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

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

Issue 1153413007: Resolve style in element.animate() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Make unittests work again Created 5 years, 6 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/EffectInput.h ('k') | Source/core/animation/EffectInputTest.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 ed925e3a4164f7b7eed8e091ecc235b5b6478cb8..6aa4ae5e12ed9a5f7f9f89b9b649021d34932262 100644
--- a/Source/core/animation/EffectInput.cpp
+++ b/Source/core/animation/EffectInput.cpp
@@ -189,12 +189,18 @@ const QualifiedName* supportedSVGAttribute(const String& property, SVGElement* s
} // namespace
-PassRefPtrWillBeRawPtr<EffectModel> EffectInput::convert(Element* element, const Vector<Dictionary>& keyframeDictionaryVector, ExceptionState& exceptionState)
+PassRefPtrWillBeRawPtr<EffectModel> EffectInput::convert(Element* element, const Vector<Dictionary>& keyframeDictionaryVector, ExceptionState& exceptionState, bool unsafe)
{
- // FIXME: Remove the dependency on element.
if (!element)
return nullptr;
+ // TODO(alancutter): Remove this once composited animations no longer depend on AnimatableValues.
+ if (!unsafe) {
+ if (!element->inActiveDocument())
esprehn 2015/06/04 06:18:09 This unsafe thing just for unit tests seems bad, t
+ return nullptr;
+ element->document().updateLayoutTreeForNodeIfNeeded(element);
+ }
+
StyleSheetContents* styleSheetContents = element->document().elementSheet().contents();
StringKeyframeVector keyframes;
double lastOffset = 0;
« no previous file with comments | « Source/core/animation/EffectInput.h ('k') | Source/core/animation/EffectInputTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698