Skip to content
Permalink
Browse files
[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

Canonical link: https://commits.webkit.org/110709@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@124336 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Zeno Albisser committed Aug 1, 2012
1 parent c61c9ab commit 92977553004a00ba8a3c1bf7c345faa3dfc5ebb5
Showing 7 changed files with 69 additions and 14 deletions.
@@ -1,3 +1,17 @@
2012-08-01 Zeno Albisser <zeno@webkit.org>

[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 <keishi@webkit.org>

Attempt to fix flakiness of color-suggestion-picker-appearance.html
@@ -1968,14 +1968,6 @@ fast/xmlhttprequest/xmlhttprequest-get.xhtml
# 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
@@ -1,3 +1,18 @@
2012-08-01 Zeno Albisser <zeno@webkit.org>

[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 <ossy@webkit.org>

[Qt][WK2] REGRESSION(r119127): resetting window.internals settings between tests doesn't work properly
@@ -104,7 +104,7 @@ class RefreshAnimation : public QAbstractAnimation {
{
m_animationScheduled = true;
if (state() != QAbstractAnimation::Running)
start();
QMetaObject::invokeMethod(this, "start", Qt::QueuedConnection);
}

protected:
@@ -1,3 +1,26 @@
2012-08-01 Zeno Albisser <zeno@webkit.org>

[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 <cgarcia@igalia.com>

Unreviewed. Fix GTK+ build with recent version of GTK+.
@@ -174,6 +174,10 @@ void LayerTreeCoordinator::scrollNonCompositedContents(const WebCore::IntRect& s

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 @@ void LayerTreeCoordinator::performScheduledLayerFlush()
{
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 @@ void LayerTreeCoordinator::performScheduledLayerFlush()
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) {
@@ -108,6 +108,7 @@ class LayerTreeCoordinator : public LayerTreeHost, WebCore::GraphicsLayerClient
void cancelPendingLayerFlush();
void performScheduledLayerFlush();
void didPerformScheduledLayerFlush();
void syncDisplayState();

OwnPtr<WebCore::GraphicsLayer> m_rootLayer;

0 comments on commit 9297755

Please sign in to comment.