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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 LayoutRect rect() const { return LayoutRect(location(), LayoutSize(size()));
} | 215 LayoutRect rect() const { return LayoutRect(location(), LayoutSize(size()));
} |
216 | 216 |
217 bool isRootLayer() const { return m_isRootLayer; } | 217 bool isRootLayer() const { return m_isRootLayer; } |
218 | 218 |
219 PaintLayerCompositor* compositor() const; | 219 PaintLayerCompositor* compositor() const; |
220 | 220 |
221 // Notification from the layoutObject that its content changed (e.g. current
frame of image changed). | 221 // Notification from the layoutObject that its content changed (e.g. current
frame of image changed). |
222 // Allows updates of layer content without invalidating paint. | 222 // Allows updates of layer content without invalidating paint. |
223 void contentChanged(ContentChangeType); | 223 void contentChanged(ContentChangeType); |
224 | 224 |
| 225 void updateLayerPosition(); |
| 226 |
225 void updateLayerPositionsAfterLayout(); | 227 void updateLayerPositionsAfterLayout(); |
226 void updateLayerPositionsAfterOverflowScroll(const DoubleSize& scrollDelta); | 228 void updateLayerPositionsAfterOverflowScroll(const DoubleSize& scrollDelta); |
227 | 229 |
228 PaintLayer* enclosingPaginationLayer() const { return m_enclosingPaginationL
ayer; } | 230 PaintLayer* enclosingPaginationLayer() const { return m_enclosingPaginationL
ayer; } |
229 | 231 |
230 void updateTransformationMatrix(); | 232 void updateTransformationMatrix(); |
231 PaintLayer* renderingContextRoot(); | 233 PaintLayer* renderingContextRoot(); |
232 | 234 |
233 const LayoutSize& offsetForInFlowPosition() const { return m_offsetForInFlow
Position; } | 235 const LayoutSize& offsetForInFlowPosition() const { return m_offsetForInFlow
Position; } |
234 | 236 |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 // While we're updating the compositing inputs, these values may differ. | 528 // While we're updating the compositing inputs, these values may differ. |
527 // We should never be asking for this value when that is the case. | 529 // We should never be asking for this value when that is the case. |
528 ASSERT(m_needsDescendantDependentCompositingInputsUpdate == m_needsAnces
torDependentCompositingInputsUpdate); | 530 ASSERT(m_needsDescendantDependentCompositingInputsUpdate == m_needsAnces
torDependentCompositingInputsUpdate); |
529 return m_needsDescendantDependentCompositingInputsUpdate; | 531 return m_needsDescendantDependentCompositingInputsUpdate; |
530 } | 532 } |
531 | 533 |
532 void updateAncestorDependentCompositingInputs(const AncestorDependentComposi
tingInputs&); | 534 void updateAncestorDependentCompositingInputs(const AncestorDependentComposi
tingInputs&); |
533 void updateDescendantDependentCompositingInputs(const DescendantDependentCom
positingInputs&); | 535 void updateDescendantDependentCompositingInputs(const DescendantDependentCom
positingInputs&); |
534 void didUpdateCompositingInputs(); | 536 void didUpdateCompositingInputs(); |
535 | 537 |
536 const AncestorDependentCompositingInputs& ancestorDependentCompositingInputs
() const { ASSERT(!m_needsAncestorDependentCompositingInputsUpdate); return m_an
cestorDependentCompositingInputs; } | 538 const AncestorDependentCompositingInputs& ancestorDependentCompositingInputs
() const |
| 539 { |
| 540 // TODO(flackr): When we process scroll updates after compositing update
s we won't be querying ancestor |
| 541 // dependent compositing inputs while they're still needed: http://crbug
.com/420741. |
| 542 ASSERT(isAllowedToQueryCompositingState() || !m_needsAncestorDependentCo
mpositingInputsUpdate); |
| 543 return m_ancestorDependentCompositingInputs; |
| 544 } |
537 const DescendantDependentCompositingInputs& descendantDependentCompositingIn
puts() const { ASSERT(!m_needsDescendantDependentCompositingInputsUpdate); retur
n m_descendantDependentCompositingInputs; } | 545 const DescendantDependentCompositingInputs& descendantDependentCompositingIn
puts() const { ASSERT(!m_needsDescendantDependentCompositingInputsUpdate); retur
n m_descendantDependentCompositingInputs; } |
538 | 546 |
539 IntRect clippedAbsoluteBoundingBox() const { return ancestorDependentComposi
tingInputs().clippedAbsoluteBoundingBox; } | 547 IntRect clippedAbsoluteBoundingBox() const { return ancestorDependentComposi
tingInputs().clippedAbsoluteBoundingBox; } |
540 const PaintLayer* opacityAncestor() const { return ancestorDependentComposit
ingInputs().opacityAncestor; } | 548 const PaintLayer* opacityAncestor() const { return ancestorDependentComposit
ingInputs().opacityAncestor; } |
541 const PaintLayer* transformAncestor() const { return ancestorDependentCompos
itingInputs().transformAncestor; } | 549 const PaintLayer* transformAncestor() const { return ancestorDependentCompos
itingInputs().transformAncestor; } |
542 const PaintLayer* filterAncestor() const { return ancestorDependentCompositi
ngInputs().filterAncestor; } | 550 const PaintLayer* filterAncestor() const { return ancestorDependentCompositi
ngInputs().filterAncestor; } |
543 const LayoutObject* clippingContainer() const { return ancestorDependentComp
ositingInputs().clippingContainer; } | 551 const LayoutObject* clippingContainer() const { return ancestorDependentComp
ositingInputs().clippingContainer; } |
544 const PaintLayer* ancestorScrollingLayer() const { return ancestorDependentC
ompositingInputs().ancestorScrollingLayer; } | 552 const PaintLayer* ancestorScrollingLayer() const { return ancestorDependentC
ompositingInputs().ancestorScrollingLayer; } |
545 const PaintLayer* nearestFixedPositionLayer() const { return ancestorDepende
ntCompositingInputs().nearestFixedPositionLayer; } | 553 const PaintLayer* nearestFixedPositionLayer() const { return ancestorDepende
ntCompositingInputs().nearestFixedPositionLayer; } |
546 PaintLayer* scrollParent() const { return const_cast<PaintLayer*>(ancestorDe
pendentCompositingInputs().scrollParent); } | 554 PaintLayer* scrollParent() const { return const_cast<PaintLayer*>(ancestorDe
pendentCompositingInputs().scrollParent); } |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
629 PaintTiming* paintTiming(); | 637 PaintTiming* paintTiming(); |
630 | 638 |
631 private: | 639 private: |
632 // Bounding box in the coordinates of this layer. | 640 // Bounding box in the coordinates of this layer. |
633 LayoutRect logicalBoundingBox() const; | 641 LayoutRect logicalBoundingBox() const; |
634 | 642 |
635 bool hasOverflowControls() const; | 643 bool hasOverflowControls() const; |
636 | 644 |
637 void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus(); | 645 void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus(); |
638 | 646 |
639 // Returns true if the position changed. | |
640 bool updateLayerPosition(); | |
641 | |
642 void updateLayerPositionRecursive(); | 647 void updateLayerPositionRecursive(); |
643 void updateLayerPositionsAfterScrollRecursive(const DoubleSize& scrollDelta,
bool paintInvalidationContainerWasScrolled); | 648 void updateLayerPositionsAfterScrollRecursive(const DoubleSize& scrollDelta,
bool paintInvalidationContainerWasScrolled); |
644 | 649 |
645 void setNextSibling(PaintLayer* next) { m_next = next; } | 650 void setNextSibling(PaintLayer* next) { m_next = next; } |
646 void setPreviousSibling(PaintLayer* prev) { m_previous = prev; } | 651 void setPreviousSibling(PaintLayer* prev) { m_previous = prev; } |
647 void setFirstChild(PaintLayer* first) { m_first = first; } | 652 void setFirstChild(PaintLayer* first) { m_first = first; } |
648 void setLastChild(PaintLayer* last) { m_last = last; } | 653 void setLastChild(PaintLayer* last) { m_last = last; } |
649 | 654 |
650 void updateHasSelfPaintingLayerDescendant() const; | 655 void updateHasSelfPaintingLayerDescendant() const; |
651 PaintLayer* hitTestLayer(PaintLayer* rootLayer, PaintLayer* containerLayer,
HitTestResult&, | 656 PaintLayer* hitTestLayer(PaintLayer* rootLayer, PaintLayer* containerLayer,
HitTestResult&, |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
826 | 831 |
827 } // namespace blink | 832 } // namespace blink |
828 | 833 |
829 #ifndef NDEBUG | 834 #ifndef NDEBUG |
830 // Outside the WebCore namespace for ease of invocation from gdb. | 835 // Outside the WebCore namespace for ease of invocation from gdb. |
831 void showLayerTree(const blink::PaintLayer*); | 836 void showLayerTree(const blink::PaintLayer*); |
832 void showLayerTree(const blink::LayoutObject*); | 837 void showLayerTree(const blink::LayoutObject*); |
833 #endif | 838 #endif |
834 | 839 |
835 #endif // Layer_h | 840 #endif // Layer_h |
OLD | NEW |