Title: [143290] trunk/Source/WebCore
- Revision
- 143290
- Author
- [email protected]
- Date
- 2013-02-18 19:42:37 -0800 (Mon, 18 Feb 2013)
Log Message
Merge handleSpecialChild into layoutBlockChildren
https://bugs.webkit.org/show_bug.cgi?id=110165
Reviewed by Darin Adler.
Merge handleSpecialChild, handlePositionedChild, and handleFloatingChild into layoutBlockChildren
to make the semantics of the code clear and to get rid of the outdated comment about how there are
four types of four types of special children.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutBlockChildren):
* rendering/RenderBlock.h:
(RenderBlock):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (143289 => 143290)
--- trunk/Source/WebCore/ChangeLog 2013-02-19 03:38:46 UTC (rev 143289)
+++ trunk/Source/WebCore/ChangeLog 2013-02-19 03:42:37 UTC (rev 143290)
@@ -1,5 +1,21 @@
2013-02-18 Ryosuke Niwa <[email protected]>
+ Merge handleSpecialChild into layoutBlockChildren
+ https://bugs.webkit.org/show_bug.cgi?id=110165
+
+ Reviewed by Darin Adler.
+
+ Merge handleSpecialChild, handlePositionedChild, and handleFloatingChild into layoutBlockChildren
+ to make the semantics of the code clear and to get rid of the outdated comment about how there are
+ four types of four types of special children.
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::layoutBlockChildren):
+ * rendering/RenderBlock.h:
+ (RenderBlock):
+
+2013-02-18 Ryosuke Niwa <[email protected]>
+
Encapsulate FloatingObject's constructor inside create
https://bugs.webkit.org/show_bug.cgi?id=110169
Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (143289 => 143290)
--- trunk/Source/WebCore/rendering/RenderBlock.cpp 2013-02-19 03:38:46 UTC (rev 143289)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp 2013-02-19 03:42:37 UTC (rev 143290)
@@ -1842,34 +1842,6 @@
setLogicalHeight(logicalHeight() - marginOffset);
}
-bool RenderBlock::handleSpecialChild(RenderBox* child, const MarginInfo& marginInfo)
-{
- // Handle in the given order
- return handlePositionedChild(child, marginInfo)
- || handleFloatingChild(child, marginInfo);
-}
-
-
-bool RenderBlock::handlePositionedChild(RenderBox* child, const MarginInfo& marginInfo)
-{
- if (child->isOutOfFlowPositioned()) {
- child->containingBlock()->insertPositionedObject(child);
- adjustPositionedBlock(child, marginInfo);
- return true;
- }
- return false;
-}
-
-bool RenderBlock::handleFloatingChild(RenderBox* child, const MarginInfo& marginInfo)
-{
- if (child->isFloating()) {
- insertFloatingObject(child);
- adjustFloatingBlock(marginInfo);
- return true;
- }
- return false;
-}
-
static void destroyRunIn(RenderBoxModelObject* runIn)
{
ASSERT(runIn->isRunIn());
@@ -2498,10 +2470,16 @@
updateBlockChildDirtyBitsBeforeLayout(relayoutChildren, child);
- // Handle the four types of special elements first. These include positioned content, floating content, compacts and
- // run-ins. When we encounter these four types of objects, we don't actually lay them out as normal flow blocks.
- if (handleSpecialChild(child, marginInfo))
+ if (child->isOutOfFlowPositioned()) {
+ child->containingBlock()->insertPositionedObject(child);
+ adjustPositionedBlock(child, marginInfo);
continue;
+ }
+ if (child->isFloating()) {
+ insertFloatingObject(child);
+ adjustFloatingBlock(marginInfo);
+ continue;
+ }
// Lay out the child.
layoutBlockChild(child, marginInfo, previousFloatLogicalBottom, maxFloatLogicalBottom);
Modified: trunk/Source/WebCore/rendering/RenderBlock.h (143289 => 143290)
--- trunk/Source/WebCore/rendering/RenderBlock.h 2013-02-19 03:38:46 UTC (rev 143289)
+++ trunk/Source/WebCore/rendering/RenderBlock.h 2013-02-19 03:42:37 UTC (rev 143290)
@@ -1020,9 +1020,6 @@
void layoutBlockChild(RenderBox* child, MarginInfo&, LayoutUnit& previousFloatLogicalBottom, LayoutUnit& maxFloatLogicalBottom);
void adjustPositionedBlock(RenderBox* child, const MarginInfo&);
void adjustFloatingBlock(const MarginInfo&);
- bool handleSpecialChild(RenderBox* child, const MarginInfo&);
- bool handleFloatingChild(RenderBox* child, const MarginInfo&);
- bool handlePositionedChild(RenderBox* child, const MarginInfo&);
RenderBoxModelObject* createReplacementRunIn(RenderBoxModelObject* runIn);
void moveRunInUnderSiblingBlockIfNeeded(RenderObject* runIn);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes