Commit 71dd4b2a authored by akling@apple.com's avatar akling@apple.com
Browse files

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):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154689 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 300a8929
2013-08-27 Andreas Kling <akling@apple.com>
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 <akling@apple.com>
 
Simplify some more Settings access where we have a Frame in reach.
......@@ -2891,9 +2891,6 @@ LayoutUnit RenderBox::availableLogicalHeight(AvailableLogicalHeightType heightTy
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.
......
......@@ -124,12 +124,12 @@ void RenderView::updateLogicalWidth()
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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment