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

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

Issue 1411313004: Bypass containing block size special-code for fixed-positioneds when printing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: third_party/WebKit/Source/core/layout/LayoutBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index 15fa2e07ca658736df4a6257d6befc6bdf59c775..9cd08824b0e41dcb89336555f65d221f4e932db2 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -2836,7 +2836,7 @@ LayoutUnit LayoutBox::containingBlockLogicalWidthForPositioned(const LayoutBoxMo
return containingBlockLogicalHeightForPositioned(containingBlock, false);
// Use viewport as container for top-level fixed-position elements.
- if (style()->position() == FixedPosition && containingBlock->isLayoutView()) {
+ if (style()->position() == FixedPosition && containingBlock->isLayoutView() && !document().printing()) {
const LayoutView* view = toLayoutView(containingBlock);
if (FrameView* frameView = view->frameView()) {
// Don't use visibleContentRect since the PaintLayer's size has not been set yet.
@@ -2880,7 +2880,7 @@ LayoutUnit LayoutBox::containingBlockLogicalHeightForPositioned(const LayoutBoxM
return containingBlockLogicalWidthForPositioned(containingBlock, false);
// Use viewport as container for top-level fixed-position elements.
- if (style()->position() == FixedPosition && containingBlock->isLayoutView()) {
+ if (style()->position() == FixedPosition && containingBlock->isLayoutView() && !document().printing()) {
const LayoutView* view = toLayoutView(containingBlock);
if (FrameView* frameView = view->frameView()) {
// Don't use visibleContentRect since the PaintLayer's size has not been set yet.

Powered by Google App Engine
This is Rietveld 408576698