[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 433b87d..9ed5cb8 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 cb92b14..2203ff8 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 935212b..f681e6a 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 fcc102f..0fb59b8 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 ebea424..598ef99 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 aa358cc..fb649c3 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*);