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

Side by Side Diff: Source/core/animation/EffectInput.cpp

Issue 1033943002: Rename LayoutStyle to papayawhip (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: ensureComputedStyle Created 5 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/animation/DocumentAnimations.cpp ('k') | Source/core/animation/ElementAnimations.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 21 matching lines...) Expand all
32 #include "core/animation/EffectInput.h" 32 #include "core/animation/EffectInput.h"
33 33
34 #include "bindings/core/v8/Dictionary.h" 34 #include "bindings/core/v8/Dictionary.h"
35 #include "bindings/core/v8/UnionTypesCore.h" 35 #include "bindings/core/v8/UnionTypesCore.h"
36 #include "core/animation/AnimationInputHelpers.h" 36 #include "core/animation/AnimationInputHelpers.h"
37 #include "core/animation/KeyframeEffectModel.h" 37 #include "core/animation/KeyframeEffectModel.h"
38 #include "core/animation/StringKeyframe.h" 38 #include "core/animation/StringKeyframe.h"
39 #include "core/css/resolver/StyleResolver.h" 39 #include "core/css/resolver/StyleResolver.h"
40 #include "core/dom/Document.h" 40 #include "core/dom/Document.h"
41 #include "core/dom/Element.h" 41 #include "core/dom/Element.h"
42 #include "core/dom/NodeLayoutStyle.h" 42 #include "core/dom/NodeComputedStyle.h"
43 #include "wtf/NonCopyingSort.h" 43 #include "wtf/NonCopyingSort.h"
44 44
45 namespace blink { 45 namespace blink {
46 46
47 PassRefPtrWillBeRawPtr<AnimationEffect> EffectInput::convert(Element* element, c onst Vector<Dictionary>& keyframeDictionaryVector, ExceptionState& exceptionStat e) 47 PassRefPtrWillBeRawPtr<AnimationEffect> EffectInput::convert(Element* element, c onst Vector<Dictionary>& keyframeDictionaryVector, ExceptionState& exceptionStat e)
48 { 48 {
49 // FIXME: Remove the dependency on element. 49 // FIXME: Remove the dependency on element.
50 if (!element) 50 if (!element)
51 return nullptr; 51 return nullptr;
52 52
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 110
111 RefPtrWillBeRawPtr<StringKeyframeEffectModel> keyframeEffectModel = StringKe yframeEffectModel::create(keyframes); 111 RefPtrWillBeRawPtr<StringKeyframeEffectModel> keyframeEffectModel = StringKe yframeEffectModel::create(keyframes);
112 if (keyframeEffectModel->hasSyntheticKeyframes()) { 112 if (keyframeEffectModel->hasSyntheticKeyframes()) {
113 exceptionState.throwDOMException(NotSupportedError, "Partial keyframes a re not supported."); 113 exceptionState.throwDOMException(NotSupportedError, "Partial keyframes a re not supported.");
114 return nullptr; 114 return nullptr;
115 } 115 }
116 if (!keyframeEffectModel->isReplaceOnly()) { 116 if (!keyframeEffectModel->isReplaceOnly()) {
117 exceptionState.throwDOMException(NotSupportedError, "Additive animations are not supported."); 117 exceptionState.throwDOMException(NotSupportedError, "Additive animations are not supported.");
118 return nullptr; 118 return nullptr;
119 } 119 }
120 keyframeEffectModel->forceConversionsToAnimatableValues(*element, element->l ayoutStyle()); 120 keyframeEffectModel->forceConversionsToAnimatableValues(*element, element->c omputedStyle());
121 121
122 return keyframeEffectModel; 122 return keyframeEffectModel;
123 } 123 }
124 124
125 PassRefPtrWillBeRawPtr<AnimationEffect> EffectInput::convert(Element* element, c onst AnimationEffectOrDictionarySequence& effectInput, ExceptionState& exception State) 125 PassRefPtrWillBeRawPtr<AnimationEffect> EffectInput::convert(Element* element, c onst AnimationEffectOrDictionarySequence& effectInput, ExceptionState& exception State)
126 { 126 {
127 if (effectInput.isAnimationEffect()) 127 if (effectInput.isAnimationEffect())
128 return effectInput.getAsAnimationEffect(); 128 return effectInput.getAsAnimationEffect();
129 if (effectInput.isDictionarySequence()) 129 if (effectInput.isDictionarySequence())
130 return convert(element, effectInput.getAsDictionarySequence(), exception State); 130 return convert(element, effectInput.getAsDictionarySequence(), exception State);
131 return nullptr; 131 return nullptr;
132 } 132 }
133 133
134 } // namespace blink 134 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/animation/DocumentAnimations.cpp ('k') | Source/core/animation/ElementAnimations.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698