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

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

Issue 2000763003: Check subtree paint invalidation when overflow clip status changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 1343 matching lines...) Expand 10 before | Expand all | Expand 10 after
1354 void setShouldDoFullPaintInvalidation(PaintInvalidationReason = PaintInvalid ationFull); 1354 void setShouldDoFullPaintInvalidation(PaintInvalidationReason = PaintInvalid ationFull);
1355 void clearShouldDoFullPaintInvalidation() { m_bitfields.setFullPaintInvalida tionReason(PaintInvalidationNone); } 1355 void clearShouldDoFullPaintInvalidation() { m_bitfields.setFullPaintInvalida tionReason(PaintInvalidationNone); }
1356 1356
1357 bool shouldInvalidateOverflowForPaint() const { return m_bitfields.shouldInv alidateOverflowForPaint(); } 1357 bool shouldInvalidateOverflowForPaint() const { return m_bitfields.shouldInv alidateOverflowForPaint(); }
1358 1358
1359 virtual void clearPaintInvalidationFlags(const PaintInvalidationState&); 1359 virtual void clearPaintInvalidationFlags(const PaintInvalidationState&);
1360 1360
1361 bool mayNeedPaintInvalidation() const { return m_bitfields.mayNeedPaintInval idation(); } 1361 bool mayNeedPaintInvalidation() const { return m_bitfields.mayNeedPaintInval idation(); }
1362 void setMayNeedPaintInvalidation(); 1362 void setMayNeedPaintInvalidation();
1363 1363
1364 bool mayNeedPaintInvalidationSubtree() const { return m_bitfields.mayNeedPai ntInvalidationSubtree(); }
1365 void setMayNeedPaintInvalidationSubtree();
1366
1364 bool shouldInvalidateSelection() const { return m_bitfields.shouldInvalidate Selection(); } 1367 bool shouldInvalidateSelection() const { return m_bitfields.shouldInvalidate Selection(); }
1365 void setShouldInvalidateSelection(); 1368 void setShouldInvalidateSelection();
1366 1369
1367 bool shouldCheckForPaintInvalidation(const PaintInvalidationState& paintInva lidationState) const 1370 bool shouldCheckForPaintInvalidation(const PaintInvalidationState& paintInva lidationState) const
1368 { 1371 {
1369 return paintInvalidationState.hasForcedSubtreeInvalidationFlags() 1372 return paintInvalidationState.hasForcedSubtreeInvalidationFlags()
1370 || shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState (); 1373 || shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState ();
1371 } 1374 }
1372 1375
1373 bool shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState() con st 1376 bool shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState() con st
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
1719 , m_needsPositionedMovementLayout(false) 1722 , m_needsPositionedMovementLayout(false)
1720 , m_normalChildNeedsLayout(false) 1723 , m_normalChildNeedsLayout(false)
1721 , m_posChildNeedsLayout(false) 1724 , m_posChildNeedsLayout(false)
1722 , m_needsSimplifiedNormalFlowLayout(false) 1725 , m_needsSimplifiedNormalFlowLayout(false)
1723 , m_selfNeedsOverflowRecalcAfterStyleChange(false) 1726 , m_selfNeedsOverflowRecalcAfterStyleChange(false)
1724 , m_childNeedsOverflowRecalcAfterStyleChange(false) 1727 , m_childNeedsOverflowRecalcAfterStyleChange(false)
1725 , m_preferredLogicalWidthsDirty(false) 1728 , m_preferredLogicalWidthsDirty(false)
1726 , m_shouldInvalidateOverflowForPaint(false) 1729 , m_shouldInvalidateOverflowForPaint(false)
1727 , m_childShouldCheckForPaintInvalidation(false) 1730 , m_childShouldCheckForPaintInvalidation(false)
1728 , m_mayNeedPaintInvalidation(false) 1731 , m_mayNeedPaintInvalidation(false)
1732 , m_mayNeedPaintInvalidationSubtree(false)
1729 , m_shouldInvalidateSelection(false) 1733 , m_shouldInvalidateSelection(false)
1730 , m_neededLayoutBecauseOfChildren(false) 1734 , m_neededLayoutBecauseOfChildren(false)
1731 , m_floating(false) 1735 , m_floating(false)
1732 , m_isAnonymous(!node) 1736 , m_isAnonymous(!node)
1733 , m_isText(false) 1737 , m_isText(false)
1734 , m_isBox(false) 1738 , m_isBox(false)
1735 , m_isInline(true) 1739 , m_isInline(true)
1736 , m_isAtomicInlineLevel(false) 1740 , m_isAtomicInlineLevel(false)
1737 , m_horizontalWritingMode(true) 1741 , m_horizontalWritingMode(true)
1738 , m_isDragging(false) 1742 , m_isDragging(false)
(...skipping 15 matching lines...) Expand all
1754 , m_lastBoxDecorationBackgroundObscured(false) 1758 , m_lastBoxDecorationBackgroundObscured(false)
1755 , m_isBackgroundAttachmentFixedObject(false) 1759 , m_isBackgroundAttachmentFixedObject(false)
1756 , m_isScrollAnchorObject(false) 1760 , m_isScrollAnchorObject(false)
1757 , m_positionedState(IsStaticallyPositioned) 1761 , m_positionedState(IsStaticallyPositioned)
1758 , m_selectionState(SelectionNone) 1762 , m_selectionState(SelectionNone)
1759 , m_boxDecorationBackgroundState(NoBoxDecorationBackground) 1763 , m_boxDecorationBackgroundState(NoBoxDecorationBackground)
1760 , m_fullPaintInvalidationReason(PaintInvalidationNone) 1764 , m_fullPaintInvalidationReason(PaintInvalidationNone)
1761 { 1765 {
1762 } 1766 }
1763 1767
1764 // 32 bits have been used in the first word, and 17 in the second. 1768 // 32 bits have been used in the first word, and 18 in the second.
1765 1769
1766 // Self needs layout means that this layout object is marked for a full layout. 1770 // Self needs layout means that this layout object is marked for a full layout.
1767 // This is the default layout but it is expensive as it recomputes every thing. 1771 // This is the default layout but it is expensive as it recomputes every thing.
1768 // For CSS boxes, this includes the width (laying out the line boxes aga in), the margins 1772 // For CSS boxes, this includes the width (laying out the line boxes aga in), the margins
1769 // (due to block collapsing margins), the positions, the height and the potential overflow. 1773 // (due to block collapsing margins), the positions, the height and the potential overflow.
1770 ADD_BOOLEAN_BITFIELD(selfNeedsLayout, SelfNeedsLayout); 1774 ADD_BOOLEAN_BITFIELD(selfNeedsLayout, SelfNeedsLayout);
1771 1775
1772 // A positioned movement layout is a specialized type of layout used on positioned objects 1776 // A positioned movement layout is a specialized type of layout used on positioned objects
1773 // that only visually moved. This layout is used when changing 'top'/'le ft' on a positioned 1777 // that only visually moved. This layout is used when changing 'top'/'le ft' on a positioned
1774 // element or margins on an out-of-flow one. Because the following opera tions don't impact 1778 // element or margins on an out-of-flow one. Because the following opera tions don't impact
(...skipping 30 matching lines...) Expand all
1805 1809
1806 // This boolean marks preferred logical widths for lazy recomputation. 1810 // This boolean marks preferred logical widths for lazy recomputation.
1807 // 1811 //
1808 // See INTRINSIC SIZES / PREFERRED LOGICAL WIDTHS above about those 1812 // See INTRINSIC SIZES / PREFERRED LOGICAL WIDTHS above about those
1809 // widths. 1813 // widths.
1810 ADD_BOOLEAN_BITFIELD(preferredLogicalWidthsDirty, PreferredLogicalWidths Dirty); 1814 ADD_BOOLEAN_BITFIELD(preferredLogicalWidthsDirty, PreferredLogicalWidths Dirty);
1811 1815
1812 ADD_BOOLEAN_BITFIELD(shouldInvalidateOverflowForPaint, ShouldInvalidateO verflowForPaint); // TODO(wangxianzhu): Remove for slimming paint v2. 1816 ADD_BOOLEAN_BITFIELD(shouldInvalidateOverflowForPaint, ShouldInvalidateO verflowForPaint); // TODO(wangxianzhu): Remove for slimming paint v2.
1813 ADD_BOOLEAN_BITFIELD(childShouldCheckForPaintInvalidation, ChildShouldCh eckForPaintInvalidation); 1817 ADD_BOOLEAN_BITFIELD(childShouldCheckForPaintInvalidation, ChildShouldCh eckForPaintInvalidation);
1814 ADD_BOOLEAN_BITFIELD(mayNeedPaintInvalidation, MayNeedPaintInvalidation) ; 1818 ADD_BOOLEAN_BITFIELD(mayNeedPaintInvalidation, MayNeedPaintInvalidation) ;
1819 ADD_BOOLEAN_BITFIELD(mayNeedPaintInvalidationSubtree, MayNeedPaintInvali dationSubtree);
1815 ADD_BOOLEAN_BITFIELD(shouldInvalidateSelection, ShouldInvalidateSelectio n); // TODO(wangxianzhu): Remove for slimming paint v2. 1820 ADD_BOOLEAN_BITFIELD(shouldInvalidateSelection, ShouldInvalidateSelectio n); // TODO(wangxianzhu): Remove for slimming paint v2.
1816 ADD_BOOLEAN_BITFIELD(neededLayoutBecauseOfChildren, NeededLayoutBecauseO fChildren); // TODO(wangxianzhu): Remove for slimming paint v2. 1821 ADD_BOOLEAN_BITFIELD(neededLayoutBecauseOfChildren, NeededLayoutBecauseO fChildren); // TODO(wangxianzhu): Remove for slimming paint v2.
1817 1822
1818 // This boolean is the cached value of 'float' 1823 // This boolean is the cached value of 'float'
1819 // (see ComputedStyle::isFloating). 1824 // (see ComputedStyle::isFloating).
1820 ADD_BOOLEAN_BITFIELD(floating, Floating); 1825 ADD_BOOLEAN_BITFIELD(floating, Floating);
1821 1826
1822 ADD_BOOLEAN_BITFIELD(isAnonymous, IsAnonymous); 1827 ADD_BOOLEAN_BITFIELD(isAnonymous, IsAnonymous);
1823 ADD_BOOLEAN_BITFIELD(isText, IsText); 1828 ADD_BOOLEAN_BITFIELD(isText, IsText);
1824 ADD_BOOLEAN_BITFIELD(isBox, IsBox); 1829 ADD_BOOLEAN_BITFIELD(isBox, IsBox);
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
2178 void showTree(const blink::LayoutObject*); 2183 void showTree(const blink::LayoutObject*);
2179 void showLineTree(const blink::LayoutObject*); 2184 void showLineTree(const blink::LayoutObject*);
2180 void showLayoutTree(const blink::LayoutObject* object1); 2185 void showLayoutTree(const blink::LayoutObject* object1);
2181 // We don't make object2 an optional parameter so that showLayoutTree 2186 // We don't make object2 an optional parameter so that showLayoutTree
2182 // can be called from gdb easily. 2187 // can be called from gdb easily.
2183 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2); 2188 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2);
2184 2189
2185 #endif 2190 #endif
2186 2191
2187 #endif // LayoutObject_h 2192 #endif // LayoutObject_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBoxModelObject.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