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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 // The hitTest() method looks for mouse events by walking layers that inters
ect the point from front to back. | 223 // The hitTest() method looks for mouse events by walking layers that inters
ect the point from front to back. |
224 bool hitTest(const HitTestRequest&, HitTestResult&); | 224 bool hitTest(const HitTestRequest&, HitTestResult&); |
225 bool hitTest(const HitTestRequest&, const HitTestLocation&, HitTestResult&); | 225 bool hitTest(const HitTestRequest&, const HitTestLocation&, HitTestResult&); |
226 | 226 |
227 // Pass offsetFromRoot if known. | 227 // Pass offsetFromRoot if known. |
228 bool intersectsDamageRect(const LayoutRect& layerBounds, const LayoutRect& d
amageRect, const RenderLayer* rootLayer, const LayoutPoint* offsetFromRoot = 0)
const; | 228 bool intersectsDamageRect(const LayoutRect& layerBounds, const LayoutRect& d
amageRect, const RenderLayer* rootLayer, const LayoutPoint* offsetFromRoot = 0)
const; |
229 | 229 |
230 // Bounding box relative to some ancestor layer. Pass offsetFromRoot if know
n. | 230 // Bounding box relative to some ancestor layer. Pass offsetFromRoot if know
n. |
231 LayoutRect physicalBoundingBox(const RenderLayer* ancestorLayer, const Layou
tPoint* offsetFromRoot = 0) const; | 231 LayoutRect physicalBoundingBox(const RenderLayer* ancestorLayer, const Layou
tPoint* offsetFromRoot = 0) const; |
232 LayoutRect physicalBoundingBoxIncludingReflectionAndStackingChildren(const R
enderLayer* ancestorLayer, const LayoutPoint& offsetFromRoot) const; | 232 LayoutRect physicalBoundingBoxIncludingReflectionAndStackingChildren(const R
enderLayer* ancestorLayer, const LayoutPoint& offsetFromRoot) const; |
| 233 LayoutRect fragmentsBoundingBox(const RenderLayer* ancestorLayer) const; |
233 | 234 |
234 // FIXME: This function is inconsistent as to whether the returned rect has
been flipped for writing mode. | 235 // FIXME: This function is inconsistent as to whether the returned rect has
been flipped for writing mode. |
235 LayoutRect boundingBoxForCompositingOverlapTest() const { return overlapBoun
dsIncludeChildren() ? boundingBoxForCompositing() : logicalBoundingBox(); } | 236 LayoutRect boundingBoxForCompositingOverlapTest() const { return overlapBoun
dsIncludeChildren() ? boundingBoxForCompositing() : logicalBoundingBox(); } |
236 | 237 |
237 // If true, this layer's children are included in its bounds for overlap tes
ting. | 238 // If true, this layer's children are included in its bounds for overlap tes
ting. |
238 // We can't rely on the children's positions if this layer has a filter that
could have moved the children's pixels around. | 239 // We can't rely on the children's positions if this layer has a filter that
could have moved the children's pixels around. |
239 bool overlapBoundsIncludeChildren() const { return hasFilter() && renderer()
->style()->filter().hasFilterThatMovesPixels(); } | 240 bool overlapBoundsIncludeChildren() const { return hasFilter() && renderer()
->style()->filter().hasFilterThatMovesPixels(); } |
240 | 241 |
241 enum CalculateBoundsOptions { | 242 enum CalculateBoundsOptions { |
242 ApplyBoundsChickenEggHacks, | 243 ApplyBoundsChickenEggHacks, |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
536 DescendantsOfTransparencyClipBox, | 537 DescendantsOfTransparencyClipBox, |
537 RootOfTransparencyClipBox | 538 RootOfTransparencyClipBox |
538 }; | 539 }; |
539 | 540 |
540 static LayoutRect transparencyClipBox(const RenderLayer*, const RenderLayer*
rootLayer, TransparencyClipBoxBehavior transparencyBehavior, | 541 static LayoutRect transparencyClipBox(const RenderLayer*, const RenderLayer*
rootLayer, TransparencyClipBoxBehavior transparencyBehavior, |
541 TransparencyClipBoxMode transparencyMode, const LayoutSize& subPixelAccu
mulation, PaintBehavior = 0); | 542 TransparencyClipBoxMode transparencyMode, const LayoutSize& subPixelAccu
mulation, PaintBehavior = 0); |
542 | 543 |
543 private: | 544 private: |
544 // Bounding box in the coordinates of this layer. | 545 // Bounding box in the coordinates of this layer. |
545 LayoutRect logicalBoundingBox() const; | 546 LayoutRect logicalBoundingBox() const; |
| 547 LayoutRect flippedLogicalBoundingBox() const; |
546 | 548 |
547 bool hasOverflowControls() const; | 549 bool hasOverflowControls() const; |
548 | 550 |
549 void setAncestorChainHasSelfPaintingLayerDescendant(); | 551 void setAncestorChainHasSelfPaintingLayerDescendant(); |
550 void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus(); | 552 void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus(); |
551 | 553 |
552 void updateLayerPositionRecursive(); | 554 void updateLayerPositionRecursive(); |
553 | 555 |
554 void setNextSibling(RenderLayer* next) { m_next = next; } | 556 void setNextSibling(RenderLayer* next) { m_next = next; } |
555 void setPreviousSibling(RenderLayer* prev) { m_previous = prev; } | 557 void setPreviousSibling(RenderLayer* prev) { m_previous = prev; } |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
714 | 716 |
715 } // namespace blink | 717 } // namespace blink |
716 | 718 |
717 #ifndef NDEBUG | 719 #ifndef NDEBUG |
718 // Outside the WebCore namespace for ease of invocation from gdb. | 720 // Outside the WebCore namespace for ease of invocation from gdb. |
719 void showLayerTree(const blink::RenderLayer*); | 721 void showLayerTree(const blink::RenderLayer*); |
720 void showLayerTree(const blink::RenderObject*); | 722 void showLayerTree(const blink::RenderObject*); |
721 #endif | 723 #endif |
722 | 724 |
723 #endif // RenderLayer_h | 725 #endif // RenderLayer_h |
OLD | NEW |