Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayer.h

Issue 2289833002: Disable clipping on root scroller's ancestors. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 bool needsCompositingInputsUpdate() const 578 bool needsCompositingInputsUpdate() const
579 { 579 {
580 // While we're updating the compositing inputs, these values may differ. 580 // While we're updating the compositing inputs, these values may differ.
581 // We should never be asking for this value when that is the case. 581 // We should never be asking for this value when that is the case.
582 ASSERT(m_needsDescendantDependentCompositingInputsUpdate == m_needsAnces torDependentCompositingInputsUpdate); 582 ASSERT(m_needsDescendantDependentCompositingInputsUpdate == m_needsAnces torDependentCompositingInputsUpdate);
583 return m_needsDescendantDependentCompositingInputsUpdate; 583 return m_needsDescendantDependentCompositingInputsUpdate;
584 } 584 }
585 585
586 void updateAncestorOverflowLayer(const PaintLayer* ancestorOverflowLayer) { m_ancestorOverflowLayer = ancestorOverflowLayer; } 586 void updateAncestorOverflowLayer(const PaintLayer* ancestorOverflowLayer) { m_ancestorOverflowLayer = ancestorOverflowLayer; }
587 void updateAncestorDependentCompositingInputs(const AncestorDependentComposi tingInputs&, const RareAncestorDependentCompositingInputs&, bool hasAncestorWith ClipPath); 587 void updateAncestorDependentCompositingInputs(const AncestorDependentComposi tingInputs&, const RareAncestorDependentCompositingInputs&, bool hasAncestorWith ClipPath);
588 void updateDescendantDependentCompositingInputs(bool hasDescendantWithClipPa th, bool hasNonIsolatedDescendantWithBlendMode); 588 void updateDescendantDependentCompositingInputs(bool hasDescendantWithClipPa th, bool hasNonIsolatedDescendantWithBlendMode, bool hasRootScrollerAsDescendant );
589 void didUpdateCompositingInputs(); 589 void didUpdateCompositingInputs();
590 590
591 IntRect clippedAbsoluteBoundingBox() const { ASSERT(!m_needsAncestorDependen tCompositingInputsUpdate); return m_ancestorDependentCompositingInputs.clippedAb soluteBoundingBox; } 591 IntRect clippedAbsoluteBoundingBox() const { ASSERT(!m_needsAncestorDependen tCompositingInputsUpdate); return m_ancestorDependentCompositingInputs.clippedAb soluteBoundingBox; }
592 const PaintLayer* opacityAncestor() const { ASSERT(!m_needsAncestorDependent CompositingInputsUpdate); return m_rareAncestorDependentCompositingInputs ? m_ra reAncestorDependentCompositingInputs->opacityAncestor : nullptr; } 592 const PaintLayer* opacityAncestor() const { ASSERT(!m_needsAncestorDependent CompositingInputsUpdate); return m_rareAncestorDependentCompositingInputs ? m_ra reAncestorDependentCompositingInputs->opacityAncestor : nullptr; }
593 const PaintLayer* transformAncestor() const { ASSERT(!m_needsAncestorDepende ntCompositingInputsUpdate); return m_rareAncestorDependentCompositingInputs ? m_ rareAncestorDependentCompositingInputs->transformAncestor : nullptr; } 593 const PaintLayer* transformAncestor() const { ASSERT(!m_needsAncestorDepende ntCompositingInputsUpdate); return m_rareAncestorDependentCompositingInputs ? m_ rareAncestorDependentCompositingInputs->transformAncestor : nullptr; }
594 const PaintLayer* filterAncestor() const { ASSERT(!m_needsAncestorDependentC ompositingInputsUpdate); return m_rareAncestorDependentCompositingInputs ? m_rar eAncestorDependentCompositingInputs->filterAncestor : nullptr; } 594 const PaintLayer* filterAncestor() const { ASSERT(!m_needsAncestorDependentC ompositingInputsUpdate); return m_rareAncestorDependentCompositingInputs ? m_rar eAncestorDependentCompositingInputs->filterAncestor : nullptr; }
595 const LayoutObject* clippingContainer() const { ASSERT(!m_needsAncestorDepen dentCompositingInputsUpdate); return m_ancestorDependentCompositingInputs.clippi ngContainer; } 595 const LayoutObject* clippingContainer() const { ASSERT(!m_needsAncestorDepen dentCompositingInputsUpdate); return m_ancestorDependentCompositingInputs.clippi ngContainer; }
596 const PaintLayer* ancestorOverflowLayer() const { return m_ancestorOverflowL ayer; } 596 const PaintLayer* ancestorOverflowLayer() const { return m_ancestorOverflowL ayer; }
597 const PaintLayer* ancestorScrollingLayer() const { ASSERT(!m_needsAncestorDe pendentCompositingInputsUpdate); return m_rareAncestorDependentCompositingInputs ? m_rareAncestorDependentCompositingInputs->ancestorScrollingLayer : nullptr; } 597 const PaintLayer* ancestorScrollingLayer() const { ASSERT(!m_needsAncestorDe pendentCompositingInputsUpdate); return m_rareAncestorDependentCompositingInputs ? m_rareAncestorDependentCompositingInputs->ancestorScrollingLayer : nullptr; }
598 const PaintLayer* nearestFixedPositionLayer() const { ASSERT(!m_needsAncesto rDependentCompositingInputsUpdate); return m_rareAncestorDependentCompositingInp uts ? m_rareAncestorDependentCompositingInputs->nearestFixedPositionLayer : null ptr; } 598 const PaintLayer* nearestFixedPositionLayer() const { ASSERT(!m_needsAncesto rDependentCompositingInputsUpdate); return m_rareAncestorDependentCompositingInp uts ? m_rareAncestorDependentCompositingInputs->nearestFixedPositionLayer : null ptr; }
599 const PaintLayer* scrollParent() const { ASSERT(!m_needsAncestorDependentCom positingInputsUpdate); return m_rareAncestorDependentCompositingInputs ? m_rareA ncestorDependentCompositingInputs->scrollParent : nullptr; } 599 const PaintLayer* scrollParent() const { ASSERT(!m_needsAncestorDependentCom positingInputsUpdate); return m_rareAncestorDependentCompositingInputs ? m_rareA ncestorDependentCompositingInputs->scrollParent : nullptr; }
600 const PaintLayer* clipParent() const { ASSERT(!m_needsAncestorDependentCompo sitingInputsUpdate); return m_rareAncestorDependentCompositingInputs ? m_rareAnc estorDependentCompositingInputs->clipParent : nullptr; } 600 const PaintLayer* clipParent() const { ASSERT(!m_needsAncestorDependentCompo sitingInputsUpdate); return m_rareAncestorDependentCompositingInputs ? m_rareAnc estorDependentCompositingInputs->clipParent : nullptr; }
601 bool hasAncestorWithClipPath() const { ASSERT(!m_needsAncestorDependentCompo sitingInputsUpdate); return m_hasAncestorWithClipPath; } 601 bool hasAncestorWithClipPath() const { ASSERT(!m_needsAncestorDependentCompo sitingInputsUpdate); return m_hasAncestorWithClipPath; }
602 bool hasDescendantWithClipPath() const { ASSERT(!m_needsDescendantDependentC ompositingInputsUpdate); return m_hasDescendantWithClipPath; } 602 bool hasDescendantWithClipPath() const { ASSERT(!m_needsDescendantDependentC ompositingInputsUpdate); return m_hasDescendantWithClipPath; }
603 bool hasNonIsolatedDescendantWithBlendMode() const; 603 bool hasNonIsolatedDescendantWithBlendMode() const;
604 604
605 bool hasRootScrollerAsDescendant() const { ASSERT(!m_needsDescendantDependen tCompositingInputsUpdate); return m_hasRootScrollerAsDescendant; }
606
605 bool lostGroupedMapping() const { ASSERT(isAllowedToQueryCompositingState()) ; return m_lostGroupedMapping; } 607 bool lostGroupedMapping() const { ASSERT(isAllowedToQueryCompositingState()) ; return m_lostGroupedMapping; }
606 void setLostGroupedMapping(bool b) { m_lostGroupedMapping = b; } 608 void setLostGroupedMapping(bool b) { m_lostGroupedMapping = b; }
607 609
608 CompositingReasons getCompositingReasons() const { ASSERT(isAllowedToQueryCo mpositingState()); return m_rareData ? m_rareData->compositingReasons : Composit ingReasonNone; } 610 CompositingReasons getCompositingReasons() const { ASSERT(isAllowedToQueryCo mpositingState()); return m_rareData ? m_rareData->compositingReasons : Composit ingReasonNone; }
609 void setCompositingReasons(CompositingReasons, CompositingReasons mask = Com positingReasonAll); 611 void setCompositingReasons(CompositingReasons, CompositingReasons mask = Com positingReasonAll);
610 612
611 SquashingDisallowedReasons getSquashingDisallowedReasons() const { ASSERT(is AllowedToQueryCompositingState()); return m_rareData ? m_rareData->squashingDisa llowedReasons : SquashingDisallowedReasonsNone; } 613 SquashingDisallowedReasons getSquashingDisallowedReasons() const { ASSERT(is AllowedToQueryCompositingState()); return m_rareData ? m_rareData->squashingDisa llowedReasons : SquashingDisallowedReasonsNone; }
612 void setSquashingDisallowedReasons(SquashingDisallowedReasons); 614 void setSquashingDisallowedReasons(SquashingDisallowedReasons);
613 615
614 bool hasCompositingDescendant() const { ASSERT(isAllowedToQueryCompositingSt ate()); return m_hasCompositingDescendant; } 616 bool hasCompositingDescendant() const { ASSERT(isAllowedToQueryCompositingSt ate()); return m_hasCompositingDescendant; }
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
851 unsigned m_previousPaintResult : 1; // PaintLayerPainter::PaintResult 853 unsigned m_previousPaintResult : 1; // PaintLayerPainter::PaintResult
852 854
853 unsigned m_needsPaintPhaseDescendantOutlines : 1; 855 unsigned m_needsPaintPhaseDescendantOutlines : 1;
854 unsigned m_needsPaintPhaseFloat : 1; 856 unsigned m_needsPaintPhaseFloat : 1;
855 unsigned m_needsPaintPhaseDescendantBlockBackgrounds : 1; 857 unsigned m_needsPaintPhaseDescendantBlockBackgrounds : 1;
856 858
857 // These bitfields are part of ancestor/descendant dependent compositing inp uts. 859 // These bitfields are part of ancestor/descendant dependent compositing inp uts.
858 unsigned m_hasDescendantWithClipPath : 1; 860 unsigned m_hasDescendantWithClipPath : 1;
859 unsigned m_hasNonIsolatedDescendantWithBlendMode : 1; 861 unsigned m_hasNonIsolatedDescendantWithBlendMode : 1;
860 unsigned m_hasAncestorWithClipPath : 1; 862 unsigned m_hasAncestorWithClipPath : 1;
863 unsigned m_hasRootScrollerAsDescendant : 1;
861 864
862 LayoutBoxModelObject* m_layoutObject; 865 LayoutBoxModelObject* m_layoutObject;
863 866
864 PaintLayer* m_parent; 867 PaintLayer* m_parent;
865 PaintLayer* m_previous; 868 PaintLayer* m_previous;
866 PaintLayer* m_next; 869 PaintLayer* m_next;
867 PaintLayer* m_first; 870 PaintLayer* m_first;
868 PaintLayer* m_last; 871 PaintLayer* m_last;
869 872
870 // Our (x,y) coordinates are in our parent layer's coordinate space. 873 // Our (x,y) coordinates are in our parent layer's coordinate space.
(...skipping 30 matching lines...) Expand all
901 904
902 } // namespace blink 905 } // namespace blink
903 906
904 #ifndef NDEBUG 907 #ifndef NDEBUG
905 // Outside the WebCore namespace for ease of invocation from gdb. 908 // Outside the WebCore namespace for ease of invocation from gdb.
906 void showLayerTree(const blink::PaintLayer*); 909 void showLayerTree(const blink::PaintLayer*);
907 void showLayerTree(const blink::LayoutObject*); 910 void showLayerTree(const blink::LayoutObject*);
908 #endif 911 #endif
909 912
910 #endif // Layer_h 913 #endif // Layer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698