2011-05-20 Simon Fraser <simon.fraser@apple.com>
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 May 2011 19:43:42 +0000 (19:43 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 May 2011 19:43:42 +0000 (19:43 +0000)
        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.fraser@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:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@86977 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/platform/mac-wk2/Skipped
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp
Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h
Source/WebKit2/WebProcess/WebPage/WebFrame.cpp
Source/WebKit2/WebProcess/WebPage/WebFrame.h
Tools/ChangeLog
Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl
Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h

index dfea55d..f894194 100644 (file)
@@ -1,3 +1,18 @@
+2011-05-20  Simon Fraser  <simon.fraser@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  <inferno@chromium.org>
 
         Reviewed by Kent Tamura.
index 57865dc..fbbe923 100644 (file)
@@ -1244,15 +1244,6 @@ svg/custom/manually-parsed-embedded-svg-disallowed-in-dashboard.html
 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 @@ plugins/private-browsing-mode-2.html
 # 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 @@ http/tests/navigation/post-goback1.html
 # 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
index 2dd3709..2a7a3df 100644 (file)
@@ -1,3 +1,20 @@
+2011-05-20  Simon Fraser  <simon.fraser@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  <sam@webkit.org>
 
         Reviewed by Anders Carlsson.
index d3b4601..814b7ed 100644 (file)
@@ -89,9 +89,14 @@ unsigned WKBundleFrameGetNumberOfActiveAnimations(WKBundleFrameRef frameRef)
     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)
index 1c19861..9eb7156 100644 (file)
@@ -42,7 +42,8 @@ WK_EXPORT WKStringRef WKBundleFrameCopyCounterValue(WKBundleFrameRef frame, JSOb
 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);
index 71a062f..a0651d2 100644 (file)
@@ -406,6 +406,25 @@ bool WebFrame::pauseAnimationOnElementWithId(const String& animationName, const
     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)
index b1c2c37..44e16ba 100644 (file)
@@ -108,6 +108,7 @@ public:
 
     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;
index a03af6f..bec3e3b 100644 (file)
@@ -1,3 +1,18 @@
+2011-05-20  Simon Fraser  <simon.fraser@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  <alokp@chromium.org>
 
         Reviewed by Stephen White.
index c04f751..5fc2a0d 100644 (file)
@@ -82,6 +82,7 @@ module WTR {
         // 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();
 
index fef4296..fc692bb 100644 (file)
@@ -169,6 +169,14 @@ bool LayoutTestController::pauseAnimationAtTimeOnElementWithId(JSStringRef anima
     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());
index c52d0ad..1c9b742 100644 (file)
@@ -105,6 +105,7 @@ public:
     // 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();