| 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 | 81 |
| 82 enum HitTestFilter { | 82 enum HitTestFilter { |
| 83 HitTestAll, | 83 HitTestAll, |
| 84 HitTestSelf, | 84 HitTestSelf, |
| 85 HitTestDescendants | 85 HitTestDescendants |
| 86 }; | 86 }; |
| 87 | 87 |
| 88 enum MarkingBehavior { | 88 enum MarkingBehavior { |
| 89 MarkOnlyThis, | 89 MarkOnlyThis, |
| 90 MarkContainerChain, | 90 MarkContainerChain, |
| 91 MarkContainerChainInLayout, |
| 91 }; | 92 }; |
| 92 | 93 |
| 93 enum MapCoordinatesMode { | 94 enum MapCoordinatesMode { |
| 94 IsFixed = 1 << 0, | 95 IsFixed = 1 << 0, |
| 95 UseTransforms = 1 << 1, | 96 UseTransforms = 1 << 1, |
| 96 ApplyContainerFlip = 1 << 2, | 97 ApplyContainerFlip = 1 << 2, |
| 97 TraverseDocumentBoundaries = 1 << 3, | 98 TraverseDocumentBoundaries = 1 << 3, |
| 98 | 99 |
| 99 // Applies to LayoutView::mapLocalToAncestor() and LayoutView::mapToVisualRe
ctInAncestorSpace() | 100 // Applies to LayoutView::mapLocalToAncestor() and LayoutView::mapToVisualRe
ctInAncestorSpace() |
| 100 // only, to indicate the input point or rect is in frame coordinates instead
of frame contents | 101 // only, to indicate the input point or rect is in frame coordinates instead
of frame contents |
| (...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 803 LayoutObject* container(const LayoutBoxModelObject* ancestor = nullptr, bool
* ancestorSkipped = nullptr) const; | 804 LayoutObject* container(const LayoutBoxModelObject* ancestor = nullptr, bool
* ancestorSkipped = nullptr) const; |
| 804 // Finds the container as if this object is fixed-position. | 805 // Finds the container as if this object is fixed-position. |
| 805 LayoutBlock* containerForFixedPosition(const LayoutBoxModelObject* ancestor
= nullptr, bool* ancestorSkipped = nullptr) const; | 806 LayoutBlock* containerForFixedPosition(const LayoutBoxModelObject* ancestor
= nullptr, bool* ancestorSkipped = nullptr) const; |
| 806 // Finds the containing block as if this object is absolute-position. | 807 // Finds the containing block as if this object is absolute-position. |
| 807 LayoutBlock* containingBlockForAbsolutePosition() const; | 808 LayoutBlock* containingBlockForAbsolutePosition() const; |
| 808 | 809 |
| 809 virtual LayoutObject* hoverAncestor() const { return parent(); } | 810 virtual LayoutObject* hoverAncestor() const { return parent(); } |
| 810 | 811 |
| 811 Element* offsetParent() const; | 812 Element* offsetParent() const; |
| 812 | 813 |
| 813 void markContainerChainForLayout(bool scheduleRelayout = true); | 814 void markContainerChainForLayout(bool scheduleRelayout = true, SubtreeLayout
Scope* = nullptr); |
| 814 void markContainerChainForLayout(SubtreeLayoutScope*); | |
| 815 void setNeedsLayout(LayoutInvalidationReasonForTracing, MarkingBehavior = Ma
rkContainerChain, SubtreeLayoutScope* = nullptr); | 815 void setNeedsLayout(LayoutInvalidationReasonForTracing, MarkingBehavior = Ma
rkContainerChain, SubtreeLayoutScope* = nullptr); |
| 816 void setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationReasonForTraci
ng, MarkingBehavior = MarkContainerChain, SubtreeLayoutScope* = nullptr); | 816 void setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationReasonForTraci
ng, MarkingBehavior = MarkContainerChain, SubtreeLayoutScope* = nullptr); |
| 817 void clearNeedsLayout(); | 817 void clearNeedsLayout(); |
| 818 void setChildNeedsLayout(MarkingBehavior = MarkContainerChain, SubtreeLayout
Scope* = nullptr); | 818 void setChildNeedsLayout(MarkingBehavior = MarkContainerChain, SubtreeLayout
Scope* = nullptr); |
| 819 void setNeedsPositionedMovementLayout(); | 819 void setNeedsPositionedMovementLayout(); |
| 820 void setPreferredLogicalWidthsDirty(MarkingBehavior = MarkContainerChain); | 820 void setPreferredLogicalWidthsDirty(MarkingBehavior = MarkContainerChain); |
| 821 void clearPreferredLogicalWidthsDirty(); | 821 void clearPreferredLogicalWidthsDirty(); |
| 822 | 822 |
| 823 void setNeedsLayoutAndPrefWidthsRecalc(LayoutInvalidationReasonForTracing re
ason) | 823 void setNeedsLayoutAndPrefWidthsRecalc(LayoutInvalidationReasonForTracing re
ason) |
| 824 { | 824 { |
| (...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1600 | 1600 |
| 1601 void updateImage(StyleImage*, StyleImage*); | 1601 void updateImage(StyleImage*, StyleImage*); |
| 1602 | 1602 |
| 1603 void scheduleRelayout(); | 1603 void scheduleRelayout(); |
| 1604 | 1604 |
| 1605 void updateShapeImage(const ShapeValue*, const ShapeValue*); | 1605 void updateShapeImage(const ShapeValue*, const ShapeValue*); |
| 1606 void updateFillImages(const FillLayer* oldLayers, const FillLayer& newLayers
); | 1606 void updateFillImages(const FillLayer* oldLayers, const FillLayer& newLayers
); |
| 1607 | 1607 |
| 1608 void setNeedsOverflowRecalcAfterStyleChange(); | 1608 void setNeedsOverflowRecalcAfterStyleChange(); |
| 1609 | 1609 |
| 1610 void markContainerChainForLayout(bool scheduleRelayout, SubtreeLayoutScope*)
; | |
| 1611 | |
| 1612 // FIXME: This should be 'markContaingBoxChainForOverflowRecalc when we make
LayoutBox | 1610 // FIXME: This should be 'markContaingBoxChainForOverflowRecalc when we make
LayoutBox |
| 1613 // recomputeOverflow-capable. crbug.com/437012 and crbug.com/434700. | 1611 // recomputeOverflow-capable. crbug.com/437012 and crbug.com/434700. |
| 1614 inline void markAncestorsForOverflowRecalcIfNeeded(); | 1612 inline void markAncestorsForOverflowRecalcIfNeeded(); |
| 1615 | 1613 |
| 1616 inline void markAncestorsForPaintInvalidation(); | 1614 inline void markAncestorsForPaintInvalidation(); |
| 1617 | 1615 |
| 1618 inline void invalidateSelectionIfNeeded(const LayoutBoxModelObject& paintInv
alidationContainer, const PaintInvalidationState&, PaintInvalidationReason); | 1616 inline void invalidateSelectionIfNeeded(const LayoutBoxModelObject& paintInv
alidationContainer, const PaintInvalidationState&, PaintInvalidationReason); |
| 1619 | 1617 |
| 1620 inline void invalidateContainerPreferredLogicalWidths(); | 1618 inline void invalidateContainerPreferredLogicalWidths(); |
| 1621 | 1619 |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2010 ASSERT(!isSetNeedsLayoutForbidden()); | 2008 ASSERT(!isSetNeedsLayoutForbidden()); |
| 2011 bool alreadyNeededLayout = m_bitfields.selfNeedsLayout(); | 2009 bool alreadyNeededLayout = m_bitfields.selfNeedsLayout(); |
| 2012 setSelfNeedsLayout(true); | 2010 setSelfNeedsLayout(true); |
| 2013 if (!alreadyNeededLayout) { | 2011 if (!alreadyNeededLayout) { |
| 2014 TRACE_EVENT_INSTANT1( | 2012 TRACE_EVENT_INSTANT1( |
| 2015 TRACE_DISABLED_BY_DEFAULT("devtools.timeline.invalidationTracking"), | 2013 TRACE_DISABLED_BY_DEFAULT("devtools.timeline.invalidationTracking"), |
| 2016 "LayoutInvalidationTracking", | 2014 "LayoutInvalidationTracking", |
| 2017 TRACE_EVENT_SCOPE_THREAD, | 2015 TRACE_EVENT_SCOPE_THREAD, |
| 2018 "data", | 2016 "data", |
| 2019 InspectorLayoutInvalidationTrackingEvent::data(this, reason)); | 2017 InspectorLayoutInvalidationTrackingEvent::data(this, reason)); |
| 2020 if (markParents == MarkContainerChain && (!layouter || layouter->root()
!= this)) | 2018 if (markParents != MarkOnlyThis && (!layouter || layouter->root() != thi
s)) |
| 2021 markContainerChainForLayout(layouter); | 2019 markContainerChainForLayout(!layouter && markParents == MarkContaine
rChain, layouter); |
| 2022 } | 2020 } |
| 2023 } | 2021 } |
| 2024 | 2022 |
| 2025 inline void LayoutObject::setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidat
ionReasonForTracing reason, MarkingBehavior markParents, SubtreeLayoutScope* lay
outer) | 2023 inline void LayoutObject::setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidat
ionReasonForTracing reason, MarkingBehavior markParents, SubtreeLayoutScope* lay
outer) |
| 2026 { | 2024 { |
| 2027 setNeedsLayout(reason, markParents, layouter); | 2025 setNeedsLayout(reason, markParents, layouter); |
| 2028 setShouldDoFullPaintInvalidation(); | 2026 setShouldDoFullPaintInvalidation(); |
| 2029 } | 2027 } |
| 2030 | 2028 |
| 2031 inline void LayoutObject::clearNeedsLayout() | 2029 inline void LayoutObject::clearNeedsLayout() |
| (...skipping 15 matching lines...) Expand all Loading... |
| 2047 checkBlockPositionedObjectsNeedLayout(); | 2045 checkBlockPositionedObjectsNeedLayout(); |
| 2048 #endif | 2046 #endif |
| 2049 } | 2047 } |
| 2050 | 2048 |
| 2051 inline void LayoutObject::setChildNeedsLayout(MarkingBehavior markParents, Subtr
eeLayoutScope* layouter) | 2049 inline void LayoutObject::setChildNeedsLayout(MarkingBehavior markParents, Subtr
eeLayoutScope* layouter) |
| 2052 { | 2050 { |
| 2053 ASSERT(!isSetNeedsLayoutForbidden()); | 2051 ASSERT(!isSetNeedsLayoutForbidden()); |
| 2054 bool alreadyNeededLayout = normalChildNeedsLayout(); | 2052 bool alreadyNeededLayout = normalChildNeedsLayout(); |
| 2055 setNormalChildNeedsLayout(true); | 2053 setNormalChildNeedsLayout(true); |
| 2056 // FIXME: Replace MarkOnlyThis with the SubtreeLayoutScope code path and rem
ove the MarkingBehavior argument entirely. | 2054 // FIXME: Replace MarkOnlyThis with the SubtreeLayoutScope code path and rem
ove the MarkingBehavior argument entirely. |
| 2057 if (!alreadyNeededLayout && markParents == MarkContainerChain && (!layouter
|| layouter->root() != this)) | 2055 if (!alreadyNeededLayout && markParents != MarkOnlyThis && (!layouter || lay
outer->root() != this)) |
| 2058 markContainerChainForLayout(layouter); | 2056 markContainerChainForLayout(!layouter && markParents == MarkContainerCha
in, layouter); |
| 2059 } | 2057 } |
| 2060 | 2058 |
| 2061 inline void LayoutObject::setNeedsPositionedMovementLayout() | 2059 inline void LayoutObject::setNeedsPositionedMovementLayout() |
| 2062 { | 2060 { |
| 2063 bool alreadyNeededLayout = needsPositionedMovementLayout(); | 2061 bool alreadyNeededLayout = needsPositionedMovementLayout(); |
| 2064 setNeedsPositionedMovementLayout(true); | 2062 setNeedsPositionedMovementLayout(true); |
| 2065 ASSERT(!isSetNeedsLayoutForbidden()); | 2063 ASSERT(!isSetNeedsLayoutForbidden()); |
| 2066 if (!alreadyNeededLayout) | 2064 if (!alreadyNeededLayout) |
| 2067 markContainerChainForLayout(); | 2065 markContainerChainForLayout(); |
| 2068 } | 2066 } |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2175 void showTree(const blink::LayoutObject*); | 2173 void showTree(const blink::LayoutObject*); |
| 2176 void showLineTree(const blink::LayoutObject*); | 2174 void showLineTree(const blink::LayoutObject*); |
| 2177 void showLayoutTree(const blink::LayoutObject* object1); | 2175 void showLayoutTree(const blink::LayoutObject* object1); |
| 2178 // We don't make object2 an optional parameter so that showLayoutTree | 2176 // We don't make object2 an optional parameter so that showLayoutTree |
| 2179 // can be called from gdb easily. | 2177 // can be called from gdb easily. |
| 2180 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec
t* object2); | 2178 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec
t* object2); |
| 2181 | 2179 |
| 2182 #endif | 2180 #endif |
| 2183 | 2181 |
| 2184 #endif // LayoutObject_h | 2182 #endif // LayoutObject_h |
| OLD | NEW |