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

Unified Diff: third_party/WebKit/Source/core/animation/CSSInterpolationType.cpp

Issue 2650403002: Revert of Add null check to animations for registered custom property initial values (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « third_party/WebKit/LayoutTests/animations/custom-properties/empty-initial-value-crash.html ('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/animation/CSSInterpolationType.cpp
diff --git a/third_party/WebKit/Source/core/animation/CSSInterpolationType.cpp b/third_party/WebKit/Source/core/animation/CSSInterpolationType.cpp
index d34afab70e35e1f564b0b8a62f1b8a4b86663c3b..56f5e359f37fd2718294bd0ffc6af5596e641c25 100644
--- a/third_party/WebKit/Source/core/animation/CSSInterpolationType.cpp
+++ b/third_party/WebKit/Source/core/animation/CSSInterpolationType.cpp
@@ -87,12 +87,6 @@
if (!inheritedValue) {
inheritedValue = m_initialValue.get();
}
- if (inheritedValue == m_inheritedValue.get()) {
- return true;
- }
- if (!inheritedValue || !m_inheritedValue) {
- return false;
- }
return m_inheritedValue->equals(*inheritedValue);
}
@@ -213,23 +207,20 @@
return nullptr;
}
- const CSSValue* value = nullptr;
if (declaration.isInitial(isInheritedProperty)) {
- value = registration->initial();
- } else {
- const CSSValue* value =
- state.parentStyle()->getRegisteredVariable(name, isInheritedProperty);
- if (!value) {
- value = registration->initial();
- }
- conversionCheckers.push_back(InheritedCustomPropertyChecker::create(
- name, isInheritedProperty, value, registration->initial()));
- }
- if (!value) {
- return nullptr;
- }
-
- return maybeConvertValue(*value, state, conversionCheckers);
+ return maybeConvertValue(*registration->initial(), state,
+ conversionCheckers);
+ }
+
+ DCHECK(declaration.isInherit(isInheritedProperty));
+ const CSSValue* inheritedValue =
+ state.parentStyle()->getRegisteredVariable(name, isInheritedProperty);
+ if (!inheritedValue) {
+ inheritedValue = registration->initial();
+ }
+ conversionCheckers.push_back(InheritedCustomPropertyChecker::create(
+ name, isInheritedProperty, inheritedValue, registration->initial()));
+ return maybeConvertValue(*inheritedValue, state, conversionCheckers);
}
if (declaration.value()->needsVariableResolution()) {
@@ -270,9 +261,6 @@
state.style()->getRegisteredVariable(name, registration->inherits());
if (!underlyingValue) {
underlyingValue = registration->initial();
- }
- if (!underlyingValue) {
- return nullptr;
}
// TODO(alancutter): Remove the need for passing in conversion checkers.
ConversionCheckers dummyConversionCheckers;
« no previous file with comments | « third_party/WebKit/LayoutTests/animations/custom-properties/empty-initial-value-crash.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698