Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Intel Corporation. All rights reserved. | 3 * Copyright (C) 2013 Intel Corporation. All rights 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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 348 // Convert a bounding box from flow thread coordinates, relative to |this|, to visual coordinates, relative to |ancestorLayer|. | 348 // Convert a bounding box from flow thread coordinates, relative to |this|, to visual coordinates, relative to |ancestorLayer|. |
| 349 // See http://www.chromium.org/developers/design-documents/multi-column-layo ut for more info on these coordinate types. | 349 // See http://www.chromium.org/developers/design-documents/multi-column-layo ut for more info on these coordinate types. |
| 350 // This method requires this layer to be paginated; i.e. it must have an enc losingPaginationLayer(). | 350 // This method requires this layer to be paginated; i.e. it must have an enc losingPaginationLayer(). |
| 351 void convertFromFlowThreadToVisualBoundingBoxInAncestor(const PaintLayer* an cestorLayer, LayoutRect&) const; | 351 void convertFromFlowThreadToVisualBoundingBoxInAncestor(const PaintLayer* an cestorLayer, LayoutRect&) const; |
| 352 | 352 |
| 353 // The hitTest() method looks for mouse events by walking layers that inters ect the point from front to back. | 353 // The hitTest() method looks for mouse events by walking layers that inters ect the point from front to back. |
| 354 bool hitTest(HitTestResult&); | 354 bool hitTest(HitTestResult&); |
| 355 | 355 |
| 356 bool intersectsDamageRect(const LayoutRect& layerBounds, const LayoutRect& d amageRect, const LayoutPoint& offsetFromRoot) const; | 356 bool intersectsDamageRect(const LayoutRect& layerBounds, const LayoutRect& d amageRect, const LayoutPoint& offsetFromRoot) const; |
| 357 | 357 |
| 358 // MaybeIncludeTransformForAncestorLayer means that a transform on |ancestor Layer| may be applied to the bounding box, | |
| 359 // in particular if paintsWithTransform() is true. | |
| 360 enum CalculateBoundsOptions { | |
| 361 MaybeIncludeTransformForAncestorLayer, | |
| 362 NeverIncludeTransformForAncestorLayer, | |
| 363 AlwaysIncludeTransforms, | |
|
chrishtr
2016/08/10 21:36:16
IncludeTransformsAndcompositedchildLayesr
Stephen White
2016/08/11 14:31:45
Done.
| |
| 364 }; | |
| 365 | |
| 358 // Bounding box relative to some ancestor layer. Pass offsetFromRoot if know n. | 366 // Bounding box relative to some ancestor layer. Pass offsetFromRoot if know n. |
| 359 LayoutRect physicalBoundingBox(const LayoutPoint& offsetFromRoot) const; | 367 LayoutRect physicalBoundingBox(const LayoutPoint& offsetFromRoot) const; |
| 360 LayoutRect physicalBoundingBox(const PaintLayer* ancestorLayer) const; | 368 LayoutRect physicalBoundingBox(const PaintLayer* ancestorLayer) const; |
| 361 LayoutRect physicalBoundingBoxIncludingReflectionAndStackingChildren(const L ayoutPoint& offsetFromRoot) const; | 369 LayoutRect physicalBoundingBoxIncludingReflectionAndStackingChildren(const L ayoutPoint& offsetFromRoot, CalculateBoundsOptions = MaybeIncludeTransformForAnc estorLayer) const; |
| 362 LayoutRect fragmentsBoundingBox(const PaintLayer* ancestorLayer) const; | 370 LayoutRect fragmentsBoundingBox(const PaintLayer* ancestorLayer) const; |
| 363 | 371 |
| 364 LayoutRect boundingBoxForCompositingOverlapTest() const; | 372 LayoutRect boundingBoxForCompositingOverlapTest() const; |
| 365 | 373 |
| 366 // If true, this layer's children are included in its bounds for overlap tes ting. | 374 // If true, this layer's children are included in its bounds for overlap tes ting. |
| 367 // We can't rely on the children's positions if this layer has a filter that could have moved the children's pixels around. | 375 // We can't rely on the children's positions if this layer has a filter that could have moved the children's pixels around. |
| 368 bool overlapBoundsIncludeChildren() const; | 376 bool overlapBoundsIncludeChildren() const; |
| 369 | |
| 370 // MaybeIncludeTransformForAncestorLayer means that a transform on |ancestor Layer| may be applied to the bounding box, | |
| 371 // in particular if paintsWithTransform() is true. | |
| 372 enum CalculateBoundsOptions { | |
| 373 MaybeIncludeTransformForAncestorLayer, | |
| 374 NeverIncludeTransformForAncestorLayer, | |
| 375 }; | |
| 376 LayoutRect boundingBoxForCompositing(const PaintLayer* ancestorLayer = 0, Ca lculateBoundsOptions = MaybeIncludeTransformForAncestorLayer) const; | 377 LayoutRect boundingBoxForCompositing(const PaintLayer* ancestorLayer = 0, Ca lculateBoundsOptions = MaybeIncludeTransformForAncestorLayer) const; |
| 377 | 378 |
| 378 LayoutUnit staticInlinePosition() const { return m_staticInlinePosition; } | 379 LayoutUnit staticInlinePosition() const { return m_staticInlinePosition; } |
| 379 LayoutUnit staticBlockPosition() const { return m_staticBlockPosition; } | 380 LayoutUnit staticBlockPosition() const { return m_staticBlockPosition; } |
| 380 | 381 |
| 381 void setStaticInlinePosition(LayoutUnit position) { m_staticInlinePosition = position; } | 382 void setStaticInlinePosition(LayoutUnit position) { m_staticInlinePosition = position; } |
| 382 void setStaticBlockPosition(LayoutUnit position) { m_staticBlockPosition = p osition; } | 383 void setStaticBlockPosition(LayoutUnit position) { m_staticBlockPosition = p osition; } |
| 383 | 384 |
| 384 LayoutSize subpixelAccumulation() const; | 385 LayoutSize subpixelAccumulation() const; |
| 385 void setSubpixelAccumulation(const LayoutSize&); | 386 void setSubpixelAccumulation(const LayoutSize&); |
| (...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 892 | 893 |
| 893 } // namespace blink | 894 } // namespace blink |
| 894 | 895 |
| 895 #ifndef NDEBUG | 896 #ifndef NDEBUG |
| 896 // Outside the WebCore namespace for ease of invocation from gdb. | 897 // Outside the WebCore namespace for ease of invocation from gdb. |
| 897 void showLayerTree(const blink::PaintLayer*); | 898 void showLayerTree(const blink::PaintLayer*); |
| 898 void showLayerTree(const blink::LayoutObject*); | 899 void showLayerTree(const blink::LayoutObject*); |
| 899 #endif | 900 #endif |
| 900 | 901 |
| 901 #endif // Layer_h | 902 #endif // Layer_h |
| OLD | NEW |