Title: [128371] trunk/Source/WebCore
Revision
128371
Author
o...@chromium.org
Date
2012-09-12 15:29:42 -0700 (Wed, 12 Sep 2012)

Log Message

RenderBox::computeLogicalClientHeight is incorrectly named
https://bugs.webkit.org/show_bug.cgi?id=94288

Reviewed by Tony Chang.

Just renamed a couple methods to make it more clear what they return.
No behavior changes.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeLogicalHeightUsing):
(WebCore::RenderBox::computeContentLogicalHeight):
(WebCore::RenderBox::computeContentAndScrollbarLogicalHeightUsing):
(WebCore::RenderBox::availableLogicalHeightUsing):
* rendering/RenderBox.h:
(RenderBox):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::mainAxisContentExtent):
(WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
(WebCore::RenderFlexibleBox::computeAvailableFreeSpace):
(WebCore::RenderFlexibleBox::lineBreakLength):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (128370 => 128371)


--- trunk/Source/WebCore/ChangeLog	2012-09-12 22:22:07 UTC (rev 128370)
+++ trunk/Source/WebCore/ChangeLog	2012-09-12 22:29:42 UTC (rev 128371)
@@ -1,3 +1,26 @@
+2012-09-12  Ojan Vafai  <o...@chromium.org>
+
+        RenderBox::computeLogicalClientHeight is incorrectly named
+        https://bugs.webkit.org/show_bug.cgi?id=94288
+
+        Reviewed by Tony Chang.
+
+        Just renamed a couple methods to make it more clear what they return.
+        No behavior changes.
+
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::computeLogicalHeightUsing):
+        (WebCore::RenderBox::computeContentLogicalHeight):
+        (WebCore::RenderBox::computeContentAndScrollbarLogicalHeightUsing):
+        (WebCore::RenderBox::availableLogicalHeightUsing):
+        * rendering/RenderBox.h:
+        (RenderBox):
+        * rendering/RenderFlexibleBox.cpp:
+        (WebCore::RenderFlexibleBox::mainAxisContentExtent):
+        (WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
+        (WebCore::RenderFlexibleBox::computeAvailableFreeSpace):
+        (WebCore::RenderFlexibleBox::lineBreakLength):
+
 2012-09-12  Joshua Bell  <jsb...@chromium.org>
 
         IndexedDB: The |source| property of IDBFactory.open() request should be null

Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (128370 => 128371)


--- trunk/Source/WebCore/rendering/RenderBox.cpp	2012-09-12 22:22:07 UTC (rev 128370)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp	2012-09-12 22:29:42 UTC (rev 128371)
@@ -2089,21 +2089,21 @@
 
 LayoutUnit RenderBox::computeLogicalHeightUsing(SizeType heightType, const Length& height) const
 {
-    LayoutUnit logicalHeight = computeContentLogicalHeightUsing(heightType, height);
+    LayoutUnit logicalHeight = computeContentAndScrollbarLogicalHeightUsing(heightType, height);
     if (logicalHeight != -1)
         logicalHeight = adjustBorderBoxLogicalHeightForBoxSizing(logicalHeight);
     return logicalHeight;
 }
 
-LayoutUnit RenderBox::computeLogicalClientHeight(SizeType heightType, const Length& height)
+LayoutUnit RenderBox::computeContentLogicalHeight(SizeType heightType, const Length& height)
 {
-    LayoutUnit heightIncludingScrollbar = computeContentLogicalHeightUsing(heightType, height);
+    LayoutUnit heightIncludingScrollbar = computeContentAndScrollbarLogicalHeightUsing(heightType, height);
     if (heightIncludingScrollbar == -1)
         return -1;
     return std::max<LayoutUnit>(0, adjustContentBoxLogicalHeightForBoxSizing(heightIncludingScrollbar) - scrollbarLogicalHeight());
 }
 
-LayoutUnit RenderBox::computeContentLogicalHeightUsing(SizeType heightType, const Length& height) const
+LayoutUnit RenderBox::computeContentAndScrollbarLogicalHeightUsing(SizeType heightType, const Length& height) const
 {
     if (height.isAuto())
         return heightType == MinSize ? 0 : -1;
@@ -2340,7 +2340,7 @@
         return adjustContentBoxLogicalHeightForBoxSizing(valueForLength(h, availableHeight));
     }
 
-    LayoutUnit heightIncludingScrollbar = computeContentLogicalHeightUsing(MainOrPreferredSize, h);
+    LayoutUnit heightIncludingScrollbar = computeContentAndScrollbarLogicalHeightUsing(MainOrPreferredSize, h);
     if (heightIncludingScrollbar != -1)
         return std::max<LayoutUnit>(0, adjustContentBoxLogicalHeightForBoxSizing(heightIncludingScrollbar) - scrollbarLogicalHeight());
 

Modified: trunk/Source/WebCore/rendering/RenderBox.h (128370 => 128371)


--- trunk/Source/WebCore/rendering/RenderBox.h	2012-09-12 22:22:07 UTC (rev 128370)
+++ trunk/Source/WebCore/rendering/RenderBox.h	2012-09-12 22:29:42 UTC (rev 128371)
@@ -389,8 +389,8 @@
 
     LayoutUnit computeLogicalWidthInRegionUsing(SizeType, LayoutUnit availableLogicalWidth, const RenderBlock* containingBlock, RenderRegion*, LayoutUnit offsetFromLogicalTopOfFirstPage) const;
     LayoutUnit computeLogicalHeightUsing(SizeType, const Length& height) const;
-    LayoutUnit computeLogicalClientHeight(SizeType, const Length& height);
-    LayoutUnit computeContentLogicalHeightUsing(SizeType, const Length& height) const;
+    LayoutUnit computeContentLogicalHeight(SizeType, const Length& height);
+    LayoutUnit computeContentAndScrollbarLogicalHeightUsing(SizeType, const Length& height) const;
     LayoutUnit computeReplacedLogicalWidthUsing(SizeType, Length width) const;
     LayoutUnit computeReplacedLogicalWidthRespectingMinMaxWidth(LayoutUnit logicalWidth, bool includeMaxWidth = true) const;
     LayoutUnit computeReplacedLogicalHeightUsing(SizeType, Length height) const;

Modified: trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp (128370 => 128371)


--- trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp	2012-09-12 22:22:07 UTC (rev 128370)
+++ trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp	2012-09-12 22:29:42 UTC (rev 128371)
@@ -396,7 +396,7 @@
 LayoutUnit RenderFlexibleBox::mainAxisContentExtent()
 {
     if (isColumnFlow())
-        return std::max(LayoutUnit(0), computeLogicalClientHeight(MainOrPreferredSize, style()->logicalHeight()));
+        return std::max(LayoutUnit(0), computeContentLogicalHeight(MainOrPreferredSize, style()->logicalHeight()));
     return contentLogicalWidth();
 }
 
@@ -405,7 +405,7 @@
     // FIXME: This is wrong for orthogonal flows. It should use the flexbox's writing-mode, not the child's in order
     // to figure out the logical height/width.
     if (isColumnFlow())
-        return child->computeLogicalClientHeight(sizeType, size);
+        return child->computeContentLogicalHeight(sizeType, size);
     return child->adjustContentBoxLogicalWidthForBoxSizing(valueForLength(size, maximumValue, view()));
 }
 
