Title: [154689] trunk/Source/WebCore
Revision
154689
Author
[email protected]
Date
2013-08-27 08:29:10 -0700 (Tue, 27 Aug 2013)

Log Message

RenderView::availableLogicalHeight() should be self-contained.
<https://webkit.org/b/120356>

Reviewed by Antti Koivisto.

Instead of checking isRenderView() in RenderBox::availableLogicalHeightUsing()
and doing an early return, do everything needed without leaving RenderView instead.
Document style never has min-/max-height so there's no need to apply constraints.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::availableLogicalHeightUsing):
* rendering/RenderView.cpp:
(WebCore::RenderView::availableLogicalHeight):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (154688 => 154689)


--- trunk/Source/WebCore/ChangeLog	2013-08-27 15:26:10 UTC (rev 154688)
+++ trunk/Source/WebCore/ChangeLog	2013-08-27 15:29:10 UTC (rev 154689)
@@ -1,5 +1,21 @@
 2013-08-27  Andreas Kling  <[email protected]>
 
+        RenderView::availableLogicalHeight() should be self-contained.
+        <https://webkit.org/b/120356>
+
+        Reviewed by Antti Koivisto.
+
+        Instead of checking isRenderView() in RenderBox::availableLogicalHeightUsing()
+        and doing an early return, do everything needed without leaving RenderView instead.
+        Document style never has min-/max-height so there's no need to apply constraints.
+
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::availableLogicalHeightUsing):
+        * rendering/RenderView.cpp:
+        (WebCore::RenderView::availableLogicalHeight):
+
+2013-08-27  Andreas Kling  <[email protected]>
+
         Simplify some more Settings access where we have a Frame in reach.
         <https://webkit.org/b/120256>
 

Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (154688 => 154689)


--- trunk/Source/WebCore/rendering/RenderBox.cpp	2013-08-27 15:26:10 UTC (rev 154688)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp	2013-08-27 15:29:10 UTC (rev 154689)
@@ -2891,9 +2891,6 @@
 
 LayoutUnit RenderBox::availableLogicalHeightUsing(const Length& h, AvailableLogicalHeightType heightType) const
 {
-    if (isRenderView())
-        return isHorizontalWritingMode() ? toRenderView(this)->frameView().visibleHeight() : toRenderView(this)->frameView().visibleWidth();
-
     // We need to stop here, since we don't want to increase the height of the table
     // artificially.  We're going to rely on this cell getting expanded to some new
     // height, and then when we lay out again we'll use the calculation below.

Modified: trunk/Source/WebCore/rendering/RenderView.cpp (154688 => 154689)


--- trunk/Source/WebCore/rendering/RenderView.cpp	2013-08-27 15:26:10 UTC (rev 154688)
+++ trunk/Source/WebCore/rendering/RenderView.cpp	2013-08-27 15:29:10 UTC (rev 154689)
@@ -124,12 +124,12 @@
         setLogicalWidth(viewLogicalWidth());
 }
 
-LayoutUnit RenderView::availableLogicalHeight(AvailableLogicalHeightType heightType) const
+LayoutUnit RenderView::availableLogicalHeight(AvailableLogicalHeightType) const
 {
     // If we have columns, then the available logical height is reduced to the column height.
     if (hasColumns())
         return columnInfo()->columnHeight();
-    return RenderBlock::availableLogicalHeight(heightType);
+    return isHorizontalWritingMode() ? frameView().visibleHeight() : frameView().visibleWidth();
 }
 
 bool RenderView::isChildAllowed(RenderObject* child, RenderStyle*) const
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to