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

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

Issue 2779683002: Revert of Add 'WithoutGeometryChange' variants of paint invalidation flag setters (Closed)
Patch Set: Created 3 years, 9 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. 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc.
7 * All rights reserved. 7 * All rights reserved.
8 * Copyright (C) 2009 Google Inc. All rights reserved. 8 * Copyright (C) 2009 Google Inc. All rights reserved.
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 1627 matching lines...) Expand 10 before | Expand all | Expand 10 after
1638 const LayoutPoint& paintOffset() const { return m_paintOffset; } 1638 const LayoutPoint& paintOffset() const { return m_paintOffset; }
1639 1639
1640 PaintInvalidationReason fullPaintInvalidationReason() const { 1640 PaintInvalidationReason fullPaintInvalidationReason() const {
1641 return m_bitfields.fullPaintInvalidationReason(); 1641 return m_bitfields.fullPaintInvalidationReason();
1642 } 1642 }
1643 bool shouldDoFullPaintInvalidation() const { 1643 bool shouldDoFullPaintInvalidation() const {
1644 return m_bitfields.fullPaintInvalidationReason() != PaintInvalidationNone; 1644 return m_bitfields.fullPaintInvalidationReason() != PaintInvalidationNone;
1645 } 1645 }
1646 void setShouldDoFullPaintInvalidation( 1646 void setShouldDoFullPaintInvalidation(
1647 PaintInvalidationReason = PaintInvalidationFull); 1647 PaintInvalidationReason = PaintInvalidationFull);
1648 void setShouldDoFullPaintInvalidationWithoutGeometryChange(
1649 PaintInvalidationReason = PaintInvalidationFull);
1650 void clearShouldDoFullPaintInvalidation() { 1648 void clearShouldDoFullPaintInvalidation() {
1651 m_bitfields.setFullPaintInvalidationReason(PaintInvalidationNone); 1649 m_bitfields.setFullPaintInvalidationReason(PaintInvalidationNone);
1652 } 1650 }
1653 1651
1654 void clearPaintInvalidationFlags(); 1652 void clearPaintInvalidationFlags();
1655 1653
1656 bool mayNeedPaintInvalidation() const { 1654 bool mayNeedPaintInvalidation() const {
1657 return m_bitfields.mayNeedPaintInvalidation(); 1655 return m_bitfields.mayNeedPaintInvalidation();
1658 } 1656 }
1659 void setMayNeedPaintInvalidation(); 1657 void setMayNeedPaintInvalidation();
1660 void setMayNeedPaintInvalidationWithoutGeometryChange();
1661 1658
1662 bool mayNeedPaintInvalidationSubtree() const { 1659 bool mayNeedPaintInvalidationSubtree() const {
1663 return m_bitfields.mayNeedPaintInvalidationSubtree(); 1660 return m_bitfields.mayNeedPaintInvalidationSubtree();
1664 } 1661 }
1665 void setMayNeedPaintInvalidationSubtree(); 1662 void setMayNeedPaintInvalidationSubtree();
1666 1663
1667 bool needsPaintOffsetAndVisualRectUpdate() const {
1668 return m_bitfields.needsPaintOffsetAndVisualRectUpdate();
1669 }
1670
1671 bool mayNeedPaintInvalidationAnimatedBackgroundImage() const { 1664 bool mayNeedPaintInvalidationAnimatedBackgroundImage() const {
1672 return m_bitfields.mayNeedPaintInvalidationAnimatedBackgroundImage(); 1665 return m_bitfields.mayNeedPaintInvalidationAnimatedBackgroundImage();
1673 } 1666 }
1674 void setMayNeedPaintInvalidationAnimatedBackgroundImage(); 1667 void setMayNeedPaintInvalidationAnimatedBackgroundImage();
1675 1668
1676 bool shouldInvalidateSelection() const { 1669 bool shouldInvalidateSelection() const {
1677 return m_bitfields.shouldInvalidateSelection(); 1670 return m_bitfields.shouldInvalidateSelection();
1678 } 1671 }
1679 void setShouldInvalidateSelection(); 1672 void setShouldInvalidateSelection();
1680 1673
1681 bool shouldCheckForPaintInvalidationWithPaintInvalidationState( 1674 bool shouldCheckForPaintInvalidationWithPaintInvalidationState(
1682 const PaintInvalidationState&) const; 1675 const PaintInvalidationState&) const;
1683 1676
1684 bool shouldCheckForPaintInvalidation() const { 1677 bool shouldCheckForPaintInvalidation() const {
1685 return mayNeedPaintInvalidation() || shouldDoFullPaintInvalidation(); 1678 return mayNeedPaintInvalidation() || shouldDoFullPaintInvalidation() ||
1679 shouldInvalidateSelection() ||
1680 m_bitfields.childShouldCheckForPaintInvalidation();
1686 } 1681 }
1687 1682
1688 virtual LayoutRect viewRect() const; 1683 virtual LayoutRect viewRect() const;
1689 1684
1690 // New version to replace the above old version. 1685 // New version to replace the above old version.
1691 virtual PaintInvalidationReason invalidatePaintIfNeeded( 1686 virtual PaintInvalidationReason invalidatePaintIfNeeded(
1692 const PaintInvalidatorContext&) const; 1687 const PaintInvalidatorContext&) const;
1693 1688
1694 // When this object is invalidated for paint, this method is called to 1689 // When this object is invalidated for paint, this method is called to
1695 // invalidate any DisplayItemClients owned by this object, including the 1690 // invalidate any DisplayItemClients owned by this object, including the
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
2012 // layerOffset is the offset of this layoutObject within the current layer 2007 // layerOffset is the offset of this layoutObject within the current layer
2013 // that should be used for each result. 2008 // that should be used for each result.
2014 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, 2009 virtual void computeSelfHitTestRects(Vector<LayoutRect>&,
2015 const LayoutPoint& layerOffset) const {} 2010 const LayoutPoint& layerOffset) const {}
2016 2011
2017 void setVisualRect(const LayoutRect& rect) { m_visualRect = rect; } 2012 void setVisualRect(const LayoutRect& rect) { m_visualRect = rect; }
2018 2013
2019 #if DCHECK_IS_ON() 2014 #if DCHECK_IS_ON()
2020 virtual bool paintInvalidationStateIsDirty() const { 2015 virtual bool paintInvalidationStateIsDirty() const {
2021 return backgroundChangedSinceLastPaintInvalidation() || 2016 return backgroundChangedSinceLastPaintInvalidation() ||
2022 shouldCheckForPaintInvalidation() || shouldInvalidateSelection() || 2017 shouldCheckForPaintInvalidation();
2023 needsPaintOffsetAndVisualRectUpdate();
2024 } 2018 }
2025 #endif 2019 #endif
2026 2020
2027 // Called before paint invalidation. 2021 // Called before paint invalidation.
2028 virtual void ensureIsReadyForPaintInvalidation() { DCHECK(!needsLayout()); } 2022 virtual void ensureIsReadyForPaintInvalidation() { DCHECK(!needsLayout()); }
2029 2023
2030 // This function walks the descendants of |this|, following a 2024 // This function walks the descendants of |this|, following a
2031 // layout ordering. 2025 // layout ordering.
2032 // 2026 //
2033 // The ordering is important for PaintInvalidationState, as it requires to be 2027 // The ordering is important for PaintInvalidationState, as it requires to be
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
2098 2092
2099 // Walk up the parent chain and find the first scrolling block to disable 2093 // Walk up the parent chain and find the first scrolling block to disable
2100 // scroll anchoring on. 2094 // scroll anchoring on.
2101 void setScrollAnchorDisablingStyleChangedOnAncestor(); 2095 void setScrollAnchorDisablingStyleChangedOnAncestor();
2102 2096
2103 // FIXME: This should be 'markContaingBoxChainForOverflowRecalc when we make 2097 // FIXME: This should be 'markContaingBoxChainForOverflowRecalc when we make
2104 // LayoutBox recomputeOverflow-capable. crbug.com/437012 and crbug.com/434700. 2098 // LayoutBox recomputeOverflow-capable. crbug.com/437012 and crbug.com/434700.
2105 inline void markAncestorsForOverflowRecalcIfNeeded(); 2099 inline void markAncestorsForOverflowRecalcIfNeeded();
2106 2100
2107 inline void markAncestorsForPaintInvalidation(); 2101 inline void markAncestorsForPaintInvalidation();
2108 inline void setNeedsPaintOffsetAndVisualRectUpdate();
2109 2102
2110 inline void invalidateContainerPreferredLogicalWidths(); 2103 inline void invalidateContainerPreferredLogicalWidths();
2111 2104
2112 void invalidatePaintIncludingNonSelfPaintingLayerDescendantsInternal( 2105 void invalidatePaintIncludingNonSelfPaintingLayerDescendantsInternal(
2113 const LayoutBoxModelObject& paintInvalidationContainer); 2106 const LayoutBoxModelObject& paintInvalidationContainer);
2114 2107
2115 LayoutObject* containerForAbsolutePosition(AncestorSkipInfo* = nullptr) const; 2108 LayoutObject* containerForAbsolutePosition(AncestorSkipInfo* = nullptr) const;
2116 2109
2117 const LayoutBoxModelObject* enclosingCompositedContainer() const; 2110 const LayoutBoxModelObject* enclosingCompositedContainer() const;
2118 2111
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
2195 // of the memory constraints on layout objects. 2188 // of the memory constraints on layout objects.
2196 LayoutObjectBitfields(Node* node) 2189 LayoutObjectBitfields(Node* node)
2197 : m_selfNeedsLayout(false), 2190 : m_selfNeedsLayout(false),
2198 m_needsPositionedMovementLayout(false), 2191 m_needsPositionedMovementLayout(false),
2199 m_normalChildNeedsLayout(false), 2192 m_normalChildNeedsLayout(false),
2200 m_posChildNeedsLayout(false), 2193 m_posChildNeedsLayout(false),
2201 m_needsSimplifiedNormalFlowLayout(false), 2194 m_needsSimplifiedNormalFlowLayout(false),
2202 m_selfNeedsOverflowRecalcAfterStyleChange(false), 2195 m_selfNeedsOverflowRecalcAfterStyleChange(false),
2203 m_childNeedsOverflowRecalcAfterStyleChange(false), 2196 m_childNeedsOverflowRecalcAfterStyleChange(false),
2204 m_preferredLogicalWidthsDirty(false), 2197 m_preferredLogicalWidthsDirty(false),
2198 m_childShouldCheckForPaintInvalidation(false),
2205 m_mayNeedPaintInvalidation(false), 2199 m_mayNeedPaintInvalidation(false),
2206 m_mayNeedPaintInvalidationSubtree(false), 2200 m_mayNeedPaintInvalidationSubtree(false),
2207 m_mayNeedPaintInvalidationAnimatedBackgroundImage(false), 2201 m_mayNeedPaintInvalidationAnimatedBackgroundImage(false),
2208 m_needsPaintOffsetAndVisualRectUpdate(false),
2209 m_shouldInvalidateSelection(false), 2202 m_shouldInvalidateSelection(false),
2210 m_floating(false), 2203 m_floating(false),
2211 m_isAnonymous(!node), 2204 m_isAnonymous(!node),
2212 m_isText(false), 2205 m_isText(false),
2213 m_isBox(false), 2206 m_isBox(false),
2214 m_isInline(true), 2207 m_isInline(true),
2215 m_isAtomicInlineLevel(false), 2208 m_isAtomicInlineLevel(false),
2216 m_horizontalWritingMode(true), 2209 m_horizontalWritingMode(true),
2217 m_hasLayer(false), 2210 m_hasLayer(false),
2218 m_hasOverflowClip(false), 2211 m_hasOverflowClip(false),
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
2297 ADD_BOOLEAN_BITFIELD(childNeedsOverflowRecalcAfterStyleChange, 2290 ADD_BOOLEAN_BITFIELD(childNeedsOverflowRecalcAfterStyleChange,
2298 ChildNeedsOverflowRecalcAfterStyleChange); 2291 ChildNeedsOverflowRecalcAfterStyleChange);
2299 2292
2300 // This boolean marks preferred logical widths for lazy recomputation. 2293 // This boolean marks preferred logical widths for lazy recomputation.
2301 // 2294 //
2302 // See INTRINSIC SIZES / PREFERRED LOGICAL WIDTHS above about those 2295 // See INTRINSIC SIZES / PREFERRED LOGICAL WIDTHS above about those
2303 // widths. 2296 // widths.
2304 ADD_BOOLEAN_BITFIELD(preferredLogicalWidthsDirty, 2297 ADD_BOOLEAN_BITFIELD(preferredLogicalWidthsDirty,
2305 PreferredLogicalWidthsDirty); 2298 PreferredLogicalWidthsDirty);
2306 2299
2300 ADD_BOOLEAN_BITFIELD(childShouldCheckForPaintInvalidation,
2301 ChildShouldCheckForPaintInvalidation);
2307 ADD_BOOLEAN_BITFIELD(mayNeedPaintInvalidation, MayNeedPaintInvalidation); 2302 ADD_BOOLEAN_BITFIELD(mayNeedPaintInvalidation, MayNeedPaintInvalidation);
2308 ADD_BOOLEAN_BITFIELD(mayNeedPaintInvalidationSubtree, 2303 ADD_BOOLEAN_BITFIELD(mayNeedPaintInvalidationSubtree,
2309 MayNeedPaintInvalidationSubtree); 2304 MayNeedPaintInvalidationSubtree);
2310 ADD_BOOLEAN_BITFIELD(mayNeedPaintInvalidationAnimatedBackgroundImage, 2305 ADD_BOOLEAN_BITFIELD(mayNeedPaintInvalidationAnimatedBackgroundImage,
2311 MayNeedPaintInvalidationAnimatedBackgroundImage); 2306 MayNeedPaintInvalidationAnimatedBackgroundImage);
2312 ADD_BOOLEAN_BITFIELD(needsPaintOffsetAndVisualRectUpdate,
2313 NeedsPaintOffsetAndVisualRectUpdate);
2314 ADD_BOOLEAN_BITFIELD(shouldInvalidateSelection, ShouldInvalidateSelection); 2307 ADD_BOOLEAN_BITFIELD(shouldInvalidateSelection, ShouldInvalidateSelection);
2315 2308
2316 // This boolean is the cached value of 'float' 2309 // This boolean is the cached value of 'float'
2317 // (see ComputedStyle::isFloating). 2310 // (see ComputedStyle::isFloating).
2318 ADD_BOOLEAN_BITFIELD(floating, Floating); 2311 ADD_BOOLEAN_BITFIELD(floating, Floating);
2319 2312
2320 ADD_BOOLEAN_BITFIELD(isAnonymous, IsAnonymous); 2313 ADD_BOOLEAN_BITFIELD(isAnonymous, IsAnonymous);
2321 ADD_BOOLEAN_BITFIELD(isText, IsText); 2314 ADD_BOOLEAN_BITFIELD(isText, IsText);
2322 ADD_BOOLEAN_BITFIELD(isBox, IsBox); 2315 ADD_BOOLEAN_BITFIELD(isBox, IsBox);
2323 2316
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
2782 CORE_EXPORT void showLineTree(const blink::LayoutObject*); 2775 CORE_EXPORT void showLineTree(const blink::LayoutObject*);
2783 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1); 2776 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1);
2784 // We don't make object2 an optional parameter so that showLayoutTree 2777 // We don't make object2 an optional parameter so that showLayoutTree
2785 // can be called from gdb easily. 2778 // can be called from gdb easily.
2786 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1, 2779 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1,
2787 const blink::LayoutObject* object2); 2780 const blink::LayoutObject* object2);
2788 2781
2789 #endif 2782 #endif
2790 2783
2791 #endif // LayoutObject_h 2784 #endif // LayoutObject_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698