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

Unified Diff: third_party/WebKit/Source/core/css/CSSPropertyEquality.cpp

Issue 2895283004: Replace AnimatableValues with ComputedStyle references for CSS Transitions (Closed)
Patch Set: Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/css/CSSPropertyEquality.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSPropertyEquality.cpp b/third_party/WebKit/Source/core/css/CSSPropertyEquality.cpp
index e24233885dfcc757db449f8f364c7223a71c1004..aa75b709c971ffd33a74765ef29a1fcde8e99a57 100644
--- a/third_party/WebKit/Source/core/css/CSSPropertyEquality.cpp
+++ b/third_party/WebKit/Source/core/css/CSSPropertyEquality.cpp
@@ -4,6 +4,7 @@
#include "core/css/CSSPropertyEquality.h"
+#include "core/animation/PropertyHandle.h"
#include "core/css/CSSValue.h"
#include "core/style/ComputedStyle.h"
#include "core/style/DataEquivalency.h"
@@ -55,10 +56,15 @@ bool FillLayersEqual(const FillLayer& a_layers, const FillLayer& b_layers) {
} // namespace
-bool CSSPropertyEquality::PropertiesEqual(CSSPropertyID prop,
+bool CSSPropertyEquality::PropertiesEqual(const PropertyHandle& property,
const ComputedStyle& a,
const ComputedStyle& b) {
- switch (prop) {
+ if (property.IsCSSCustomProperty()) {
+ const AtomicString& name = property.CustomPropertyName();
+ return DataEquivalent(a.GetRegisteredVariable(name),
+ b.GetRegisteredVariable(name));
+ }
+ switch (property.CssProperty()) {
case CSSPropertyBackgroundColor:
return a.BackgroundColor() == b.BackgroundColor() &&
a.VisitedLinkBackgroundColor() == b.VisitedLinkBackgroundColor();
@@ -378,12 +384,4 @@ bool CSSPropertyEquality::PropertiesEqual(CSSPropertyID prop,
}
}
-bool CSSPropertyEquality::RegisteredCustomPropertiesEqual(
- const AtomicString& property_name,
- const ComputedStyle& a,
- const ComputedStyle& b) {
- return DataEquivalent(a.GetRegisteredVariable(property_name),
- b.GetRegisteredVariable(property_name));
-}
-
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698