Move pauseAnimation/pauseTransition from TestRunner to Internals
authorbenjamin@webkit.org <benjamin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Feb 2013 21:34:32 +0000 (21:34 +0000)
committerbenjamin@webkit.org <benjamin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Feb 2013 21:34:32 +0000 (21:34 +0000)
https://bugs.webkit.org/show_bug.cgi?id=109107

Patch by Benjamin Poulain <bpoulain@apple.com> on 2013-02-07
Reviewed by Anders Carlsson.

Source/WebCore:

Tests: animations/animation-internals-api-multiple-keyframes.html
       animations/animation-internals-api.html

* testing/Internals.cpp:
(WebCore::Internals::pauseAnimationAtTimeOnElement):
(WebCore):
(WebCore::Internals::pauseTransitionAtTimeOnElement):
* testing/Internals.h:
(Internals):
* testing/Internals.idl:

Source/WebKit/efl:

* WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
* WebCoreSupport/DumpRenderTreeSupportEfl.h:

Source/WebKit/gtk:

* WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
* WebCoreSupport/DumpRenderTreeSupportGtk.h:
(DumpRenderTreeSupportGtk):

Source/WebKit/mac:

* WebView/WebFrame.mm:
* WebView/WebFramePrivate.h:

Source/WebKit/qt:

* WebCoreSupport/DumpRenderTreeSupportQt.cpp:
* WebCoreSupport/DumpRenderTreeSupportQt.h:

Source/WebKit2:

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

Tools:

* DumpRenderTree/TestRunner.cpp:
(TestRunner::staticFunctions):
* DumpRenderTree/TestRunner.h:
* DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp:
* DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
(WebTestRunner::TestRunner::TestRunner):
* DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
(TestRunner):
* DumpRenderTree/efl/TestRunnerEfl.cpp:
* DumpRenderTree/gtk/TestRunnerGtk.cpp:
* DumpRenderTree/mac/TestRunnerMac.mm:
* DumpRenderTree/qt/TestRunnerQt.cpp:
* DumpRenderTree/qt/TestRunnerQt.h:
(TestRunner):
* DumpRenderTree/win/TestRunnerWin.cpp:
* DumpRenderTree/wx/TestRunnerWx.cpp:
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
* WebKitTestRunner/InjectedBundle/TestRunner.h:

LayoutTests:

Change the tests with the following:
-Use the methods on Internals instead of TestRunner.
-Adapt the calls to pass a particular element instead of an ID.
-Remove feature detection. Having Internals implies having the feature.

* animations/animation-hit-test-transform.html:
* animations/animation-hit-test.html:
* animations/animation-internals-api-expected.txt: Renamed from LayoutTests/animations/animation-drt-api-expected.txt.
* animations/animation-internals-api-multiple-keyframes-expected.txt: Renamed from LayoutTests/animations/animation-drt-api-multiple-keyframes-expected.txt.
* animations/animation-internals-api-multiple-keyframes.html: Renamed from LayoutTests/animations/animation-drt-api-multiple-keyframes.html.
* animations/animation-internals-api.html: Renamed from LayoutTests/animations/animation-drt-api.html.
* animations/change-keyframes-name.html:
* animations/change-transform-style-during-animation.html:
* animations/missing-from-to-transforms.html:
* animations/missing-from-to.html:
* animations/resources/animation-test-helpers.js:
(checkExpectedValue):
(startTest):
* css3/calc/transitions-dependent.html:
* fast/dom/shadow/transition-on-shadow-host-with-distributed-node.html:
* transitions/opacity-transition-zindex.html:
* transitions/resources/transition-test-helpers.js:
(expected):
* transitions/transition-drt-api-delay.html:
* transitions/transition-drt-api.html:
* transitions/transition-hit-test-transform.html:
* transitions/transition-hit-test.html:

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

57 files changed:
LayoutTests/ChangeLog
LayoutTests/animations/animation-hit-test-transform.html
LayoutTests/animations/animation-hit-test.html
LayoutTests/animations/animation-internals-api-expected.txt [moved from LayoutTests/animations/animation-drt-api-expected.txt with 100% similarity]
LayoutTests/animations/animation-internals-api-multiple-keyframes-expected.txt [moved from LayoutTests/animations/animation-drt-api-multiple-keyframes-expected.txt with 100% similarity]
LayoutTests/animations/animation-internals-api-multiple-keyframes.html [moved from LayoutTests/animations/animation-drt-api-multiple-keyframes.html with 82% similarity]
LayoutTests/animations/animation-internals-api.html [moved from LayoutTests/animations/animation-drt-api.html with 84% similarity]
LayoutTests/animations/change-keyframes-name.html
LayoutTests/animations/change-transform-style-during-animation.html
LayoutTests/animations/missing-from-to-transforms.html
LayoutTests/animations/missing-from-to.html
LayoutTests/animations/resources/animation-test-helpers.js
LayoutTests/css3/calc/transitions-dependent.html
LayoutTests/fast/dom/shadow/transition-on-shadow-host-with-distributed-node.html
LayoutTests/transitions/opacity-transition-zindex.html
LayoutTests/transitions/resources/transition-test-helpers.js
LayoutTests/transitions/transition-drt-api-delay.html
LayoutTests/transitions/transition-drt-api.html
LayoutTests/transitions/transition-hit-test-transform.html
LayoutTests/transitions/transition-hit-test.html
Source/WebCore/ChangeLog
Source/WebCore/testing/Internals.cpp
Source/WebCore/testing/Internals.h
Source/WebCore/testing/Internals.idl
Source/WebKit/efl/ChangeLog
Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp
Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.h
Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp
Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebFrame.mm
Source/WebKit/mac/WebView/WebFramePrivate.h
Source/WebKit/qt/ChangeLog
Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
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/DumpRenderTree/TestRunner.cpp
Tools/DumpRenderTree/TestRunner.h
Tools/DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp
Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp
Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.h
Tools/DumpRenderTree/efl/TestRunnerEfl.cpp
Tools/DumpRenderTree/gtk/TestRunnerGtk.cpp
Tools/DumpRenderTree/mac/TestRunnerMac.mm
Tools/DumpRenderTree/qt/TestRunnerQt.cpp
Tools/DumpRenderTree/qt/TestRunnerQt.h
Tools/DumpRenderTree/win/TestRunnerWin.cpp
Tools/DumpRenderTree/wx/TestRunnerWx.cpp
Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl
Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
Tools/WebKitTestRunner/InjectedBundle/TestRunner.h

index 0e5845f..714013f 100644 (file)
@@ -1,3 +1,38 @@
+2013-02-07  Benjamin Poulain  <bpoulain@apple.com>
+
+        Move pauseAnimation/pauseTransition from TestRunner to Internals
+        https://bugs.webkit.org/show_bug.cgi?id=109107
+
+        Reviewed by Anders Carlsson.
+
+        Change the tests with the following:
+        -Use the methods on Internals instead of TestRunner.
+        -Adapt the calls to pass a particular element instead of an ID.
+        -Remove feature detection. Having Internals implies having the feature.
+
+        * animations/animation-hit-test-transform.html:
+        * animations/animation-hit-test.html:
+        * animations/animation-internals-api-expected.txt: Renamed from LayoutTests/animations/animation-drt-api-expected.txt.
+        * animations/animation-internals-api-multiple-keyframes-expected.txt: Renamed from LayoutTests/animations/animation-drt-api-multiple-keyframes-expected.txt.
+        * animations/animation-internals-api-multiple-keyframes.html: Renamed from LayoutTests/animations/animation-drt-api-multiple-keyframes.html.
+        * animations/animation-internals-api.html: Renamed from LayoutTests/animations/animation-drt-api.html.
+        * animations/change-keyframes-name.html:
+        * animations/change-transform-style-during-animation.html:
+        * animations/missing-from-to-transforms.html:
+        * animations/missing-from-to.html:
+        * animations/resources/animation-test-helpers.js:
+        (checkExpectedValue):
+        (startTest):
+        * css3/calc/transitions-dependent.html:
+        * fast/dom/shadow/transition-on-shadow-host-with-distributed-node.html:
+        * transitions/opacity-transition-zindex.html:
+        * transitions/resources/transition-test-helpers.js:
+        (expected):
+        * transitions/transition-drt-api-delay.html:
+        * transitions/transition-drt-api.html:
+        * transitions/transition-hit-test-transform.html:
+        * transitions/transition-hit-test.html:
+
 2013-02-07  Rik Cabanier  <cabanier@adobe.com>
 
         Add support for parsing of -webkit-background-blend-mode
