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

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

Issue 1472083006: Root layer scrolling: set correct size for document's main GraphicsLayer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@garden
Patch Set: reuse boundingBoxForCompositing in ViewPainter Created 4 years, 11 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) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@web.de> 9 * Christian Biesinger <cbiesinger@web.de>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 #include "core/paint/PaintLayer.h" 44 #include "core/paint/PaintLayer.h"
45 45
46 #include "core/CSSPropertyNames.h" 46 #include "core/CSSPropertyNames.h"
47 #include "core/HTMLNames.h" 47 #include "core/HTMLNames.h"
48 #include "core/css/PseudoStyleRequest.h" 48 #include "core/css/PseudoStyleRequest.h"
49 #include "core/dom/Document.h" 49 #include "core/dom/Document.h"
50 #include "core/dom/shadow/ShadowRoot.h" 50 #include "core/dom/shadow/ShadowRoot.h"
51 #include "core/frame/DeprecatedScheduleStyleRecalcDuringLayout.h" 51 #include "core/frame/DeprecatedScheduleStyleRecalcDuringLayout.h"
52 #include "core/frame/FrameView.h" 52 #include "core/frame/FrameView.h"
53 #include "core/frame/LocalFrame.h" 53 #include "core/frame/LocalFrame.h"
54 #include "core/frame/Settings.h"
54 #include "core/html/HTMLFrameElement.h" 55 #include "core/html/HTMLFrameElement.h"
55 #include "core/layout/HitTestRequest.h" 56 #include "core/layout/HitTestRequest.h"
56 #include "core/layout/HitTestResult.h" 57 #include "core/layout/HitTestResult.h"
57 #include "core/layout/HitTestingTransformState.h" 58 #include "core/layout/HitTestingTransformState.h"
58 #include "core/layout/LayoutFlowThread.h" 59 #include "core/layout/LayoutFlowThread.h"
59 #include "core/layout/LayoutGeometryMap.h" 60 #include "core/layout/LayoutGeometryMap.h"
60 #include "core/layout/LayoutInline.h" 61 #include "core/layout/LayoutInline.h"
61 #include "core/layout/LayoutPart.h" 62 #include "core/layout/LayoutPart.h"
62 #include "core/layout/LayoutReplica.h" 63 #include "core/layout/LayoutReplica.h"
63 #include "core/layout/LayoutScrollbar.h" 64 #include "core/layout/LayoutScrollbar.h"
(...skipping 2141 matching lines...) Expand 10 before | Expand all | Expand 10 after
2205 if (!isSelfPaintingLayer()) 2206 if (!isSelfPaintingLayer())
2206 return LayoutRect(); 2207 return LayoutRect();
2207 2208
2208 if (!ancestorLayer) 2209 if (!ancestorLayer)
2209 ancestorLayer = this; 2210 ancestorLayer = this;
2210 2211
2211 // FIXME: This could be improved to do a check like hasVisibleNonCompositing DescendantLayers() (bug 92580). 2212 // FIXME: This could be improved to do a check like hasVisibleNonCompositing DescendantLayers() (bug 92580).
2212 if (this != ancestorLayer && !hasVisibleContent() && !hasVisibleDescendant() ) 2213 if (this != ancestorLayer && !hasVisibleContent() && !hasVisibleDescendant() )
2213 return LayoutRect(); 2214 return LayoutRect();
2214 2215
2215 // The root layer is always just the size of the document. 2216 // Without composited scrolling, the root layer is the size of the document.
2216 if (isRootLayer()) 2217 if (isRootLayer() && !needsCompositedScrolling())
2217 return LayoutRect(m_layoutObject->view()->documentRect()); 2218 return LayoutRect(m_layoutObject->view()->documentRect());
2218 2219
2219 // The layer created for the LayoutFlowThread is just a helper for painting and hit-testing, 2220 // The layer created for the LayoutFlowThread is just a helper for painting and hit-testing,
2220 // and should not contribute to the bounding box. The LayoutMultiColumnSets will contribute 2221 // and should not contribute to the bounding box. The LayoutMultiColumnSets will contribute
2221 // the correct size for the layout content of the multicol container. 2222 // the correct size for the layout content of the multicol container.
2222 if (layoutObject()->isLayoutFlowThread()) 2223 if (layoutObject()->isLayoutFlowThread())
2223 return LayoutRect(); 2224 return LayoutRect();
2224 2225
2225 // If there is a clip applied by an ancestor to this PaintLayer but below or equal to |ancestorLayer|, 2226 // If there is a clip applied by an ancestor to this PaintLayer but below or equal to |ancestorLayer|,
2226 // use that clip as the bounds rather than the recursive bounding boxes, sin ce the latter may be larger than the 2227 // use that clip as the bounds rather than the recursive bounding boxes, sin ce the latter may be larger than the
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
2829 2830
2830 void showLayerTree(const blink::LayoutObject* layoutObject) 2831 void showLayerTree(const blink::LayoutObject* layoutObject)
2831 { 2832 {
2832 if (!layoutObject) { 2833 if (!layoutObject) {
2833 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); 2834 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n");
2834 return; 2835 return;
2835 } 2836 }
2836 showLayerTree(layoutObject->enclosingLayer()); 2837 showLayerTree(layoutObject->enclosingLayer());
2837 } 2838 }
2838 #endif 2839 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | third_party/WebKit/Source/core/paint/ViewPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698