Title: [124336] trunk
Revision
124336
Author
[email protected]
Date
2012-08-01 08:45:28 -0700 (Wed, 01 Aug 2012)

Log Message

[Qt]REGRESSION(r123786): It made 3 fast/animation tests fail.
https://bugs.webkit.org/show_bug.cgi?id=92490

Source/WebKit/qt:

QAbstractAnimation:start() is implicitly calling updateTime
without going through the event loop. This resulted in executing
scripted animation callbacks right when registering a first callback.

Reviewed by Noam Rosenthal.

* WebCoreSupport/ChromeClientQt.cpp:
(WebCore::RefreshAnimation::scheduleAnimation):
    Invoke QAbstractAnimation::start() method through the event loop.

Source/WebKit2:

Make sure that scripted animations are also serviced when
forceRepaint is being executed. As this is what is being used for
running layout tests.
Move servicing of scripted animations and layoutIfNeeded call
into a separate function syncDisplayState.
This function can then be called from forceRepaint as well as from
performScheduledLayerFlush.

Reviewed by Noam Rosenthal.

* WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.cpp:
(WebKit::LayerTreeCoordinator::forceRepaint):
(WebKit::LayerTreeCoordinator::performScheduledLayerFlush):
(WebKit):
(WebKit::LayerTreeCoordinator::syncDisplayState):
* WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.h:
(LayerTreeCoordinator):

LayoutTests:

Reviewed by Noam Rosenthal.

* platform/qt/Skipped: Unskipping the tests listed below.
    fast/animation/request-animation-frame-cancel2.html
    fast/animation/request-animation-frame-detach-element.html
    fast/animation/request-animation-frame-during-modal.html
    fast/animation/request-animation-frame-timestamps.html
    fast/dom/Window/post-message-crash.html

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (124335 => 124336)


--- trunk/LayoutTests/ChangeLog	2012-08-01 14:58:09 UTC (rev 124335)
+++ trunk/LayoutTests/ChangeLog	2012-08-01 15:45:28 UTC (rev 124336)
@@ -1,3 +1,17 @@
+2012-08-01  Zeno Albisser  <[email protected]>
+
+        [Qt]REGRESSION(r123786): It made 3 fast/animation tests fail.
+        https://bugs.webkit.org/show_bug.cgi?id=92490
+
+        Reviewed by Noam Rosenthal.
+
+        * platform/qt/Skipped: Unskipping the tests listed below.
+            fast/animation/request-animation-frame-cancel2.html
+            fast/animation/request-animation-frame-detach-element.html
+            fast/animation/request-animation-frame-during-modal.html
+            fast/animation/request-animation-frame-timestamps.html
+            fast/dom/Window/post-message-crash.html
+
 2012-08-01  Keishi Hattori  <[email protected]>
 
         Attempt to fix flakiness of color-suggestion-picker-appearance.html

Modified: trunk/LayoutTests/platform/qt/Skipped (124335 => 124336)


--- trunk/LayoutTests/platform/qt/Skipped	2012-08-01 14:58:09 UTC (rev 124335)
+++ trunk/LayoutTests/platform/qt/Skipped	2012-08-01 15:45:28 UTC (rev 124336)
@@ -1968,14 +1968,6 @@
 # https://bugs.webkit.org/show_bug.cgi?id=84013
 fast/repaint/line-flow-with-floats-in-regions.html
 
-# [Qt]REGRESSION(r123786) It made 3 fast/animation tests fail
-# https://bugs.webkit.org/show_bug.cgi?id=92490
-fast/animation/request-animation-frame-cancel2.html
-fast/animation/request-animation-frame-detach-element.html
-fast/animation/request-animation-frame-during-modal.html
-fast/animation/request-animation-frame-timestamps.html
-fast/dom/Window/post-message-crash.html
-
 # [Qt] fast/block/positioning/offsetLeft-offsetTop-multicolumn.html is failing
 # https://bugs.webkit.org/show_bug.cgi?id=86130
 fast/block/positioning/offsetLeft-offsetTop-multicolumn.html

Modified: trunk/Source/WebKit/qt/ChangeLog (124335 => 124336)


--- trunk/Source/WebKit/qt/ChangeLog	2012-08-01 14:58:09 UTC (rev 124335)
+++ trunk/Source/WebKit/qt/ChangeLog	2012-08-01 15:45:28 UTC (rev 124336)
@@ -1,3 +1,18 @@
+2012-08-01  Zeno Albisser  <[email protected]>
+
+        [Qt]REGRESSION(r123786): It made 3 fast/animation tests fail.
+        https://bugs.webkit.org/show_bug.cgi?id=92490
+
+        QAbstractAnimation:start() is implicitly calling updateTime
+        without going through the event loop. This resulted in executing
+        scripted animation callbacks right when registering a first callback.
+
+        Reviewed by Noam Rosenthal.
+
+        * WebCoreSupport/ChromeClientQt.cpp:
+        (WebCore::RefreshAnimation::scheduleAnimation):
+            Invoke QAbstractAnimation::start() method through the event loop.
+
 2012-07-27  Csaba Osztrogonác  <[email protected]>
 
         [Qt][WK2] REGRESSION(r119127): resetting window.internals settings between tests doesn't work properly

