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

Unified Diff: third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp

Issue 2228313002: Make a function to query whether a CSSPropertyID is valid and whether it has a name. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@asan
Patch Set: Revert incorrect changes Created 4 years, 3 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/animation/css/CSSAnimations.cpp
diff --git a/third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp b/third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp
index c74e996998ea0b05804b619a2d4aec4e697d6d2a..4ae2362cb1f52ee76556a2802dc88e5fd1c59a47 100644
--- a/third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp
+++ b/third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp
@@ -115,7 +115,7 @@ static StringKeyframeEffectModel* createKeyframeEffectModel(StyleResolver* resol
DEFINE_STATIC_LOCAL(SparseHistogram, propertyHistogram, ("WebCore.Animation.CSSProperties"));
for (CSSPropertyID property : specifiedPropertiesForUseCounter) {
- DCHECK_NE(property, CSSPropertyInvalid);
+ DCHECK(isValidCSSPropertyID(property));
propertyHistogram.sample(UseCounter::mapCSSPropertyIdToCSSSampleIdForHistogram(property));
}
@@ -520,7 +520,7 @@ void CSSAnimations::maybeApplyPendingUpdate(Element* element)
animation->update(TimingUpdateOnDemand);
runningTransition.animation = animation;
m_transitions.set(id, runningTransition);
- DCHECK_NE(id, CSSPropertyInvalid);
+ DCHECK(isValidCSSPropertyID(id));
DEFINE_STATIC_LOCAL(SparseHistogram, propertyHistogram, ("WebCore.Animation.CSSProperties"));
propertyHistogram.sample(UseCounter::mapCSSPropertyIdToCSSSampleIdForHistogram(id));
@@ -652,7 +652,7 @@ void CSSAnimations::calculateTransitionUpdate(CSSAnimationUpdate& update, const
// If not a shorthand we only execute one iteration of this loop, and refer to the property directly.
for (unsigned j = 0; !j || j < propertyList.length(); ++j) {
CSSPropertyID id = propertyList.length() ? propertyList.properties()[j] : property;
- DCHECK_GE(id, firstCSSProperty);
+ DCHECK(isPropertyIDWithName(id));
if (!animateAll) {
if (CSSPropertyMetadata::isInterpolableProperty(id))

Powered by Google App Engine
This is Rietveld 408576698