[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75

eric.carlson at apple.com eric.carlson at apple.com
Thu Oct 29 20:47:48 UTC 2009


The following commit has been merged in the webkit-1.1 branch:
commit de358e061f07138616f666d312b3a575b3de87cf
Author: eric.carlson at apple.com <eric.carlson at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Oct 19 17:13:08 2009 +0000

    2009-10-19  Eric Carlson  <eric.carlson at apple.com>
    
            Reviewed by Simon Fraser.
    
            https://bugs.webkit.org/show_bug.cgi?id=30463
            Remove HTML5 media element 'loadend' event
    
            * dom/EventNames.h:
            * html/HTMLMediaElement.cpp:
            (WebCore::HTMLMediaElement::parseMappedAttribute): Remove 'loadend'.
            (WebCore::HTMLMediaElement::loadInternal): Ditto.
            (WebCore::HTMLMediaElement::noneSupported): Ditto.
            (WebCore::HTMLMediaElement::mediaEngineError): Ditto.
            (WebCore::HTMLMediaElement::setNetworkState): Ditto.
            (WebCore::HTMLMediaElement::userCancelledLoad): Ditto.
    
    2009-10-19  Eric Carlson  <eric.carlson at apple.com>
    
            Reviewed by Simon Fraser.
    
            https://bugs.webkit.org/show_bug.cgi?id=30463
            Remove HTML5 media element 'loadend' event
    
            * media/event-attributes-expected.txt:
            * media/event-attributes.html: Switch from 'loadend' to 'canplaythrough'.
            * media/media-load-event-expected.txt:
            * media/media-load-event.html: Ditto.
            * media/progress-event-at-least-one-expected.txt:
            * media/progress-event-at-least-one.html: Ditto.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49790 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 75aa04e..4c99b4a 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,17 @@
+2009-10-19  Eric Carlson  <eric.carlson at apple.com>
+
+        Reviewed by Simon Fraser.
+
+        https://bugs.webkit.org/show_bug.cgi?id=30463
+        Remove HTML5 media element 'loadend' event
+
+        * media/event-attributes-expected.txt:
+        * media/event-attributes.html: Switch from 'loadend' to 'canplaythrough'.
+        * media/media-load-event-expected.txt:
+        * media/media-load-event.html: Ditto.
+        * media/progress-event-at-least-one-expected.txt:
+        * media/progress-event-at-least-one.html: Ditto.
+
 2009-10-19  Andras Becsi  <becsi.andras at stud.u-szeged.hu>
 
         Reviewed by Tor Arne Vestbø.
diff --git a/LayoutTests/media/event-attributes-expected.txt b/LayoutTests/media/event-attributes-expected.txt
index 4ea5fbd..6a9d6c8 100644
--- a/LayoutTests/media/event-attributes-expected.txt
+++ b/LayoutTests/media/event-attributes-expected.txt
@@ -4,8 +4,6 @@ EVENT(loadedmetadata)
 EVENT(loadeddata)
 EVENT(canplay)
 EVENT(canplaythrough)
-EVENT(load)
-EVENT(loadend)
 
 *** starting playback
 RUN(video.play())
diff --git a/LayoutTests/media/event-attributes.html b/LayoutTests/media/event-attributes.html
index 6a8a195..84cb3c7 100644
--- a/LayoutTests/media/event-attributes.html
+++ b/LayoutTests/media/event-attributes.html
@@ -16,7 +16,7 @@
                     consoleWrite("EVENT(" + event.type + ")");
                 switch (event.type)
                 {
-                    case "loadend":
+                    case "canplaythrough":
                         consoleWrite("<br>*** starting playback");
                         run("video.play()"); 
                         break;
@@ -81,11 +81,9 @@
             onemptied="eventHandler()"
             onended="eventHandler()"
             onerror="eventHandler()"
-            onload="eventHandler()"
             onloadeddata="eventHandler()"
             onloadedmetadata="eventHandler()"
             onloadstart="eventHandler()"
-            onloadend="eventHandler()"
             onpause="eventHandler()"
             onplay="eventHandler()"
             onplaying="eventHandler()"
diff --git a/LayoutTests/media/media-load-event-expected.txt b/LayoutTests/media/media-load-event-expected.txt
index 53609f9..27bb18c 100644
--- a/LayoutTests/media/media-load-event-expected.txt
+++ b/LayoutTests/media/media-load-event-expected.txt
@@ -7,12 +7,12 @@ RUN(mediaElement.load())
 EVENT(loadstart)
 EVENT(durationchange)
 EVENT(loadeddata)
-EVENT(load)
-EVENT(loadend)
+EVENT(canplaythrough)
 
 RUN(document.getElementById('parent').appendChild(mediaElement))
 RUN(mediaElement.play())
 
+EVENT(load)
 EVENT(play)
 EVENT(playing)
 
diff --git a/LayoutTests/media/media-load-event.html b/LayoutTests/media/media-load-event.html
index fa9c837..aa7423b 100644
--- a/LayoutTests/media/media-load-event.html
+++ b/LayoutTests/media/media-load-event.html
@@ -11,9 +11,9 @@
                 endTest();
             }
 
-            function loadend()
+            function canplaythrough()
             {
-                consoleWrite("EVENT(loadend)");
+                consoleWrite("EVENT(canplaythrough)");
                 consoleWrite("");
                 run("document.getElementById('parent').appendChild(mediaElement)");
                 run("mediaElement.play()");
@@ -24,7 +24,7 @@
             {
                 run("mediaElement = document.createElement('audio')");
 
-                mediaElement.setAttribute('onloadend', "loadend()");
+                mediaElement.setAttribute('oncanplaythrough', "canplaythrough()");
                 mediaElement.setAttribute('onplaying', "playing()");
 
                 waitForEvent("loadstart");
diff --git a/LayoutTests/media/progress-event-at-least-one-expected.txt b/LayoutTests/media/progress-event-at-least-one-expected.txt
index fd34659..353eb0d 100644
--- a/LayoutTests/media/progress-event-at-least-one-expected.txt
+++ b/LayoutTests/media/progress-event-at-least-one-expected.txt
@@ -8,7 +8,7 @@ EVENT(loadstart)
 EVENT(durationchange)
 EVENT(loadedmetadata)
 EVENT(loadeddata)
-EVENT(loadend)
+EVENT(canplaythrough)
 EXPECTED (progressEventCount >= '1') OK
 END OF TEST
 
diff --git a/LayoutTests/media/progress-event-at-least-one.html b/LayoutTests/media/progress-event-at-least-one.html
index 9f86816..d129156 100644
--- a/LayoutTests/media/progress-event-at-least-one.html
+++ b/LayoutTests/media/progress-event-at-least-one.html
@@ -18,9 +18,9 @@
                     return;
             }
 
-            function loadend()
+            function canplaythrough()
             {
-                consoleWrite("EVENT(loadend)");
+                consoleWrite("EVENT(canplaythrough)");
                 
                 testExpected('progressEventCount', 1, '>=');
                 endTest();
@@ -30,11 +30,10 @@
             {
                 run("mediaElement = document.createElement('audio')");
 
-                mediaElement.setAttribute('onloadend', "loadend()");
+                mediaElement.setAttribute('oncanplaythrough', "canplaythrough()");
                 mediaElement.setAttribute('onprogress', "progress()");
 
                 waitForEvent("loadstart");
-                waitForEvent("loadend");
                 waitForEvent("loaded");
                 waitForEvent("waiting");
                 waitForEvent("ratechange");
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index ff1f084..540fd46 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2009-10-19  Eric Carlson  <eric.carlson at apple.com>
+
+        Reviewed by Simon Fraser.
+
+        https://bugs.webkit.org/show_bug.cgi?id=30463
+        Remove HTML5 media element 'loadend' event
+
+        * dom/EventNames.h:
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::parseMappedAttribute): Remove 'loadend'.
+        (WebCore::HTMLMediaElement::loadInternal): Ditto.
+        (WebCore::HTMLMediaElement::noneSupported): Ditto.
+        (WebCore::HTMLMediaElement::mediaEngineError): Ditto.
+        (WebCore::HTMLMediaElement::setNetworkState): Ditto.
+        (WebCore::HTMLMediaElement::userCancelledLoad): Ditto.
+
 2009-10-19  Jocelyn Turcotte  <jocelyn.turcotte at nokia.com>
 
         Reviewed by Adam Barth.
diff --git a/WebCore/dom/EventNames.h b/WebCore/dom/EventNames.h
index f32287e..2c4cd32 100644
--- a/WebCore/dom/EventNames.h
+++ b/WebCore/dom/EventNames.h
@@ -64,7 +64,6 @@ namespace WebCore {
     macro(keypress) \
     macro(keyup) \
     macro(load) \
-    macro(loadend) \
     macro(loadstart) \
     macro(message) \
     macro(mousedown) \
diff --git a/WebCore/html/HTMLAttributeNames.in b/WebCore/html/HTMLAttributeNames.in
index 7c6c4d6..340779e 100644
--- a/WebCore/html/HTMLAttributeNames.in
+++ b/WebCore/html/HTMLAttributeNames.in
@@ -158,7 +158,6 @@ onkeyup
 onload
 onloadeddata
 onloadedmetadata
-onloadend
 onloadstart
 onmousedown
 onmousemove
diff --git a/WebCore/html/HTMLMediaElement.cpp b/WebCore/html/HTMLMediaElement.cpp
index 4d6aa0d..11ca3ba 100644
--- a/WebCore/html/HTMLMediaElement.cpp
+++ b/WebCore/html/HTMLMediaElement.cpp
@@ -187,8 +187,6 @@ void HTMLMediaElement::parseMappedAttribute(MappedAttribute* attr)
         setAttributeEventListener(eventNames().loadeddataEvent, createAttributeEventListener(this, attr));
     else if (attrName == onloadedmetadataAttr)
         setAttributeEventListener(eventNames().loadedmetadataEvent, createAttributeEventListener(this, attr));
-    else if (attrName == onloadendAttr)
-        setAttributeEventListener(eventNames().loadendEvent, createAttributeEventListener(this, attr));
     else if (attrName == onloadstartAttr)
         setAttributeEventListener(eventNames().loadstartEvent, createAttributeEventListener(this, attr));
     else if (attrName == onpauseAttr)
@@ -468,17 +466,15 @@ void HTMLMediaElement::loadInternal()
     // 4 - If the media element's networkState is set to NETWORK_LOADING or NETWORK_IDLE, set
     // the error attribute to a new MediaError object whose code attribute is set to
     // MEDIA_ERR_ABORTED, fire a progress event called abort at the media element, in the
-    // context of the fetching process that is in progress for the element, and fire a progress
-    // event called loadend at the media element, in the context of the same fetching process.
+    // context of the fetching process that is in progress for the element.
     if (m_networkState == NETWORK_LOADING || m_networkState == NETWORK_IDLE) {
         m_error = MediaError::create(MediaError::MEDIA_ERR_ABORTED);
 
-        // fire synchronous 'abort' and 'loadend'
+        // fire synchronous 'abort'
         bool totalKnown = m_player && m_player->totalBytesKnown();
         unsigned loaded = m_player ? m_player->bytesLoaded() : 0;
         unsigned total = m_player ? m_player->totalBytes() : 0;
         dispatchEvent(ProgressEvent::create(eventNames().abortEvent, totalKnown, loaded, total));
-        dispatchEvent(ProgressEvent::create(eventNames().loadendEvent, totalKnown, loaded, total));
     }
 
     // 5
@@ -644,24 +640,19 @@ void HTMLMediaElement::noneSupported()
     m_loadState = WaitingForSource;
     m_currentSourceNode = 0;
 
-    // 4 - Reaching this step indicates that either the URL failed to resolve, or the media
+    // 5 - Reaching this step indicates that either the URL failed to resolve, or the media
     // resource failed to load. Set the error attribute to a new MediaError object whose
     // code attribute is set to MEDIA_ERR_SRC_NOT_SUPPORTED.
     m_error = MediaError::create(MediaError::MEDIA_ERR_SRC_NOT_SUPPORTED);
 
-    // 5 - Set the element's networkState attribute to the NETWORK_NO_SOURCE value.
+    // 6 - Set the element's networkState attribute to the NETWORK_NO_SOURCE value.
     m_networkState = NETWORK_NO_SOURCE;
 
-    // 6 - Queue a task to fire a progress event called error at the media element, in
+    // 7 - Queue a task to fire a progress event called error at the media element, in
     // the context of the fetching process that was used to try to obtain the media
     // resource in the resource fetch algorithm.
     scheduleProgressEvent(eventNames().errorEvent);
 
-    // 7 - Queue a task to fire a progress event called loadend at the media element, in
-    // the context of the fetching process that was used to try to obtain the media
-    // resource in the resource fetch algorithm.
-    scheduleProgressEvent(eventNames().loadendEvent);
-
     // 8 - Set the element's delaying-the-load-event flag to false. This stops delaying the load event.
     m_delayingTheLoadEvent = false;
 
@@ -687,19 +678,15 @@ void HTMLMediaElement::mediaEngineError(PassRefPtr<MediaError> err)
     // the context of the fetching process started by this instance of this algorithm.
     scheduleProgressEvent(eventNames().errorEvent);
 
-    // 4 - Queue a task to fire a progress event called loadend at the media element, in
-    // the context of the fetching process started by this instance of this algorithm.
-    scheduleProgressEvent(eventNames().loadendEvent);
-
-    // 5 - Set the element's networkState attribute to the NETWORK_EMPTY value and queue a
+    // 4 - Set the element's networkState attribute to the NETWORK_EMPTY value and queue a
     // task to fire a simple event called emptied at the element.
     m_networkState = NETWORK_EMPTY;
     scheduleEvent(eventNames().emptiedEvent);
 
-    // 6 - Set the element's delaying-the-load-event flag to false. This stops delaying the load event.
+    // 5 - Set the element's delaying-the-load-event flag to false. This stops delaying the load event.
     m_delayingTheLoadEvent = false;
 
-    // 7 - Abort the overall resource selection algorithm.
+    // 6 - Abort the overall resource selection algorithm.
     m_currentSourceNode = 0;
 }
 
@@ -786,7 +773,6 @@ void HTMLMediaElement::setNetworkState(MediaPlayer::NetworkState state)
                 setReadyState(currentState);
 
             scheduleProgressEvent(eventNames().loadEvent);
-            scheduleProgressEvent(eventNames().loadendEvent);
         }
     }
 }
@@ -1665,17 +1651,13 @@ void HTMLMediaElement::userCancelledLoad()
 #endif
     stopPeriodicTimers();
 
-    // 2 - Set the error attribute to a new MediaError object whose code attribute is set to MEDIA_ERR_ABORT.
+    // 2 - Set the error attribute to a new MediaError object whose code attribute is set to MEDIA_ERR_ABORTED.
     m_error = MediaError::create(MediaError::MEDIA_ERR_ABORTED);
 
     // 3 - Queue a task to fire a progress event called abort at the media element, in the context
     // of the fetching process started by this instance of this algorithm.
     scheduleProgressEvent(eventNames().abortEvent);
 
-    // 4 - Queue a task to fire a progress event called loadend at the media element, in the context
-    // of the fetching process started by this instance of this algorithm.
-    scheduleProgressEvent(eventNames().loadendEvent);
-
     // 5 - If the media element's readyState attribute has a value equal to HAVE_NOTHING, set the
     // element's networkState attribute to the NETWORK_EMPTY value and queue a task to fire a
     // simple event called emptied at the element. Otherwise, set set the element's networkState

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list