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

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

Issue 2854213004: Update layer size from LayoutBox::UpdateAfterLayout (Closed)
Patch Set: Fix placement of inline comment Created 3 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 unified diff | Download patch
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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 } 272 }
273 273
274 SubtreeLayoutScope layout_scope(*this); 274 SubtreeLayoutScope layout_scope(*this);
275 275
276 // Use calcWidth/Height to get the new width/height, since this will take the 276 // Use calcWidth/Height to get the new width/height, since this will take the
277 // full page zoom factor into account. 277 // full page zoom factor into account.
278 bool relayout_children = 278 bool relayout_children =
279 !ShouldUsePrintingLayout() && 279 !ShouldUsePrintingLayout() &&
280 (!frame_view_ || LogicalWidth() != ViewLogicalWidthForBoxSizing() || 280 (!frame_view_ || LogicalWidth() != ViewLogicalWidthForBoxSizing() ||
281 LogicalHeight() != ViewLogicalHeightForBoxSizing()); 281 LogicalHeight() != ViewLogicalHeightForBoxSizing());
282
282 if (relayout_children) { 283 if (relayout_children) {
283 layout_scope.SetChildNeedsLayout(this); 284 layout_scope.SetChildNeedsLayout(this);
284 for (LayoutObject* child = FirstChild(); child; 285 for (LayoutObject* child = FirstChild(); child;
285 child = child->NextSibling()) { 286 child = child->NextSibling()) {
286 if (child->IsSVGRoot()) 287 if (child->IsSVGRoot())
287 continue; 288 continue;
288 289
289 if ((child->IsBox() && ToLayoutBox(child)->HasRelativeLogicalHeight()) || 290 if ((child->IsBox() && ToLayoutBox(child)->HasRelativeLogicalHeight()) ||
290 child->Style()->LogicalHeight().IsPercentOrCalc() || 291 child->Style()->LogicalHeight().IsPercentOrCalc() ||
291 child->Style()->LogicalMinHeight().IsPercentOrCalc() || 292 child->Style()->LogicalMinHeight().IsPercentOrCalc() ||
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
824 // Frame scroll corner is painted using LayoutView as the display item client. 825 // Frame scroll corner is painted using LayoutView as the display item client.
825 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled() && 826 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled() &&
826 (GetFrameView()->HorizontalScrollbar() || 827 (GetFrameView()->HorizontalScrollbar() ||
827 GetFrameView()->VerticalScrollbar())) 828 GetFrameView()->VerticalScrollbar()))
828 return false; 829 return false;
829 830
830 return LayoutBlockFlow::PaintedOutputOfObjectHasNoEffectRegardlessOfSize(); 831 return LayoutBlockFlow::PaintedOutputOfObjectHasNoEffectRegardlessOfSize();
831 } 832 }
832 833
833 } // namespace blink 834 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp ('k') | third_party/WebKit/Source/core/paint/PaintLayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698