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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayer.cpp

Issue 2736513002: [RLS] Document's main GraphicsLayer size should not include overflow. (Closed)
Patch Set: drop unrelated dependent patchset Created 3 years, 9 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 | « no previous file | third_party/WebKit/Source/core/paint/PaintLayerTest.cpp » ('j') | 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) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * 4 *
5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
6 * 6 *
7 * Other contributors: 7 * Other contributors:
8 * Robert O'Callahan <roc+@cs.cmu.edu> 8 * Robert O'Callahan <roc+@cs.cmu.edu>
9 * David Baron <dbaron@fas.harvard.edu> 9 * David Baron <dbaron@fas.harvard.edu>
10 * Christian Biesinger <cbiesinger@web.de> 10 * Christian Biesinger <cbiesinger@web.de>
(...skipping 2485 matching lines...) Expand 10 before | Expand all | Expand 10 after
2496 CalculateBoundsOptions options) const { 2496 CalculateBoundsOptions options) const {
2497 if (!isSelfPaintingLayer()) 2497 if (!isSelfPaintingLayer())
2498 return LayoutRect(); 2498 return LayoutRect();
2499 2499
2500 // FIXME: This could be improved to do a check like 2500 // FIXME: This could be improved to do a check like
2501 // hasVisibleNonCompositingDescendantLayers() (bug 92580). 2501 // hasVisibleNonCompositingDescendantLayers() (bug 92580).
2502 if (this != &compositedLayer && !hasVisibleContent() && 2502 if (this != &compositedLayer && !hasVisibleContent() &&
2503 !hasVisibleDescendant()) 2503 !hasVisibleDescendant())
2504 return LayoutRect(); 2504 return LayoutRect();
2505 2505
2506 // The root layer is the size of the document, plus any additional area due
2507 // to layout viewport being different than initial containing block.
2508 if (isRootLayer()) { 2506 if (isRootLayer()) {
2509 IntRect documentRect = layoutObject().view()->documentRect(); 2507 // In root layer scrolling mode, the main GraphicsLayer is the size of the
2510 2508 // layout viewport. In non-RLS mode, it is the union of the layout viewport
2511 if (FrameView* frameView = layoutObject().document().view()) { 2509 // and the document's layout overflow rect.
2512 documentRect.unite(IntRect(IntPoint(), frameView->visibleContentSize())); 2510 IntRect result = IntRect();
2513 } 2511 if (FrameView* frameView = layoutObject().frameView())
2514 2512 result = IntRect(IntPoint(), frameView->visibleContentSize());
2515 return LayoutRect(documentRect); 2513 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled())
2514 result.unite(layoutObject().view()->documentRect());
2515 return LayoutRect(result);
2516 } 2516 }
2517 2517
2518 // The layer created for the LayoutFlowThread is just a helper for painting 2518 // The layer created for the LayoutFlowThread is just a helper for painting
2519 // and hit-testing, and should not contribute to the bounding box. The 2519 // and hit-testing, and should not contribute to the bounding box. The
2520 // LayoutMultiColumnSets will contribute the correct size for the layout 2520 // LayoutMultiColumnSets will contribute the correct size for the layout
2521 // content of the multicol container. 2521 // content of the multicol container.
2522 if (layoutObject().isLayoutFlowThread()) 2522 if (layoutObject().isLayoutFlowThread())
2523 return LayoutRect(); 2523 return LayoutRect();
2524 2524
2525 const_cast<PaintLayer*>(this)->stackingNode()->updateLayerListsIfNeeded(); 2525 const_cast<PaintLayer*>(this)->stackingNode()->updateLayerListsIfNeeded();
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
3227 } 3227 }
3228 3228
3229 void showLayerTree(const blink::LayoutObject* layoutObject) { 3229 void showLayerTree(const blink::LayoutObject* layoutObject) {
3230 if (!layoutObject) { 3230 if (!layoutObject) {
3231 LOG(INFO) << "Cannot showLayerTree. Root is (nil)"; 3231 LOG(INFO) << "Cannot showLayerTree. Root is (nil)";
3232 return; 3232 return;
3233 } 3233 }
3234 showLayerTree(layoutObject->enclosingLayer()); 3234 showLayerTree(layoutObject->enclosingLayer());
3235 } 3235 }
3236 #endif 3236 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/PaintLayerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698