| 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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 bool hasBoxDecorationsOrBackground() const; | 252 bool hasBoxDecorationsOrBackground() const; |
| 253 bool hasVisibleBoxDecorations() const; | 253 bool hasVisibleBoxDecorations() const; |
| 254 // True if this layer container layoutObjects that paint. | 254 // True if this layer container layoutObjects that paint. |
| 255 bool hasNonEmptyChildLayoutObjects() const; | 255 bool hasNonEmptyChildLayoutObjects() const; |
| 256 | 256 |
| 257 // Will ensure that hasNonCompositiedChild are up to date. | 257 // Will ensure that hasNonCompositiedChild are up to date. |
| 258 void updateScrollingStateAfterCompositingChange(); | 258 void updateScrollingStateAfterCompositingChange(); |
| 259 bool hasVisibleNonLayerContent() const { return m_hasVisibleNonLayerContent;
} | 259 bool hasVisibleNonLayerContent() const { return m_hasVisibleNonLayerContent;
} |
| 260 bool hasNonCompositedChild() const { ASSERT(isAllowedToQueryCompositingState
()); return m_hasNonCompositedChild; } | 260 bool hasNonCompositedChild() const { ASSERT(isAllowedToQueryCompositingState
()); return m_hasNonCompositedChild; } |
| 261 | 261 |
| 262 // Gets the ancestor layer that serves as the containing block of this layer
. It is assumed | 262 // Gets the ancestor layer that serves as the containing block of this layer
. This is either |
| 263 // that this layer is established by an out-of-flow positioned layout object
(i.e. either | 263 // another out of flow positioned layer, or one that contains paint. |
| 264 // absolutely or fixed positioned). | |
| 265 // If |ancestor| is specified, |*skippedAncestor| will be set to true if |an
cestor| is found in | 264 // If |ancestor| is specified, |*skippedAncestor| will be set to true if |an
cestor| is found in |
| 266 // the ancestry chain between this layer and the containing block layer; if
not found, it will | 265 // the ancestry chain between this layer and the containing block layer; if
not found, it will |
| 267 // be set to false. Either both |ancestor| and |skippedAncestor| should be n
ullptr, or none of | 266 // be set to false. Either both |ancestor| and |skippedAncestor| should be n
ullptr, or none of |
| 268 // them should. | 267 // them should. |
| 269 PaintLayer* enclosingPositionedAncestor(const PaintLayer* ancestor = nullptr
, bool* skippedAncestor = nullptr) const; | 268 PaintLayer* containingLayerForOutOfFlowPositioned(const PaintLayer* ancestor
= nullptr, bool* skippedAncestor = nullptr) const; |
| 270 | 269 |
| 271 bool isPaintInvalidationContainer() const; | 270 bool isPaintInvalidationContainer() const; |
| 272 | 271 |
| 273 // Do *not* call this method unless you know what you are dooing. You probab
ly want to call enclosingCompositingLayerForPaintInvalidation() instead. | 272 // Do *not* call this method unless you know what you are dooing. You probab
ly want to call enclosingCompositingLayerForPaintInvalidation() instead. |
| 274 // If includeSelf is true, may return this. | 273 // If includeSelf is true, may return this. |
| 275 PaintLayer* enclosingLayerWithCompositedLayerMapping(IncludeSelfOrNot) const
; | 274 PaintLayer* enclosingLayerWithCompositedLayerMapping(IncludeSelfOrNot) const
; |
| 276 | 275 |
| 277 // Returns the enclosing layer root into which this layer paints, inclusive
of this one. Note that the enclosing layer may or may not have its own | 276 // Returns the enclosing layer root into which this layer paints, inclusive
of this one. Note that the enclosing layer may or may not have its own |
| 278 // GraphicsLayer backing, but is nevertheless the root for a call to the Lay
er::paint*() methods. | 277 // GraphicsLayer backing, but is nevertheless the root for a call to the Lay
er::paint*() methods. |
| 279 PaintLayer* enclosingLayerForPaintInvalidation() const; | 278 PaintLayer* enclosingLayerForPaintInvalidation() const; |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 void addLayerHitTestRects(LayerHitTestRects&) const; | 449 void addLayerHitTestRects(LayerHitTestRects&) const; |
| 451 | 450 |
| 452 // Compute rects only for this layer | 451 // Compute rects only for this layer |
| 453 void computeSelfHitTestRects(LayerHitTestRects&) const; | 452 void computeSelfHitTestRects(LayerHitTestRects&) const; |
| 454 | 453 |
| 455 // FIXME: This should probably return a ScrollableArea but a lot of internal
methods are mistakenly exposed. | 454 // FIXME: This should probably return a ScrollableArea but a lot of internal
methods are mistakenly exposed. |
| 456 PaintLayerScrollableArea* scrollableArea() const { return m_scrollableArea.g
et(); } | 455 PaintLayerScrollableArea* scrollableArea() const { return m_scrollableArea.g
et(); } |
| 457 PaintLayerClipper& clipper() { return m_clipper; } | 456 PaintLayerClipper& clipper() { return m_clipper; } |
| 458 const PaintLayerClipper& clipper() const { return m_clipper; } | 457 const PaintLayerClipper& clipper() const { return m_clipper; } |
| 459 | 458 |
| 460 inline bool isPositionedContainer() const | |
| 461 { | |
| 462 // FIXME: This is not in sync with containingBlock. | |
| 463 // LayoutObject::canContainFixedPositionObjects() should probably be use
d | |
| 464 // instead. | |
| 465 LayoutBoxModelObject* layerlayoutObject = layoutObject(); | |
| 466 return isRootLayer() || layerlayoutObject->isPositioned() || hasTransfor
mRelatedProperty(); | |
| 467 } | |
| 468 | |
| 469 bool scrollsOverflow() const; | 459 bool scrollsOverflow() const; |
| 470 | 460 |
| 471 CompositingReasons potentialCompositingReasonsFromStyle() const { return m_p
otentialCompositingReasonsFromStyle; } | 461 CompositingReasons potentialCompositingReasonsFromStyle() const { return m_p
otentialCompositingReasonsFromStyle; } |
| 472 void setPotentialCompositingReasonsFromStyle(CompositingReasons reasons) { A
SSERT(reasons == (reasons & CompositingReasonComboAllStyleDeterminedReasons)); m
_potentialCompositingReasonsFromStyle = reasons; } | 462 void setPotentialCompositingReasonsFromStyle(CompositingReasons reasons) { A
SSERT(reasons == (reasons & CompositingReasonComboAllStyleDeterminedReasons)); m
_potentialCompositingReasonsFromStyle = reasons; } |
| 473 | 463 |
| 474 bool hasStyleDeterminedDirectCompositingReasons() const { return m_potential
CompositingReasonsFromStyle & CompositingReasonComboAllDirectStyleDeterminedReas
ons; } | 464 bool hasStyleDeterminedDirectCompositingReasons() const { return m_potential
CompositingReasonsFromStyle & CompositingReasonComboAllDirectStyleDeterminedReas
ons; } |
| 475 | 465 |
| 476 class AncestorDependentCompositingInputs { | 466 class AncestorDependentCompositingInputs { |
| 477 DISALLOW_NEW(); | 467 DISALLOW_NEW(); |
| 478 public: | 468 public: |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 813 | 803 |
| 814 } // namespace blink | 804 } // namespace blink |
| 815 | 805 |
| 816 #ifndef NDEBUG | 806 #ifndef NDEBUG |
| 817 // Outside the WebCore namespace for ease of invocation from gdb. | 807 // Outside the WebCore namespace for ease of invocation from gdb. |
| 818 void showLayerTree(const blink::PaintLayer*); | 808 void showLayerTree(const blink::PaintLayer*); |
| 819 void showLayerTree(const blink::LayoutObject*); | 809 void showLayerTree(const blink::LayoutObject*); |
| 820 #endif | 810 #endif |
| 821 | 811 |
| 822 #endif // Layer_h | 812 #endif // Layer_h |
| OLD | NEW |