Swap both the error and change event queue before processing fullscreen events
authorjochen@chromium.org <jochen@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Mar 2013 17:57:20 +0000 (17:57 +0000)
committerjochen@chromium.org <jochen@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Mar 2013 17:57:20 +0000 (17:57 +0000)
https://bugs.webkit.org/show_bug.cgi?id=113194

Reviewed by Jer Noble.

Source/WebCore:

While processing the change events, not only new change events but
also new error events might get generated. However, for the timer, we
should only process preexisting events.

This is covered by fullscreen/full-screen-restrictions.html which times
out depending on the delay between requesting fullscreen and granting
fullscreen.

* dom/Document.cpp:
(WebCore::Document::fullScreenChangeDelayTimerFired):

LayoutTests:

* platform/chromium/TestExpectations:

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

LayoutTests/ChangeLog
LayoutTests/platform/chromium/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/dom/Document.cpp

index 1f729a5..e7cc597 100644 (file)
@@ -1,3 +1,12 @@
+2013-03-25  Jochen Eisinger  <jochen@chromium.org>
+
+        Swap both the error and change event queue before processing fullscreen events
+        https://bugs.webkit.org/show_bug.cgi?id=113194
+
+        Reviewed by Jer Noble.
+
+        * platform/chromium/TestExpectations:
+
 2013-03-25  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
 
         [Qt] Unreviewed gardening. Rebaselining. Making pixel test bot happier after r146206.
index 070f8a8..154071b 100644 (file)
@@ -2712,8 +2712,6 @@ webkit.org/b/81537 fast/events/touch/gesture/pad-gesture-fling.html [ Failure Pa
 
 webkit.org/b/81638 [ Mac Debug ] editing/selection/iframe.html [ ImageOnlyFailure Pass ]
 
-webkit.org/b/81721 [ Win ] fullscreen/full-screen-restrictions.html [ Pass Timeout ]
-
 webkit.org/b/81697 fast/notifications/notifications-check-permission.html [ Failure ]
 webkit.org/b/81697 fast/notifications/notifications-without-permission.html [ Failure ]
 webkit.org/b/81697 fast/notifications/notifications-request-permission.html [ Failure ]
index 7115c0d..edb2ec8 100644 (file)
@@ -1,3 +1,21 @@
+2013-03-25  Jochen Eisinger  <jochen@chromium.org>
+
+        Swap both the error and change event queue before processing fullscreen events
+        https://bugs.webkit.org/show_bug.cgi?id=113194
+
+        Reviewed by Jer Noble.
+
+        While processing the change events, not only new change events but
+        also new error events might get generated. However, for the timer, we
+        should only process preexisting events.
+
+        This is covered by fullscreen/full-screen-restrictions.html which times
+        out depending on the delay between requesting fullscreen and granting
+        fullscreen.
+
+        * dom/Document.cpp:
+        (WebCore::Document::fullScreenChangeDelayTimerFired):
+
 2013-03-25  Marja Hölttä  <marja@chromium.org>
 
         [V8] Generate specialized callbacks for the main world
index 93004ae..0483f51 100644 (file)
@@ -5450,6 +5450,8 @@ void Document::fullScreenChangeDelayTimerFired(Timer<Document>*)
     RefPtr<Document> protectDocument(this);
     Deque<RefPtr<Node> > changeQueue;
     m_fullScreenChangeEventTargetQueue.swap(changeQueue);
+    Deque<RefPtr<Node> > errorQueue;
+    m_fullScreenErrorEventTargetQueue.swap(errorQueue);
 
     while (!changeQueue.isEmpty()) {
         RefPtr<Node> node = changeQueue.takeFirst();
@@ -5467,9 +5469,6 @@ void Document::fullScreenChangeDelayTimerFired(Timer<Document>*)
         node->dispatchEvent(Event::create(eventNames().webkitfullscreenchangeEvent, true, false));
     }
 
-    Deque<RefPtr<Node> > errorQueue;
-    m_fullScreenErrorEventTargetQueue.swap(errorQueue);
-    
     while (!errorQueue.isEmpty()) {
         RefPtr<Node> node = errorQueue.takeFirst();
         if (!node)