[Webkit-unassigned] [Bug 21261] Add layoutTestController API so that animation layout tests don't have to delay
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Nov 10 20:23:42 PST 2008
https://bugs.webkit.org/show_bug.cgi?id=21261
------- Comment #4 from simon.fraser at apple.com 2008-11-10 20:23 PDT -------
> diff --git a/WebCore/page/animation/AnimationController.cpp b/WebCore/page/animation/AnimationController.cpp
> index d449afe..ec29b36 100644
> --- a/WebCore/page/animation/AnimationController.cpp
> +++ b/WebCore/page/animation/AnimationController.cpp
> @@ -59,6 +60,9 @@ public:
>
> bool isAnimatingPropertyOnRenderer(RenderObject*, int property, bool isRunningNow) const;
>
> + bool setTimeForAnimationOnNode(Node*, const String&, double t);
> + bool setTimeForTransitionOnNode(Node*, const String&, double t);
The rest of the AnimationController API deals with renderers. I think the
caller should get the node's renderer and pass that in here.
Also, I think it should be more obvious that these pause the
animation/transition, and a comment should indicate that they are used by the
test harness, and are not intended for general use.
So I think these should be:
bool pauseAnimationAt(RenderObject*, const String& animName, double t);
bool pauseTransitionAt(RenderObject*, int propertyID, double t);
What do they do if the animation/transition is in the pause phase? Comments
should say.
> diff --git a/WebKit/mac/WebView/WebFrameView.mm b/WebKit/mac/WebView/WebFrameView.mm
> index e9c0aae..202c695 100644
> --- a/WebKit/mac/WebView/WebFrameView.mm
> +++ b/WebKit/mac/WebView/WebFrameView.mm
> +- (BOOL)_setTime:(NSTimeInterval)time forNamedAnimation:(NSString *)name onNode:(DOMNode *)node
To be consistent:
- (BOOL)_pauseAnimation:(NSString*)name onNode:(DOMNode *)node
atTime:(NSTimeInterval)time;
- (BOOL)_pauseTransitionOfProperty:(NSString*)cssProperty onNode:(DOMNode
*)node atTime:(NSTimeInterval)time;
> diff --git a/WebKitTools/DumpRenderTree/LayoutTestController.h b/WebKitTools/DumpRenderTree/LayoutTestController.h
> index f27c2c6..c0fbca8 100644
> --- a/WebKitTools/DumpRenderTree/LayoutTestController.h
> +++ b/WebKitTools/DumpRenderTree/LayoutTestController.h
> @@ -153,6 +153,9 @@ public:
> const std::string& testPathOrURL() const { return m_testPathOrURL; }
> const std::string& expectedPixelHash() const { return m_expectedPixelHash; }
>
> + bool setAnimationTimeForElement(JSStringRef elementId, JSStringRef animationName, double time);
> + bool setTransitionTimeForElement(JSStringRef elementId, JSStringRef propertyName, double time);
I think it's worth figuring out how to pass the element directly. We shouldn't
have to require that elements used
with this API have an id.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list