[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

eric.carlson at apple.com eric.carlson at apple.com
Wed Dec 22 12:45:14 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 6a4ff9a3d72c2977984857d8c37e4971f5cc4619
Author: eric.carlson at apple.com <eric.carlson at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Aug 28 18:48:49 2010 +0000

    2010-08-28  Eric Carlson  <eric.carlson at apple.com>
    
            Reviewed by Simon Fraser.
    
            Crash reloading fast/events/tabindex-focus-blur-all.html test
            https://bugs.webkit.org/show_bug.cgi?id=44743
    
            * html/HTMLMediaElement.cpp:
            (WebCore::HTMLMediaElement::asyncEventTimerFired): If m_isWaitingToDecrementLoadEventDelayCount
            is true, call setShouldDelayLoadEvent(false) and set the timer to fire the pending events
            on the next idle.
            (WebCore::HTMLMediaElement::setShouldDelayLoadEvent): Don't clear the delay from within a
            media engine callback because document 'load' event handlers that cause the page to become
            inactive will delete the media engine.
            * html/HTMLMediaElement.h: Add m_isWaitingToDecrementLoadEventDelayCount.
    
    2010-08-28  Eric Carlson  <eric.carlson at apple.com>
    
            Reviewed by Simon Fraser.
    
            Crash reloading fast/events/tabindex-focus-blur-all.html test
            https://bugs.webkit.org/show_bug.cgi?id=44743
    
            * platform/mac/Skipped: Remove tabindex-focus-blur-all.html from the skip list.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66311 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 662c528..0c6f3e9 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,12 @@
+2010-08-28  Eric Carlson  <eric.carlson at apple.com>
+
+        Reviewed by Simon Fraser.
+
+        Crash reloading fast/events/tabindex-focus-blur-all.html test
+        https://bugs.webkit.org/show_bug.cgi?id=44743
+
+        * platform/mac/Skipped: Remove tabindex-focus-blur-all.html from the skip list.
+
 2010-08-28  Adam Barth  <abarth at webkit.org>
 
         Reviewed by Eric Seidel.
diff --git a/LayoutTests/platform/mac/Skipped b/LayoutTests/platform/mac/Skipped
index 92468e5..9874182 100644
--- a/LayoutTests/platform/mac/Skipped
+++ b/LayoutTests/platform/mac/Skipped
@@ -298,8 +298,3 @@ inspector/dom-breakpoints.html
 
 # https://bugs.webkit.org/show_bug.cgi?id=44566
 fast/canvas/webgl/gl-teximage.html
-
-# https://bugs.webkit.org/show_bug.cgi?id=44743
-# Test always crashes on snowleopard, crashes on reload on leopard
-fast/events/tabindex-focus-blur-all.html
-
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 562b872..76b3a55 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-08-28  Eric Carlson  <eric.carlson at apple.com>
+
+        Reviewed by Simon Fraser.
+
+        Crash reloading fast/events/tabindex-focus-blur-all.html test
+        https://bugs.webkit.org/show_bug.cgi?id=44743
+
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::asyncEventTimerFired): If m_isWaitingToDecrementLoadEventDelayCount
+        is true, call setShouldDelayLoadEvent(false) and set the timer to fire the pending events
+        on the next idle.
+        (WebCore::HTMLMediaElement::setShouldDelayLoadEvent): Don't clear the delay from within a
+        media engine callback because document 'load' event handlers that cause the page to become
+        inactive will delete the media engine. 
+        * html/HTMLMediaElement.h: Add m_isWaitingToDecrementLoadEventDelayCount.
+
 2010-08-28  Simon Fraser  <simon.fraser at apple.com>
 
         Reviewed by Sam Weinig.
diff --git a/WebCore/html/HTMLMediaElement.cpp b/WebCore/html/HTMLMediaElement.cpp
index 6b334e2..8c858c5 100644
--- a/WebCore/html/HTMLMediaElement.cpp
+++ b/WebCore/html/HTMLMediaElement.cpp
@@ -112,6 +112,7 @@ HTMLMediaElement::HTMLMediaElement(const QualifiedName& tagName, Document* doc)
     , m_playing(false)
     , m_isWaitingUntilMediaCanStart(false)
     , m_shouldDelayLoadEvent(false)
+    , m_isWaitingToDecrementLoadEventDelayCount(false)
     , m_haveFiredLoadedData(false)
     , m_inActiveDocument(true)
     , m_autoplaying(true)
@@ -371,6 +372,15 @@ void HTMLMediaElement::scheduleEvent(const AtomicString& eventName)
 
 void HTMLMediaElement::asyncEventTimerFired(Timer<HTMLMediaElement>*)
 {
+    // If we are waiting to release our delay on the load event, do that first and post
+    // the pending events on the next go around.
+    if (m_isWaitingToDecrementLoadEventDelayCount) {
+        setShouldDelayLoadEvent(false);
+        if (!m_asyncEventTimer.isActive())
+            m_asyncEventTimer.startOneShot(0);
+        return;
+    }
+
     Vector<RefPtr<Event> > pendingEvents;
     ExceptionCode ec = 0;
 
@@ -2083,13 +2093,28 @@ bool HTMLMediaElement::isURLAttribute(Attribute* attribute) const
     return attribute->name() == srcAttr;
 }
 
-void HTMLMediaElement::setShouldDelayLoadEvent(bool delay)
+void HTMLMediaElement::setShouldDelayLoadEvent(bool shouldDelay)
 {
-    if (m_shouldDelayLoadEvent == delay)
+    if (m_shouldDelayLoadEvent == shouldDelay)
         return;
 
-    m_shouldDelayLoadEvent = delay;
-    if (delay)
+    // Don't decrement the load event delay if we are in the middle of a callback from
+    // the media engine. The load event is sent synchronously and may trigger a script that
+    // causes the document to be come inactive and that will clear the media engine, causing 
+    // the return to be a rough one.
+    if (!shouldDelay && processingMediaPlayerCallback()) {
+        m_isWaitingToDecrementLoadEventDelayCount = true;
+
+        // Instead of creating yet-another-timer, reuse the async event timer which is always
+        // used as a one-shot.
+        if (!m_asyncEventTimer.isActive())
+            m_asyncEventTimer.startOneShot(0);
+        return;
+    }
+
+    m_shouldDelayLoadEvent = shouldDelay;
+    m_isWaitingToDecrementLoadEventDelayCount = false;
+    if (shouldDelay)
         document()->incrementLoadEventDelayCount();
     else
         document()->decrementLoadEventDelayCount();
diff --git a/WebCore/html/HTMLMediaElement.h b/WebCore/html/HTMLMediaElement.h
index a98e19e..3895fe3 100644
--- a/WebCore/html/HTMLMediaElement.h
+++ b/WebCore/html/HTMLMediaElement.h
@@ -342,6 +342,7 @@ private:
     bool m_playing : 1;
     bool m_isWaitingUntilMediaCanStart : 1;
     bool m_shouldDelayLoadEvent : 1;
+    bool m_isWaitingToDecrementLoadEventDelayCount : 1;
     bool m_haveFiredLoadedData : 1;
     bool m_inActiveDocument : 1;
     bool m_autoplaying : 1;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list