[EFL] Disable REQUEST_ANIMATION_FRAME_TIMER to render a new animation frame.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Mar 2013 10:01:22 +0000 (10:01 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Mar 2013 10:01:22 +0000 (10:01 +0000)
https://bugs.webkit.org/show_bug.cgi?id=112114

Patch by JungJik Lee <jungjik.lee@samsung.com> on 2013-03-20
Reviewed by Kenneth Rohde Christiansen.

.:

Add a manual test to check the running of scripted transition animation.

* ManualTests/animation/transition-on-and-offscreen-animation.html: Added.

Source/WebKit/efl:

Add dummy functions for WK1.

Example test case: ManualTests/animation/transition-on-and-offscreen-animation.html

* WebCoreSupport/ChromeClientEfl.cpp: Add dummy functions for WK1.
(WebCore):
(WebCore::ChromeClientEfl::scheduleAnimation):
(WebCore::ChromeClientEfl::serviceScriptedAnimations):
* WebCoreSupport/ChromeClientEfl.h:
(ChromeClientEfl):

Source/WTF:

The issue is that if the animation starts outside of the area covered by keepRects,
the web process does not create tiles of the animation layer and the layer moves
without having any tiles. In order to fix this issue, CoordinatedLayerHost must call
scheduleLayerFlush to create new tiles when the layer enters the area covered by keepRect.
However EFL port didn't call scheduleLayerFlush periodically for animation.
We can tie scripted animations with synchronization of the layer and that already
has been implemented in r123786 by Qt port. This patch is for activating r123786 patch.

The testing is covered by ManualTests/animation/transition-on-and-offscreen-animation.html

* wtf/Platform.h: Disable REQUEST_ANIMATION_FRAME_TIMER.

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

ChangeLog
ManualTests/animation/transition-on-and-offscreen-animation.html [new file with mode: 0644]
Source/WTF/ChangeLog
Source/WTF/wtf/Platform.h
Source/WebKit/efl/ChangeLog
Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.h

index 433b87d8d22a90fd747a2663d23b4f488971d0b2..9ed5cb8f03d4ee2cf05628e38d63b3d2a1474571 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2013-03-20  JungJik Lee  <jungjik.lee@samsung.com>
+
+        [EFL] Disable REQUEST_ANIMATION_FRAME_TIMER to render a new animation frame.
+        https://bugs.webkit.org/show_bug.cgi?id=112114
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Add a manual test to check the running of scripted transition animation.
+
+        * ManualTests/animation/transition-on-and-offscreen-animation.html: Added.
+
 2013-03-19  David Rosca  <nowrep@gmail.com>
 
         [Qt] QStyle: Set State_Enabled by default when painting style widgets.
diff --git a/ManualTests/animation/transition-on-and-offscreen-animation.html b/ManualTests/animation/transition-on-and-offscreen-animation.html
new file mode 100644 (file)
index 0000000..e41f0fe
--- /dev/null
@@ -0,0 +1,52 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+   "http://www.w3.org/TR/html4/loose.dtd">
+
+<html lang="en">
+<head>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+  <title>Box Transitions coming out from the viewport.</title>
+  <style type="text/css" media="screen">
+    
+    .container {
+      height: 200px;
+      width: 200px;
+      border: 1px solid black;
+      background-color : red;
+      -webkit-transition: -webkit-transform 3s;
+    }
+    
+  </style>
+  <script type="text/javascript" charset="utf-8">
+    function runTest()
+    {
+      var box = document.getElementById("box");
+
+      window.setTimeout(function() {
+        box.style.webkitTransform = "translateX(" + window.innerWidth * 2.5 + "px)";
+      }, 3000);
+      
+      window.setTimeout(function() {
+        box.style.webkitTransform = "translateX(0px)";
+      }, 6000);
+
+      window.setTimeout(function() {
+        box.style.webkitTransform = "translateX(" + window.innerWidth * 2.5 + "px)";
+      }, 9000);
+
+      window.setTimeout(function() {
+        box.style.webkitTransform = "translateX(0px)";
+      }, 12000);
+    }
+    window.addEventListener('load', runTest, false)
+  </script>
+</head>
+<body>
+<p>
+We should be able to see that the red box is going out and coming from the viewport twice.
+The reason why the box goes to the viewport's 2.5x distance is that the backing store cannot create tile only if the GraphicsLayer is out of keepRect.
+</p>
+<div id="box" class="container">
+</div>
+
+</body>
+</html>
index cb92b1403391933312eff4a9e8bac8d20d1348a6..2203ff825bfb45b70ff324c767e86518efef2310 100644 (file)
@@ -1,3 +1,22 @@
+2013-03-20  JungJik Lee  <jungjik.lee@samsung.com>
+
+        [EFL] Disable REQUEST_ANIMATION_FRAME_TIMER to render a new animation frame.
+        https://bugs.webkit.org/show_bug.cgi?id=112114
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        The issue is that if the animation starts outside of the area covered by keepRects,
+        the web process does not create tiles of the animation layer and the layer moves 
+        without having any tiles. In order to fix this issue, CoordinatedLayerHost must call 
+        scheduleLayerFlush to create new tiles when the layer enters the area covered by keepRect.
+        However EFL port didn't call scheduleLayerFlush periodically for animation.
+        We can tie scripted animations with synchronization of the layer and that already 
+        has been implemented in r123786 by Qt port. This patch is for activating r123786 patch.
+
+        The testing is covered by ManualTests/animation/transition-on-and-offscreen-animation.html
+
+        * wtf/Platform.h: Disable REQUEST_ANIMATION_FRAME_TIMER.
+
 2013-03-20  Mark Lam  <mark.lam@apple.com>
 
         Introducing String::reverseFindLineTerminator().
index 935212b618f7db7951bd4a3c37387e6403dda400..f681e6acae4bca3e8821166c278aa76fb834df48 100644 (file)
 #define HAVE_MEDIA_ACCESSIBILITY_FRAMEWORK 1
 #endif
 
-#if PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(EFL) || (PLATFORM(WIN) && !OS(WINCE) && !PLATFORM(WIN_CAIRO)) || PLATFORM(BLACKBERRY)
+#if PLATFORM(MAC) || PLATFORM(GTK) || (PLATFORM(WIN) && !OS(WINCE) && !PLATFORM(WIN_CAIRO)) || PLATFORM(BLACKBERRY)
 #define WTF_USE_REQUEST_ANIMATION_FRAME_TIMER 1
 #endif
 
index fcc102fb3c49193b4813bcc3e3e02edef31c436b..0fb59b819d27f4ac4601a3b43a85d0aa89fc201a 100644 (file)
@@ -1,3 +1,21 @@
+2013-03-20  JungJik Lee  <jungjik.lee@samsung.com>
+
+        [EFL] Disable REQUEST_ANIMATION_FRAME_TIMER to render a new animation frame.
+        https://bugs.webkit.org/show_bug.cgi?id=112114
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Add dummy functions for WK1.
+
+        Example test case: ManualTests/animation/transition-on-and-offscreen-animation.html
+
+        * WebCoreSupport/ChromeClientEfl.cpp: Add dummy functions for WK1.
+        (WebCore):
+        (WebCore::ChromeClientEfl::scheduleAnimation):
+        (WebCore::ChromeClientEfl::serviceScriptedAnimations):
+        * WebCoreSupport/ChromeClientEfl.h:
+        (ChromeClientEfl):
+
 2013-03-15  Nate Chapin  <japhet@chromium.org>
 
         Hide MainResourceLoader from the outside world
index ebea424607060d078399cb9ceb41401f10f31913..598ef995e721e4129fa0d079080f63f3fed7526a 100644 (file)
@@ -504,6 +504,18 @@ void ChromeClientEfl::setCursorHiddenUntilMouseMoves(bool)
     notImplemented();
 }
 
+#if ENABLE(REQUEST_ANIMATION_FRAME) && !USE(REQUEST_ANIMATION_FRAME_TIMER)
+void ChromeClientEfl::scheduleAnimation()
+{
+    notImplemented();
+}
+
+void ChromeClientEfl::serviceScriptedAnimations()
+{
+    notImplemented();
+}
+#endif
+
 void ChromeClientEfl::cancelGeolocationPermissionForFrame(Frame*, Geolocation*)
 {
     notImplemented();
index aa358cc178aef39ee5cb8587a30cf76d6fdb8561..fb649c35fc4530271314f817c14cea06f1e4f3ad 100644 (file)
@@ -155,6 +155,11 @@ public:
     virtual void setCursor(const Cursor&);
     virtual void setCursorHiddenUntilMouseMoves(bool);
 
+#if ENABLE(REQUEST_ANIMATION_FRAME) && !USE(REQUEST_ANIMATION_FRAME_TIMER)
+    virtual void scheduleAnimation();
+    virtual void serviceScriptedAnimations();
+#endif
+
     virtual void scrollRectIntoView(const IntRect&) const { }
 
     virtual void cancelGeolocationPermissionForFrame(Frame*, Geolocation*);