@@ -616,11 +616,11 @@
     else if (hasOverrideHeight())
         contentExtent = overrideLogicalContentHeight();
     else {
-        LayoutUnit heightResult = computeLogicalClientHeight(MainOrPreferredSize, style()->logicalHeight());
+        LayoutUnit heightResult = computeContentLogicalHeight(MainOrPreferredSize, style()->logicalHeight());
         if (heightResult == -1)
             heightResult = preferredMainAxisExtent;
-        LayoutUnit minHeight = computeLogicalClientHeight(MinSize, style()->logicalMinHeight()); // Leave as -1 if unset.
-        LayoutUnit maxHeight = style()->logicalMaxHeight().isUndefined() ? heightResult : computeLogicalClientHeight(MaxSize, style()->logicalMaxHeight());
+        LayoutUnit minHeight = computeContentLogicalHeight(MinSize, style()->logicalMinHeight()); // Leave as -1 if unset.
+        LayoutUnit maxHeight = style()->logicalMaxHeight().isUndefined() ? heightResult : computeContentLogicalHeight(MaxSize, style()->logicalMaxHeight());
         if (maxHeight == -1)
             maxHeight = heightResult;
         heightResult = std::min(maxHeight, heightResult);
@@ -801,10 +801,10 @@
     if (!isColumnFlow())
         return mainAxisContentExtent();
 
-    LayoutUnit height = computeLogicalClientHeight(MainOrPreferredSize, style()->logicalHeight());
+    LayoutUnit height = computeContentLogicalHeight(MainOrPreferredSize, style()->logicalHeight());
     if (height == -1)
         height = MAX_LAYOUT_UNIT;
-    LayoutUnit maxHeight = computeLogicalClientHeight(MaxSize, style()->logicalMaxHeight());
+    LayoutUnit maxHeight = computeContentLogicalHeight(MaxSize, style()->logicalMaxHeight());
     if (maxHeight != -1)
         height = std::min(height, maxHeight);
     return height;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to