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

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

Issue 299073003: Web Animations API: Avoid style resolution when calling element.animate() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rename test to api-balls-keyframe-animations.html Created 6 years, 7 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: Source/core/animation/EffectInput.cpp
diff --git a/Source/core/animation/EffectInput.cpp b/Source/core/animation/EffectInput.cpp
index 869e3b47c0df959d265d63a0d9562a0455113b24..fef23d149ff6752fd18c1ddc3832dedb22701a6d 100644
--- a/Source/core/animation/EffectInput.cpp
+++ b/Source/core/animation/EffectInput.cpp
@@ -43,19 +43,16 @@
namespace WebCore {
// FIXME: Remove this once we've removed the dependency on Element.
-static bool checkDocumentAndRenderer(Element* element)
+static bool checkDocument(Element* element)
{
- if (!element || !element->inActiveDocument())
- return false;
- element->document().updateRenderTreeIfNeeded();
- return element->renderer();
alancutter (OOO until 2018) 2014/05/23 07:01:36 I think we still need to check for renderer() in c
dstockwell 2014/05/23 07:40:58 But, we won't know whether or not there should be
dstockwell 2014/05/23 07:42:25 Wait, why do we care if it's display: none?
dstockwell 2014/05/23 07:44:29 Ahh, because of forceConversions... Hmm, I'm not s
+ return (element && element->inActiveDocument());
}
PassRefPtrWillBeRawPtr<AnimationEffect> EffectInput::convert(Element* element, const Vector<Dictionary>& keyframeDictionaryVector, ExceptionState& exceptionState, bool unsafe)
{
// FIXME: This test will not be neccessary once resolution of keyframe values occurs at
// animation application time.
- if (!unsafe && !checkDocumentAndRenderer(element))
+ if (!unsafe && !checkDocument(element))
return nullptr;
StyleSheetContents* styleSheetContents = element->document().elementSheet().contents();
« no previous file with comments | « PerformanceTests/Animation/api-balls-keyframe-animations-small.html ('k') | Source/core/animation/StringKeyframe.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698