Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(379)

Unified Diff: third_party/WebKit/Source/core/html/shadow/MediaControls.cpp

Issue 2617993003: Fix displayed duration after onDurationChange (Closed)
Patch Set: Addressed comment Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/shadow/MediaControls.cpp
diff --git a/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp b/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp
index a60048a5c749f7070102f0308959f87ef0844e47..00344eb7e8067d9b4b2a7543a7234cb51cd85031 100644
--- a/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp
+++ b/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp
@@ -709,8 +709,16 @@ void MediaControls::onTimeUpdate() {
}
void MediaControls::onDurationChange() {
- m_timeline->setDuration(mediaElement().duration());
+ const double duration = mediaElement().duration();
+
+ // Update the displayed current time/duration.
+ m_durationDisplay->setTextContent(
+ LayoutTheme::theme().formatMediaControlsTime(duration));
+ m_durationDisplay->setCurrentValue(duration);
updateCurrentTimeDisplay();
+
+ // Update the timeline (the UI with the seek marker).
+ m_timeline->setDuration(duration);
}
void MediaControls::onPlay() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698