Modified: trunk/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp (124335 => 124336)


--- trunk/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp	2012-08-01 14:58:09 UTC (rev 124335)
+++ trunk/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp	2012-08-01 15:45:28 UTC (rev 124336)
@@ -104,7 +104,7 @@
     {
         m_animationScheduled = true;
         if (state() != QAbstractAnimation::Running)
-            start();
+            QMetaObject::invokeMethod(this, "start", Qt::QueuedConnection);
     }
 
 protected:

Modified: trunk/Source/WebKit2/ChangeLog (124335 => 124336)


--- trunk/Source/WebKit2/ChangeLog	2012-08-01 14:58:09 UTC (rev 124335)
+++ trunk/Source/WebKit2/ChangeLog	2012-08-01 15:45:28 UTC (rev 124336)
@@ -1,3 +1,26 @@
+2012-08-01  Zeno Albisser  <[email protected]>
+
+        [Qt]REGRESSION(r123786): It made 3 fast/animation tests fail.
+        https://bugs.webkit.org/show_bug.cgi?id=92490
+
+        Make sure that scripted animations are also serviced when
+        forceRepaint is being executed. As this is what is being used for
+        running layout tests.
+        Move servicing of scripted animations and layoutIfNeeded call
+        into a separate function syncDisplayState.
+        This function can then be called from forceRepaint as well as from
+        performScheduledLayerFlush.
+
+        Reviewed by Noam Rosenthal.
+
+        * WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.cpp:
+        (WebKit::LayerTreeCoordinator::forceRepaint):
+        (WebKit::LayerTreeCoordinator::performScheduledLayerFlush):
+        (WebKit):
+        (WebKit::LayerTreeCoordinator::syncDisplayState):
+        * WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.h:
+        (LayerTreeCoordinator):
+
 2012-08-01  Carlos Garcia Campos  <[email protected]>
 
         Unreviewed. Fix GTK+ build with recent version of GTK+.

Modified: trunk/Source/WebKit2/WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.cpp (124335 => 124336)


--- trunk/Source/WebKit2/WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.cpp	2012-08-01 14:58:09 UTC (rev 124335)
+++ trunk/Source/WebKit2/WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.cpp	2012-08-01 15:45:28 UTC (rev 124336)
@@ -174,6 +174,10 @@
 
 void LayerTreeCoordinator::forceRepaint()
 {
+    // This is necessary for running layout tests. Since in this case we are not waiting for a UIProcess to reply nicely.
+    // Instead we are just triggering forceRepaint. But we still want to have the scripted animation callbacks being executed.
+    syncDisplayState();
+
     // We need to schedule another flush, otherwise the forced paint might cancel a later expected flush.
     // This is aligned with LayerTreeHostCA.
     scheduleLayerFlush();
@@ -356,12 +360,8 @@
 {
     if (m_isSuspended || m_waitingForUIProcess)
         return;
-#if ENABLE(REQUEST_ANIMATION_FRAME) && !USE(REQUEST_ANIMATION_FRAME_TIMER) && !USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
-    // Make sure that any previously registered animation callbacks are being executed before we flush the layers.
-    m_webPage->corePage()->mainFrame()->view()->serviceScriptedAnimations(convertSecondsToDOMTimeStamp(currentTime()));
-#endif
 
-    m_webPage->layoutIfNeeded();
+    syncDisplayState();
 
     if (!m_isValid)
         return;
@@ -370,6 +370,16 @@
         didPerformScheduledLayerFlush();
 }
 
+void LayerTreeCoordinator::syncDisplayState()
+{
+#if ENABLE(REQUEST_ANIMATION_FRAME) && !USE(REQUEST_ANIMATION_FRAME_TIMER) && !USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
+    // Make sure that any previously registered animation callbacks are being executed before we flush the layers.
+    m_webPage->corePage()->mainFrame()->view()->serviceScriptedAnimations(convertSecondsToDOMTimeStamp(currentTime()));
+#endif
+
+    m_webPage->layoutIfNeeded();
+}
+
 void LayerTreeCoordinator::didPerformScheduledLayerFlush()
 {
     if (m_notifyAfterScheduledLayerFlush) {

Modified: trunk/Source/WebKit2/WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.h (124335 => 124336)


--- trunk/Source/WebKit2/WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.h	2012-08-01 14:58:09 UTC (rev 124335)
+++ trunk/Source/WebKit2/WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.h	2012-08-01 15:45:28 UTC (rev 124336)
@@ -108,6 +108,7 @@
     void cancelPendingLayerFlush();
     void performScheduledLayerFlush();
     void didPerformScheduledLayerFlush();
+    void syncDisplayState();
 
     OwnPtr<WebCore::GraphicsLayer> m_rootLayer;
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to