OLD | NEW |
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 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
771 bool isColumnSpanAll() const { return style()->getColumnSpan() == ColumnSpan
All && spannerPlaceholder(); } | 771 bool isColumnSpanAll() const { return style()->getColumnSpan() == ColumnSpan
All && spannerPlaceholder(); } |
772 | 772 |
773 // We include isLayoutButton in this check because buttons are implemented | 773 // We include isLayoutButton in this check because buttons are implemented |
774 // using flex box but should still support first-line|first-letter. | 774 // using flex box but should still support first-line|first-letter. |
775 // The flex box and grid specs require that flex box and grid do not | 775 // The flex box and grid specs require that flex box and grid do not |
776 // support first-line|first-letter, though. | 776 // support first-line|first-letter, though. |
777 // TODO(cbiesinger): Remove when buttons are implemented with align-items in
stead | 777 // TODO(cbiesinger): Remove when buttons are implemented with align-items in
stead |
778 // of flex box. crbug.com/226252. | 778 // of flex box. crbug.com/226252. |
779 bool canHaveFirstLineOrFirstLetterStyle() const { return isLayoutBlockFlow()
|| isLayoutButton(); } | 779 bool canHaveFirstLineOrFirstLetterStyle() const { return isLayoutBlockFlow()
|| isLayoutButton(); } |
780 | 780 |
| 781 bool hasFilterOrReflection() const; |
| 782 |
781 // This function returns the containing block of the object. | 783 // This function returns the containing block of the object. |
782 // Due to CSS being inconsistent, a containing block can be a relatively | 784 // Due to CSS being inconsistent, a containing block can be a relatively |
783 // positioned inline, thus we can't return a LayoutBlock from this function. | 785 // positioned inline, thus we can't return a LayoutBlock from this function. |
784 // | 786 // |
785 // This method is extremely similar to containingBlock(), but with a few | 787 // This method is extremely similar to containingBlock(), but with a few |
786 // notable exceptions. | 788 // notable exceptions. |
787 // (1) It can be used on orphaned subtrees, i.e., it can be called safely | 789 // (1) It can be used on orphaned subtrees, i.e., it can be called safely |
788 // even when the object is not part of the primary document subtree yet. | 790 // even when the object is not part of the primary document subtree yet. |
789 // (2) For normal flow elements, it just returns the parent. | 791 // (2) For normal flow elements, it just returns the parent. |
790 // (3) For absolute positioned elements, it will return a relative | 792 // (3) For absolute positioned elements, it will return a relative |
791 // positioned inline. containingBlock() simply skips relpositioned inlines | 793 // positioned inline. containingBlock() simply skips relpositioned inlines |
792 // and lets an enclosing block handle the layout of the positioned object. | 794 // and lets an enclosing block handle the layout of the positioned object. |
793 // This does mean that computePositionedLogicalWidth and | 795 // This does mean that computePositionedLogicalWidth and |
794 // computePositionedLogicalHeight have to use container(). | 796 // computePositionedLogicalHeight have to use container(). |
795 // | 797 // |
796 // This function should be used for any invalidation as it would correctly | 798 // This function should be used for any invalidation as it would correctly |
797 // walk the containing block chain. See e.g. markContainerChainForLayout. | 799 // walk the containing block chain. See e.g. markContainerChainForLayout. |
798 // It is also used for correctly sizing absolutely positioned elements | 800 // It is also used for correctly sizing absolutely positioned elements |
799 // (point 3 above). | 801 // (point 3 above). |
800 // | 802 // |
801 // If |ancestor| and |ancestorSkipped| are not null, on return *ancestorSkip
ped | 803 // If |ancestor| and |ancestorSkipped| are not null, on return *ancestorSkip
ped |
802 // is true if the layoutObject returned is an ancestor of |ancestor|. | 804 // is true if the layoutObject returned is an ancestor of |ancestor|. |
803 LayoutObject* container(const LayoutBoxModelObject* ancestor = nullptr, bool
* ancestorSkipped = nullptr) const; | 805 LayoutObject* container(const LayoutBoxModelObject* ancestor = nullptr, bool
* ancestorSkipped = nullptr, bool* filterOrReflectionSkipped = nullptr) const; |
804 // Finds the container as if this object is fixed-position. | 806 // Finds the container as if this object is fixed-position. |
805 LayoutBlock* containerForFixedPosition(const LayoutBoxModelObject* ancestor
= nullptr, bool* ancestorSkipped = nullptr) const; | 807 LayoutBlock* containerForFixedPosition(const LayoutBoxModelObject* ancestor
= nullptr, bool* ancestorSkipped = nullptr, bool* filterOrReflectionSkipped = nu
llptr) const; |
806 // Finds the containing block as if this object is absolute-position. | 808 // Finds the containing block as if this object is absolute-position. |
807 LayoutBlock* containingBlockForAbsolutePosition() const; | 809 LayoutBlock* containingBlockForAbsolutePosition() const; |
808 | 810 |
809 virtual LayoutObject* hoverAncestor() const { return parent(); } | 811 virtual LayoutObject* hoverAncestor() const { return parent(); } |
810 | 812 |
811 Element* offsetParent() const; | 813 Element* offsetParent() const; |
812 | 814 |
813 void markContainerChainForLayout(bool scheduleRelayout = true, SubtreeLayout
Scope* = nullptr); | 815 void markContainerChainForLayout(bool scheduleRelayout = true, SubtreeLayout
Scope* = nullptr); |
814 void setNeedsLayout(LayoutInvalidationReasonForTracing, MarkingBehavior = Ma
rkContainerChain, SubtreeLayoutScope* = nullptr); | 816 void setNeedsLayout(LayoutInvalidationReasonForTracing, MarkingBehavior = Ma
rkContainerChain, SubtreeLayoutScope* = nullptr); |
815 void setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationReasonForTraci
ng, MarkingBehavior = MarkContainerChain, SubtreeLayoutScope* = nullptr); | 817 void setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationReasonForTraci
ng, MarkingBehavior = MarkContainerChain, SubtreeLayoutScope* = nullptr); |
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1613 inline void invalidateContainerPreferredLogicalWidths(); | 1615 inline void invalidateContainerPreferredLogicalWidths(); |
1614 | 1616 |
1615 void invalidatePaintIncludingNonSelfPaintingLayerDescendantsInternal(const L
ayoutBoxModelObject& paintInvalidationContainer); | 1617 void invalidatePaintIncludingNonSelfPaintingLayerDescendantsInternal(const L
ayoutBoxModelObject& paintInvalidationContainer); |
1616 | 1618 |
1617 // The caller should ensure the enclosing layer has been setNeedsRepaint bef
ore calling this function. | 1619 // The caller should ensure the enclosing layer has been setNeedsRepaint bef
ore calling this function. |
1618 void invalidatePaintOfPreviousPaintInvalidationRect(const LayoutBoxModelObje
ct& paintInvalidationContainer, PaintInvalidationReason); | 1620 void invalidatePaintOfPreviousPaintInvalidationRect(const LayoutBoxModelObje
ct& paintInvalidationContainer, PaintInvalidationReason); |
1619 | 1621 |
1620 LayoutRect previousSelectionRectForPaintInvalidation() const; | 1622 LayoutRect previousSelectionRectForPaintInvalidation() const; |
1621 void setPreviousSelectionRectForPaintInvalidation(const LayoutRect&); | 1623 void setPreviousSelectionRectForPaintInvalidation(const LayoutRect&); |
1622 | 1624 |
1623 LayoutObject* containerForAbsolutePosition(const LayoutBoxModelObject* ances
tor = nullptr, bool* ancestorSkipped = nullptr) const; | 1625 LayoutObject* containerForAbsolutePosition(const LayoutBoxModelObject* ances
tor = nullptr, bool* ancestorSkipped = nullptr, bool* filterOrReflectionSkipped
= nullptr) const; |
1624 | 1626 |
1625 const LayoutBoxModelObject* enclosingCompositedContainer() const; | 1627 const LayoutBoxModelObject* enclosingCompositedContainer() const; |
1626 | 1628 |
1627 LayoutFlowThread* locateFlowThreadContainingBlock() const; | 1629 LayoutFlowThread* locateFlowThreadContainingBlock() const; |
1628 void removeFromLayoutFlowThreadRecursive(LayoutFlowThread*); | 1630 void removeFromLayoutFlowThreadRecursive(LayoutFlowThread*); |
1629 | 1631 |
1630 ComputedStyle* cachedFirstLineStyle() const; | 1632 ComputedStyle* cachedFirstLineStyle() const; |
1631 StyleDifference adjustStyleDifference(StyleDifference) const; | 1633 StyleDifference adjustStyleDifference(StyleDifference) const; |
1632 | 1634 |
1633 Color selectionColor(int colorProperty, const GlobalPaintFlags) const; | 1635 Color selectionColor(int colorProperty, const GlobalPaintFlags) const; |
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2170 void showTree(const blink::LayoutObject*); | 2172 void showTree(const blink::LayoutObject*); |
2171 void showLineTree(const blink::LayoutObject*); | 2173 void showLineTree(const blink::LayoutObject*); |
2172 void showLayoutTree(const blink::LayoutObject* object1); | 2174 void showLayoutTree(const blink::LayoutObject* object1); |
2173 // We don't make object2 an optional parameter so that showLayoutTree | 2175 // We don't make object2 an optional parameter so that showLayoutTree |
2174 // can be called from gdb easily. | 2176 // can be called from gdb easily. |
2175 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec
t* object2); | 2177 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec
t* object2); |
2176 | 2178 |
2177 #endif | 2179 #endif |
2178 | 2180 |
2179 #endif // LayoutObject_h | 2181 #endif // LayoutObject_h |
OLD | NEW |