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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutView.cpp

Issue 1423643002: Print absolutely positioned objects correctly when sized against the viewport. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Need to rebaseline some tests, and it has to be done manually because of more specific entries alre… Created 5 years, 2 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 | « third_party/WebKit/LayoutTests/printing/simultaneous-position-float-change-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/LayoutView.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutView.cpp b/third_party/WebKit/Source/core/layout/LayoutView.cpp
index eea396a633fef1a2a4c58709cbe9bb466ebb6100..00c4e103da8d0aa615fb562e5182e1fef6f20080 100644
--- a/third_party/WebKit/Source/core/layout/LayoutView.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutView.cpp
@@ -135,13 +135,12 @@ void LayoutView::clearHitTestCache()
void LayoutView::computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit, LogicalExtentComputedValues& computedValues) const
{
- computedValues.m_extent = (!shouldUsePrintingLayout() && m_frameView) ? LayoutUnit(viewLogicalHeightForBoxSizing()) : logicalHeight;
+ computedValues.m_extent = viewLogicalHeightForBoxSizing();
}
void LayoutView::updateLogicalWidth()
{
- if (!shouldUsePrintingLayout() && m_frameView)
- setLogicalWidth(viewLogicalWidthForBoxSizing());
+ setLogicalWidth(viewLogicalWidthForBoxSizing());
}
bool LayoutView::isChildAllowed(LayoutObject* child, const ComputedStyle&) const
@@ -838,7 +837,10 @@ IntRect LayoutView::documentRect() const
IntSize LayoutView::layoutSize(IncludeScrollbarsInRect scrollbarInclusion) const
{
- if (!m_frameView || shouldUsePrintingLayout())
+ if (shouldUsePrintingLayout())
+ return IntSize(size().width(), pageLogicalHeight());
+
+ if (!m_frameView)
return IntSize();
IntSize result = m_frameView->layoutSize(IncludeScrollbars);
« no previous file with comments | « third_party/WebKit/LayoutTests/printing/simultaneous-position-float-change-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698