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

Unified Diff: third_party/WebKit/Source/core/style/StyleDifference.h

Issue 2570463004: [SPInvalidation] Update paint properties on css clip change (Closed)
Patch Set: Rebase Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/style/StyleDifference.h
diff --git a/third_party/WebKit/Source/core/style/StyleDifference.h b/third_party/WebKit/Source/core/style/StyleDifference.h
index 232831f5a83df6f6f7627bede79f231c61f2b38d..ed12f68fde62672ecfb55abb028999f3c5132c86 100644
--- a/third_party/WebKit/Source/core/style/StyleDifference.h
+++ b/third_party/WebKit/Source/core/style/StyleDifference.h
@@ -20,9 +20,10 @@ class StyleDifference {
ZIndexChanged = 1 << 2,
FilterChanged = 1 << 3,
BackdropFilterChanged = 1 << 4,
+ CSSClipChanged = 1 << 5,
// The object needs to issue paint invalidations if it is affected by text
// decorations or properties dependent on color (e.g., border or outline).
- TextDecorationOrColorChanged = 1 << 5,
+ TextDecorationOrColorChanged = 1 << 6,
// If you add a value here, be sure to update the number of bits on
// m_propertySpecificDifferences.
};
@@ -32,11 +33,18 @@ class StyleDifference {
m_layoutType(NoLayout),
m_recomputeOverflow(false),
m_propertySpecificDifferences(0),
- m_scrollAnchorDisablingPropertyChanged(false) {}
+ m_scrollAnchorDisablingPropertyChanged(false),
+ m_needsPaintPropertyUpdate(false) {}
bool hasDifference() const {
- return m_paintInvalidationType || m_layoutType ||
- m_propertySpecificDifferences;
+ bool result = m_paintInvalidationType || m_layoutType ||
+ m_propertySpecificDifferences;
+ // m_recomputeOverflow, m_scrollAnchorDisablingPropertyChanged and
+ // m_needsPaintPropertyUpdate are never set without other flags set.
+ DCHECK(result ||
+ (!m_recomputeOverflow && !m_scrollAnchorDisablingPropertyChanged &&
+ !m_needsPaintPropertyUpdate));
+ return result;
}
bool hasAtMostPropertySpecificDifferences(
@@ -113,6 +121,11 @@ class StyleDifference {
m_propertySpecificDifferences |= BackdropFilterChanged;
}
+ bool cssClipChanged() const {
+ return m_propertySpecificDifferences & CSSClipChanged;
+ }
+ void setCSSClipChanged() { m_propertySpecificDifferences |= CSSClipChanged; }
+
bool textDecorationOrColorChanged() const {
return m_propertySpecificDifferences & TextDecorationOrColorChanged;
}
@@ -127,6 +140,9 @@ class StyleDifference {
m_scrollAnchorDisablingPropertyChanged = true;
}
+ bool needsPaintPropertyUpdate() const { return m_needsPaintPropertyUpdate; }
+ void setNeedsPaintPropertyUpdate() { m_needsPaintPropertyUpdate = true; }
+
private:
enum PaintInvalidationType {
NoPaintInvalidation = 0,
@@ -138,8 +154,9 @@ class StyleDifference {
enum LayoutType { NoLayout = 0, PositionedMovement, FullLayout };
unsigned m_layoutType : 2;
unsigned m_recomputeOverflow : 1;
- unsigned m_propertySpecificDifferences : 6;
+ unsigned m_propertySpecificDifferences : 7;
unsigned m_scrollAnchorDisablingPropertyChanged : 1;
+ unsigned m_needsPaintPropertyUpdate : 1;
};
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698