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 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 609 static LayoutRect transparencyClipBox(const PaintLayer*, const PaintLayer* r ootLayer, TransparencyClipBoxBehavior transparencyBehavior, | 609 static LayoutRect transparencyClipBox(const PaintLayer*, const PaintLayer* r ootLayer, TransparencyClipBoxBehavior transparencyBehavior, |
| 610 TransparencyClipBoxMode transparencyMode, const LayoutSize& subPixelAccu mulation, GlobalPaintFlags = GlobalPaintNormalPhase); | 610 TransparencyClipBoxMode transparencyMode, const LayoutSize& subPixelAccu mulation, GlobalPaintFlags = GlobalPaintNormalPhase); |
| 611 | 611 |
| 612 bool needsRepaint() const { return m_needsRepaint; } | 612 bool needsRepaint() const { return m_needsRepaint; } |
| 613 void setNeedsRepaint(); | 613 void setNeedsRepaint(); |
| 614 void clearNeedsRepaintRecursively(); | 614 void clearNeedsRepaintRecursively(); |
| 615 | 615 |
| 616 IntSize previousScrollOffsetAccumulationForPainting() const { return m_previ ousScrollOffsetAccumulationForPainting; } | 616 IntSize previousScrollOffsetAccumulationForPainting() const { return m_previ ousScrollOffsetAccumulationForPainting; } |
| 617 void setPreviousScrollOffsetAccumulationForPainting(const IntSize& s) { m_pr eviousScrollOffsetAccumulationForPainting = s; } | 617 void setPreviousScrollOffsetAccumulationForPainting(const IntSize& s) { m_pr eviousScrollOffsetAccumulationForPainting = s; } |
| 618 | 618 |
| 619 // For subsequence display items. | 619 DisplayItemClientWrapper displayItemClientForNegativeZOrderChildren() const |
|
chrishtr
2015/11/04 23:37:11
Don't inline these.
| |
| 620 DisplayItemClient displayItemClient() const { return toDisplayItemClient(thi s); } | 620 { |
| 621 return DisplayItemClientWrapper(*this, toSubDisplayItemClient<1>(this), debugNameForNegativeZOrderChildrenDisplayItemClient); | |
| 622 } | |
| 623 DisplayItemClientWrapper displayItemClientForNormalAndPositiveZOrderChildren () const | |
| 624 { | |
| 625 return DisplayItemClientWrapper(*this, toSubDisplayItemClient<2>(this), debugNameForNormalAndPositiveZOrderChildrenDisplayItemClient); | |
| 626 } | |
| 621 | 627 |
| 622 private: | 628 private: |
| 623 // Bounding box in the coordinates of this layer. | 629 // Bounding box in the coordinates of this layer. |
| 624 LayoutRect logicalBoundingBox() const; | 630 LayoutRect logicalBoundingBox() const; |
| 625 | 631 |
| 626 bool hasOverflowControls() const; | 632 bool hasOverflowControls() const; |
| 627 | 633 |
| 628 void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus(); | 634 void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus(); |
| 629 | 635 |
| 630 // Returns true if the position changed. | 636 // Returns true if the position changed. |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 686 | 692 |
| 687 void updateOrRemoveFilterClients(); | 693 void updateOrRemoveFilterClients(); |
| 688 | 694 |
| 689 void updatePaginationRecursive(bool needsPaginationUpdate = false); | 695 void updatePaginationRecursive(bool needsPaginationUpdate = false); |
| 690 void clearPaginationRecursive(); | 696 void clearPaginationRecursive(); |
| 691 | 697 |
| 692 void blockSelectionGapsBoundsChanged(); | 698 void blockSelectionGapsBoundsChanged(); |
| 693 | 699 |
| 694 void markCompositingContainerChainForNeedsRepaint(); | 700 void markCompositingContainerChainForNeedsRepaint(); |
| 695 | 701 |
| 702 static String debugNameForNegativeZOrderChildrenDisplayItemClient(const Pain tLayer& layer) { return layer.debugName() + " negative z-order children"; } | |
| 703 static String debugNameForNormalAndPositiveZOrderChildrenDisplayItemClient(c onst PaintLayer& layer) { return layer.debugName() + " normal and positive z-ord er children"; } | |
| 704 | |
| 696 PaintLayerType m_layerType; | 705 PaintLayerType m_layerType; |
| 697 | 706 |
| 698 // Self-painting layer is an optimization where we avoid the heavy Layer pai nting | 707 // Self-painting layer is an optimization where we avoid the heavy Layer pai nting |
| 699 // machinery for a Layer allocated only to handle the overflow clip case. | 708 // machinery for a Layer allocated only to handle the overflow clip case. |
| 700 // FIXME(crbug.com/332791): Self-painting layer should be merged into the ov erflow-only concept. | 709 // FIXME(crbug.com/332791): Self-painting layer should be merged into the ov erflow-only concept. |
| 701 unsigned m_isSelfPaintingLayer : 1; | 710 unsigned m_isSelfPaintingLayer : 1; |
| 702 | 711 |
| 703 // If have no self-painting descendants, we don't have to walk our children during painting. This can lead to | 712 // If have no self-painting descendants, we don't have to walk our children during painting. This can lead to |
| 704 // significant savings, especially if the tree has lots of non-self-painting layers grouped together (e.g. table cells). | 713 // significant savings, especially if the tree has lots of non-self-painting layers grouped together (e.g. table cells). |
| 705 mutable unsigned m_hasSelfPaintingLayerDescendant : 1; | 714 mutable unsigned m_hasSelfPaintingLayerDescendant : 1; |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 810 | 819 |
| 811 } // namespace blink | 820 } // namespace blink |
| 812 | 821 |
| 813 #ifndef NDEBUG | 822 #ifndef NDEBUG |
| 814 // Outside the WebCore namespace for ease of invocation from gdb. | 823 // Outside the WebCore namespace for ease of invocation from gdb. |
| 815 void showLayerTree(const blink::PaintLayer*); | 824 void showLayerTree(const blink::PaintLayer*); |
| 816 void showLayerTree(const blink::LayoutObject*); | 825 void showLayerTree(const blink::LayoutObject*); |
| 817 #endif | 826 #endif |
| 818 | 827 |
| 819 #endif // Layer_h | 828 #endif // Layer_h |
| OLD | NEW |