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

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

Issue 2106073005: Add fast-path for propagated variable changes (WIP) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@+pointer_events_fastpath_5
Patch Set: Rebase Created 4 years, 1 month 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
Index: third_party/WebKit/Source/core/style/ComputedStyle.h
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.h b/third_party/WebKit/Source/core/style/ComputedStyle.h
index 7645fc4d8111f7e6429185ceb5cf62f59f69ead5..32224db9625b9dd2c11d6b3af79f97e6d4d2dbff 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.h
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.h
@@ -228,7 +228,8 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
(m_rtlOrdering == other.m_rtlOrdering) &&
(m_printColorAdjust == other.m_printColorAdjust) &&
(m_insideLink == other.m_insideLink) &&
- (m_writingMode == other.m_writingMode);
+ (m_writingMode == other.m_writingMode) &&
+ (m_variableReference == other.m_variableReference);
}
unsigned m_captionSide : 2; // ECaptionSide
@@ -253,7 +254,10 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
// CSS Text Layout Module Level 3: Vertical writing support
unsigned m_writingMode : 2; // WritingMode
- // 42 bits
+
+ unsigned m_variableReference : 1; // Whether an inherited property
+ // references a variable.
+ // 43 bits
} m_inheritedData;
// don't inherit
@@ -379,6 +383,7 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
m_inheritedData.m_pointerEvents = initialPointerEvents();
m_inheritedData.m_insideLink = NotInsideLink;
m_inheritedData.m_writingMode = initialWritingMode();
+ m_inheritedData.m_variableReference = false;
m_nonInheritedData.m_effectiveDisplay =
m_nonInheritedData.m_originalDisplay =
@@ -2650,8 +2655,14 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
bool inheritedEqual(const ComputedStyle&) const;
bool nonInheritedEqual(const ComputedStyle&) const;
+
+ // Compares independent inherited properties, not including variables.
inline bool independentInheritedEqual(const ComputedStyle&) const;
inline bool nonIndependentInheritedEqual(const ComputedStyle&) const;
+
+ // Compares variables.
+ inline bool variablesEqual(const ComputedStyle&) const;
+
bool loadingCustomFontsEqual(const ComputedStyle&) const;
bool inheritedDataShared(const ComputedStyle&) const;
@@ -2705,6 +2716,12 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
bool hasVariableReferenceFromNonInheritedProperty() const {
return m_nonInheritedData.m_variableReference;
}
+ void setHasVariableReferenceFromInheritedProperty() {
+ m_inheritedData.m_variableReference = true;
+ }
+ bool hasVariableReferenceFromInheritedProperty() const {
+ return m_inheritedData.m_variableReference;
+ }
// Animations.
CSSAnimationData& accessAnimations();
« no previous file with comments | « third_party/WebKit/Source/core/dom/Element.cpp ('k') | third_party/WebKit/Source/core/style/ComputedStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698