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 779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
790 LayoutObject* containerCrossingFrameBoundaries() const; | 790 LayoutObject* containerCrossingFrameBoundaries() const; |
791 // Finds the container as if this object is fixed-position. | 791 // Finds the container as if this object is fixed-position. |
792 LayoutBlock* containerForFixedPosition(const LayoutBoxModelObject* ancestor
= nullptr, bool* ancestorSkipped = nullptr) const; | 792 LayoutBlock* containerForFixedPosition(const LayoutBoxModelObject* ancestor
= nullptr, bool* ancestorSkipped = nullptr) const; |
793 // Finds the containing block as if this object is absolute-position. | 793 // Finds the containing block as if this object is absolute-position. |
794 LayoutBlock* containingBlockForAbsolutePosition() const; | 794 LayoutBlock* containingBlockForAbsolutePosition() const; |
795 | 795 |
796 virtual LayoutObject* hoverAncestor() const { return parent(); } | 796 virtual LayoutObject* hoverAncestor() const { return parent(); } |
797 | 797 |
798 Element* offsetParent() const; | 798 Element* offsetParent() const; |
799 | 799 |
800 void markContainerChainForLayout(bool scheduleRelayout = true, SubtreeLayout
Scope* = nullptr); | 800 void markContainerChainForLayout(bool scheduleRelayout = true); |
| 801 void markContainerChainForLayout(SubtreeLayoutScope*); |
801 void setNeedsLayout(LayoutInvalidationReasonForTracing, MarkingBehavior = Ma
rkContainerChain, SubtreeLayoutScope* = nullptr); | 802 void setNeedsLayout(LayoutInvalidationReasonForTracing, MarkingBehavior = Ma
rkContainerChain, SubtreeLayoutScope* = nullptr); |
802 void setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationReasonForTraci
ng, MarkingBehavior = MarkContainerChain, SubtreeLayoutScope* = nullptr); | 803 void setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationReasonForTraci
ng, MarkingBehavior = MarkContainerChain, SubtreeLayoutScope* = nullptr); |
803 void clearNeedsLayout(); | 804 void clearNeedsLayout(); |
804 void setChildNeedsLayout(MarkingBehavior = MarkContainerChain, SubtreeLayout
Scope* = nullptr); | 805 void setChildNeedsLayout(MarkingBehavior = MarkContainerChain, SubtreeLayout
Scope* = nullptr); |
805 void setNeedsPositionedMovementLayout(); | 806 void setNeedsPositionedMovementLayout(); |
806 void setPreferredLogicalWidthsDirty(MarkingBehavior = MarkContainerChain); | 807 void setPreferredLogicalWidthsDirty(MarkingBehavior = MarkContainerChain); |
807 void clearPreferredLogicalWidthsDirty(); | 808 void clearPreferredLogicalWidthsDirty(); |
808 | 809 |
809 void setNeedsLayoutAndPrefWidthsRecalc(LayoutInvalidationReasonForTracing re
ason) | 810 void setNeedsLayoutAndPrefWidthsRecalc(LayoutInvalidationReasonForTracing re
ason) |
810 { | 811 { |
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1571 | 1572 |
1572 void updateImage(StyleImage*, StyleImage*); | 1573 void updateImage(StyleImage*, StyleImage*); |
1573 | 1574 |
1574 void scheduleRelayout(); | 1575 void scheduleRelayout(); |
1575 | 1576 |
1576 void updateShapeImage(const ShapeValue*, const ShapeValue*); | 1577 void updateShapeImage(const ShapeValue*, const ShapeValue*); |
1577 void updateFillImages(const FillLayer* oldLayers, const FillLayer& newLayers
); | 1578 void updateFillImages(const FillLayer* oldLayers, const FillLayer& newLayers
); |
1578 | 1579 |
1579 void setNeedsOverflowRecalcAfterStyleChange(); | 1580 void setNeedsOverflowRecalcAfterStyleChange(); |
1580 | 1581 |
| 1582 void markContainerChainForLayout(bool scheduleRelayout, SubtreeLayoutScope*)
; |
| 1583 |
1581 // FIXME: This should be 'markContaingBoxChainForOverflowRecalc when we make
LayoutBox | 1584 // FIXME: This should be 'markContaingBoxChainForOverflowRecalc when we make
LayoutBox |
1582 // recomputeOverflow-capable. crbug.com/437012 and crbug.com/434700. | 1585 // recomputeOverflow-capable. crbug.com/437012 and crbug.com/434700. |
1583 inline void markContainingBlocksForOverflowRecalc(); | 1586 inline void markContainingBlocksForOverflowRecalc(); |
1584 | 1587 |
1585 inline void markContainerChainForPaintInvalidation(); | 1588 inline void markContainerChainForPaintInvalidation(); |
1586 | 1589 |
1587 inline void invalidateSelectionIfNeeded(const LayoutBoxModelObject& paintInv
alidationContainer, const PaintInvalidationState&, PaintInvalidationReason); | 1590 inline void invalidateSelectionIfNeeded(const LayoutBoxModelObject& paintInv
alidationContainer, const PaintInvalidationState&, PaintInvalidationReason); |
1588 | 1591 |
1589 inline void invalidateContainerPreferredLogicalWidths(); | 1592 inline void invalidateContainerPreferredLogicalWidths(); |
1590 | 1593 |
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1978 bool alreadyNeededLayout = m_bitfields.selfNeedsLayout(); | 1981 bool alreadyNeededLayout = m_bitfields.selfNeedsLayout(); |
1979 setSelfNeedsLayout(true); | 1982 setSelfNeedsLayout(true); |
1980 if (!alreadyNeededLayout) { | 1983 if (!alreadyNeededLayout) { |
1981 TRACE_EVENT_INSTANT1( | 1984 TRACE_EVENT_INSTANT1( |
1982 TRACE_DISABLED_BY_DEFAULT("devtools.timeline.invalidationTracking"), | 1985 TRACE_DISABLED_BY_DEFAULT("devtools.timeline.invalidationTracking"), |
1983 "LayoutInvalidationTracking", | 1986 "LayoutInvalidationTracking", |
1984 TRACE_EVENT_SCOPE_THREAD, | 1987 TRACE_EVENT_SCOPE_THREAD, |
1985 "data", | 1988 "data", |
1986 InspectorLayoutInvalidationTrackingEvent::data(this, reason)); | 1989 InspectorLayoutInvalidationTrackingEvent::data(this, reason)); |
1987 if (markParents == MarkContainerChain && (!layouter || layouter->root()
!= this)) | 1990 if (markParents == MarkContainerChain && (!layouter || layouter->root()
!= this)) |
1988 markContainerChainForLayout(true, layouter); | 1991 markContainerChainForLayout(layouter); |
1989 } | 1992 } |
1990 } | 1993 } |
1991 | 1994 |
1992 inline void LayoutObject::setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidat
ionReasonForTracing reason, MarkingBehavior markParents, SubtreeLayoutScope* lay
outer) | 1995 inline void LayoutObject::setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidat
ionReasonForTracing reason, MarkingBehavior markParents, SubtreeLayoutScope* lay
outer) |
1993 { | 1996 { |
1994 setNeedsLayout(reason, markParents, layouter); | 1997 setNeedsLayout(reason, markParents, layouter); |
1995 setShouldDoFullPaintInvalidation(); | 1998 setShouldDoFullPaintInvalidation(); |
1996 } | 1999 } |
1997 | 2000 |
1998 inline void LayoutObject::clearNeedsLayout() | 2001 inline void LayoutObject::clearNeedsLayout() |
(...skipping 16 matching lines...) Expand all Loading... |
2015 #endif | 2018 #endif |
2016 } | 2019 } |
2017 | 2020 |
2018 inline void LayoutObject::setChildNeedsLayout(MarkingBehavior markParents, Subtr
eeLayoutScope* layouter) | 2021 inline void LayoutObject::setChildNeedsLayout(MarkingBehavior markParents, Subtr
eeLayoutScope* layouter) |
2019 { | 2022 { |
2020 ASSERT(!isSetNeedsLayoutForbidden()); | 2023 ASSERT(!isSetNeedsLayoutForbidden()); |
2021 bool alreadyNeededLayout = normalChildNeedsLayout(); | 2024 bool alreadyNeededLayout = normalChildNeedsLayout(); |
2022 setNormalChildNeedsLayout(true); | 2025 setNormalChildNeedsLayout(true); |
2023 // FIXME: Replace MarkOnlyThis with the SubtreeLayoutScope code path and rem
ove the MarkingBehavior argument entirely. | 2026 // FIXME: Replace MarkOnlyThis with the SubtreeLayoutScope code path and rem
ove the MarkingBehavior argument entirely. |
2024 if (!alreadyNeededLayout && markParents == MarkContainerChain && (!layouter
|| layouter->root() != this)) | 2027 if (!alreadyNeededLayout && markParents == MarkContainerChain && (!layouter
|| layouter->root() != this)) |
2025 markContainerChainForLayout(true, layouter); | 2028 markContainerChainForLayout(layouter); |
2026 } | 2029 } |
2027 | 2030 |
2028 inline void LayoutObject::setNeedsPositionedMovementLayout() | 2031 inline void LayoutObject::setNeedsPositionedMovementLayout() |
2029 { | 2032 { |
2030 bool alreadyNeededLayout = needsPositionedMovementLayout(); | 2033 bool alreadyNeededLayout = needsPositionedMovementLayout(); |
2031 setNeedsPositionedMovementLayout(true); | 2034 setNeedsPositionedMovementLayout(true); |
2032 ASSERT(!isSetNeedsLayoutForbidden()); | 2035 ASSERT(!isSetNeedsLayoutForbidden()); |
2033 if (!alreadyNeededLayout) | 2036 if (!alreadyNeededLayout) |
2034 markContainerChainForLayout(); | 2037 markContainerChainForLayout(); |
2035 } | 2038 } |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2142 void showTree(const blink::LayoutObject*); | 2145 void showTree(const blink::LayoutObject*); |
2143 void showLineTree(const blink::LayoutObject*); | 2146 void showLineTree(const blink::LayoutObject*); |
2144 void showLayoutTree(const blink::LayoutObject* object1); | 2147 void showLayoutTree(const blink::LayoutObject* object1); |
2145 // We don't make object2 an optional parameter so that showLayoutTree | 2148 // We don't make object2 an optional parameter so that showLayoutTree |
2146 // can be called from gdb easily. | 2149 // can be called from gdb easily. |
2147 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec
t* object2); | 2150 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec
t* object2); |
2148 | 2151 |
2149 #endif | 2152 #endif |
2150 | 2153 |
2151 #endif // LayoutObject_h | 2154 #endif // LayoutObject_h |
OLD | NEW |