| Index: third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp b/third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp
|
| index 567a7a7586c5d42f09d9217ab8a3fbba13960162..ff8d47b2985330d24408d1c417a86a6299e07758 100644
|
| --- a/third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp
|
| +++ b/third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp
|
| @@ -770,6 +770,13 @@ void MediaControlTimelineElement::defaultEventHandler(Event* event) {
|
|
|
| double time = value().toDouble();
|
|
|
| + double duration = mediaElement().duration();
|
| + // Workaround for floating point error - it's possible for this element's max
|
| + // attribute to be rounded to a value slightly higher than the duration. If
|
| + // this happens and scrubber is dragged near the max, seek to duration.
|
| + if (time > duration)
|
| + time = duration;
|
| +
|
| // FIXME: This will need to take the timeline offset into consideration
|
| // once that concept is supported, see https://crbug.com/312699
|
| if (mediaElement().seekable()->contain(time))
|
|
|