[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
hyatt at apple.com
hyatt at apple.com
Wed Dec 22 13:54:56 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 6a93c3cf88d976a895ff48e92b4058e3e548bee2
Author: hyatt at apple.com <hyatt at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Sep 29 17:00:36 2010 +0000
https://bugs.webkit.org/show_bug.cgi?id=46786, convert layoutBlockChild (but not any functions it calls)
to be block-flow-aware.
Reviewed by Sam Weinig.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutBlock):
(WebCore::RenderBlock::handleAfterSideOfBlock):
(WebCore::RenderBlock::layoutBlockChildren):
* rendering/RenderBlock.h:
* rendering/RenderBox.h:
(WebCore::RenderBox::scrollbarLogicalHeight):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68654 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index e81112f..fcac2bc 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2010-09-29 David Hyatt <hyatt at apple.com>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=46786, convert layoutBlockChild (but not any functions it calls)
+ to be block-flow-aware.
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::layoutBlock):
+ (WebCore::RenderBlock::handleAfterSideOfBlock):
+ (WebCore::RenderBlock::layoutBlockChildren):
+ * rendering/RenderBlock.h:
+ * rendering/RenderBox.h:
+ (WebCore::RenderBox::scrollbarLogicalHeight):
+
2010-09-29 João Paulo Rechi Vita <jprvita at profusion.mobi>
Reviewed by Antonio Gomes.
diff --git a/WebCore/rendering/RenderBlock.cpp b/WebCore/rendering/RenderBlock.cpp
index d20285b..d44c8ea 100644
--- a/WebCore/rendering/RenderBlock.cpp
+++ b/WebCore/rendering/RenderBlock.cpp
@@ -1207,7 +1207,7 @@ void RenderBlock::layoutBlock(bool relayoutChildren, int pageHeight)
layoutBlockChildren(relayoutChildren, maxFloatBottom);
// Expand our intrinsic height to encompass floats.
- int toAdd = borderAfter() + paddingAfter() + horizontalScrollbarHeight(); // FIXME: https://bugs.webkit.org/show_bug.cgi?id=46645, overflow and block-flow.
+ int toAdd = borderAfter() + paddingAfter() + scrollbarLogicalHeight();
if (floatBottom() > (logicalHeight() - toAdd) && expandsToEncloseOverhangingFloats())
setLogicalHeight(floatBottom() + toAdd);
@@ -1713,7 +1713,7 @@ void RenderBlock::setCollapsedBottomMargin(const MarginInfo& marginInfo)
}
}
-void RenderBlock::handleBottomOfBlock(int top, int bottom, MarginInfo& marginInfo)
+void RenderBlock::handleAfterSideOfBlock(int top, int bottom, MarginInfo& marginInfo)
{
marginInfo.setAtAfterSideOfBlock(true);
@@ -1753,16 +1753,18 @@ void RenderBlock::layoutBlockChildren(bool relayoutChildren, int& maxFloatBottom
}
}
- int top = borderTop() + paddingTop();
- int bottom = borderBottom() + paddingBottom() + horizontalScrollbarHeight();
+ int beforeEdge = borderBefore() + paddingBefore();
+ int afterEdge = borderAfter() + paddingAfter() + scrollbarLogicalHeight();
- setLogicalHeight(top);
+ setLogicalHeight(beforeEdge);
// The margin struct caches all our current margin collapsing state. The compact struct caches state when we encounter compacts,
- MarginInfo marginInfo(this, top, bottom);
+ MarginInfo marginInfo(this, beforeEdge, afterEdge);
// Fieldsets need to find their legend and position it inside the border of the object.
// The legend then gets skipped during normal layout.
+ // FIXME: Make fieldsets work with block-flow.
+ // https://bugs.webkit.org/show_bug.cgi?id=46785
RenderObject* legend = layoutLegend(relayoutChildren);
int previousFloatBottom = 0;
@@ -1780,11 +1782,11 @@ void RenderBlock::layoutBlockChildren(bool relayoutChildren, int& maxFloatBottom
// Make sure we layout children if they need it.
// FIXME: Technically percentage height objects only need a relayout if their percentage isn't going to be turned into
// an auto value. Add a method to determine this, so that we can avoid the relayout.
- if (relayoutChildren || ((child->style()->height().isPercent() || child->style()->minHeight().isPercent() || child->style()->maxHeight().isPercent()) && !isRenderView()))
+ if (relayoutChildren || ((child->style()->logicalHeight().isPercent() || child->style()->logicalMinHeight().isPercent() || child->style()->logicalMaxHeight().isPercent()) && !isRenderView()))
child->setChildNeedsLayout(true, false);
- // If relayoutChildren is set and we have percentage padding, we also need to invalidate the child's pref widths.
- if (relayoutChildren && (child->style()->paddingLeft().isPercent() || child->style()->paddingRight().isPercent()))
+ // If relayoutChildren is set and the child has percentage padding, we also need to invalidate the child's pref widths.
+ if (relayoutChildren && (child->style()->paddingStart().isPercent() || child->style()->paddingEnd().isPercent()))
child->setPreferredLogicalWidthsDirty(true, false);
// Handle the four types of special elements first. These include positioned content, floating content, compacts and
@@ -1798,7 +1800,7 @@ void RenderBlock::layoutBlockChildren(bool relayoutChildren, int& maxFloatBottom
// Now do the handling of the bottom of the block, adding in our bottom border/padding and
// determining the correct collapsed bottom margin information.
- handleBottomOfBlock(top, bottom, marginInfo);
+ handleAfterSideOfBlock(beforeEdge, afterEdge, marginInfo);
}
void RenderBlock::layoutBlockChild(RenderBox* child, MarginInfo& marginInfo, int& previousFloatBottom, int& maxFloatBottom)
diff --git a/WebCore/rendering/RenderBlock.h b/WebCore/rendering/RenderBlock.h
index 0682039..cecd84c 100644
--- a/WebCore/rendering/RenderBlock.h
+++ b/WebCore/rendering/RenderBlock.h
@@ -568,7 +568,7 @@ private:
int clearFloatsIfNeeded(RenderBox* child, MarginInfo&, int oldTopPosMargin, int oldTopNegMargin, int yPos);
int estimateVerticalPosition(RenderBox* child, const MarginInfo&);
void determineHorizontalPosition(RenderBox* child);
- void handleBottomOfBlock(int top, int bottom, MarginInfo&);
+ void handleAfterSideOfBlock(int top, int bottom, MarginInfo&);
void setCollapsedBottomMargin(const MarginInfo&);
// End helper functions and structs used by layoutBlockChildren.
diff --git a/WebCore/rendering/RenderBox.h b/WebCore/rendering/RenderBox.h
index df8a8de..c63259d 100644
--- a/WebCore/rendering/RenderBox.h
+++ b/WebCore/rendering/RenderBox.h
@@ -316,6 +316,7 @@ public:
virtual int verticalScrollbarWidth() const;
int horizontalScrollbarHeight() const;
+ int scrollbarLogicalHeight() const { return style()->isVerticalBlockFlow() ? horizontalScrollbarHeight() : verticalScrollbarWidth(); }
virtual bool scroll(ScrollDirection, ScrollGranularity, float multiplier = 1, Node** stopNode = 0);
bool canBeScrolledAndHasScrollableArea() const;
virtual bool canBeProgramaticallyScrolled(bool) const;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list