OLD | NEW |
---|---|
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
45 #include "core/paint/PaintLayer.h" | 45 #include "core/paint/PaintLayer.h" |
46 | 46 |
47 #include "core/CSSPropertyNames.h" | 47 #include "core/CSSPropertyNames.h" |
48 #include "core/HTMLNames.h" | 48 #include "core/HTMLNames.h" |
49 #include "core/css/PseudoStyleRequest.h" | 49 #include "core/css/PseudoStyleRequest.h" |
50 #include "core/dom/Document.h" | 50 #include "core/dom/Document.h" |
51 #include "core/dom/shadow/ShadowRoot.h" | 51 #include "core/dom/shadow/ShadowRoot.h" |
52 #include "core/frame/DeprecatedScheduleStyleRecalcDuringLayout.h" | 52 #include "core/frame/DeprecatedScheduleStyleRecalcDuringLayout.h" |
53 #include "core/frame/FrameView.h" | 53 #include "core/frame/FrameView.h" |
54 #include "core/frame/LocalFrame.h" | 54 #include "core/frame/LocalFrame.h" |
55 #include "core/frame/Settings.h" | |
55 #include "core/html/HTMLFrameElement.h" | 56 #include "core/html/HTMLFrameElement.h" |
56 #include "core/layout/HitTestRequest.h" | 57 #include "core/layout/HitTestRequest.h" |
57 #include "core/layout/HitTestResult.h" | 58 #include "core/layout/HitTestResult.h" |
58 #include "core/layout/HitTestingTransformState.h" | 59 #include "core/layout/HitTestingTransformState.h" |
59 #include "core/layout/LayoutFlowThread.h" | 60 #include "core/layout/LayoutFlowThread.h" |
60 #include "core/layout/LayoutGeometryMap.h" | 61 #include "core/layout/LayoutGeometryMap.h" |
61 #include "core/layout/LayoutInline.h" | 62 #include "core/layout/LayoutInline.h" |
62 #include "core/layout/LayoutPart.h" | 63 #include "core/layout/LayoutPart.h" |
63 #include "core/layout/LayoutReplica.h" | 64 #include "core/layout/LayoutReplica.h" |
64 #include "core/layout/LayoutScrollbar.h" | 65 #include "core/layout/LayoutScrollbar.h" |
(...skipping 2113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2178 if (!isSelfPaintingLayer()) | 2179 if (!isSelfPaintingLayer()) |
2179 return LayoutRect(); | 2180 return LayoutRect(); |
2180 | 2181 |
2181 if (!ancestorLayer) | 2182 if (!ancestorLayer) |
2182 ancestorLayer = this; | 2183 ancestorLayer = this; |
2183 | 2184 |
2184 // FIXME: This could be improved to do a check like hasVisibleNonCompositing DescendantLayers() (bug 92580). | 2185 // FIXME: This could be improved to do a check like hasVisibleNonCompositing DescendantLayers() (bug 92580). |
2185 if (this != ancestorLayer && !hasVisibleContent() && !hasVisibleDescendant() ) | 2186 if (this != ancestorLayer && !hasVisibleContent() && !hasVisibleDescendant() ) |
2186 return LayoutRect(); | 2187 return LayoutRect(); |
2187 | 2188 |
2188 // The root layer is always just the size of the document. | 2189 // Without composited scrolling, the root layer is the size of the document. |
2189 if (isRootLayer()) | 2190 if (isRootLayer() && !needsCompositedScrolling()) |
Ian Vollick
2015/12/22 03:21:50
If the root layer does need composited scrolling,
skobes
2015/12/28 23:33:17
It does return the viewRect, indirectly, since the
Ian Vollick
2015/12/29 00:54:29
Thanks, lgtm.
| |
2190 return LayoutRect(m_layoutObject->view()->documentRect()); | 2191 return LayoutRect(m_layoutObject->view()->documentRect()); |
2191 | 2192 |
2192 // The layer created for the LayoutFlowThread is just a helper for painting and hit-testing, | 2193 // The layer created for the LayoutFlowThread is just a helper for painting and hit-testing, |
2193 // and should not contribute to the bounding box. The LayoutMultiColumnSets will contribute | 2194 // and should not contribute to the bounding box. The LayoutMultiColumnSets will contribute |
2194 // the correct size for the layout content of the multicol container. | 2195 // the correct size for the layout content of the multicol container. |
2195 if (layoutObject()->isLayoutFlowThread()) | 2196 if (layoutObject()->isLayoutFlowThread()) |
2196 return LayoutRect(); | 2197 return LayoutRect(); |
2197 | 2198 |
2198 // If there is a clip applied by an ancestor to this PaintLayer but below or equal to |ancestorLayer|, | 2199 // If there is a clip applied by an ancestor to this PaintLayer but below or equal to |ancestorLayer|, |
2199 // use that clip as the bounds rather than the recursive bounding boxes, sin ce the latter may be larger than the | 2200 // 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 Loading... | |
2802 | 2803 |
2803 void showLayerTree(const blink::LayoutObject* layoutObject) | 2804 void showLayerTree(const blink::LayoutObject* layoutObject) |
2804 { | 2805 { |
2805 if (!layoutObject) { | 2806 if (!layoutObject) { |
2806 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); | 2807 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); |
2807 return; | 2808 return; |
2808 } | 2809 } |
2809 showLayerTree(layoutObject->enclosingLayer()); | 2810 showLayerTree(layoutObject->enclosingLayer()); |
2810 } | 2811 } |
2811 #endif | 2812 #endif |
OLD | NEW |