Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(993)

Unified Diff: Source/core/rendering/RenderBox.cpp

Issue 273043002: Don't use pageLogicalHeight() to resolve percentage values in subframes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@mixed-case-selector
Patch Set: Set a fixed body height to work around rounding issue on mac; also add a title to the test to descr… Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/RenderBox.h ('k') | Source/core/rendering/RenderView.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBox.cpp
diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp
index c1e5be5dd91567fc3f2fe9a50c3f3e0474d08727..b1c53809393cecb69b6f49c9c4515e7e8851e008 100644
--- a/Source/core/rendering/RenderBox.cpp
+++ b/Source/core/rendering/RenderBox.cpp
@@ -2582,7 +2582,7 @@ void RenderBox::computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logica
&& (isDocumentElement() || (isBody() && document().documentElement()->renderer()->style()->logicalHeight().isPercent())) && !isInline();
if (stretchesToViewport() || paginatedContentNeedsBaseHeight) {
LayoutUnit margins = collapsedMarginBefore() + collapsedMarginAfter();
- LayoutUnit visibleHeight = viewLogicalHeightForPercentages();
+ LayoutUnit visibleHeight = view()->viewLogicalHeightForPercentages();
if (isDocumentElement())
computedValues.m_extent = max(computedValues.m_extent, visibleHeight - margins);
else {
@@ -2592,13 +2592,6 @@ void RenderBox::computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logica
}
}
-LayoutUnit RenderBox::viewLogicalHeightForPercentages() const
-{
- if (document().printing())
- return static_cast<LayoutUnit>(view()->pageLogicalHeight());
- return view()->viewLogicalHeight();
-}
-
LayoutUnit RenderBox::computeLogicalHeightUsing(const Length& height, LayoutUnit intrinsicContentHeight) const
{
LayoutUnit logicalHeight = computeContentAndScrollbarLogicalHeightUsing(height, intrinsicContentHeight);
@@ -2734,7 +2727,7 @@ LayoutUnit RenderBox::computePercentageLogicalHeight(const Length& height) const
cb->computeLogicalHeight(cb->logicalHeight(), 0, computedValues);
availableHeight = computedValues.m_extent - cb->borderAndPaddingLogicalHeight() - cb->scrollbarLogicalHeight();
} else if (cb->isRenderView())
- availableHeight = viewLogicalHeightForPercentages();
+ availableHeight = view()->viewLogicalHeightForPercentages();
if (availableHeight == -1)
return availableHeight;
« no previous file with comments | « Source/core/rendering/RenderBox.h ('k') | Source/core/rendering/RenderView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698