index 26baad0..8c08e76 100644 (file)
@@ -54,7 +54,8 @@
         function doTest()
         {
             if (window.testRunner) {
-                if (!testRunner.pauseAnimationAtTimeOnElementWithId("anim", 2.0, "target"))
+                var target = document.getElementById("target");
+                if (!internals.pauseAnimationAtTimeOnElement("anim", 2.0, target))
                     throw("Transition is not running");
         
                 checkResults();
index b0913bd..5410b3f 100644 (file)
@@ -54,7 +54,8 @@
         function doTest()
         {
             if (window.testRunner) {
-                if (!testRunner.pauseAnimationAtTimeOnElementWithId("anim", 2.0, "target"))
+                var target = document.getElementById("target");
+                if (!internals.pauseAnimationAtTimeOnElement("anim", 2.0, target))
                     throw("Transition is not running");
         
                 checkResults();
        testRunner.waitUntilDone();
        testRunner.dumpAsText();
      }
-   
+
     function animationStarted()
     {
       if (window.testRunner) {
-        var paused = testRunner.pauseAnimationAtTimeOnElementWithId("anim", 1, "target");
+        var target = document.getElementById('target');
+        var paused = internals.pauseAnimationAtTimeOnElement("anim", 1, target);
         var result;
         if (paused)
           result = "PASS: correctly paused animation";
@@ -41,7 +42,7 @@
         document.getElementById('results').innerText = result;
         testRunner.notifyDone();
       } else
-        document.getElementById('results').innerText = "This test requires DRT";
+        document.getElementById('results').innerText = "This test requires WebCore Internals";
     }
 
     function startTest()
@@ -53,7 +54,7 @@
    </script>
 </head>
 <body onload="startTest()">
-  <!-- Test for DRT pauseAnimationAtTimeOnElementWithId() API on animations with multiple keyframes -->
+  <!-- Test for Internals' pauseAnimationAtTimeOnElement() API on animations with multiple keyframes -->
   <div id="target"></div>
   <div id="results"></div>
 
@@ -20,7 +20,7 @@
         left: 200px;
       }
     }
-         
+
   </style>
 
   <script src="resources/animation-test-helpers.js"></script>
@@ -33,7 +33,8 @@
     function animationStarted()
     {
       if (window.testRunner) {
-        var paused = testRunner.pauseAnimationAtTimeOnElementWithId("bounce", 1.0, "target");
+        var target = document.getElementById('target');
+        var paused = internals.pauseAnimationAtTimeOnElement("bounce", 1.0, target);
         var result = "";
         if (paused)
           result = "PASS: correctly paused animation";
@@ -43,7 +44,7 @@
         document.getElementById('results').innerText = result;
         testRunner.notifyDone();
       } else
-        document.getElementById('results').innerText = "This test requires DRT";
+        document.getElementById('results').innerText = "This test requires WebCore Internals";
     }
 
     function startTest()
@@ -55,7 +56,7 @@
    </script>
 </head>
 <body onload="startTest()">
-  <!-- Test for DRT pauseAnimationAtTimeOnElementWithId() API -->
+  <!-- Test for Internals pauseAnimationAtTimeOnElement() API -->
   <div id="target"></div>
   <div id="results"></div>
 </body>
index 2f3ad52..db42bd9 100644 (file)
@@ -60,7 +60,8 @@
         if (window.testRunner) {
           testRunner.dumpAsText();
           testRunner.waitUntilDone();
-          if (testRunner.pauseAnimationAtTimeOnElementWithId("bar", 0.5, "box"))
+          var box = document.getElementById('box');
+          if (internals.pauseAnimationAtTimeOnElement("bar", 0.5, box))
               document.getElementById("pre-result").innerHTML = "FAIL: animation is running";
           else
               document.getElementById("pre-result").innerHTML = "PASS: animation is not running";
index de7d1e7..2e2e3d7 100644 (file)
@@ -73,7 +73,6 @@
    </script>
 </head>
 <body onload="startTest()">
-  <!-- Test for DRT pauseAnimationAtTimeOnElementWithId() API on animations with multiple keyframes -->
   <div id="container">
     <div id="revealed"></div>
     <div id="animated"></div>
index 2eac9e1..2fbc1b5 100644 (file)
@@ -90,7 +90,8 @@
 
     runAnimationTest(expectedValues, function() {
       if (window.testRunner) {
-          if (testRunner.pauseAnimationAtTimeOnElementWithId("anim5", 0.1, "box5"))
+          var box5Element = document.getElementById('box5');
+          if (internals.pauseAnimationAtTimeOnElement("anim5", 0.1, box5Element))
               result += "FAIL - box5 animation was running<br>";
           else 
               result += "PASS - box5 animation was not running<br>";
index 8fac608..851707f 100644 (file)
@@ -89,7 +89,8 @@
 
     runAnimationTest(expectedValues, function() {
       if (window.testRunner) {
-          if (testRunner.pauseAnimationAtTimeOnElementWithId("anim5", 0.1, "box5"))
+          var box5Element = document.getElementById('box5');
+          if (internals.pauseAnimationAtTimeOnElement("anim5", 0.1, box5Element))
               result += "FAIL - box5 animation was running<br>";
           else 
               result += "PASS - box5 animation was not running<br>";
index 3a8381b..1a97ad8 100644 (file)
@@ -18,7 +18,7 @@ Function parameters:
     - the tolerance to use when comparing the effective CSS property value with its expected value
 
     [1] If null is passed, a regular setTimeout() will be used instead to snapshot the animated property in the future,
-    instead of fast forwarding using the pauseAnimationAtTimeOnElementWithId() JS API from DRT
+    instead of fast forwarding using the pauseAnimationAtTimeOnElement() JS API from Internals.
     
     [2] If a single string is passed, it is the id of the element to test. If an array with 2 elements is passed they
     are the ids of 2 elements, whose values are compared for equality. In this case the expected value is ignored
@@ -240,12 +240,12 @@ function checkExpectedValue(expected, index)
         }
     }
 
-    if (animationName && hasPauseAnimationAPI && !testRunner.pauseAnimationAtTimeOnElementWithId(animationName, time, elementId)) {
+    if (animationName && hasPauseAnimationAPI && !internals.pauseAnimationAtTimeOnElement(animationName, time, document.getElementById(elementId))) {
         result += "FAIL - animation \"" + animationName + "\" is not running" + "<br>";
         return;
     }
     
-    if (compareElements && !element2Static && animationName && hasPauseAnimationAPI && !testRunner.pauseAnimationAtTimeOnElementWithId(animationName, time, elementId2)) {
+    if (compareElements && !element2Static && animationName && hasPauseAnimationAPI && !internals.pauseAnimationAtTimeOnElement(animationName, time, document.getElementById(elementId2))) {
         result += "FAIL - animation \"" + animationName + "\" is not running" + "<br>";
         return;
     }
@@ -390,7 +390,7 @@ function startTest(expected, callback)
         var time = expected[i][1];
 
         // We can only use the animation fast-forward mechanism if there's an animation name
-        // and DRT implements pauseAnimationAtTimeOnElementWithId()
+        // and Internals implements pauseAnimationAtTimeOnElement()
         if (animationName && hasPauseAnimationAPI)
             checkExpectedValue(expected, i);
         else {
@@ -412,7 +412,7 @@ var hasPauseAnimationAPI;
 
 function runAnimationTest(expected, callback, event, disablePauseAnimationAPI, doPixelTest)
 {
-    hasPauseAnimationAPI = ('testRunner' in window) && ('pauseAnimationAtTimeOnElementWithId' in testRunner);
+    hasPauseAnimationAPI = 'internals' in window;
     if (disablePauseAnimationAPI)
         hasPauseAnimationAPI = false;
 
index 71ee4ff..6f4e544 100644 (file)
@@ -73,9 +73,9 @@ function runTest(expected)
         var property = expected[i][2];
         var expectedValue = expected[i][3];
         var dependsOn = expected[i][4];
-        if (window.testRunner) {
-            window.testRunner.pauseTransitionAtTimeOnElementWithId(property, time, dependsOn);
-            window.testRunner.pauseTransitionAtTimeOnElementWithId(property, time, elementId);
+        if (window.internals) {
+            internals.pauseTransitionAtTimeOnElement(property, time, document.getElementById(dependsOn));
+            internals.pauseTransitionAtTimeOnElement(property, time, document.getElementById(elementId));
             var actual = window.getComputedStyle(document.getElementById(elementId)).getPropertyCSSValue(property).getFloatValue(CSSPrimitiveValue.CSS_NUMBER);
             var result = document.getElementById("result");
             if (actual == expectedValue)
index 8e2b988..fc9d393 100644 (file)
@@ -42,7 +42,7 @@ runTransitionTest(expectedValues, setupTest, usePauseAPI);
 <body>
     <!-- Test for [bug 93755] ShadowRoot insertion point change aborts css transition, https://bugs.webkit.org/show_bug.cgi?id=93755 -->
     <!-- If this test pass, css transition will be started and -->
-    <!-- the css transition will be paused by using pauseTransitionAtTimeOnElementWithId. -->
+    <!-- the css transition will be paused by using pauseTransitionAtTimeOnElement. -->
     <div id="box" class="box" style="background: green;">
         <div>Content</div>
         <div>New Content</div>
index fd67513..bc6dd86 100644 (file)
       container.style.opacity = 1;
       
       // dump the tree in the middle of the transition
-      if (window.testRunner) {
-        if (testRunner.pauseTransitionAtTimeOnElementWithId)
-          window.setTimeout(function() { testRunner.pauseTransitionAtTimeOnElementWithId("opacity", 2.5, "first"); testRunner.notifyDone(); }, 0);
-        else
-          window.setTimeout(function() { testRunner.notifyDone(); }, 2500);
-      }
+      if (window.testRunner)
+        window.setTimeout(function() {
+          var firstElement = document.getElementById('first');
+          internals.pauseTransitionAtTimeOnElement("opacity", 2.5, first);
+          testRunner.notifyDone();
+        }, 0);
     }
     // FIXME: this should use runTransitionTest().
     window.addEventListener('load', runTest, false);
index 4a4971d..793460e 100644 (file)
@@ -233,10 +233,10 @@ function runTest(expected, usePauseAPI)
         if (tryToPauseTransition === undefined)
           tryToPauseTransition = shouldBeTransitioning;
 
-        // We can only use the transition fast-forward mechanism if DRT implements pauseTransitionAtTimeOnElementWithId()
         if (hasPauseTransitionAPI && usePauseAPI) {
             if (tryToPauseTransition) {
-              if (!testRunner.pauseTransitionAtTimeOnElementWithId(property, time, elementId))
+              var element = document.getElementById(elementId);
+              if (!internals.pauseTransitionAtTimeOnElement(property, time, element))
                 window.console.log("Failed to pause '" + property + "' transition on element '" + elementId + "'");
             }
             checkExpectedValue(expected, i);
@@ -281,7 +281,7 @@ var hasPauseTransitionAPI;
 
 function runTransitionTest(expected, callback, usePauseAPI, doPixelTest)
 {
-    hasPauseTransitionAPI = ('testRunner' in window) && ('pauseTransitionAtTimeOnElementWithId' in testRunner);
+    hasPauseTransitionAPI = 'internals' in window;
     
     if (window.testRunner) {
         if (!doPixelTest)
index e824227..01d8097 100644 (file)
@@ -23,8 +23,9 @@
    <script>
     function endTest() {
       if (window.testRunner) {
-        testRunner.pauseTransitionAtTimeOnElementWithId("left", 2.0, "target");
-        var left = window.getComputedStyle(document.getElementById('target')).left;
+        var target = document.getElementById('target');
+        internals.pauseTransitionAtTimeOnElement("left", 2.0, target);
+        var left = window.getComputedStyle(target).left;
         var result = "PASS";
         if (left != "125px") {
           result = "FAIL - expected 125px got " + left;
index 1bbd473..15c30f0 100644 (file)
@@ -24,7 +24,8 @@
 
     function endTest() {
       if (window.testRunner) {
-        var paused = testRunner.pauseTransitionAtTimeOnElementWithId("left", 1.0, "target");
+        var target = document.getElementById('target');
+        var paused = internals.pauseTransitionAtTimeOnElement("left", 1.0, target);
         var result = "";
         if (paused)
           result = "PASS: correctly paused transition";
@@ -47,7 +48,7 @@
    </script>
 </head>
 <body onload="startTest()">
-  <!-- Test for DRT pauseTransitionAtTimeOnElementWithId() API -->
+  <!-- Test for Interals pauseTransitionAtTimeOnElement() API -->
   <div id="target"></div>
   <div id="results"></div>
 
index 3c7b4a8..1c0a035 100644 (file)
@@ -48,7 +48,8 @@
         function doTest()
         {
             if (window.testRunner) {
-                if (!testRunner.pauseTransitionAtTimeOnElementWithId("-webkit-transform", 2.0, "target"))
+                var target = document.getElementById('target');
+                if (!internals.pauseTransitionAtTimeOnElement("-webkit-transform", 2.0, target))
                     throw("Transition is not running");
         
                 checkResults();
index 0d1ce1a..897a519 100644 (file)
@@ -46,7 +46,8 @@
         function doTest()
         {
             if (window.testRunner) {
-                if (!testRunner.pauseTransitionAtTimeOnElementWithId("left", 2.0, "target"))
+                var target = document.getElementById('target');
+                if (!internals.pauseTransitionAtTimeOnElement("left", 2.0, target))
                     throw("Transition is not running");
         
                 checkResults();
index 5a46451..94f2948 100644 (file)
@@ -1,3 +1,21 @@
+2013-02-07  Benjamin Poulain  <bpoulain@apple.com>
+
+        Move pauseAnimation/pauseTransition from TestRunner to Internals
+        https://bugs.webkit.org/show_bug.cgi?id=109107
+
+        Reviewed by Anders Carlsson.
+
+        Tests: animations/animation-internals-api-multiple-keyframes.html
+               animations/animation-internals-api.html
+
+        * testing/Internals.cpp:
+        (WebCore::Internals::pauseAnimationAtTimeOnElement):
+        (WebCore):
+        (WebCore::Internals::pauseTransitionAtTimeOnElement):
+        * testing/Internals.h:
+        (Internals):
+        * testing/Internals.idl:
+
 2013-02-07  Gavin Peters  <gavinp@chromium.org>
 
         Unreviewed, rolling out r142155.
index 3f7825d..ad4dd9d 100644 (file)
@@ -442,6 +442,16 @@ void Internals::resumeAnimations(Document* document, ExceptionCode& ec) const
     controller->resumeAnimations();
 }
 
+bool Internals::pauseAnimationAtTimeOnElement(const String& animationName, double pauseTime, Element* element, ExceptionCode& ec)
+{
+    if (!element || pauseTime < 0) {
+        ec = INVALID_ACCESS_ERR;
+        return false;
+    }
+    AnimationController* controller = frame()->animation();
+    return controller->pauseAnimationAtTime(element->renderer(), AtomicString(animationName), pauseTime);
+}
+
 bool Internals::pauseAnimationAtTimeOnPseudoElement(const String& animationName, double pauseTime, Element* element, const String& pseudoId, ExceptionCode& ec)
 {
     if (!element || pauseTime < 0) {
@@ -463,6 +473,16 @@ bool Internals::pauseAnimationAtTimeOnPseudoElement(const String& animationName,
     return frame()->animation()->pauseAnimationAtTime(pseudoElement->renderer(), AtomicString(animationName), pauseTime);
 }
 
+bool Internals::pauseTransitionAtTimeOnElement(const String& propertyName, double pauseTime, Element* element, ExceptionCode& ec)
+{
+    if (!element || pauseTime < 0) {
+        ec = INVALID_ACCESS_ERR;
+        return false;
+    }
+    AnimationController* controller = frame()->animation();
+    return controller->pauseTransitionAtTime(element->renderer(), propertyName, pauseTime);
+}
+
 bool Internals::pauseTransitionAtTimeOnPseudoElement(const String& property, double pauseTime, Element* element, const String& pseudoId, ExceptionCode& ec)
 {
     if (!element || pauseTime < 0) {
index 8314f93..646b155 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2012 Google Inc. All rights reserved.
+ * Copyright (C) 2013 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -96,10 +97,15 @@ public:
     String shadowPseudoId(Element*, ExceptionCode&);
     void setShadowPseudoId(Element*, const String&, ExceptionCode&);
 
+    // CSS Animation testing.
     unsigned numberOfActiveAnimations() const;
     void suspendAnimations(Document*, ExceptionCode&) const;
     void resumeAnimations(Document*, ExceptionCode&) const;
+    bool pauseAnimationAtTimeOnElement(const String& animationName, double pauseTime, Element*, ExceptionCode&);
     bool pauseAnimationAtTimeOnPseudoElement(const String& animationName, double pauseTime, Element*, const String& pseudoId, ExceptionCode&);
+
+    // CSS Transition testing.
+    bool pauseTransitionAtTimeOnElement(const String& propertyName, double pauseTime, Element*, ExceptionCode&);
     bool pauseTransitionAtTimeOnPseudoElement(const String& property, double pauseTime, Element*, const String& pseudoId, ExceptionCode&);
 
     PassRefPtr<Element> createContentElement(ExceptionCode&);
index f7a97ab..a50b79c 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2012 Google Inc. All rights reserved.
+ * Copyright (C) 2013 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
     boolean hasSelectorForAttributeInShadow(in Element host, in DOMString attributeName) raises (DOMException);
     boolean hasSelectorForPseudoClassInShadow(in Element host, in DOMString pseudoClass) raises (DOMException);
 
+    // CSS Animation testing.
     unsigned long numberOfActiveAnimations();
     void suspendAnimations(in Document document) raises (DOMException);
     void resumeAnimations(in Document document) raises (DOMException);
+    boolean pauseAnimationAtTimeOnElement(in DOMString animationName, in double pauseTime, in Element element) raises (DOMException);
     boolean pauseAnimationAtTimeOnPseudoElement(in DOMString animationName, in double pauseTime, in Element element, in DOMString pseudoId) raises (DOMException);
+
+    // CSS Transition testing.
+    boolean pauseTransitionAtTimeOnElement(in DOMString propertyName, in double pauseTime, in Element element) raises (DOMException);
     boolean pauseTransitionAtTimeOnPseudoElement(in DOMString property, in double pauseTime, in Element element, in DOMString pseudoId) raises (DOMException);
 
     Node nextSiblingByWalker(in Node node) raises(DOMException);
index d484a73..e0137d6 100644 (file)
@@ -1,3 +1,13 @@
+2013-02-07  Benjamin Poulain  <bpoulain@apple.com>
+
+        Move pauseAnimation/pauseTransition from TestRunner to Internals
+        https://bugs.webkit.org/show_bug.cgi?id=109107
+
+        Reviewed by Anders Carlsson.
+
+        * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
+        * WebCoreSupport/DumpRenderTreeSupportEfl.h:
+
 2013-02-04  Benjamin Poulain  <bpoulain@apple.com>
 
         Kill suspendAnimation(), resumeAnimation() and numberOfActiveAnimations() from DRT/WTR; use Internals
index e7f50aa..48bcf1e 100644 (file)
@@ -177,30 +177,6 @@ void DumpRenderTreeSupportEfl::layoutFrame(Evas_Object* ewkFrame)
     frame->view()->layout();
 }
 
-bool DumpRenderTreeSupportEfl::pauseAnimation(Evas_Object* ewkFrame, const char* name, const char* elementId, double time)
-{
-    DRT_SUPPORT_FRAME_GET_OR_RETURN(ewkFrame, frame, false);
-
-    WebCore::Element* element = frame->document()->getElementById(elementId);
-
-    if (!element || !element->renderer())
-        return false;
-
-    return frame->animation()->pauseAnimationAtTime(element->renderer(), name, time);
-}
-
-bool DumpRenderTreeSupportEfl::pauseTransition(Evas_Object* ewkFrame, const char* name, const char* elementId, double time)
-{
-    DRT_SUPPORT_FRAME_GET_OR_RETURN(ewkFrame, frame, false);
-
-    WebCore::Element* element = frame->document()->getElementById(elementId);
-
-    if (!element || !element->renderer())
-        return false;
-
-    return frame->animation()->pauseTransitionAtTime(element->renderer(), name, time);
-}
-
 unsigned DumpRenderTreeSupportEfl::pendingUnloadEventCount(const Evas_Object* ewkFrame)
 {
     DRT_SUPPORT_FRAME_GET_OR_RETURN(ewkFrame, frame, 0);
index 3d67dc7..62da57c 100644 (file)
@@ -61,8 +61,6 @@ public:
     static Eina_List* frameChildren(const Evas_Object* ewkFrame);
     static WebCore::Frame* frameParent(const Evas_Object* ewkFrame);
     static void layoutFrame(Evas_Object* ewkFrame);
-    static bool pauseAnimation(Evas_Object* ewkFrame, const char* name, const char* elementId, double time);
-    static bool pauseTransition(Evas_Object* ewkFrame, const char* name, const char* elementId, double time);
     static unsigned pendingUnloadEventCount(const Evas_Object* ewkFrame);
     static String renderTreeDump(Evas_Object* ewkFrame);
     static String responseMimeType(const Evas_Object* ewkFrame);
index 3e871a3..8ef7f6a 100644 (file)
@@ -1,3 +1,14 @@
+2013-02-07  Benjamin Poulain  <bpoulain@apple.com>
+
+        Move pauseAnimation/pauseTransition from TestRunner to Internals
+        https://bugs.webkit.org/show_bug.cgi?id=109107
+
+        Reviewed by Anders Carlsson.
+
+        * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
+        * WebCoreSupport/DumpRenderTreeSupportGtk.h:
+        (DumpRenderTreeSupportGtk):
+
 2013-02-07  ChangSeok Oh  <shivamidow@gmail.com>
 
         [GTK][AC] Implement opacity animation with clutter ac backend
index cd6eeb3..923407b 100644 (file)
@@ -240,24 +240,6 @@ guint DumpRenderTreeSupportGtk::getPendingUnloadEventCount(WebKitWebFrame* frame
     return core(frame)->document()->domWindow()->pendingUnloadEventListeners();
 }
 
-bool DumpRenderTreeSupportGtk::pauseAnimation(WebKitWebFrame* frame, const char* name, double time, const char* element)
-{
-    ASSERT(core(frame));
-    Element* coreElement = core(frame)->document()->getElementById(AtomicString(element));
-    if (!coreElement || !coreElement->renderer())
-        return false;
-    return core(frame)->animation()->pauseAnimationAtTime(coreElement->renderer(), AtomicString(name), time);
-}
-
-bool DumpRenderTreeSupportGtk::pauseTransition(WebKitWebFrame* frame, const char* name, double time, const char* element)
-{
-    ASSERT(core(frame));
-    Element* coreElement = core(frame)->document()->getElementById(AtomicString(element));
-    if (!coreElement || !coreElement->renderer())
-        return false;
-    return core(frame)->animation()->pauseTransitionAtTime(coreElement->renderer(), AtomicString(name), time);
-}
-
 CString DumpRenderTreeSupportGtk::markerTextForListItem(WebKitWebFrame* frame, JSContextRef context, JSValueRef nodeObject)
 {
     JSC::ExecState* exec = toJS(context);
index 5393cb0..d12bbd4 100644 (file)
@@ -63,8 +63,6 @@ public:
     static void addUserScript(WebKitWebFrame*, const char*, bool, bool);
     static void addUserStyleSheet(WebKitWebFrame*, const char* sourceCode, bool allFrames);
     static guint getPendingUnloadEventCount(WebKitWebFrame*);
-    static bool pauseAnimation(WebKitWebFrame*, const char* name, double time, const char* element);
-    static bool pauseTransition(WebKitWebFrame*, const char* name, double time, const char* element);
     static WTF::CString markerTextForListItem(WebKitWebFrame*, JSContextRef, JSValueRef nodeObject);
     static void clearMainFrameName(WebKitWebFrame*);
     static AtkObject* getFocusedAccessibleElement(WebKitWebFrame*);
index 8cc465a..17e1279 100644 (file)
@@ -1,3 +1,13 @@
+2013-02-07  Benjamin Poulain  <bpoulain@apple.com>
+
+        Move pauseAnimation/pauseTransition from TestRunner to Internals
+        https://bugs.webkit.org/show_bug.cgi?id=109107
+
+        Reviewed by Anders Carlsson.
+
+        * WebView/WebFrame.mm:
+        * WebView/WebFramePrivate.h:
+
 2013-02-06  Mike West  <mkwst@chromium.org>
 
         Add an ENABLE_NOSNIFF feature flag.
index cfc655d..dc79e6f 100644 (file)
@@ -926,40 +926,6 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
 }
 #endif
 
-- (BOOL)_pauseAnimation:(NSString*)name onNode:(DOMNode *)node atTime:(NSTimeInterval)time
-{
-    Frame* frame = core(self);
-    if (!frame)
-        return false;
-
-    AnimationController* controller = frame->animation();
-    if (!controller)
-        return false;
-
-    Node* coreNode = core(node);
-    if (!coreNode || !coreNode->renderer())
-        return false;
-
-    return controller->pauseAnimationAtTime(coreNode->renderer(), name, time);
-}
-
-- (BOOL)_pauseTransitionOfProperty:(NSString*)name onNode:(DOMNode*)node atTime:(NSTimeInterval)time
-{
-    Frame* frame = core(self);
-    if (!frame)
-        return false;
-
-    AnimationController* controller = frame->animation();
-    if (!controller)
-        return false;
-
-    Node* coreNode = core(node);
-    if (!coreNode || !coreNode->renderer())
-        return false;
-
-    return controller->pauseTransitionAtTime(coreNode->renderer(), name, time);
-}
-
 - (void)_replaceSelectionWithFragment:(DOMDocumentFragment *)fragment selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace matchStyle:(BOOL)matchStyle
 {
     if (_private->coreFrame->selection()->isNone() || !fragment)
index c7b707e..6ee8233 100644 (file)
@@ -95,12 +95,6 @@ typedef enum {
 - (NSString *)_stringByEvaluatingJavaScriptFromString:(NSString *)string withGlobalObject:(JSObjectRef)globalObject inScriptWorld:(WebScriptWorld *)world;
 - (JSGlobalContextRef)_globalContextForScriptWorld:(WebScriptWorld *)world;
 
-// Pause a given CSS animation or transition on the target node at a specific time.
-// If the animation or transition is already paused, it will update its pause time.
-// This method is only intended to be used for testing the CSS animation and transition system.
-- (BOOL)_pauseAnimation:(NSString*)name onNode:(DOMNode *)node atTime:(NSTimeInterval)time;
-- (BOOL)_pauseTransitionOfProperty:(NSString*)name onNode:(DOMNode*)node atTime:(NSTimeInterval)time;
-
 - (void)_replaceSelectionWithFragment:(DOMDocumentFragment *)fragment selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace matchStyle:(BOOL)matchStyle;
 - (void)_replaceSelectionWithText:(NSString *)text selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace;
 - (void)_replaceSelectionWithMarkupString:(NSString *)markupString baseURLString:(NSString *)baseURLString selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace;
index b124aa6..1206487 100644 (file)
@@ -1,3 +1,13 @@
+2013-02-07  Benjamin Poulain  <bpoulain@apple.com>
+
+        Move pauseAnimation/pauseTransition from TestRunner to Internals
+        https://bugs.webkit.org/show_bug.cgi?id=109107
+
+        Reviewed by Anders Carlsson.
+
+        * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+        * WebCoreSupport/DumpRenderTreeSupportQt.h:
+
 2013-02-04  Benjamin Poulain  <bpoulain@apple.com>
 
         Kill suspendAnimation(), resumeAnimation() and numberOfActiveAnimations() from DRT/WTR; use Internals
index a4a0826..5ab942f 100644 (file)
@@ -298,49 +298,6 @@ void DumpRenderTreeSupportQt::setValueForUser(const QWebElement& element, const
     inputElement->setValueForUser(value);
 }
 
-// Pause a given CSS animation or transition on the target node at a specific time.
-// If the animation or transition is already paused, it will update its pause time.
-// This method is only intended to be used for testing the CSS animation and transition system.
-bool DumpRenderTreeSupportQt::pauseAnimation(QWebFrameAdapter *adapter, const QString &animationName, double time, const QString &elementId)
-{
-    Frame* coreFrame = adapter->frame;
-    if (!coreFrame)
-        return false;
-
-    AnimationController* controller = coreFrame->animation();
-    if (!controller)
-        return false;
-
-    Document* doc = coreFrame->document();
-    Q_ASSERT(doc);
-
-    Node* coreNode = doc->getElementById(elementId);
-    if (!coreNode || !coreNode->renderer())
-        return false;
-
-    return controller->pauseAnimationAtTime(coreNode->renderer(), animationName, time);
-}
-
-bool DumpRenderTreeSupportQt::pauseTransitionOfProperty(QWebFrameAdapter *adapter, const QString &propertyName, double time, const QString &elementId)
-{
-    Frame* coreFrame = adapter->frame;
-    if (!coreFrame)
-        return false;
-
-    AnimationController* controller = coreFrame->animation();
-    if (!controller)
-        return false;
-
-    Document* doc = coreFrame->document();
-    Q_ASSERT(doc);
-
-    Node* coreNode = doc->getElementById(elementId);
-    if (!coreNode || !coreNode->renderer())
-        return false;
-
-    return controller->pauseTransitionAtTime(coreNode->renderer(), propertyName, time);
-}
-
 void DumpRenderTreeSupportQt::clearFrameName(QWebFrameAdapter *adapter)
 {
     Frame* coreFrame = adapter->frame;
index 90889e8..2d6a886 100644 (file)
@@ -99,9 +99,6 @@ public:
     static QVariantList firstRectForCharacterRange(QWebPageAdapter*, int location, int length);
     static void confirmComposition(QWebPageAdapter*, const char* text);
 
-    static bool pauseAnimation(QWebFrameAdapter*, const QString& name, double time, const QString& elementId);
-    static bool pauseTransitionOfProperty(QWebFrameAdapter*, const QString& name, double time, const QString& elementId);
-
     static void setDomainRelaxationForbiddenForURLScheme(bool forbidden, const QString& scheme);
     static void setFrameFlatteningEnabled(QWebPageAdapter*, bool);
     static void setCaretBrowsingEnabled(QWebPageAdapter*, bool value);
index b80419d..8b57841 100644 (file)
@@ -1,3 +1,16 @@
+2013-02-07  Benjamin Poulain  <bpoulain@apple.com>
+
+        Move pauseAnimation/pauseTransition from TestRunner to Internals
+        https://bugs.webkit.org/show_bug.cgi?id=109107
+
+        Reviewed by Anders Carlsson.
+
+        * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
+        * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
+        * WebProcess/WebPage/WebFrame.cpp:
+        * WebProcess/WebPage/WebFrame.h:
+        (WebFrame):
+
 2013-02-07  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
 
         [WK2][EFL] Removal of non coordinated graphics code path from WK2 EFL
index 8e14387..06ddc3b 100644 (file)
@@ -92,16 +92,6 @@ WKArrayRef WKBundleFrameCopyChildFrames(WKBundleFrameRef frameRef)
     return toAPI(toImpl(frameRef)->childFrames().leakRef());    
 }
 
-bool WKBundleFramePauseAnimationOnElementWithId(WKBundleFrameRef frameRef, WKStringRef animationName, WKStringRef elementID, double time)
-{
-    return toImpl(frameRef)->pauseAnimationOnElementWithId(AtomicString(toWTFString(animationName)), toWTFString(elementID), time);
-}
-
-bool WKBundleFramePauseTransitionOnElementWithId(WKBundleFrameRef frameRef, WKStringRef propertyName, WKStringRef elementID, double time)
-{
-    return toImpl(frameRef)->pauseTransitionOnElementWithId(toWTFString(propertyName), toWTFString(elementID), time);
-}
-
 JSGlobalContextRef WKBundleFrameGetJavaScriptContext(WKBundleFrameRef frameRef)
 {
     return toImpl(frameRef)->jsContext();
index ea89206..4e5c5c3 100644 (file)
@@ -41,8 +41,6 @@ WK_EXPORT WKStringRef WKBundleFrameCopyInnerText(WKBundleFrameRef frame);
 WK_EXPORT WKStringRef WKBundleFrameCopyCounterValue(WKBundleFrameRef frame, JSObjectRef element);
 WK_EXPORT WKStringRef WKBundleFrameCopyMarkerText(WKBundleFrameRef frame, JSObjectRef element);
 WK_EXPORT JSValueRef WKBundleFrameGetComputedStyleIncludingVisitedInfo(WKBundleFrameRef frame, JSObjectRef element);
-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 unsigned WKBundleFrameGetPendingUnloadCount(WKBundleFrameRef frame);
 WK_EXPORT WKStringRef WKBundleFrameCopyLayerTreeAsText(WKBundleFrameRef frame);
 WK_EXPORT void WKBundleFrameClearOpener(WKBundleFrameRef frame);
index e4a55c8..602bec9 100644 (file)
@@ -417,44 +417,6 @@ PassRefPtr<ImmutableArray> WebFrame::childFrames()
     return ImmutableArray::adopt(vector);
 }
 
-bool WebFrame::pauseAnimationOnElementWithId(const AtomicString& animationName, 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->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);
-}
-
 String WebFrame::layerTreeAsText() const
 {
     if (!m_coreFrame)
index e1bd11e..3305307 100644 (file)
@@ -115,8 +115,6 @@ public:
     static String counterValue(JSObjectRef element);
     static String markerText(JSObjectRef element);
 
-    bool pauseAnimationOnElementWithId(const AtomicString& animationName, const String& elementID, double time);
-    bool pauseTransitionOnElementWithId(const String& propertyName, const String& elementID, double time);
     String layerTreeAsText() const;
     
     unsigned pendingUnloadCount() const;
index 9370602..f1e8219 100644 (file)
@@ -1,3 +1,30 @@
+2013-02-07  Benjamin Poulain  <bpoulain@apple.com>
+
+        Move pauseAnimation/pauseTransition from TestRunner to Internals
+        https://bugs.webkit.org/show_bug.cgi?id=109107
+
+        Reviewed by Anders Carlsson.
+
+        * DumpRenderTree/TestRunner.cpp:
+        (TestRunner::staticFunctions):
+        * DumpRenderTree/TestRunner.h:
+        * DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp:
+        * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+        (WebTestRunner::TestRunner::TestRunner):
+        * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+        (TestRunner):
+        * DumpRenderTree/efl/TestRunnerEfl.cpp:
+        * DumpRenderTree/gtk/TestRunnerGtk.cpp:
+        * DumpRenderTree/mac/TestRunnerMac.mm:
+        * DumpRenderTree/qt/TestRunnerQt.cpp:
+        * DumpRenderTree/qt/TestRunnerQt.h:
+        (TestRunner):
+        * DumpRenderTree/win/TestRunnerWin.cpp:
+        * DumpRenderTree/wx/TestRunnerWx.cpp:
+        * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+        * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+        * WebKitTestRunner/InjectedBundle/TestRunner.h:
+
 2013-02-07  Jochen Eisinger  <jochen@chromium.org>
 
         [chromium] turn TestRunner library into a component build
index 142be84..b329f14 100644 (file)
@@ -1647,38 +1647,6 @@ static JSValueRef elementDoesAutoCompleteForElementWithIdCallback(JSContextRef c
     return JSValueMakeBoolean(context, autoCompletes);
 }
 
-static JSValueRef pauseAnimationAtTimeOnElementWithIdCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
-    if (argumentCount != 3)
-        return JSValueMakeUndefined(context);
-
-    JSRetainPtr<JSStringRef> animationName(Adopt, JSValueToStringCopy(context, arguments[0], exception));
-    ASSERT(!*exception);
-    double time = JSValueToNumber(context, arguments[1], exception);
-    ASSERT(!*exception);
-    JSRetainPtr<JSStringRef> elementId(Adopt, JSValueToStringCopy(context, arguments[2], exception));
-    ASSERT(!*exception);
-
-    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
-    return JSValueMakeBoolean(context, controller->pauseAnimationAtTimeOnElementWithId(animationName.get(), time, elementId.get()));
-}
-
-static JSValueRef pauseTransitionAtTimeOnElementWithIdCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
-    if (argumentCount != 3)
-        return JSValueMakeUndefined(context);
-
-    JSRetainPtr<JSStringRef> propertyName(Adopt, JSValueToStringCopy(context, arguments[0], exception));
-    ASSERT(!*exception);
-    double time = JSValueToNumber(context, arguments[1], exception);
-    ASSERT(!*exception);
-    JSRetainPtr<JSStringRef> elementId(Adopt, JSValueToStringCopy(context, arguments[2], exception));
-    ASSERT(!*exception);
-
-    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
-    return JSValueMakeBoolean(context, controller->pauseTransitionAtTimeOnElementWithId(propertyName.get(), time, elementId.get()));
-}
-
 static JSValueRef waitForPolicyDelegateCallback(JSContextRef context, JSObjectRef, JSObjectRef thisObject, size_t, const JSValueRef[], JSValueRef*)
 {
     TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
@@ -2230,8 +2198,6 @@ JSStaticFunction* TestRunner::staticFunctions()
         { "notifyDone", notifyDoneCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "overridePreference", overridePreferenceCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "pathToLocalResource", pathToLocalResourceCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
-        { "pauseAnimationAtTimeOnElementWithId", pauseAnimationAtTimeOnElementWithIdCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
-        { "pauseTransitionAtTimeOnElementWithId", pauseTransitionAtTimeOnElementWithIdCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "printToPDF", dumpAsPDFCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "queueBackNavigation", queueBackNavigationCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "queueForwardNavigation", queueForwardNavigationCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
index f23b3ce..e8b2c62 100644 (file)
@@ -287,9 +287,6 @@ public:
 
     const std::string& encodedAudioData() const { return m_encodedAudioData; }
     void setEncodedAudioData(const std::string& encodedAudioData) { m_encodedAudioData = encodedAudioData; }
-    
-    bool pauseAnimationAtTimeOnElementWithId(JSStringRef animationName, double time, JSStringRef elementId);
-    bool pauseTransitionAtTimeOnElementWithId(JSStringRef propertyName, double time, JSStringRef elementId);
 
     void addOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef destinationProtocol, JSStringRef destinationHost, bool allowDestinationSubdomains);
     void removeOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef destinationProtocol, JSStringRef destinationHost, bool allowDestinationSubdomains);
index 36c449f..4d58cc4 100644 (file)
@@ -341,54 +341,6 @@ void TestRunner::setWindowIsKey(bool windowIsKey)
     notImplemented();
 }
 
-bool TestRunner::pauseAnimationAtTimeOnElementWithId(JSStringRef animationName, double time, JSStringRef elementId)
-{
-    if (!mainFrame)
-        return false;
-
-    int nameLen = JSStringGetMaximumUTF8CStringSize(animationName);
-    int idLen = JSStringGetMaximumUTF8CStringSize(elementId);
-    OwnArrayPtr<char> name = adoptArrayPtr(new char[nameLen]);
-    OwnArrayPtr<char> eId = adoptArrayPtr(new char[idLen]);
-
-    JSStringGetUTF8CString(animationName, name.get(), nameLen);
-    JSStringGetUTF8CString(elementId, eId.get(), idLen);
-
-    WebCore::AnimationController* animationController = mainFrame->animation();
-    if (!animationController)
-        return false;
-
-    WebCore::Node* node = mainFrame->document()->getElementById(eId.get());
-    if (!node || !node->renderer())
-        return false;
-
-    return animationController->pauseAnimationAtTime(node->renderer(), name.get(), time);
-}
-
-bool TestRunner::pauseTransitionAtTimeOnElementWithId(JSStringRef propertyName, double time, JSStringRef elementId)
-{
-    if (!mainFrame)
-        return false;
-
-    int nameLen = JSStringGetMaximumUTF8CStringSize(propertyName);
-    int idLen = JSStringGetMaximumUTF8CStringSize(elementId);
-    OwnArrayPtr<char> name = adoptArrayPtr(new char[nameLen]);
-    OwnArrayPtr<char> eId = adoptArrayPtr(new char[idLen]);
-
-    JSStringGetUTF8CString(propertyName, name.get(), nameLen);
-    JSStringGetUTF8CString(elementId, eId.get(), idLen);
-
-    WebCore::AnimationController* animationController = mainFrame->animation();
-    if (!animationController)
-        return false;
-
-    WebCore::Node* node = mainFrame->document()->getElementById(eId.get());
-    if (!node || !node->renderer())
-        return false;
-
-    return animationController->pauseTransitionAtTime(node->renderer(), name.get(), time);
-}
-
 unsigned TestRunner::workerThreadCount() const
 {
 #if ENABLE_WORKERS
index daac521..713b7e9 100644 (file)
@@ -183,8 +183,6 @@ TestRunner::TestRunner()
     bindMethod("setTabKeyCyclesThroughElements", &TestRunner::setTabKeyCyclesThroughElements);
     bindMethod("execCommand", &TestRunner::execCommand);
     bindMethod("isCommandEnabled", &TestRunner::isCommandEnabled);
-    bindMethod("pauseAnimationAtTimeOnElementWithId", &TestRunner::pauseAnimationAtTimeOnElementWithId);
-    bindMethod("pauseTransitionAtTimeOnElementWithId", &TestRunner::pauseTransitionAtTimeOnElementWithId);
     bindMethod("elementDoesAutoCompleteForElementWithId", &TestRunner::elementDoesAutoCompleteForElementWithId);
     bindMethod("callShouldCloseOnWebView", &TestRunner::callShouldCloseOnWebView);
     bindMethod("setDomainRelaxationForbiddenForURLScheme", &TestRunner::setDomainRelaxationForbiddenForURLScheme);
@@ -1049,38 +1047,6 @@ void TestRunner::isCommandEnabled(const CppArgumentList& arguments, CppVariant*
     result->set(rv);
 }
 
-bool TestRunner::pauseAnimationAtTimeOnElementWithId(const WebString& animationName, double time, const WebString& elementId)
-{
-    WebFrame* webFrame = m_webView->mainFrame();
-    if (!webFrame)
-        return false;
-
-    WebAnimationController* controller = webFrame->animationController();
-    if (!controller)
-        return false;
-
-    WebElement element = webFrame->document().getElementById(elementId);
-    if (element.isNull())
-        return false;
-    return controller->pauseAnimationAtTime(element, animationName, time);
-}
-
-bool TestRunner::pauseTransitionAtTimeOnElementWithId(const WebString& propertyName, double time, const WebString& elementId)
-{
-    WebFrame* webFrame = m_webView->mainFrame();
-    if (!webFrame)
-        return false;
-
-    WebAnimationController* controller = webFrame->animationController();
-    if (!controller)
-        return false;
-
-    WebElement element = webFrame->document().getElementById(elementId);
-    if (element.isNull())
-        return false;
-    return controller->pauseTransitionAtTime(element, propertyName, time);
-}
-
 bool TestRunner::elementDoesAutoCompleteForElementWithId(const WebString& elementId)
 {
     WebFrame* webFrame = m_webView->mainFrame();
@@ -1095,28 +1061,6 @@ bool TestRunner::elementDoesAutoCompleteForElementWithId(const WebString& elemen
     return inputElement.autoComplete();
 }
 
-void TestRunner::pauseAnimationAtTimeOnElementWithId(const CppArgumentList& arguments, CppVariant* result)
-{
-    result->set(false);
-    if (arguments.size() > 2 && arguments[0].isString() && arguments[1].isNumber() && arguments[2].isString()) {
-        WebString animationName = cppVariantToWebString(arguments[0]);
-        double time = arguments[1].toDouble();
-        WebString elementId = cppVariantToWebString(arguments[2]);
-        result->set(pauseAnimationAtTimeOnElementWithId(animationName, time, elementId));
-    }
-}
-
-void TestRunner::pauseTransitionAtTimeOnElementWithId(const CppArgumentList& arguments, CppVariant* result)
-{
-    result->set(false);
-    if (arguments.size() > 2 && arguments[0].isString() && arguments[1].isNumber() && arguments[2].isString()) {
-        WebString propertyName = cppVariantToWebString(arguments[0]);
-        double time = arguments[1].toDouble();
-        WebString elementId = cppVariantToWebString(arguments[2]);
-        result->set(pauseTransitionAtTimeOnElementWithId(propertyName, time, elementId));
-    }
-}
-
 void TestRunner::elementDoesAutoCompleteForElementWithId(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() != 1 || !arguments[0].isString()) {
index 3fe1c1f..1c34708 100644 (file)
@@ -203,8 +203,6 @@ private:
     // Checks if an internal command is currently available.
     void isCommandEnabled(const CppArgumentList&, CppVariant*);
 
-    void pauseAnimationAtTimeOnElementWithId(const CppArgumentList&, CppVariant*);
-    void pauseTransitionAtTimeOnElementWithId(const CppArgumentList&, CppVariant*);
     void elementDoesAutoCompleteForElementWithId(const CppArgumentList&, CppVariant*);
     void callShouldCloseOnWebView(const CppArgumentList&, CppVariant*);
     void setDomainRelaxationForbiddenForURLScheme(const CppArgumentList&, CppVariant*);
@@ -509,8 +507,6 @@ private:
         virtual void runIfValid() { m_object->completeNotifyDone(true); }
     };
 
-    bool pauseAnimationAtTimeOnElementWithId(const WebKit::WebString& animationName, double time, const WebKit::WebString& elementId);
-    bool pauseTransitionAtTimeOnElementWithId(const WebKit::WebString& propertyName, double time, const WebKit::WebString& elementId);
     bool elementDoesAutoCompleteForElementWithId(const WebKit::WebString&);
     bool cppVariantToBool(const CppVariant&);
     int32_t cppVariantToInt32(const CppVariant&);
index adcf5c1..30cea24 100644 (file)
@@ -655,16 +655,6 @@ void TestRunner::setAppCacheMaximumSize(unsigned long long size)
     ewk_settings_application_cache_max_quota_set(size);
 }
 
-bool TestRunner::pauseAnimationAtTimeOnElementWithId(JSStringRef animationName, double time, JSStringRef elementId)
-{
-    return DumpRenderTreeSupportEfl::pauseAnimation(browser->mainFrame(), animationName->string().utf8().data(), elementId->string().utf8().data(), time);
-}
-
-bool TestRunner::pauseTransitionAtTimeOnElementWithId(JSStringRef propertyName, double time, JSStringRef elementId)
-{
-    return DumpRenderTreeSupportEfl::pauseTransition(browser->mainFrame(), propertyName->string().utf8().data(), elementId->string().utf8().data(), time);
-}
-
 static inline bool toBool(JSStringRef value)
 {
     return equals(value, "true") || equals(value, "1");
index 284700e..221de0a 100644 (file)
@@ -720,26 +720,6 @@ void TestRunner::setAppCacheMaximumSize(unsigned long long size)
     webkit_application_cache_set_maximum_size(size);
 }
 
-bool TestRunner::pauseAnimationAtTimeOnElementWithId(JSStringRef animationName, double time, JSStringRef elementId)
-{    
-    gchar* name = JSStringCopyUTF8CString(animationName);
-    gchar* element = JSStringCopyUTF8CString(elementId);
-    bool returnValue = DumpRenderTreeSupportGtk::pauseAnimation(mainFrame, name, time, element);
-    g_free(name);
-    g_free(element);
-    return returnValue;
-}
-
-bool TestRunner::pauseTransitionAtTimeOnElementWithId(JSStringRef propertyName, double time, JSStringRef elementId)
-{    
-    gchar* name = JSStringCopyUTF8CString(propertyName);
-    gchar* element = JSStringCopyUTF8CString(elementId);
-    bool returnValue = DumpRenderTreeSupportGtk::pauseTransition(mainFrame, name, time, element);
-    g_free(name);
-    g_free(element);
-    return returnValue;
-}
-
 static gboolean booleanFromValue(gchar* value)
 {
     return !g_ascii_strcasecmp(value, "true") || !g_ascii_strcasecmp(value, "1");
index c98218b..864eda8 100644 (file)
@@ -787,26 +787,6 @@ bool TestRunner::isCommandEnabled(JSStringRef name)
     return [validator validateUserInterfaceItem:target.get()];
 }
 
-bool TestRunner::pauseAnimationAtTimeOnElementWithId(JSStringRef animationName, double time, JSStringRef elementId)
-{
-    RetainPtr<CFStringRef> idCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, elementId));
-    NSString *idNS = (NSString *)idCF.get();
-    RetainPtr<CFStringRef> nameCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, animationName));
-    NSString *nameNS = (NSString *)nameCF.get();
-    
-    return [mainFrame _pauseAnimation:nameNS onNode:[[mainFrame DOMDocument] getElementById:idNS] atTime:time];
-}
-
-bool TestRunner::pauseTransitionAtTimeOnElementWithId(JSStringRef propertyName, double time, JSStringRef elementId)
-{
-    RetainPtr<CFStringRef> idCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, elementId));
-    NSString *idNS = (NSString *)idCF.get();
-    RetainPtr<CFStringRef> nameCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, propertyName));
-    NSString *nameNS = (NSString *)nameCF.get();
-    
-    return [mainFrame _pauseTransitionOfProperty:nameNS onNode:[[mainFrame DOMDocument] getElementById:idNS] atTime:time];
-}
-
 void TestRunner::waitForPolicyDelegate()
 {
     setWaitToDump(true);
index d6afde7..0ed0c62 100644 (file)
@@ -546,24 +546,6 @@ void TestRunner::setXSSAuditorEnabled(bool enable)
     m_drt->webPage()->settings()->setAttribute(QWebSettings::XSSAuditingEnabled, enable);
 }
 
-bool TestRunner::pauseAnimationAtTimeOnElementWithId(const QString& animationName,
-                                                               double time,
-                                                               const QString& elementId)
-{
-    QWebFrame* frame = m_drt->webPage()->mainFrame();
-    Q_ASSERT(frame);
-    return DumpRenderTreeSupportQt::pauseAnimation(frame->handle(), animationName, time, elementId);
-}
-
-bool TestRunner::pauseTransitionAtTimeOnElementWithId(const QString& propertyName,
-                                                                double time,
-                                                                const QString& elementId)
-{
-    QWebFrame* frame = m_drt->webPage()->mainFrame();
-    Q_ASSERT(frame);
-    return DumpRenderTreeSupportQt::pauseTransitionOfProperty(frame->handle(), propertyName, time, elementId);
-}
-
 void TestRunner::dispatchPendingLoadRequests()
 {
     // FIXME: Implement for testing fix for 6727495
index 20de2b0..36feec1 100644 (file)
@@ -187,8 +187,6 @@ public Q_SLOTS:
     bool isCommandEnabled(const QString& name) const;
     bool findString(const QString&, const QStringList& optionArray);
 
-    bool pauseAnimationAtTimeOnElementWithId(const QString& animationName, double time, const QString& elementId);
-    bool pauseTransitionAtTimeOnElementWithId(const QString& propertyName, double time, const QString& elementId);
     bool elementDoesAutoCompleteForElementWithId(const QString& elementId);
 
     void addOriginAccessWhitelistEntry(const QString& sourceOrigin, const QString& destinationProtocol, const QString& destinationHost, bool allowDestinationSubdomains);
index bba77c2..f23f471 100644 (file)
@@ -1013,56 +1013,6 @@ void TestRunner::setAppCacheMaximumSize(unsigned long long size)
     printf("ERROR: TestRunner::setAppCacheMaximumSize() not implemented\n");
 }
 
-bool TestRunner::pauseAnimationAtTimeOnElementWithId(JSStringRef animationName, double time, JSStringRef elementId)
-{
-    COMPtr<IDOMDocument> document;
-    if (FAILED(frame->DOMDocument(&document)))
-        return false;
-
-    BSTR idBSTR = JSStringCopyBSTR(elementId);
-    COMPtr<IDOMElement> element;
-    HRESULT hr = document->getElementById(idBSTR, &element);
-    SysFreeString(idBSTR);
-    if (FAILED(hr))
-        return false;
-
-    COMPtr<IWebFramePrivate> framePrivate(Query, frame);
-    if (!framePrivate)
-        return false;
-
-    BSTR nameBSTR = JSStringCopyBSTR(animationName);
-    BOOL wasRunning = FALSE;
-    hr = framePrivate->pauseAnimation(nameBSTR, element.get(), time, &wasRunning);
-    SysFreeString(nameBSTR);
-
-    return SUCCEEDED(hr) && wasRunning;
-}
-
-bool TestRunner::pauseTransitionAtTimeOnElementWithId(JSStringRef propertyName, double time, JSStringRef elementId)
-{
-    COMPtr<IDOMDocument> document;
-    if (FAILED(frame->DOMDocument(&document)))
-        return false;
-
-    BSTR idBSTR = JSStringCopyBSTR(elementId);
-    COMPtr<IDOMElement> element;
-    HRESULT hr = document->getElementById(idBSTR, &element);
-    SysFreeString(idBSTR);
-    if (FAILED(hr))
-        return false;
-
-    COMPtr<IWebFramePrivate> framePrivate(Query, frame);
-    if (!framePrivate)
-        return false;
-
-    BSTR nameBSTR = JSStringCopyBSTR(propertyName);
-    BOOL wasRunning = FALSE;
-    hr = framePrivate->pauseTransition(nameBSTR, element.get(), time, &wasRunning);
-    SysFreeString(nameBSTR);
-
-    return SUCCEEDED(hr) && wasRunning;
-}
-
 static _bstr_t bstrT(JSStringRef jsString)
 {
     // The false parameter tells the _bstr_t constructor to adopt the BSTR we pass it.
index ca4aa01..318f2c3 100644 (file)
@@ -315,12 +315,6 @@ void TestRunner::setSelectTrailingWhitespaceEnabled(bool flag)
     // FIXME: implement
 }
 
-bool TestRunner::pauseTransitionAtTimeOnElementWithId(JSStringRef propertyName, double time, JSStringRef elementId)
-{
-    // FIXME: implement
-    return false;
-}
-
 void TestRunner::setMockDeviceOrientation(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma)
 {
     // FIXME: Implement for DeviceOrientation layout tests.
@@ -374,12 +368,6 @@ void TestRunner::setIconDatabaseEnabled(bool iconDatabaseEnabled)
     // FIXME: implement
 }
 
-bool TestRunner::pauseAnimationAtTimeOnElementWithId(JSStringRef animationName, double time, JSStringRef elementId)
-{
-    // FIXME: implement
-    return false;
-}
-
 void TestRunner::setCacheModel(int)
 {
     // FIXME: implement
index 9ed7a31..921c475 100644 (file)
@@ -96,10 +96,6 @@ interface TestRunner {
 
     [PassContext] void setValueForUser(in object element, in DOMString value);
 
-    // Animation testing.
-    boolean pauseAnimationAtTimeOnElementWithId(in DOMString animationName, in double time, in DOMString elementId);
-    boolean pauseTransitionAtTimeOnElementWithId(in DOMString propertyName, in double time, in DOMString elementId);
-
     // UserContent testing.
     void addUserScript(in DOMString source, in boolean runAtStart, in boolean allFrames);
     void addUserStyleSheet(in DOMString source, in boolean allFrames);
index 9175a83..d76dda9 100644 (file)
@@ -166,22 +166,6 @@ void TestRunner::setCustomTimeout(int timeout)
     m_timeout = timeout;
 }
 
-bool TestRunner::pauseAnimationAtTimeOnElementWithId(JSStringRef animationName, 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 WKBundleFramePauseAnimationOnElementWithId(mainFrame, toWK(animationName).get(), toWK(elementId).get(), time);
-}
-
-bool TestRunner::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 TestRunner::addUserScript(JSStringRef source, bool runAtStart, bool allFrames)
 {
     WKRetainPtr<WKStringRef> sourceWK = toWK(source);
index 0a93614..84f2be7 100644 (file)
@@ -130,10 +130,6 @@ public:
     void testRepaint() { m_testRepaint = true; }
     void repaintSweepHorizontally() { m_testRepaintSweepHorizontally = true; }
     void display();
-
-    // Animation testing.
-    bool pauseAnimationAtTimeOnElementWithId(JSStringRef animationName, double time, JSStringRef elementId);
-    bool pauseTransitionAtTimeOnElementWithId(JSStringRef propertyName, double time, JSStringRef elementId);
     
     // UserContent testing.
     void addUserScript(JSStringRef source, bool runAtStart, bool allFrames);