2009-08-25 Eric Carlson <eric.carlson@apple.com>

        Reviewed by Dan Bernstein

        r47744 causes media/video-controls-with-mutation-event-handler.html to crash
        https://bugs.webkit.org/show_bug.cgi?id=28732

        * rendering/MediaControlElements.cpp:
        (WebCore::MediaControlVolumeSliderElement::MediaControlVolumeSliderElement):
            Don't call setAttribute from the construtor, any registered mutation event 
            listener will cause a crash.

        * rendering/RenderMedia.cpp:
        (WebCore::RenderMedia::createVolumeSlider):
            Set the maxAttr here instead of in the constructor.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47774 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent f22ddc27
2009-08-25 Eric Carlson <eric.carlson@apple.com>
Reviewed by Dan Bernstein
r47744 causes media/video-controls-with-mutation-event-handler.html to crash
https://bugs.webkit.org/show_bug.cgi?id=28732
* rendering/MediaControlElements.cpp:
(WebCore::MediaControlVolumeSliderElement::MediaControlVolumeSliderElement):
Don't call setAttribute from the construtor, any registered mutation event
listener will cause a crash.
* rendering/RenderMedia.cpp:
(WebCore::RenderMedia::createVolumeSlider):
Set the maxAttr here instead of in the constructor.
2009-08-25 Dmitry Titov <dimich@chromium.org>
Reviewed by Brady Eidson.
......@@ -628,7 +628,6 @@ void MediaControlTimelineElement::update(bool updateDuration)
MediaControlVolumeSliderElement::MediaControlVolumeSliderElement(Document* document, HTMLMediaElement* element)
: MediaControlInputElement(document, MEDIA_CONTROLS_VOLUME_SLIDER, "range", element)
{
setAttribute(maxAttr, "1");
}
void MediaControlVolumeSliderElement::defaultEventHandler(Event* event)
......
......@@ -257,6 +257,7 @@ void RenderMedia::createVolumeSlider()
ASSERT(!m_volumeSlider);
m_volumeSlider = new MediaControlVolumeSliderElement(document(), mediaElement());
m_volumeSlider->setAttribute(precisionAttr, "float");
m_volumeSlider->setAttribute(maxAttr, "1");
m_volumeSlider->attachToParent(m_volumeSliderContainer.get());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment