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

Unified Diff: Source/core/animation/EffectInput.cpp

Issue 373423002: Split Dictionary's get and convert into DictionaryHelper. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 | « Source/core/animation/AnimationTest.cpp ('k') | Source/core/animation/TimingInput.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/EffectInput.cpp
diff --git a/Source/core/animation/EffectInput.cpp b/Source/core/animation/EffectInput.cpp
index 39c9fd3bddf1334e31dd0895517fd432264cb0b5..2e619838a1a18f33df38bc7759ffa972871dface 100644
--- a/Source/core/animation/EffectInput.cpp
+++ b/Source/core/animation/EffectInput.cpp
@@ -61,7 +61,7 @@ PassRefPtrWillBeRawPtr<AnimationEffect> EffectInput::convert(Element* element, c
bool frameHasOffset = false;
double offset;
- if (keyframeDictionaryVector[i].get("offset", offset)) {
+ if (DictionaryHelper::get(keyframeDictionaryVector[i], "offset", offset)) {
// Keyframes with offsets outside the range [0.0, 1.0] are ignored.
if (std::isnan(offset) || offset < 0 || offset > 1)
continue;
@@ -70,7 +70,7 @@ PassRefPtrWillBeRawPtr<AnimationEffect> EffectInput::convert(Element* element, c
// The JS value null gets converted to 0 so we need to check whether the original value is null.
if (offset == 0) {
ScriptValue scriptValue;
- if (keyframeDictionaryVector[i].get("offset", scriptValue) && scriptValue.isNull())
+ if (DictionaryHelper::get(keyframeDictionaryVector[i], "offset", scriptValue) && scriptValue.isNull())
frameHasOffset = false;
}
if (frameHasOffset) {
@@ -85,12 +85,12 @@ PassRefPtrWillBeRawPtr<AnimationEffect> EffectInput::convert(Element* element, c
keyframes.append(keyframe);
String compositeString;
- keyframeDictionaryVector[i].get("composite", compositeString);
+ DictionaryHelper::get(keyframeDictionaryVector[i], "composite", compositeString);
if (compositeString == "add")
keyframe->setComposite(AnimationEffect::CompositeAdd);
String timingFunctionString;
- if (keyframeDictionaryVector[i].get("easing", timingFunctionString)) {
+ if (DictionaryHelper::get(keyframeDictionaryVector[i], "easing", timingFunctionString)) {
if (RefPtrWillBeRawPtr<CSSValue> timingFunctionValue = BisonCSSParser::parseAnimationTimingFunctionValue(timingFunctionString))
keyframe->setEasing(CSSToStyleMap::mapAnimationTimingFunction(timingFunctionValue.get(), true));
}
@@ -103,7 +103,7 @@ PassRefPtrWillBeRawPtr<AnimationEffect> EffectInput::convert(Element* element, c
if (id == CSSPropertyInvalid)
continue;
String value;
- keyframeDictionaryVector[i].get(property, value);
+ DictionaryHelper::get(keyframeDictionaryVector[i], property, value);
keyframe->setPropertyValue(id, value, styleSheetContents);
}
}
« no previous file with comments | « Source/core/animation/AnimationTest.cpp ('k') | Source/core/animation/TimingInput.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698