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

darin at apple.com darin at apple.com
Wed Dec 22 13:40:53 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 23b19a7d060cc6aa91c8ffd3e7fc78e34e2c8e3c
Author: darin at apple.com <darin at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Sep 23 08:38:32 2010 +0000

    2010-09-23  Darin Adler  <darin at apple.com>
    
            Reviewed by Chris Fleizach.
    
            media/video-controls-with-mutation-event-handler.html crashing
            https://bugs.webkit.org/show_bug.cgi?id=46169
    
            * rendering/MediaControlElements.cpp:
            (WebCore::MediaControlInputElement::MediaControlInputElement): Don't take a type argument.
            We can't set the type until after the element is created beacuse of reference counting rules.
            (WebCore::MediaControlMuteButtonElement::MediaControlMuteButtonElement): Don't pass the type.
            (WebCore::MediaControlMuteButtonElement::create): Set the type.
            (WebCore::MediaControlPlayButtonElement::MediaControlPlayButtonElement): More of the same.
            (WebCore::MediaControlPlayButtonElement::create): Ditto.
            (WebCore::MediaControlSeekButtonElement::MediaControlSeekButtonElement): Ditto.
            (WebCore::MediaControlSeekButtonElement::create): Ditto.
            (WebCore::MediaControlRewindButtonElement::MediaControlRewindButtonElement): Ditto.
            (WebCore::MediaControlRewindButtonElement::create): Ditto.
            (WebCore::MediaControlReturnToRealtimeButtonElement::MediaControlReturnToRealtimeButtonElement): Ditto.
            (WebCore::MediaControlReturnToRealtimeButtonElement::create): Ditto.
            (WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement): Ditto.
            (WebCore::MediaControlToggleClosedCaptionsButtonElement::create): Ditto.
            (WebCore::MediaControlTimelineElement::MediaControlTimelineElement): Ditto.
            (WebCore::MediaControlTimelineElement::create): Ditto.
            (WebCore::MediaControlVolumeSliderElement::MediaControlVolumeSliderElement): Ditto.
            (WebCore::MediaControlVolumeSliderElement::create): Ditto.
            (WebCore::MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement): Ditto.
            (WebCore::MediaControlFullscreenButtonElement::create): Ditto.
    
            * rendering/MediaControlElements.h: Removed the type argument from the MediaControlInputElement
            constructor.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68126 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index c1cffb6..c47e031 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,35 @@
+2010-09-23  Darin Adler  <darin at apple.com>
+
+        Reviewed by Chris Fleizach.
+
+        media/video-controls-with-mutation-event-handler.html crashing
+        https://bugs.webkit.org/show_bug.cgi?id=46169
+
+        * rendering/MediaControlElements.cpp:
+        (WebCore::MediaControlInputElement::MediaControlInputElement): Don't take a type argument.
+        We can't set the type until after the element is created beacuse of reference counting rules.
+        (WebCore::MediaControlMuteButtonElement::MediaControlMuteButtonElement): Don't pass the type.
+        (WebCore::MediaControlMuteButtonElement::create): Set the type.
+        (WebCore::MediaControlPlayButtonElement::MediaControlPlayButtonElement): More of the same.
+        (WebCore::MediaControlPlayButtonElement::create): Ditto.
+        (WebCore::MediaControlSeekButtonElement::MediaControlSeekButtonElement): Ditto.
+        (WebCore::MediaControlSeekButtonElement::create): Ditto.
+        (WebCore::MediaControlRewindButtonElement::MediaControlRewindButtonElement): Ditto.
+        (WebCore::MediaControlRewindButtonElement::create): Ditto.
+        (WebCore::MediaControlReturnToRealtimeButtonElement::MediaControlReturnToRealtimeButtonElement): Ditto.
+        (WebCore::MediaControlReturnToRealtimeButtonElement::create): Ditto.
+        (WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement): Ditto.
+        (WebCore::MediaControlToggleClosedCaptionsButtonElement::create): Ditto.
+        (WebCore::MediaControlTimelineElement::MediaControlTimelineElement): Ditto.
+        (WebCore::MediaControlTimelineElement::create): Ditto.
+        (WebCore::MediaControlVolumeSliderElement::MediaControlVolumeSliderElement): Ditto.
+        (WebCore::MediaControlVolumeSliderElement::create): Ditto.
+        (WebCore::MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement): Ditto.
+        (WebCore::MediaControlFullscreenButtonElement::create): Ditto.
+
+        * rendering/MediaControlElements.h: Removed the type argument from the MediaControlInputElement
+        constructor.
+
 2010-09-22  Luke Macpherson  <macpherson at chromium.org>
 
         Reviewed by Alexey Proskuryakov.
diff --git a/WebCore/rendering/MediaControlElements.cpp b/WebCore/rendering/MediaControlElements.cpp
index 5533326..adaac03 100644
--- a/WebCore/rendering/MediaControlElements.cpp
+++ b/WebCore/rendering/MediaControlElements.cpp
@@ -345,12 +345,11 @@ bool MediaControlStatusDisplayElement::rendererIsNeeded(RenderStyle* style)
 
 // ----------------------------
     
-MediaControlInputElement::MediaControlInputElement(HTMLMediaElement* mediaElement, PseudoId pseudo, const String& type)
+MediaControlInputElement::MediaControlInputElement(HTMLMediaElement* mediaElement, PseudoId pseudo)
     : HTMLInputElement(inputTag, mediaElement->document())
     , m_mediaElement(mediaElement)
     , m_pseudoStyleId(pseudo)
 {
-    setType(type);
     setInDocument();
 
     switch (pseudo) {
@@ -484,13 +483,15 @@ void MediaControlInputElement::setDisplayType(MediaControlElementType displayTyp
 // ----------------------------
 
 inline MediaControlMuteButtonElement::MediaControlMuteButtonElement(HTMLMediaElement* mediaElement, ButtonLocation location)
-    : MediaControlInputElement(mediaElement, location == Controller ? MEDIA_CONTROLS_MUTE_BUTTON : MEDIA_CONTROLS_VOLUME_SLIDER_MUTE_BUTTON, "button")
+    : MediaControlInputElement(mediaElement, location == Controller ? MEDIA_CONTROLS_MUTE_BUTTON : MEDIA_CONTROLS_VOLUME_SLIDER_MUTE_BUTTON)
 {
 }
 
 PassRefPtr<MediaControlMuteButtonElement> MediaControlMuteButtonElement::create(HTMLMediaElement* mediaElement, ButtonLocation location)
 {
-    return adoptRef(new MediaControlMuteButtonElement(mediaElement, location));
+    RefPtr<MediaControlMuteButtonElement> button = adoptRef(new MediaControlMuteButtonElement(mediaElement, location));
+    button->setType("button");
+    return button.release();
 }
 
 void MediaControlMuteButtonElement::defaultEventHandler(Event* event)
@@ -510,13 +511,15 @@ void MediaControlMuteButtonElement::updateDisplayType()
 // ----------------------------
 
 inline MediaControlPlayButtonElement::MediaControlPlayButtonElement(HTMLMediaElement* mediaElement)
-    : MediaControlInputElement(mediaElement, MEDIA_CONTROLS_PLAY_BUTTON, "button")
+    : MediaControlInputElement(mediaElement, MEDIA_CONTROLS_PLAY_BUTTON)
 {
 }
 
 PassRefPtr<MediaControlPlayButtonElement> MediaControlPlayButtonElement::create(HTMLMediaElement* mediaElement)
 {
-    return adoptRef(new MediaControlPlayButtonElement(mediaElement));
+    RefPtr<MediaControlPlayButtonElement> button = adoptRef(new MediaControlPlayButtonElement(mediaElement));
+    button->setType("button");
+    return button.release();
 }
 
 void MediaControlPlayButtonElement::defaultEventHandler(Event* event)
@@ -536,7 +539,7 @@ void MediaControlPlayButtonElement::updateDisplayType()
 // ----------------------------
 
 inline MediaControlSeekButtonElement::MediaControlSeekButtonElement(HTMLMediaElement* mediaElement, PseudoId pseudoId)
-    : MediaControlInputElement(mediaElement, pseudoId, "button")
+    : MediaControlInputElement(mediaElement, pseudoId)
     , m_seeking(false)
     , m_capturing(false)
     , m_seekTimer(this, &MediaControlSeekButtonElement::seekTimerFired)
@@ -545,7 +548,9 @@ inline MediaControlSeekButtonElement::MediaControlSeekButtonElement(HTMLMediaEle
 
 PassRefPtr<MediaControlSeekButtonElement> MediaControlSeekButtonElement::create(HTMLMediaElement* mediaElement, PseudoId pseudoStyleId)
 {
-    return adoptRef(new MediaControlSeekButtonElement(mediaElement, pseudoStyleId));
+    RefPtr<MediaControlSeekButtonElement> button = adoptRef(new MediaControlSeekButtonElement(mediaElement, pseudoStyleId));
+    button->setType("button");
+    return button.release();
 }
 
 inline bool MediaControlSeekButtonElement::isForwardButton() const
@@ -603,13 +608,15 @@ void MediaControlSeekButtonElement::detach()
 // ----------------------------
 
 inline MediaControlRewindButtonElement::MediaControlRewindButtonElement(HTMLMediaElement* element)
-    : MediaControlInputElement(element, MEDIA_CONTROLS_REWIND_BUTTON, "button")
+    : MediaControlInputElement(element, MEDIA_CONTROLS_REWIND_BUTTON)
 {
 }
 
 PassRefPtr<MediaControlRewindButtonElement> MediaControlRewindButtonElement::create(HTMLMediaElement* mediaElement)
 {
-    return adoptRef(new MediaControlRewindButtonElement(mediaElement));
+    RefPtr<MediaControlRewindButtonElement> button = adoptRef(new MediaControlRewindButtonElement(mediaElement));
+    button->setType("button");
+    return button.release();
 }
 
 void MediaControlRewindButtonElement::defaultEventHandler(Event* event)
@@ -621,17 +628,18 @@ void MediaControlRewindButtonElement::defaultEventHandler(Event* event)
     HTMLInputElement::defaultEventHandler(event);
 }
 
-
 // ----------------------------
 
 inline MediaControlReturnToRealtimeButtonElement::MediaControlReturnToRealtimeButtonElement(HTMLMediaElement* mediaElement)
-    : MediaControlInputElement(mediaElement, MEDIA_CONTROLS_RETURN_TO_REALTIME_BUTTON, "button")
+    : MediaControlInputElement(mediaElement, MEDIA_CONTROLS_RETURN_TO_REALTIME_BUTTON)
 {
 }
 
 PassRefPtr<MediaControlReturnToRealtimeButtonElement> MediaControlReturnToRealtimeButtonElement::create(HTMLMediaElement* mediaElement)
 {
-    return adoptRef(new MediaControlReturnToRealtimeButtonElement(mediaElement));
+    RefPtr<MediaControlReturnToRealtimeButtonElement> button = adoptRef(new MediaControlReturnToRealtimeButtonElement(mediaElement));
+    button->setType("button");
+    return button.release();
 }
 
 void MediaControlReturnToRealtimeButtonElement::defaultEventHandler(Event* event)
@@ -647,13 +655,15 @@ void MediaControlReturnToRealtimeButtonElement::defaultEventHandler(Event* event
 // ----------------------------
 
 inline MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement(HTMLMediaElement* mediaElement)
-    : MediaControlInputElement(mediaElement, MEDIA_CONTROLS_TOGGLE_CLOSED_CAPTIONS_BUTTON, "button")
+    : MediaControlInputElement(mediaElement, MEDIA_CONTROLS_TOGGLE_CLOSED_CAPTIONS_BUTTON)
 {
 }
 
 PassRefPtr<MediaControlToggleClosedCaptionsButtonElement> MediaControlToggleClosedCaptionsButtonElement::create(HTMLMediaElement* mediaElement)
 {
-    return adoptRef(new MediaControlToggleClosedCaptionsButtonElement(mediaElement));
+    RefPtr<MediaControlToggleClosedCaptionsButtonElement> button = adoptRef(new MediaControlToggleClosedCaptionsButtonElement(mediaElement));
+    button->setType("button");
+    return button.release();
 }
 
 void MediaControlToggleClosedCaptionsButtonElement::defaultEventHandler(Event* event)
@@ -674,13 +684,15 @@ void MediaControlToggleClosedCaptionsButtonElement::updateDisplayType()
 // ----------------------------
 
 MediaControlTimelineElement::MediaControlTimelineElement(HTMLMediaElement* mediaElement)
-    : MediaControlInputElement(mediaElement, MEDIA_CONTROLS_TIMELINE, "range")
+    : MediaControlInputElement(mediaElement, MEDIA_CONTROLS_TIMELINE)
 {
 }
 
 PassRefPtr<MediaControlTimelineElement> MediaControlTimelineElement::create(HTMLMediaElement* mediaElement)
 {
-    return adoptRef(new MediaControlTimelineElement(mediaElement));
+    RefPtr<MediaControlTimelineElement> timeline = adoptRef(new MediaControlTimelineElement(mediaElement));
+    timeline->setType("range");
+    return timeline.release();
 }
 
 void MediaControlTimelineElement::defaultEventHandler(Event* event)
@@ -727,13 +739,15 @@ void MediaControlTimelineElement::update(bool updateDuration)
 // ----------------------------
 
 inline MediaControlVolumeSliderElement::MediaControlVolumeSliderElement(HTMLMediaElement* mediaElement)
-    : MediaControlInputElement(mediaElement, MEDIA_CONTROLS_VOLUME_SLIDER, "range")
+    : MediaControlInputElement(mediaElement, MEDIA_CONTROLS_VOLUME_SLIDER)
 {
 }
 
 PassRefPtr<MediaControlVolumeSliderElement> MediaControlVolumeSliderElement::create(HTMLMediaElement* mediaElement)
 {
-    return adoptRef(new MediaControlVolumeSliderElement(mediaElement));
+    RefPtr<MediaControlVolumeSliderElement> slider = adoptRef(new MediaControlVolumeSliderElement(mediaElement));
+    slider->setType("range");
+    return slider.release();
 }
 
 void MediaControlVolumeSliderElement::defaultEventHandler(Event* event)
@@ -769,13 +783,15 @@ void MediaControlVolumeSliderElement::update()
 // ----------------------------
 
 inline MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement(HTMLMediaElement* mediaElement)
-    : MediaControlInputElement(mediaElement, MEDIA_CONTROLS_FULLSCREEN_BUTTON, "button")
+    : MediaControlInputElement(mediaElement, MEDIA_CONTROLS_FULLSCREEN_BUTTON)
 {
 }
 
 PassRefPtr<MediaControlFullscreenButtonElement> MediaControlFullscreenButtonElement::create(HTMLMediaElement* mediaElement)
 {
-    return adoptRef(new MediaControlFullscreenButtonElement(mediaElement));
+    RefPtr<MediaControlFullscreenButtonElement> button = adoptRef(new MediaControlFullscreenButtonElement(mediaElement));
+    button->setType("button");
+    return button.release();
 }
 
 void MediaControlFullscreenButtonElement::defaultEventHandler(Event* event)
diff --git a/WebCore/rendering/MediaControlElements.h b/WebCore/rendering/MediaControlElements.h
index 1dcf6be..a9ffb0b 100644
--- a/WebCore/rendering/MediaControlElements.h
+++ b/WebCore/rendering/MediaControlElements.h
@@ -178,7 +178,7 @@ public:
     HTMLMediaElement* mediaElement() const { return m_mediaElement; }
 
 protected:
-    MediaControlInputElement(HTMLMediaElement*, PseudoId, const String& type);
+    MediaControlInputElement(HTMLMediaElement*, PseudoId);
 
     void setDisplayType(MediaControlElementType);
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list