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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
212 LayoutRect rect() const { return LayoutRect(location(), LayoutSize(size())); } | 212 LayoutRect rect() const { return LayoutRect(location(), LayoutSize(size())); } |
213 | 213 |
214 bool isRootLayer() const { return m_isRootLayer; } | 214 bool isRootLayer() const { return m_isRootLayer; } |
215 | 215 |
216 PaintLayerCompositor* compositor() const; | 216 PaintLayerCompositor* compositor() const; |
217 | 217 |
218 // Notification from the layoutObject that its content changed (e.g. current frame of image changed). | 218 // Notification from the layoutObject that its content changed (e.g. current frame of image changed). |
219 // Allows updates of layer content without invalidating paint. | 219 // Allows updates of layer content without invalidating paint. |
220 void contentChanged(ContentChangeType); | 220 void contentChanged(ContentChangeType); |
221 | 221 |
222 // Returns true if the position changed. | |
223 bool updateLayerPosition(); | |
chrishtr
2015/12/11 02:06:12
It appears no one cares about the return value of
flackr
2016/01/19 15:40:48
Done.
| |
224 | |
222 void updateLayerPositionsAfterLayout(); | 225 void updateLayerPositionsAfterLayout(); |
223 void updateLayerPositionsAfterOverflowScroll(const DoubleSize& scrollDelta); | 226 void updateLayerPositionsAfterOverflowScroll(const DoubleSize& scrollDelta); |
224 | 227 |
225 PaintLayer* enclosingPaginationLayer() const { return m_enclosingPaginationL ayer; } | 228 PaintLayer* enclosingPaginationLayer() const { return m_enclosingPaginationL ayer; } |
226 | 229 |
227 void updateTransformationMatrix(); | 230 void updateTransformationMatrix(); |
228 PaintLayer* renderingContextRoot(); | 231 PaintLayer* renderingContextRoot(); |
229 | 232 |
230 const LayoutSize& offsetForInFlowPosition() const { return m_offsetForInFlow Position; } | 233 const LayoutSize& offsetForInFlowPosition() const { return m_offsetForInFlow Position; } |
231 | 234 |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
533 // While we're updating the compositing inputs, these values may differ. | 536 // While we're updating the compositing inputs, these values may differ. |
534 // We should never be asking for this value when that is the case. | 537 // We should never be asking for this value when that is the case. |
535 ASSERT(m_needsDescendantDependentCompositingInputsUpdate == m_needsAnces torDependentCompositingInputsUpdate); | 538 ASSERT(m_needsDescendantDependentCompositingInputsUpdate == m_needsAnces torDependentCompositingInputsUpdate); |
536 return m_needsDescendantDependentCompositingInputsUpdate; | 539 return m_needsDescendantDependentCompositingInputsUpdate; |
537 } | 540 } |
538 | 541 |
539 void updateAncestorDependentCompositingInputs(const AncestorDependentComposi tingInputs&); | 542 void updateAncestorDependentCompositingInputs(const AncestorDependentComposi tingInputs&); |
540 void updateDescendantDependentCompositingInputs(const DescendantDependentCom positingInputs&); | 543 void updateDescendantDependentCompositingInputs(const DescendantDependentCom positingInputs&); |
541 void didUpdateCompositingInputs(); | 544 void didUpdateCompositingInputs(); |
542 | 545 |
543 const AncestorDependentCompositingInputs& ancestorDependentCompositingInputs () const { ASSERT(!m_needsAncestorDependentCompositingInputsUpdate); return m_an cestorDependentCompositingInputs; } | 546 const AncestorDependentCompositingInputs& ancestorDependentCompositingInputs () const |
547 { | |
548 // TODO(flackr): When we process scroll updates after compositing update s we won't be querying ancestor | |
549 // dependent compositing inputs while they're still needed: http://crbug .com/420741. | |
550 ASSERT(isAllowedToQueryCompositingState() || !m_needsAncestorDependentCo mpositingInputsUpdate); | |
551 return m_ancestorDependentCompositingInputs; | |
552 } | |
544 const DescendantDependentCompositingInputs& descendantDependentCompositingIn puts() const { ASSERT(!m_needsDescendantDependentCompositingInputsUpdate); retur n m_descendantDependentCompositingInputs; } | 553 const DescendantDependentCompositingInputs& descendantDependentCompositingIn puts() const { ASSERT(!m_needsDescendantDependentCompositingInputsUpdate); retur n m_descendantDependentCompositingInputs; } |
545 | 554 |
546 IntRect clippedAbsoluteBoundingBox() const { return ancestorDependentComposi tingInputs().clippedAbsoluteBoundingBox; } | 555 IntRect clippedAbsoluteBoundingBox() const { return ancestorDependentComposi tingInputs().clippedAbsoluteBoundingBox; } |
547 const PaintLayer* opacityAncestor() const { return ancestorDependentComposit ingInputs().opacityAncestor; } | 556 const PaintLayer* opacityAncestor() const { return ancestorDependentComposit ingInputs().opacityAncestor; } |
548 const PaintLayer* transformAncestor() const { return ancestorDependentCompos itingInputs().transformAncestor; } | 557 const PaintLayer* transformAncestor() const { return ancestorDependentCompos itingInputs().transformAncestor; } |
549 const PaintLayer* filterAncestor() const { return ancestorDependentCompositi ngInputs().filterAncestor; } | 558 const PaintLayer* filterAncestor() const { return ancestorDependentCompositi ngInputs().filterAncestor; } |
550 const LayoutObject* clippingContainer() const { return ancestorDependentComp ositingInputs().clippingContainer; } | 559 const LayoutObject* clippingContainer() const { return ancestorDependentComp ositingInputs().clippingContainer; } |
551 const PaintLayer* ancestorScrollingLayer() const { return ancestorDependentC ompositingInputs().ancestorScrollingLayer; } | 560 const PaintLayer* ancestorScrollingLayer() const { return ancestorDependentC ompositingInputs().ancestorScrollingLayer; } |
552 const PaintLayer* nearestFixedPositionLayer() const { return ancestorDepende ntCompositingInputs().nearestFixedPositionLayer; } | 561 const PaintLayer* nearestFixedPositionLayer() const { return ancestorDepende ntCompositingInputs().nearestFixedPositionLayer; } |
553 PaintLayer* scrollParent() const { return const_cast<PaintLayer*>(ancestorDe pendentCompositingInputs().scrollParent); } | 562 PaintLayer* scrollParent() const { return const_cast<PaintLayer*>(ancestorDe pendentCompositingInputs().scrollParent); } |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
621 PaintTiming* paintTiming(); | 630 PaintTiming* paintTiming(); |
622 | 631 |
623 private: | 632 private: |
624 // Bounding box in the coordinates of this layer. | 633 // Bounding box in the coordinates of this layer. |
625 LayoutRect logicalBoundingBox() const; | 634 LayoutRect logicalBoundingBox() const; |
626 | 635 |
627 bool hasOverflowControls() const; | 636 bool hasOverflowControls() const; |
628 | 637 |
629 void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus(); | 638 void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus(); |
630 | 639 |
631 // Returns true if the position changed. | |
632 bool updateLayerPosition(); | |
633 | |
634 void updateLayerPositionRecursive(); | 640 void updateLayerPositionRecursive(); |
635 void updateLayerPositionsAfterScrollRecursive(const DoubleSize& scrollDelta, bool paintInvalidationContainerWasScrolled); | 641 void updateLayerPositionsAfterScrollRecursive(const DoubleSize& scrollDelta, bool paintInvalidationContainerWasScrolled); |
636 | 642 |
637 void setNextSibling(PaintLayer* next) { m_next = next; } | 643 void setNextSibling(PaintLayer* next) { m_next = next; } |
638 void setPreviousSibling(PaintLayer* prev) { m_previous = prev; } | 644 void setPreviousSibling(PaintLayer* prev) { m_previous = prev; } |
639 void setFirstChild(PaintLayer* first) { m_first = first; } | 645 void setFirstChild(PaintLayer* first) { m_first = first; } |
640 void setLastChild(PaintLayer* last) { m_last = last; } | 646 void setLastChild(PaintLayer* last) { m_last = last; } |
641 | 647 |
642 void updateHasSelfPaintingLayerDescendant() const; | 648 void updateHasSelfPaintingLayerDescendant() const; |
643 PaintLayer* hitTestLayer(PaintLayer* rootLayer, PaintLayer* containerLayer, HitTestResult&, | 649 PaintLayer* hitTestLayer(PaintLayer* rootLayer, PaintLayer* containerLayer, HitTestResult&, |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
813 | 819 |
814 } // namespace blink | 820 } // namespace blink |
815 | 821 |
816 #ifndef NDEBUG | 822 #ifndef NDEBUG |
817 // Outside the WebCore namespace for ease of invocation from gdb. | 823 // Outside the WebCore namespace for ease of invocation from gdb. |
818 void showLayerTree(const blink::PaintLayer*); | 824 void showLayerTree(const blink::PaintLayer*); |
819 void showLayerTree(const blink::LayoutObject*); | 825 void showLayerTree(const blink::LayoutObject*); |
820 #endif | 826 #endif |
821 | 827 |
822 #endif // Layer_h | 828 #endif // Layer_h |
OLD | NEW |