[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373
eric at webkit.org
eric at webkit.org
Wed Apr 7 23:02:23 UTC 2010
The following commit has been merged in the webkit-1.2 branch:
commit b3328a12b9e4ea4b08e24e26e2d7a291a7a66062
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Oct 23 20:35:15 2009 +0000
2009-10-23 Alpha Lam <hclam at chromium.org>
Reviewed by Eric Carlson.
Volume slider always starts at half volume
https://bugs.webkit.org/show_bug.cgi?id=28322
* media/video-volume-slider.html: Added.
Pixel test for the volume slider of the media control. This test
assumes volume slider is implemented and usable. It moves the mouse
over the right bottom corner of a video element to trigger the
volume slider. If volume slider is not implemented at all, you'll
only see a video element with the first frame.
* platform/gtk/Skipped: The above test requires a volume slider so it's skipped.
* platform/mac/Skipped: ditto.
* platform/win/Skipped: ditto.
2009-10-23 Alpha Lam <hclam at chromium.org>
Reviewed by Eric Carlson.
Volume slider always starts at half volume
https://bugs.webkit.org/show_bug.cgi?id=28322
Sets the value attribute of volume slider to the volume attribute
of the media element. Also update the value attribute of the
input element for the volume slider when the volume attribute
of the media element is updated.
Test: media/video-volume-slider.html
* rendering/MediaControlElements.cpp:
(WebCore::MediaControlVolumeSliderElement::update):
Set the value attribute of the input element for the volume slider
using the current volume of the media element.
* rendering/MediaControlElements.h:
Add method definition of update().
* rendering/RenderMedia.cpp:
(WebCore::RenderMedia::createVolumeSlider):
Creates a volume slider with value attribute equals to the current
volume attribute of the media element.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49995 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index f0b91d5..68f6fdf 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,20 @@
+2009-10-23 Alpha Lam <hclam at chromium.org>
+
+ Reviewed by Eric Carlson.
+
+ Volume slider always starts at half volume
+ https://bugs.webkit.org/show_bug.cgi?id=28322
+
+ * media/video-volume-slider.html: Added.
+ Pixel test for the volume slider of the media control. This test
+ assumes volume slider is implemented and usable. It moves the mouse
+ over the right bottom corner of a video element to trigger the
+ volume slider. If volume slider is not implemented at all, you'll
+ only see a video element with the first frame.
+ * platform/gtk/Skipped: The above test requires a volume slider so it's skipped.
+ * platform/mac/Skipped: ditto.
+ * platform/win/Skipped: ditto.
+
2009-10-23 Andrew Scherkus <scherkus at chromium.org>
Reviewed by Eric Carlson.
diff --git a/LayoutTests/media/video-volume-slider.html b/LayoutTests/media/video-volume-slider.html
new file mode 100644
index 0000000..d6e6260
--- /dev/null
+++ b/LayoutTests/media/video-volume-slider.html
@@ -0,0 +1,38 @@
+<html>
+<head>
+ <title>Test rendering of volume slider of video tag</title>
+ <script src=media-file.js></script>
+ <script>
+ var video;
+
+ function init()
+ {
+ if (window.layoutTestController)
+ layoutTestController.waitUntilDone();
+
+ video = document.getElementsByTagName("video")[0];
+ video.src = findMediaFile("video", "content/test");
+ }
+
+ function test()
+ {
+ video.volume = 0.7;
+
+ if (window.eventSender) {
+ x = video.offsetLeft + video.offsetWidth - 10;
+ y = video.offsetTop + video.offsetHeight - 10;
+ eventSender.mouseMoveTo(x, y);
+ }
+
+ if (window.layoutTestController)
+ layoutTestController.notifyDone();
+ }
+ </script>
+</head>
+<body onload="init()">
+ Tests if the volume slider is rendererd properly. This test assumes the<br>
+ volume slider is implmented and mouse over the right bottom corner of<br>
+ video element will show the volume slider.<br>
+ <video oncanplaythrough="test()" controls></video>
+</body>
+</html>
diff --git a/LayoutTests/platform/gtk/Skipped b/LayoutTests/platform/gtk/Skipped
index ceab753..6859e7e 100644
--- a/LayoutTests/platform/gtk/Skipped
+++ b/LayoutTests/platform/gtk/Skipped
@@ -3611,6 +3611,8 @@ media/video-no-audio.html
media/video-transformed.html
media/video-zoom-controls.html
media/video-zoom.html
+# This test requires media controls has a volume slider.
+media/video-volume-slider.html
# Tests in plugins/ directory
# These tests require ObjC plugin, do not bother trying to get them to work
diff --git a/LayoutTests/platform/mac/Skipped b/LayoutTests/platform/mac/Skipped
index c1b52da..b7da5e7 100644
--- a/LayoutTests/platform/mac/Skipped
+++ b/LayoutTests/platform/mac/Skipped
@@ -84,6 +84,9 @@ media/audio-delete-while-step-button-clicked.html
media/video-controls-transformed.html
media/video-controls-zoomed.html
+# This test requires media controls has a volume slider.
+media/video-volume-slider.html
+
# As long as pages with unload handlers are put in the Page Cache, this test doesn't make any sense for Mac.
# <rdar://problem/7196485> and https://bugs.webkit.org/show_bug.cgi?id=29021
fast/loader/frames-with-unload-handlers-in-page-cache.html
diff --git a/LayoutTests/platform/win/Skipped b/LayoutTests/platform/win/Skipped
index 089fe16..30614f8 100644
--- a/LayoutTests/platform/win/Skipped
+++ b/LayoutTests/platform/win/Skipped
@@ -48,6 +48,9 @@ media/video-seek-past-end-paused.html
# <rdar://problem/6710625> Test media/video-error-abort.html doesn't work
media/video-error-abort.html
+# This test requires media controls has a volume slider.
+media/video-volume-slider.html
+
# <rdar://problem/5075790> Layout tests that depend on certain fonts don't match Mac results:
# - Mac OS X and Windows do not have an Arabic font in common
fast/text/international/bidi-AN-after-L.html
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 26a3842..a1efbdc 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,28 @@
+2009-10-23 Alpha Lam <hclam at chromium.org>
+
+ Reviewed by Eric Carlson.
+
+ Volume slider always starts at half volume
+ https://bugs.webkit.org/show_bug.cgi?id=28322
+
+ Sets the value attribute of volume slider to the volume attribute
+ of the media element. Also update the value attribute of the
+ input element for the volume slider when the volume attribute
+ of the media element is updated.
+
+ Test: media/video-volume-slider.html
+
+ * rendering/MediaControlElements.cpp:
+ (WebCore::MediaControlVolumeSliderElement::update):
+ Set the value attribute of the input element for the volume slider
+ using the current volume of the media element.
+ * rendering/MediaControlElements.h:
+ Add method definition of update().
+ * rendering/RenderMedia.cpp:
+ (WebCore::RenderMedia::createVolumeSlider):
+ Creates a volume slider with value attribute equals to the current
+ volume attribute of the media element.
+
2009-10-23 Evan Martin <evan at chromium.org>
Reviewed by Eric Seidel.
diff --git a/WebCore/rendering/MediaControlElements.cpp b/WebCore/rendering/MediaControlElements.cpp
index 73b9a3a..9611660 100644
--- a/WebCore/rendering/MediaControlElements.cpp
+++ b/WebCore/rendering/MediaControlElements.cpp
@@ -646,6 +646,15 @@ void MediaControlVolumeSliderElement::defaultEventHandler(Event* event)
}
}
+void MediaControlVolumeSliderElement::update()
+{
+ float volume = m_mediaElement->volume();
+ if (value().toFloat() != volume) {
+ setValue(String::number(volume));
+ MediaControlInputElement::update();
+ }
+}
+
// ----------------------------
MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement(Document* document, HTMLMediaElement* element)
diff --git a/WebCore/rendering/MediaControlElements.h b/WebCore/rendering/MediaControlElements.h
index e562bb5..8b29773 100644
--- a/WebCore/rendering/MediaControlElements.h
+++ b/WebCore/rendering/MediaControlElements.h
@@ -234,6 +234,7 @@ class MediaControlVolumeSliderElement : public MediaControlInputElement {
public:
MediaControlVolumeSliderElement(Document*, HTMLMediaElement*);
virtual void defaultEventHandler(Event*);
+ virtual void update();
};
// ----------------------------
diff --git a/WebCore/rendering/RenderMedia.cpp b/WebCore/rendering/RenderMedia.cpp
index 1da2628..1d4da23 100644
--- a/WebCore/rendering/RenderMedia.cpp
+++ b/WebCore/rendering/RenderMedia.cpp
@@ -258,6 +258,7 @@ void RenderMedia::createVolumeSlider()
m_volumeSlider = new MediaControlVolumeSliderElement(document(), mediaElement());
m_volumeSlider->setAttribute(precisionAttr, "float");
m_volumeSlider->setAttribute(maxAttr, "1");
+ m_volumeSlider->setAttribute(valueAttr, String::number(mediaElement()->volume()));
m_volumeSlider->attachToParent(m_volumeSliderContainer.get());
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list