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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutObject.h

Issue 1934833002: Ensure filter and reflection outsets are applied on paint invalidation rect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after
772 bool isColumnSpanAll() const { return style()->getColumnSpan() == ColumnSpan All && spannerPlaceholder(); } 772 bool isColumnSpanAll() const { return style()->getColumnSpan() == ColumnSpan All && spannerPlaceholder(); }
773 773
774 // We include isLayoutButton in this check because buttons are implemented 774 // We include isLayoutButton in this check because buttons are implemented
775 // using flex box but should still support first-line|first-letter. 775 // using flex box but should still support first-line|first-letter.
776 // The flex box and grid specs require that flex box and grid do not 776 // The flex box and grid specs require that flex box and grid do not
777 // support first-line|first-letter, though. 777 // support first-line|first-letter, though.
778 // TODO(cbiesinger): Remove when buttons are implemented with align-items in stead 778 // TODO(cbiesinger): Remove when buttons are implemented with align-items in stead
779 // of flex box. crbug.com/226252. 779 // of flex box. crbug.com/226252.
780 bool canHaveFirstLineOrFirstLetterStyle() const { return isLayoutBlockFlow() || isLayoutButton(); } 780 bool canHaveFirstLineOrFirstLetterStyle() const { return isLayoutBlockFlow() || isLayoutButton(); }
781 781
782 bool hasFilterOrReflection() const;
783
782 // This function returns the containing block of the object. 784 // This function returns the containing block of the object.
783 // Due to CSS being inconsistent, a containing block can be a relatively 785 // Due to CSS being inconsistent, a containing block can be a relatively
784 // positioned inline, thus we can't return a LayoutBlock from this function. 786 // positioned inline, thus we can't return a LayoutBlock from this function.
785 // 787 //
786 // This method is extremely similar to containingBlock(), but with a few 788 // This method is extremely similar to containingBlock(), but with a few
787 // notable exceptions. 789 // notable exceptions.
788 // (1) It can be used on orphaned subtrees, i.e., it can be called safely 790 // (1) It can be used on orphaned subtrees, i.e., it can be called safely
789 // even when the object is not part of the primary document subtree yet. 791 // even when the object is not part of the primary document subtree yet.
790 // (2) For normal flow elements, it just returns the parent. 792 // (2) For normal flow elements, it just returns the parent.
791 // (3) For absolute positioned elements, it will return a relative 793 // (3) For absolute positioned elements, it will return a relative
792 // positioned inline. containingBlock() simply skips relpositioned inlines 794 // positioned inline. containingBlock() simply skips relpositioned inlines
793 // and lets an enclosing block handle the layout of the positioned object. 795 // and lets an enclosing block handle the layout of the positioned object.
794 // This does mean that computePositionedLogicalWidth and 796 // This does mean that computePositionedLogicalWidth and
795 // computePositionedLogicalHeight have to use container(). 797 // computePositionedLogicalHeight have to use container().
796 // 798 //
797 // This function should be used for any invalidation as it would correctly 799 // This function should be used for any invalidation as it would correctly
798 // walk the containing block chain. See e.g. markContainerChainForLayout. 800 // walk the containing block chain. See e.g. markContainerChainForLayout.
799 // It is also used for correctly sizing absolutely positioned elements 801 // It is also used for correctly sizing absolutely positioned elements
800 // (point 3 above). 802 // (point 3 above).
801 // 803 //
802 // If |ancestor| and |ancestorSkipped| are not null, on return *ancestorSkip ped 804 // If |ancestor| and |ancestorSkipped| are not null, on return *ancestorSkip ped
803 // is true if the layoutObject returned is an ancestor of |ancestor|. 805 // is true if the layoutObject returned is an ancestor of |ancestor|.
804 LayoutObject* container(const LayoutBoxModelObject* ancestor = nullptr, bool * ancestorSkipped = nullptr) const; 806 LayoutObject* container(const LayoutBoxModelObject* ancestor = nullptr, bool * ancestorSkipped = nullptr, bool* filterOrReflectionSkipped = nullptr) const;
805 // Finds the container as if this object is fixed-position. 807 // Finds the container as if this object is fixed-position.
806 LayoutBlock* containerForFixedPosition(const LayoutBoxModelObject* ancestor = nullptr, bool* ancestorSkipped = nullptr) const; 808 LayoutBlock* containerForFixedPosition(const LayoutBoxModelObject* ancestor = nullptr, bool* ancestorSkipped = nullptr, bool* filterOrReflectionSkipped = nu llptr) const;
807 // Finds the containing block as if this object is absolute-position. 809 // Finds the containing block as if this object is absolute-position.
808 LayoutBlock* containingBlockForAbsolutePosition() const; 810 LayoutBlock* containingBlockForAbsolutePosition() const;
809 811
810 virtual LayoutObject* hoverAncestor() const { return parent(); } 812 virtual LayoutObject* hoverAncestor() const { return parent(); }
811 813
812 Element* offsetParent() const; 814 Element* offsetParent() const;
813 815
814 void markContainerChainForLayout(bool scheduleRelayout = true, SubtreeLayout Scope* = nullptr); 816 void markContainerChainForLayout(bool scheduleRelayout = true, SubtreeLayout Scope* = nullptr);
815 void setNeedsLayout(LayoutInvalidationReasonForTracing, MarkingBehavior = Ma rkContainerChain, SubtreeLayoutScope* = nullptr); 817 void setNeedsLayout(LayoutInvalidationReasonForTracing, MarkingBehavior = Ma rkContainerChain, SubtreeLayoutScope* = nullptr);
816 void setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationReasonForTraci ng, MarkingBehavior = MarkContainerChain, SubtreeLayoutScope* = nullptr); 818 void setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationReasonForTraci ng, MarkingBehavior = MarkContainerChain, SubtreeLayoutScope* = nullptr);
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after
1614 inline void invalidateContainerPreferredLogicalWidths(); 1616 inline void invalidateContainerPreferredLogicalWidths();
1615 1617
1616 void invalidatePaintIncludingNonSelfPaintingLayerDescendantsInternal(const L ayoutBoxModelObject& paintInvalidationContainer); 1618 void invalidatePaintIncludingNonSelfPaintingLayerDescendantsInternal(const L ayoutBoxModelObject& paintInvalidationContainer);
1617 1619
1618 // The caller should ensure the enclosing layer has been setNeedsRepaint bef ore calling this function. 1620 // The caller should ensure the enclosing layer has been setNeedsRepaint bef ore calling this function.
1619 void invalidatePaintOfPreviousPaintInvalidationRect(const LayoutBoxModelObje ct& paintInvalidationContainer, PaintInvalidationReason); 1621 void invalidatePaintOfPreviousPaintInvalidationRect(const LayoutBoxModelObje ct& paintInvalidationContainer, PaintInvalidationReason);
1620 1622
1621 LayoutRect previousSelectionRectForPaintInvalidation() const; 1623 LayoutRect previousSelectionRectForPaintInvalidation() const;
1622 void setPreviousSelectionRectForPaintInvalidation(const LayoutRect&); 1624 void setPreviousSelectionRectForPaintInvalidation(const LayoutRect&);
1623 1625
1624 LayoutObject* containerForAbsolutePosition(const LayoutBoxModelObject* ances tor = nullptr, bool* ancestorSkipped = nullptr) const; 1626 LayoutObject* containerForAbsolutePosition(const LayoutBoxModelObject* ances tor = nullptr, bool* ancestorSkipped = nullptr, bool* filterOrReflectionSkipped = nullptr) const;
1625 1627
1626 const LayoutBoxModelObject* enclosingCompositedContainer() const; 1628 const LayoutBoxModelObject* enclosingCompositedContainer() const;
1627 1629
1628 LayoutFlowThread* locateFlowThreadContainingBlock() const; 1630 LayoutFlowThread* locateFlowThreadContainingBlock() const;
1629 void removeFromLayoutFlowThreadRecursive(LayoutFlowThread*); 1631 void removeFromLayoutFlowThreadRecursive(LayoutFlowThread*);
1630 1632
1631 ComputedStyle* cachedFirstLineStyle() const; 1633 ComputedStyle* cachedFirstLineStyle() const;
1632 StyleDifference adjustStyleDifference(StyleDifference) const; 1634 StyleDifference adjustStyleDifference(StyleDifference) const;
1633 1635
1634 Color selectionColor(int colorProperty, const GlobalPaintFlags) const; 1636 Color selectionColor(int colorProperty, const GlobalPaintFlags) const;
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
2169 void showTree(const blink::LayoutObject*); 2171 void showTree(const blink::LayoutObject*);
2170 void showLineTree(const blink::LayoutObject*); 2172 void showLineTree(const blink::LayoutObject*);
2171 void showLayoutTree(const blink::LayoutObject* object1); 2173 void showLayoutTree(const blink::LayoutObject* object1);
2172 // We don't make object2 an optional parameter so that showLayoutTree 2174 // We don't make object2 an optional parameter so that showLayoutTree
2173 // can be called from gdb easily. 2175 // can be called from gdb easily.
2174 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2); 2176 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2);
2175 2177
2176 #endif 2178 #endif
2177 2179
2178 #endif // LayoutObject_h 2180 #endif // LayoutObject_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698