Title: [108755] trunk/Source/WebCore
- Revision
- 108755
- Author
- [email protected]
- Date
- 2012-02-24 01:53:12 -0800 (Fri, 24 Feb 2012)
Log Message
Small refactor in RenderFlexibleBox::layoutAndPlaceChildren
https://bugs.webkit.org/show_bug.cgi?id=79420
Reviewed by Ojan Vafai.
No new tests, just a refactor.
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Share some of the logic
in computing the cross axis length.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (108754 => 108755)
--- trunk/Source/WebCore/ChangeLog 2012-02-24 09:50:06 UTC (rev 108754)
+++ trunk/Source/WebCore/ChangeLog 2012-02-24 09:53:12 UTC (rev 108755)
@@ -1,3 +1,16 @@
+2012-02-24 Tony Chang <[email protected]>
+
+ Small refactor in RenderFlexibleBox::layoutAndPlaceChildren
+ https://bugs.webkit.org/show_bug.cgi?id=79420
+
+ Reviewed by Ojan Vafai.
+
+ No new tests, just a refactor.
+
+ * rendering/RenderFlexibleBox.cpp:
+ (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Share some of the logic
+ in computing the cross axis length.
+
2012-02-24 Yury Semikhatsky <[email protected]>
Web Inspector: cannot drag timeline overview window when clicking inside the window
Modified: trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp (108754 => 108755)
--- trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp 2012-02-24 09:50:06 UTC (rev 108754)
+++ trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp 2012-02-24 09:53:12 UTC (rev 108755)
@@ -734,6 +734,7 @@
child->setChildNeedsLayout(true);
child->layoutIfNeeded();
+ LayoutUnit childCrossAxisExtent;
if (flexAlignForChild(child) == AlignBaseline) {
LayoutUnit ascent = marginBoxAscent(child);
LayoutUnit descent = (crossAxisMarginExtentForChild(child) + crossAxisExtentForChild(child)) - ascent;
@@ -741,10 +742,11 @@
maxAscent = std::max(maxAscent, ascent);
maxDescent = std::max(maxDescent, descent);
- if (crossAxisLength().isAuto())
- setCrossAxisExtent(std::max(crossAxisExtent(), crossAxisBorderAndPaddingExtent() + crossAxisMarginExtentForChild(child) + maxAscent + maxDescent + crossAxisScrollbarExtent()));
- } else if (crossAxisLength().isAuto())
- setCrossAxisExtent(std::max(crossAxisExtent(), crossAxisBorderAndPaddingExtent() + crossAxisMarginExtentForChild(child) + crossAxisExtentForChild(child) + crossAxisScrollbarExtent()));
+ childCrossAxisExtent = maxAscent + maxDescent;
+ } else
+ childCrossAxisExtent = crossAxisExtentForChild(child);
+ if (crossAxisLength().isAuto())
+ setCrossAxisExtent(std::max(crossAxisExtent(), crossAxisBorderAndPaddingExtent() + crossAxisMarginExtentForChild(child) + childCrossAxisExtent + crossAxisScrollbarExtent()));
mainAxisOffset += flowAwareMarginStartForChild(child);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes