Title: [86977] trunk
Revision
86977
Author
simon.fra...@apple.com
Date
2011-05-20 12:43:42 -0700 (Fri, 20 May 2011)

Log Message

2011-05-20  Simon Fraser  <simon.fra...@apple.com>

        Reviewed by Sam Weinig.

        WebKitTestRunner needs layoutTestController.pauseTransitionAtTimeOnElementWithId
        https://bugs.webkit.org/show_bug.cgi?id=42550

        Implement pauseTransitionAtTimeOnElementWithId in WebKitTestRunner.

        * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
        * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
        Copy the code for pausing animations, FIXME comments and all.
        (WTR::LayoutTestController::pauseTransitionAtTimeOnElementWithId):
        * WebKitTestRunner/InjectedBundle/LayoutTestController.h:

2011-05-20  Simon Fraser  <simon.fra...@apple.com>

        Reviewed by Sam Weinig.

        WebKitTestRunner needs layoutTestController.pauseTransitionAtTimeOnElementWithId
        https://bugs.webkit.org/show_bug.cgi?id=42550

        Plumb through methods to pause a transition of a given property on an element.

        * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
        (WKBundleFramePauseAnimationOnElementWithId):
        (WKBundleFramePauseTransitionOnElementWithId):
        * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
        * WebProcess/WebPage/WebFrame.cpp:
        (WebKit::WebFrame::pauseTransitionOnElementWithId):
        * WebProcess/WebPage/WebFrame.h:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (86976 => 86977)


--- trunk/LayoutTests/ChangeLog	2011-05-20 19:36:02 UTC (rev 86976)
+++ trunk/LayoutTests/ChangeLog	2011-05-20 19:43:42 UTC (rev 86977)
@@ -1,3 +1,18 @@
+2011-05-20  Simon Fraser  <simon.fra...@apple.com>
+
+        Reviewed by Sam Weinig.
+
+        WebKitTestRunner needs layoutTestController.pauseTransitionAtTimeOnElementWithId
+        https://bugs.webkit.org/show_bug.cgi?id=42550
+        
+        REGRESSION (r84961): transitions/transition-timing-function.html failing on SnowLeopard Intel Release (WebKit2 Tests)
+        https://bugs.webkit.org/show_bug.cgi?id=59865
+        
+        Unskip transition tests that rely on the pause API, and remove a line which refers
+        to a test that no longer exists.
+
+        * platform/mac-wk2/Skipped:
+
 2011-05-20  Abhishek Arya  <infe...@chromium.org>
 
         Reviewed by Kent Tamura.

Modified: trunk/LayoutTests/platform/mac-wk2/Skipped (86976 => 86977)


--- trunk/LayoutTests/platform/mac-wk2/Skipped	2011-05-20 19:36:02 UTC (rev 86976)
+++ trunk/LayoutTests/platform/mac-wk2/Skipped	2011-05-20 19:43:42 UTC (rev 86977)
@@ -1244,15 +1244,6 @@
 svg/custom/manually-parsed-svg-disallowed-in-dashboard.html
 svg/custom/svg-disallowed-in-dashboard-object.html
 
-# WebKitTestRunner needs layoutTestController.pauseTransitionAtTimeOnElementWithId
-# <https://bugs.webkit.org/show_bug.cgi?id=42550>
-transitions/transition-drt-api-delay.html
-transitions/transition-drt-api.html
-transitions/transition-hit-test.html
-transitions/transition-hit-test-transform.html
-transitions/transition-shorthand-delay.html
-transitions/negative-delay.html
-
 # WebKitTestRunner needs layoutTestController.setJavaScriptCanAccessClipboard
 # <https://bugs.webkit.org/show_bug.cgi?id=42669>
 editing/execCommand/clipboard-access.html
@@ -1530,10 +1521,6 @@
 # http://webkit.org/b/58990
 editing/undo/undo-iframe-location-change.html
 
-# Failing since r84961, always with slightly different results
-# http://webkit.org/b/59865
-transitions/transition-timing-function.html
-
 ### END OF (1) Classified failures with bug reports
 ########################################
 
@@ -1947,7 +1934,6 @@
 # Unexplained plugin failures
 platform/mac/plugins/testplugin-onnew-onpaint.html
 plugins/no-mime-with-valid-extension.html
-fast/dom/object-embed-plugin-scripting.html
 
 # Causes subsequent plugin tests to fail, time out or crash
 plugins/destroy-on-setwindow.html

Modified: trunk/Source/WebKit2/ChangeLog (86976 => 86977)


--- trunk/Source/WebKit2/ChangeLog	2011-05-20 19:36:02 UTC (rev 86976)
+++ trunk/Source/WebKit2/ChangeLog	2011-05-20 19:43:42 UTC (rev 86977)
@@ -1,3 +1,20 @@
+2011-05-20  Simon Fraser  <simon.fra...@apple.com>
+
+        Reviewed by Sam Weinig.
+
+        WebKitTestRunner needs layoutTestController.pauseTransitionAtTimeOnElementWithId
+        https://bugs.webkit.org/show_bug.cgi?id=42550
+        
+        Plumb through methods to pause a transition of a given property on an element.
+
+        * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
+        (WKBundleFramePauseAnimationOnElementWithId):
+        (WKBundleFramePauseTransitionOnElementWithId):
+        * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
+        * WebProcess/WebPage/WebFrame.cpp:
+        (WebKit::WebFrame::pauseTransitionOnElementWithId):
+        * WebProcess/WebPage/WebFrame.h:
+
 2011-05-20  Sam Weinig  <s...@webkit.org>
 
         Reviewed by Anders Carlsson.

Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp (86976 => 86977)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp	2011-05-20 19:36:02 UTC (rev 86976)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp	2011-05-20 19:43:42 UTC (rev 86977)
@@ -89,11 +89,16 @@
     return toImpl(frameRef)->numberOfActiveAnimations();
 }
 
-bool WKBundleFramePauseAnimationOnElementWithId(WKBundleFrameRef frameRef, WKStringRef name, WKStringRef elementID, double time)
+bool WKBundleFramePauseAnimationOnElementWithId(WKBundleFrameRef frameRef, WKStringRef animationName, WKStringRef elementID, double time)
 {
-    return toImpl(frameRef)->pauseAnimationOnElementWithId(toImpl(name)->string(), toImpl(elementID)->string(), time);
+    return toImpl(frameRef)->pauseAnimationOnElementWithId(toImpl(animationName)->string(), toImpl(elementID)->string(), time);
 }
 
+bool WKBundleFramePauseTransitionOnElementWithId(WKBundleFrameRef frameRef, WKStringRef propertyName, WKStringRef elementID, double time)
+{
+    return toImpl(frameRef)->pauseTransitionOnElementWithId(toImpl(propertyName)->string(), toImpl(elementID)->string(), time);
+}
+
 void WKBundleFrameSuspendAnimations(WKBundleFrameRef frameRef)
 {
     toImpl(frameRef)->suspendAnimations();

Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h (86976 => 86977)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h	2011-05-20 19:36:02 UTC (rev 86976)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h	2011-05-20 19:43:42 UTC (rev 86977)
@@ -42,7 +42,8 @@
 WK_EXPORT WKStringRef WKBundleFrameCopyMarkerText(WKBundleFrameRef frame, JSObjectRef element);
 WK_EXPORT JSValueRef WKBundleFrameGetComputedStyleIncludingVisitedInfo(WKBundleFrameRef frame, JSObjectRef element);
 WK_EXPORT unsigned WKBundleFrameGetNumberOfActiveAnimations(WKBundleFrameRef frame);
-WK_EXPORT bool WKBundleFramePauseAnimationOnElementWithId(WKBundleFrameRef frame, WKStringRef name, WKStringRef elementID, double time);
+WK_EXPORT bool WKBundleFramePauseAnimationOnElementWithId(WKBundleFrameRef frame, WKStringRef animationName, WKStringRef elementID, double time);
+WK_EXPORT bool WKBundleFramePauseTransitionOnElementWithId(WKBundleFrameRef frame, WKStringRef propertyName, WKStringRef elementID, double time);
 WK_EXPORT void WKBundleFrameSuspendAnimations(WKBundleFrameRef frame);
 WK_EXPORT void WKBundleFrameResumeAnimations(WKBundleFrameRef frame);
 WK_EXPORT unsigned WKBundleFrameGetPendingUnloadCount(WKBundleFrameRef frame);

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebFrame.cpp (86976 => 86977)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebFrame.cpp	2011-05-20 19:36:02 UTC (rev 86976)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebFrame.cpp	2011-05-20 19:43:42 UTC (rev 86977)
@@ -406,6 +406,25 @@
     return controller->pauseAnimationAtTime(coreNode->renderer(), animationName, time);
 }
 
+bool WebFrame::pauseTransitionOnElementWithId(const String& propertyName, const String& elementID, double time)
+{
+    if (!m_coreFrame)
+        return false;
+
+    AnimationController* controller = m_coreFrame->animation();
+    if (!controller)
+        return false;
+
+    if (!m_coreFrame->document())
+        return false;
+
+    Node* coreNode = m_coreFrame->document()->getElementById(elementID);
+    if (!coreNode || !coreNode->renderer())
+        return false;
+
+    return controller->pauseTransitionAtTime(coreNode->renderer(), propertyName, time);
+}
+
 void WebFrame::suspendAnimations()
 {
     if (!m_coreFrame)

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebFrame.h (86976 => 86977)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebFrame.h	2011-05-20 19:36:02 UTC (rev 86976)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebFrame.h	2011-05-20 19:43:42 UTC (rev 86977)
@@ -108,6 +108,7 @@
 
     unsigned numberOfActiveAnimations() const;
     bool pauseAnimationOnElementWithId(const String& animationName, const String& elementID, double time);
+    bool pauseTransitionOnElementWithId(const String& propertyName, const String& elementID, double time);
     void suspendAnimations();
     void resumeAnimations();
     String layerTreeAsText() const;

Modified: trunk/Tools/ChangeLog (86976 => 86977)


--- trunk/Tools/ChangeLog	2011-05-20 19:36:02 UTC (rev 86976)
+++ trunk/Tools/ChangeLog	2011-05-20 19:43:42 UTC (rev 86977)
@@ -1,3 +1,18 @@
+2011-05-20  Simon Fraser  <simon.fra...@apple.com>
+
+        Reviewed by Sam Weinig.
+
+        WebKitTestRunner needs layoutTestController.pauseTransitionAtTimeOnElementWithId
+        https://bugs.webkit.org/show_bug.cgi?id=42550
+        
+        Implement pauseTransitionAtTimeOnElementWithId in WebKitTestRunner.
+
+        * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
+        * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
+        Copy the code for pausing animations, FIXME comments and all.
+        (WTR::LayoutTestController::pauseTransitionAtTimeOnElementWithId):
+        * WebKitTestRunner/InjectedBundle/LayoutTestController.h:
+
 2011-05-20  Alok Priyadarshi  <al...@chromium.org>
 
         Reviewed by Stephen White.

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl (86976 => 86977)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl	2011-05-20 19:36:02 UTC (rev 86976)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl	2011-05-20 19:43:42 UTC (rev 86977)
@@ -82,6 +82,7 @@
         // Animation testing.
         int numberOfActiveAnimations();
         boolean pauseAnimationAtTimeOnElementWithId(in DOMString animationName, in double time, in DOMString elementId);
+        boolean pauseTransitionAtTimeOnElementWithId(in DOMString propertyName, in double time, in DOMString elementId);
         void suspendAnimations();
         void resumeAnimations();
 

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp (86976 => 86977)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp	2011-05-20 19:36:02 UTC (rev 86976)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp	2011-05-20 19:43:42 UTC (rev 86977)
@@ -169,6 +169,14 @@
     return WKBundleFramePauseAnimationOnElementWithId(mainFrame, toWK(animationName).get(), toWK(elementId).get(), time);
 }
 
+bool LayoutTestController::pauseTransitionAtTimeOnElementWithId(JSStringRef propertyName, double time, JSStringRef elementId)
+{
+    // FIXME: Is it OK this works only for the main frame?
+    // FIXME: If this is needed only for the main frame, then why is the function on WKBundleFrame instead of WKBundlePage?
+    WKBundleFrameRef mainFrame = WKBundlePageGetMainFrame(InjectedBundle::shared().page()->page());
+    return WKBundleFramePauseTransitionOnElementWithId(mainFrame, toWK(propertyName).get(), toWK(elementId).get(), time);
+}
+
 void LayoutTestController::suspendAnimations()
 {
     WKBundleFrameRef mainFrame = WKBundlePageGetMainFrame(InjectedBundle::shared().page()->page());

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h (86976 => 86977)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h	2011-05-20 19:36:02 UTC (rev 86976)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h	2011-05-20 19:43:42 UTC (rev 86977)
@@ -105,6 +105,7 @@
     // Animation testing.
     unsigned numberOfActiveAnimations() const;
     bool pauseAnimationAtTimeOnElementWithId(JSStringRef animationName, double time, JSStringRef elementId);
+    bool pauseTransitionAtTimeOnElementWithId(JSStringRef propertyName, double time, JSStringRef elementId);
     void suspendAnimations();
     void resumeAnimations();
     
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to