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 1115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1126 // get our true bounding box. | 1126 // get our true bounding box. |
1127 LayoutFlowThread* enclosingFlowThread = toLayoutFlowThread(paginationLay
er->layoutObject()); | 1127 LayoutFlowThread* enclosingFlowThread = toLayoutFlowThread(paginationLay
er->layoutObject()); |
1128 result = enclosingFlowThread->fragmentsBoundingBox(result); | 1128 result = enclosingFlowThread->fragmentsBoundingBox(result); |
1129 | 1129 |
1130 LayoutPoint rootLayerDelta; | 1130 LayoutPoint rootLayerDelta; |
1131 paginationLayer->convertToLayerCoords(rootLayer, rootLayerDelta); | 1131 paginationLayer->convertToLayerCoords(rootLayer, rootLayerDelta); |
1132 result.moveBy(rootLayerDelta); | 1132 result.moveBy(rootLayerDelta); |
1133 return result; | 1133 return result; |
1134 } | 1134 } |
1135 | 1135 |
1136 LayoutRect clipRect = layer->fragmentsBoundingBox(rootLayer); | 1136 LayoutRect clipRect = layer->shouldFragmentCompositedBounds(rootLayer) ? lay
er->fragmentsBoundingBox(rootLayer) : layer->physicalBoundingBox(rootLayer); |
1137 expandClipRectForDescendantsAndReflection(clipRect, layer, rootLayer, transp
arencyBehavior, subPixelAccumulation, globalPaintFlags); | 1137 expandClipRectForDescendantsAndReflection(clipRect, layer, rootLayer, transp
arencyBehavior, subPixelAccumulation, globalPaintFlags); |
1138 clipRect = layer->mapLayoutRectForFilter(clipRect); | 1138 clipRect = layer->mapLayoutRectForFilter(clipRect); |
1139 clipRect.move(subPixelAccumulation); | 1139 clipRect.move(subPixelAccumulation); |
1140 return clipRect; | 1140 return clipRect; |
1141 } | 1141 } |
1142 | 1142 |
1143 LayoutRect PaintLayer::paintingExtent(const PaintLayer* rootLayer, const LayoutS
ize& subPixelAccumulation, GlobalPaintFlags globalPaintFlags) | 1143 LayoutRect PaintLayer::paintingExtent(const PaintLayer* rootLayer, const LayoutS
ize& subPixelAccumulation, GlobalPaintFlags globalPaintFlags) |
1144 { | 1144 { |
1145 return transparencyClipBox(this, rootLayer, PaintingTransparencyClipBox, Roo
tOfTransparencyClipBox, subPixelAccumulation, globalPaintFlags); | 1145 return transparencyClipBox(this, rootLayer, PaintingTransparencyClipBox, Roo
tOfTransparencyClipBox, subPixelAccumulation, globalPaintFlags); |
1146 } | 1146 } |
(...skipping 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2157 | 2157 |
2158 LayoutRect result = flippedLogicalBoundingBox(logicalBoundingBox(), layoutOb
ject()); | 2158 LayoutRect result = flippedLogicalBoundingBox(logicalBoundingBox(), layoutOb
ject()); |
2159 convertFromFlowThreadToVisualBoundingBoxInAncestor(ancestorLayer, result); | 2159 convertFromFlowThreadToVisualBoundingBoxInAncestor(ancestorLayer, result); |
2160 return result; | 2160 return result; |
2161 } | 2161 } |
2162 | 2162 |
2163 LayoutRect PaintLayer::boundingBoxForCompositingOverlapTest() const | 2163 LayoutRect PaintLayer::boundingBoxForCompositingOverlapTest() const |
2164 { | 2164 { |
2165 // Apply NeverIncludeTransformForAncestorLayer, because the geometry map in
CompositingInputsUpdater will take care of applying the | 2165 // Apply NeverIncludeTransformForAncestorLayer, because the geometry map in
CompositingInputsUpdater will take care of applying the |
2166 // transform of |this| (== the ancestorLayer argument to boundingBoxForCompo
siting). | 2166 // transform of |this| (== the ancestorLayer argument to boundingBoxForCompo
siting). |
| 2167 // TODO(trchen): Layer fragmentation is inhibited across compositing boundar
y. Should we |
| 2168 // return the unfragmented bounds for overlap testing? Or perhaps assume fra
gmented layers |
| 2169 // always overlap? |
2167 return overlapBoundsIncludeChildren() ? boundingBoxForCompositing(this, Neve
rIncludeTransformForAncestorLayer) : fragmentsBoundingBox(this); | 2170 return overlapBoundsIncludeChildren() ? boundingBoxForCompositing(this, Neve
rIncludeTransformForAncestorLayer) : fragmentsBoundingBox(this); |
2168 } | 2171 } |
2169 | 2172 |
2170 bool PaintLayer::overlapBoundsIncludeChildren() const | 2173 bool PaintLayer::overlapBoundsIncludeChildren() const |
2171 { | 2174 { |
2172 const auto* style = layoutObject()->style(); | 2175 const auto* style = layoutObject()->style(); |
2173 if (style && style->filter().hasFilterThatMovesPixels()) | 2176 if (style && style->filter().hasFilterThatMovesPixels()) |
2174 return true; | 2177 return true; |
2175 if (RuntimeEnabledFeatures::cssBoxReflectFilterEnabled() && layoutObject()->
hasReflection()) | 2178 if (RuntimeEnabledFeatures::cssBoxReflectFilterEnabled() && layoutObject()->
hasReflection()) |
2176 return true; | 2179 return true; |
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2943 | 2946 |
2944 void showLayerTree(const blink::LayoutObject* layoutObject) | 2947 void showLayerTree(const blink::LayoutObject* layoutObject) |
2945 { | 2948 { |
2946 if (!layoutObject) { | 2949 if (!layoutObject) { |
2947 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); | 2950 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); |
2948 return; | 2951 return; |
2949 } | 2952 } |
2950 showLayerTree(layoutObject->enclosingLayer()); | 2953 showLayerTree(layoutObject->enclosingLayer()); |
2951 } | 2954 } |
2952 #endif | 2955 #endif |
OLD | NEW |