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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutView.cpp

Issue 2908503003: Always relayout children of LayoutView when printing. (Closed)
Patch Set: Created 3 years, 6 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutView.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after
814 LayoutBlock* block = ContainingBlock(); 814 LayoutBlock* block = ContainingBlock();
815 if (block) 815 if (block)
816 block->AdjustChildDebugRect(rect); 816 block->AdjustChildDebugRect(rect);
817 817
818 rect.SetWidth(LayoutUnit(ViewWidth(kIncludeScrollbars))); 818 rect.SetWidth(LayoutUnit(ViewWidth(kIncludeScrollbars)));
819 rect.SetHeight(LayoutUnit(ViewHeight(kIncludeScrollbars))); 819 rect.SetHeight(LayoutUnit(ViewHeight(kIncludeScrollbars)));
820 820
821 return rect; 821 return rect;
822 } 822 }
823 823
824 bool LayoutView::UpdateLogicalWidthAndColumnWidth() {
825 bool relayout_children = LayoutBlockFlow::UpdateLogicalWidthAndColumnWidth();
826 // When we're printing, the size of LayoutView is changed outside of layout,
827 // so we'll fail to detect any changes here. Just return true.
828 return relayout_children || ShouldUsePrintingLayout();
829 }
830
824 bool LayoutView::PaintedOutputOfObjectHasNoEffectRegardlessOfSize() const { 831 bool LayoutView::PaintedOutputOfObjectHasNoEffectRegardlessOfSize() const {
825 // Frame scroll corner is painted using LayoutView as the display item client. 832 // Frame scroll corner is painted using LayoutView as the display item client.
826 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled() && 833 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled() &&
827 (GetFrameView()->HorizontalScrollbar() || 834 (GetFrameView()->HorizontalScrollbar() ||
828 GetFrameView()->VerticalScrollbar())) 835 GetFrameView()->VerticalScrollbar()))
829 return false; 836 return false;
830 837
831 return LayoutBlockFlow::PaintedOutputOfObjectHasNoEffectRegardlessOfSize(); 838 return LayoutBlockFlow::PaintedOutputOfObjectHasNoEffectRegardlessOfSize();
832 } 839 }
833 840
834 } // namespace blink 841 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutView.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698