Title: [97801] trunk/Source/WebCore
- Revision
- 97801
- Author
- [email protected]
- Date
- 2011-10-18 15:58:38 -0700 (Tue, 18 Oct 2011)
Log Message
cleanup some FIXMEs in RenderFlexibleBox
https://bugs.webkit.org/show_bug.cgi?id=70374
Reviewed by Darin Adler.
No new tests. Existing tests cover all changes.
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::layoutBlock):
(WebCore::RenderFlexibleBox::flowAwareBorderAndPaddingLogicalHeight):
(WebCore::RenderFlexibleBox::flowAwareMarginLogicalHeightForChild):
* rendering/RenderFlexibleBox.h:
Removed the FIXME to implement computePreferredLogicalWidths. It doesn't
seem to be necessary, at least not with the current test cases.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (97800 => 97801)
--- trunk/Source/WebCore/ChangeLog 2011-10-18 22:57:03 UTC (rev 97800)
+++ trunk/Source/WebCore/ChangeLog 2011-10-18 22:58:38 UTC (rev 97801)
@@ -1,3 +1,20 @@
+2011-10-18 Ojan Vafai <[email protected]>
+
+ cleanup some FIXMEs in RenderFlexibleBox
+ https://bugs.webkit.org/show_bug.cgi?id=70374
+
+ Reviewed by Darin Adler.
+
+ No new tests. Existing tests cover all changes.
+
+ * rendering/RenderFlexibleBox.cpp:
+ (WebCore::RenderFlexibleBox::layoutBlock):
+ (WebCore::RenderFlexibleBox::flowAwareBorderAndPaddingLogicalHeight):
+ (WebCore::RenderFlexibleBox::flowAwareMarginLogicalHeightForChild):
+ * rendering/RenderFlexibleBox.h:
+ Removed the FIXME to implement computePreferredLogicalWidths. It doesn't
+ seem to be necessary, at least not with the current test cases.
+
2011-10-18 Joseph Pecoraro <[email protected]>
Web Inspector: Some localizedStrings.js Updates
Modified: trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp (97800 => 97801)
--- trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp 2011-10-18 22:57:03 UTC (rev 97800)
+++ trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp 2011-10-18 22:58:38 UTC (rev 97801)
@@ -168,6 +168,8 @@
IntSize previousSize = size();
+ // FIXME: In theory we should only have to call one of these.
+ // computeLogicalWidth for flex-flow:row and computeLogicalHeight for flex-flow:column.
computeLogicalWidth();
computeLogicalHeight();
@@ -175,10 +177,10 @@
layoutInlineDirection(relayoutChildren);
- // FIXME: We should only need to call one of these for a given flex-flow + writing-mode combination.
- // Is that true above as well?
- computeLogicalWidth();
- computeLogicalHeight();
+ if (isColumnFlow())
+ computeLogicalWidth();
+ else
+ computeLogicalHeight();
if (size() != previousSize)
relayoutChildren = true;
@@ -319,8 +321,7 @@
LayoutUnit RenderFlexibleBox::flowAwareBorderAndPaddingLogicalHeight() const
{
- // FIXME: Only do the flow check once.
- return flowAwareBorderBefore() + flowAwarePaddingBefore() + flowAwarePaddingAfter() + flowAwareBorderAfter();
+ return isHorizontalFlow() ? borderAndPaddingHeight() : borderAndPaddingWidth();
}
LayoutUnit RenderFlexibleBox::flowAwarePaddingStart() const
@@ -410,8 +411,7 @@
LayoutUnit RenderFlexibleBox::flowAwareMarginLogicalHeightForChild(RenderBox* child) const
{
- // FIXME: Only do the flow check once.
- return flowAwareMarginBeforeForChild(child) + flowAwareMarginAfterForChild(child);
+ return isHorizontalFlow() ? child->marginTop() + child->marginBottom() : child->marginLeft() + child->marginRight();
}
LayoutPoint RenderFlexibleBox::flowAwareLogicalLocationForChild(RenderBox* child) const
Modified: trunk/Source/WebCore/rendering/RenderFlexibleBox.h (97800 => 97801)
--- trunk/Source/WebCore/rendering/RenderFlexibleBox.h 2011-10-18 22:57:03 UTC (rev 97800)
+++ trunk/Source/WebCore/rendering/RenderFlexibleBox.h 2011-10-18 22:58:38 UTC (rev 97801)
@@ -53,7 +53,6 @@
class FlexOrderIterator;
typedef WTF::HashMap<const RenderBox*, LayoutUnit> InflexibleFlexItemSize;
- // FIXME: Implement computePreferredLogicalWidths since it needs to be flow-aware.
bool hasOrthogonalFlow(RenderBox* child) const;
bool isColumnFlow() const;
bool isHorizontalFlow() const;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes