Diff
Modified: trunk/LayoutTests/ChangeLog (158111 => 158112)
--- trunk/LayoutTests/ChangeLog 2013-10-28 15:48:44 UTC (rev 158111)
+++ trunk/LayoutTests/ChangeLog 2013-10-28 16:11:45 UTC (rev 158112)
@@ -1,3 +1,18 @@
+2013-10-28 Xabier Rodriguez Calvar <[email protected]>
+
+ Remove HTMLMediaElement.startTime
+ https://bugs.webkit.org/show_bug.cgi?id=123264
+
+ Reviewed by Eric Carlson.
+
+ Removed test about startTime.
+
+ Patch by: [email protected]
+ Blink review URL: https://codereview.chromium.org/32583003
+
+ * media/media-startTime-expected.txt: Removed.
+ * media/media-startTime.html: Removed.
+
2013-10-28 Gyuyoung Kim <[email protected]>
Unreviewed, EFL gardening.
Deleted: trunk/LayoutTests/media/media-startTime-expected.txt (158111 => 158112)
--- trunk/LayoutTests/media/media-startTime-expected.txt 2013-10-28 15:48:44 UTC (rev 158111)
+++ trunk/LayoutTests/media/media-startTime-expected.txt 2013-10-28 16:11:45 UTC (rev 158112)
@@ -1,8 +0,0 @@
-Test the, so far unused, 'startTime' attribute.
-
-EVENT(loadeddata)
-EXPECTED (video.startTime == '0') OK
-RUN(video.startTime = 10)
-EXPECTED (video.startTime == '0') OK
-END OF TEST
-
Deleted: trunk/LayoutTests/media/media-startTime.html (158111 => 158112)
--- trunk/LayoutTests/media/media-startTime.html 2013-10-28 15:48:44 UTC (rev 158111)
+++ trunk/LayoutTests/media/media-startTime.html 2013-10-28 16:11:45 UTC (rev 158112)
@@ -1,35 +0,0 @@
-<html>
- <head>
- <title>startTime attribute test</title>
- <script src=""
- <script src=""
-
- <script>
- function loadeddata()
- {
- testExpected("video.startTime", 0);
- run("video.startTime = 10");
- testExpected("video.startTime", 0);
- endTest();
- }
-
- function start()
- {
- findMediaElement();
- waitForEvent('loadeddata', loadeddata);
-
- var mediaFile = findMediaFile("video", "content/test");
- disableFullTestDetailsPrinting();
- runSilently("video.src = ''");
- enableFullTestDetailsPrinting();
- }
-
- </script>
- </head>
-
- <body _onload_="start()">
- <video controls> </video>
- <p>Test the, so far unused, 'startTime' attribute.</p>
-
- </body>
-</html>
Modified: trunk/Source/WebCore/ChangeLog (158111 => 158112)
--- trunk/Source/WebCore/ChangeLog 2013-10-28 15:48:44 UTC (rev 158111)
+++ trunk/Source/WebCore/ChangeLog 2013-10-28 16:11:45 UTC (rev 158112)
@@ -1,3 +1,35 @@
+2013-10-28 Xabier Rodriguez Calvar <[email protected]>
+
+ Remove HTMLMediaElement.startTime
+ https://bugs.webkit.org/show_bug.cgi?id=123264
+
+ Reviewed by Eric Carlson.
+
+ Patch based on one by: [email protected]
+ Blink review URL: https://codereview.chromium.org/32583003
+
+ startTime has been removed from the HTMLMediaElement and its use
+ in the rest of components.
+
+ * Modules/mediacontrols/mediaControlsApple.js:
+ (Controller.prototype.handleRewindButtonClicked):
+ (Controller.prototype.handleTimelineMouseMove):
+ (Controller.prototype.updateDuration):
+ (Controller.prototype.updateTime): Removed used of startTime().
+ * bindings/gobject/WebKitDOMCustom.cpp:
+ (webkit_dom_html_media_element_get_start_time):
+ * bindings/gobject/WebKitDOMCustom.h:
+ * bindings/gobject/WebKitDOMCustom.symbols: Added phony function.
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
+ (WebCore::HTMLMediaElement::isBlockedOnMediaController): Removed
+ use of startTime()
+ * html/HTMLMediaElement.h:
+ * html/HTMLMediaElement.idl: Removed startTime()
+ * rendering/RenderThemeWinCE.cpp:
+ (WebCore::RenderThemeWinCE::paintSliderThumb): Removed use of
+ startTime()
+
2013-10-28 Andreas Kling <[email protected]>
RenderElement::m_style should be a Ref.
Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js (158111 => 158112)
--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js 2013-10-28 15:48:44 UTC (rev 158111)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js 2013-10-28 16:11:45 UTC (rev 158112)
@@ -539,7 +539,6 @@
handleRewindButtonClicked: function(event)
{
var newTime = Math.max(
- this.video.startTime,
this.video.currentTime - this.RewindAmount,
this.video.seekable.start(0));
this.video.currentTime = newTime;
@@ -594,7 +593,7 @@
percent = Math.max(Math.min(1, percent), 0);
this.controls.thumbnail.style.left = percent * 100 + '%';
- var thumbnailTime = this.video.startTime + percent * this.video.duration;
+ var thumbnailTime = percent * this.video.duration;
for (var i = 0; i < this.video.textTracks.length; ++i) {
var track = this.video.textTracks[i];
if (!this.trackHasThumbnails(track))
@@ -725,7 +724,7 @@
updateDuration: function()
{
- this.controls.timeline.min = this.video.startTime;
+ this.controls.timeline.min = 0;
this.controls.timeline.max = this.video.duration;
},
@@ -781,7 +780,7 @@
updateTime: function()
{
var currentTime = this.video.currentTime;
- var timeRemaining = (currentTime - this.video.startTime) - this.video.duration;
+ var timeRemaining = currentTime - this.video.duration;
this.controls.currentTime.innerText = this.formatTime(currentTime);
this.controls.timeline.value = this.video.currentTime;
this.controls.remainingTime.innerText = this.formatTime(timeRemaining);
Modified: trunk/Source/WebCore/bindings/gobject/WebKitDOMCustom.cpp (158111 => 158112)
--- trunk/Source/WebCore/bindings/gobject/WebKitDOMCustom.cpp 2013-10-28 15:48:44 UTC (rev 158111)
+++ trunk/Source/WebCore/bindings/gobject/WebKitDOMCustom.cpp 2013-10-28 16:11:45 UTC (rev 158112)
@@ -551,3 +551,9 @@
g_warning("%s: the PropertyNodeList object has been removed from WebKit, this function does nothing.", __func__);
return 0;
}
+
+gdouble webkit_dom_html_media_element_get_start_time(WebKitDOMHTMLMediaElement*)
+{
+ g_warning("%s: the HTMLMediaElement:start-time property has been removed from WebKit, this function does nothing.", __func__);
+ return 0;
+}
Modified: trunk/Source/WebCore/bindings/gobject/WebKitDOMCustom.h (158111 => 158112)
--- trunk/Source/WebCore/bindings/gobject/WebKitDOMCustom.h 2013-10-28 15:48:44 UTC (rev 158111)
+++ trunk/Source/WebCore/bindings/gobject/WebKitDOMCustom.h 2013-10-28 16:11:45 UTC (rev 158112)
@@ -458,6 +458,17 @@
**/
WEBKIT_API gulong webkit_dom_property_node_list_get_length(void* self);
+/**
+ * webkit_dom_html_media_element_get_start_time:
+ * @self: A #HTMLMediaElement
+ *
+ * The HTMLMediaElement:start-time property has been removed from WebKit, this function does nothing.
+ *
+ * Returns:
+ *
+**/
+WEBKIT_API gdouble webkit_dom_html_media_element_get_start_time(WebKitDOMHTMLMediaElement*);
+
G_END_DECLS
#endif
Modified: trunk/Source/WebCore/bindings/gobject/WebKitDOMCustom.symbols (158111 => 158112)
--- trunk/Source/WebCore/bindings/gobject/WebKitDOMCustom.symbols 2013-10-28 15:48:44 UTC (rev 158111)
+++ trunk/Source/WebCore/bindings/gobject/WebKitDOMCustom.symbols 2013-10-28 16:11:45 UTC (rev 158112)
@@ -42,3 +42,4 @@
GType webkit_dom_property_node_list_get_type(void)
WebKitDOMNode* webkit_dom_property_node_list_item(void*, gulong)
gulong webkit_dom_property_node_list_get_length(void*)
+gdouble webkit_dom_html_media_element_get_start_time(WebKitDOMHTMLMediaElement*)
Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (158111 => 158112)
--- trunk/Source/WebCore/html/HTMLMediaElement.cpp 2013-10-28 15:48:44 UTC (rev 158111)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp 2013-10-28 16:11:45 UTC (rev 158112)
@@ -2351,13 +2351,6 @@
seek(time, ec);
}
-double HTMLMediaElement::startTime() const
-{
- if (!m_player)
- return 0;
- return m_player->startTime();
-}
-
double HTMLMediaElement::initialTime() const
{
if (m_fragmentStartTime != MediaPlayer::invalidTime())
@@ -3679,7 +3672,7 @@
if (loop() && !m_mediaController) {
m_sentEndEvent = false;
// then seek to the earliest possible position of the media resource and abort these steps.
- seek(startTime(), IGNORE_EXCEPTION);
+ seek(0, IGNORE_EXCEPTION);
} else {
// If the media element does not have a current media controller, and the media element
// has still ended playback, and the direction of playback is still forwards, and paused
@@ -4996,7 +4989,7 @@
// position relative to the MediaController's timeline or after the end of the media resource
// relative to the MediaController's timeline.
double mediaControllerPosition = m_mediaController->currentTime();
- if (mediaControllerPosition < startTime() || mediaControllerPosition > startTime() + duration())
+ if (mediaControllerPosition < 0 || mediaControllerPosition > duration())
return true;
return false;
Modified: trunk/Source/WebCore/html/HTMLMediaElement.h (158111 => 158112)
--- trunk/Source/WebCore/html/HTMLMediaElement.h 2013-10-28 15:48:44 UTC (rev 158111)
+++ trunk/Source/WebCore/html/HTMLMediaElement.h 2013-10-28 16:11:45 UTC (rev 158112)
@@ -161,7 +161,6 @@
virtual double currentTime() const OVERRIDE;
virtual void setCurrentTime(double, ExceptionCode&) OVERRIDE;
double initialTime() const;
- double startTime() const;
virtual double duration() const OVERRIDE;
virtual bool paused() const OVERRIDE;
virtual double defaultPlaybackRate() const OVERRIDE;
Modified: trunk/Source/WebCore/html/HTMLMediaElement.idl (158111 => 158112)
--- trunk/Source/WebCore/html/HTMLMediaElement.idl 2013-10-28 15:48:44 UTC (rev 158111)
+++ trunk/Source/WebCore/html/HTMLMediaElement.idl 2013-10-28 16:11:45 UTC (rev 158112)
@@ -66,7 +66,6 @@
// playback state
[SetterRaisesException] attribute double currentTime;
readonly attribute double initialTime;
-readonly attribute double startTime;
readonly attribute double duration;
readonly attribute boolean paused;
attribute double defaultPlaybackRate;
Modified: trunk/Source/WebCore/rendering/RenderThemeWinCE.cpp (158111 => 158112)
--- trunk/Source/WebCore/rendering/RenderThemeWinCE.cpp 2013-10-28 15:48:44 UTC (rev 158111)
+++ trunk/Source/WebCore/rendering/RenderThemeWinCE.cpp 2013-10-28 16:11:45 UTC (rev 158112)
@@ -521,7 +521,7 @@
#if ENABLE(VIDEO)
HTMLMediaElement* mediaElement = mediaElementParent(o->node());
if (mediaElement) {
- float pt = (mediaElement->currentTime() - mediaElement->startTime()) / mediaElement->duration();
+ float pt = mediaElement->currentTime() / mediaElement->duration();
FloatRect intRect = r;
intRect.setX(intRect.x() + intRect.width() * pt - 2);
intRect.setWidth(5);