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

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

Issue 2229643002: Don't invalidate paint on background image change if it's obscured (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@BackgroundObscured
Patch Set: - Created 4 years, 4 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 1323 matching lines...) Expand 10 before | Expand all | Expand 10 after
1334 void clearShouldDoFullPaintInvalidation() { m_bitfields.setFullPaintInvalida tionReason(PaintInvalidationNone); } 1334 void clearShouldDoFullPaintInvalidation() { m_bitfields.setFullPaintInvalida tionReason(PaintInvalidationNone); }
1335 1335
1336 virtual void clearPaintInvalidationFlags(const PaintInvalidationState&); 1336 virtual void clearPaintInvalidationFlags(const PaintInvalidationState&);
1337 1337
1338 bool mayNeedPaintInvalidation() const { return m_bitfields.mayNeedPaintInval idation(); } 1338 bool mayNeedPaintInvalidation() const { return m_bitfields.mayNeedPaintInval idation(); }
1339 void setMayNeedPaintInvalidation(); 1339 void setMayNeedPaintInvalidation();
1340 1340
1341 bool mayNeedPaintInvalidationSubtree() const { return m_bitfields.mayNeedPai ntInvalidationSubtree(); } 1341 bool mayNeedPaintInvalidationSubtree() const { return m_bitfields.mayNeedPai ntInvalidationSubtree(); }
1342 void setMayNeedPaintInvalidationSubtree(); 1342 void setMayNeedPaintInvalidationSubtree();
1343 1343
1344 bool mayNeedPaintInvalidationAnimatedBackgroundImage() const { return m_bitf ields.mayNeedPaintInvalidationAnimatedBackgroundImage(); }
1345 void setMayNeedPaintInvalidationAnimatgedBackgroundImage();
1346
1344 bool shouldInvalidateSelection() const { return m_bitfields.shouldInvalidate Selection(); } 1347 bool shouldInvalidateSelection() const { return m_bitfields.shouldInvalidate Selection(); }
1345 void setShouldInvalidateSelection(); 1348 void setShouldInvalidateSelection();
1346 1349
1347 bool shouldCheckForPaintInvalidation(const PaintInvalidationState& paintInva lidationState) const 1350 bool shouldCheckForPaintInvalidation(const PaintInvalidationState& paintInva lidationState) const
1348 { 1351 {
1349 return paintInvalidationState.hasForcedSubtreeInvalidationFlags() 1352 return paintInvalidationState.hasForcedSubtreeInvalidationFlags()
1350 || shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState (); 1353 || shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState ();
1351 } 1354 }
1352 1355
1353 bool shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState() con st 1356 bool shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState() con st
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
1727 , m_needsPositionedMovementLayout(false) 1730 , m_needsPositionedMovementLayout(false)
1728 , m_normalChildNeedsLayout(false) 1731 , m_normalChildNeedsLayout(false)
1729 , m_posChildNeedsLayout(false) 1732 , m_posChildNeedsLayout(false)
1730 , m_needsSimplifiedNormalFlowLayout(false) 1733 , m_needsSimplifiedNormalFlowLayout(false)
1731 , m_selfNeedsOverflowRecalcAfterStyleChange(false) 1734 , m_selfNeedsOverflowRecalcAfterStyleChange(false)
1732 , m_childNeedsOverflowRecalcAfterStyleChange(false) 1735 , m_childNeedsOverflowRecalcAfterStyleChange(false)
1733 , m_preferredLogicalWidthsDirty(false) 1736 , m_preferredLogicalWidthsDirty(false)
1734 , m_childShouldCheckForPaintInvalidation(false) 1737 , m_childShouldCheckForPaintInvalidation(false)
1735 , m_mayNeedPaintInvalidation(false) 1738 , m_mayNeedPaintInvalidation(false)
1736 , m_mayNeedPaintInvalidationSubtree(false) 1739 , m_mayNeedPaintInvalidationSubtree(false)
1740 , m_mayNeedPaintInvalidationAnimatedBackgroundImage(false)
1737 , m_shouldInvalidateSelection(false) 1741 , m_shouldInvalidateSelection(false)
1738 , m_floating(false) 1742 , m_floating(false)
1739 , m_isAnonymous(!node) 1743 , m_isAnonymous(!node)
1740 , m_isText(false) 1744 , m_isText(false)
1741 , m_isBox(false) 1745 , m_isBox(false)
1742 , m_isInline(true) 1746 , m_isInline(true)
1743 , m_isAtomicInlineLevel(false) 1747 , m_isAtomicInlineLevel(false)
1744 , m_horizontalWritingMode(true) 1748 , m_horizontalWritingMode(true)
1745 , m_isDragging(false) 1749 , m_isDragging(false)
1746 , m_hasLayer(false) 1750 , m_hasLayer(false)
(...skipping 15 matching lines...) Expand all
1762 , m_isBackgroundAttachmentFixedObject(false) 1766 , m_isBackgroundAttachmentFixedObject(false)
1763 , m_isScrollAnchorObject(false) 1767 , m_isScrollAnchorObject(false)
1764 , m_hasBoxDecorationBackground(false) 1768 , m_hasBoxDecorationBackground(false)
1765 , m_positionedState(IsStaticallyPositioned) 1769 , m_positionedState(IsStaticallyPositioned)
1766 , m_selectionState(SelectionNone) 1770 , m_selectionState(SelectionNone)
1767 , m_backgroundObscurationState(BackgroundObscurationStatusInvalid) 1771 , m_backgroundObscurationState(BackgroundObscurationStatusInvalid)
1768 , m_fullPaintInvalidationReason(PaintInvalidationNone) 1772 , m_fullPaintInvalidationReason(PaintInvalidationNone)
1769 { 1773 {
1770 } 1774 }
1771 1775
1772 // 32 bits have been used in the first word, and 17 in the second. 1776 // 32 bits have been used in the first word, and 18 in the second.
1773 1777
1774 // Self needs layout means that this layout object is marked for a full layout. 1778 // Self needs layout means that this layout object is marked for a full layout.
1775 // This is the default layout but it is expensive as it recomputes every thing. 1779 // This is the default layout but it is expensive as it recomputes every thing.
1776 // For CSS boxes, this includes the width (laying out the line boxes aga in), the margins 1780 // For CSS boxes, this includes the width (laying out the line boxes aga in), the margins
1777 // (due to block collapsing margins), the positions, the height and the potential overflow. 1781 // (due to block collapsing margins), the positions, the height and the potential overflow.
1778 ADD_BOOLEAN_BITFIELD(selfNeedsLayout, SelfNeedsLayout); 1782 ADD_BOOLEAN_BITFIELD(selfNeedsLayout, SelfNeedsLayout);
1779 1783
1780 // A positioned movement layout is a specialized type of layout used on positioned objects 1784 // A positioned movement layout is a specialized type of layout used on positioned objects
1781 // that only visually moved. This layout is used when changing 'top'/'le ft' on a positioned 1785 // that only visually moved. This layout is used when changing 'top'/'le ft' on a positioned
1782 // element or margins on an out-of-flow one. Because the following opera tions don't impact 1786 // element or margins on an out-of-flow one. Because the following opera tions don't impact
(...skipping 30 matching lines...) Expand all
1813 1817
1814 // This boolean marks preferred logical widths for lazy recomputation. 1818 // This boolean marks preferred logical widths for lazy recomputation.
1815 // 1819 //
1816 // See INTRINSIC SIZES / PREFERRED LOGICAL WIDTHS above about those 1820 // See INTRINSIC SIZES / PREFERRED LOGICAL WIDTHS above about those
1817 // widths. 1821 // widths.
1818 ADD_BOOLEAN_BITFIELD(preferredLogicalWidthsDirty, PreferredLogicalWidths Dirty); 1822 ADD_BOOLEAN_BITFIELD(preferredLogicalWidthsDirty, PreferredLogicalWidths Dirty);
1819 1823
1820 ADD_BOOLEAN_BITFIELD(childShouldCheckForPaintInvalidation, ChildShouldCh eckForPaintInvalidation); 1824 ADD_BOOLEAN_BITFIELD(childShouldCheckForPaintInvalidation, ChildShouldCh eckForPaintInvalidation);
1821 ADD_BOOLEAN_BITFIELD(mayNeedPaintInvalidation, MayNeedPaintInvalidation) ; 1825 ADD_BOOLEAN_BITFIELD(mayNeedPaintInvalidation, MayNeedPaintInvalidation) ;
1822 ADD_BOOLEAN_BITFIELD(mayNeedPaintInvalidationSubtree, MayNeedPaintInvali dationSubtree); 1826 ADD_BOOLEAN_BITFIELD(mayNeedPaintInvalidationSubtree, MayNeedPaintInvali dationSubtree);
1827 ADD_BOOLEAN_BITFIELD(mayNeedPaintInvalidationAnimatedBackgroundImage, Ma yNeedPaintInvalidationAnimatedBackgroundImage);
1823 ADD_BOOLEAN_BITFIELD(shouldInvalidateSelection, ShouldInvalidateSelectio n); 1828 ADD_BOOLEAN_BITFIELD(shouldInvalidateSelection, ShouldInvalidateSelectio n);
1824 1829
1825 // This boolean is the cached value of 'float' 1830 // This boolean is the cached value of 'float'
1826 // (see ComputedStyle::isFloating). 1831 // (see ComputedStyle::isFloating).
1827 ADD_BOOLEAN_BITFIELD(floating, Floating); 1832 ADD_BOOLEAN_BITFIELD(floating, Floating);
1828 1833
1829 ADD_BOOLEAN_BITFIELD(isAnonymous, IsAnonymous); 1834 ADD_BOOLEAN_BITFIELD(isAnonymous, IsAnonymous);
1830 ADD_BOOLEAN_BITFIELD(isText, IsText); 1835 ADD_BOOLEAN_BITFIELD(isText, IsText);
1831 ADD_BOOLEAN_BITFIELD(isBox, IsBox); 1836 ADD_BOOLEAN_BITFIELD(isBox, IsBox);
1832 1837
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
2181 void showTree(const blink::LayoutObject*); 2186 void showTree(const blink::LayoutObject*);
2182 void showLineTree(const blink::LayoutObject*); 2187 void showLineTree(const blink::LayoutObject*);
2183 void showLayoutTree(const blink::LayoutObject* object1); 2188 void showLayoutTree(const blink::LayoutObject* object1);
2184 // We don't make object2 an optional parameter so that showLayoutTree 2189 // We don't make object2 an optional parameter so that showLayoutTree
2185 // can be called from gdb easily. 2190 // can be called from gdb easily.
2186 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2); 2191 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2);
2187 2192
2188 #endif 2193 #endif
2189 2194
2190 #endif // LayoutObject_h 2195 #endif // LayoutObject_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698