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

Issue 2707043004: Media Controls: Fix seek to end when max attr is rounded up (Closed)

Created:
3 years, 10 months ago by johnme
Modified:
3 years, 9 months ago
CC:
blink-reviews, blink-reviews-html_chromium.org, chromium-reviews, DaleCurtis, dglazkov+blink, eric.carlson_apple.com, feature-media-reviews_chromium.org, foolip, fs, gasubic, mlamouri+watch-blink_chromium.org, nessy, Srirama
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Media Controls: Fix seek to end when max attr is rounded up When seeking to the end of an audio/video element, by clicking slightly past the end of the track, sometimes the scrubber would move but the current playing time wouldn't be updated. This happened because https://codereview.chromium.org/614263002 (https://crbug.com/412562) made the scrubber only call mediaElement().setCurrentTime if the |value| of the underlying <input type="range"> is contained within the mediaElement().seekable() TimeRanges. But the |max| attribute of the <input type="range"> can sometimes be rounded up slightly, for example a duration of 596.586667 results in a |max| attribute of 596.587, and so seeking to this |max| value fails to update currentTime. This patch updates the seekable() contains check to take this floating point error into account. BUG=695065 Review-Url: https://codereview.chromium.org/2707043004 Cr-Commit-Position: refs/heads/master@{#453689} Committed: https://chromium.googlesource.com/chromium/src/+/6d7ae217f9f1a7772046c5447f73bc8cdff8cbed

Patch Set 1 #

Total comments: 2

Patch Set 2 : Simplify time>duration check #

Unified diffs Side-by-side diffs Delta from patch set Stats (+48 lines, -1 line) Patch
M third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp View 1 1 chunk +7 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/shadow/MediaControlsTest.cpp View 5 chunks +41 lines, -1 line 0 comments Download

Messages

Total messages: 10 (4 generated)
johnme
3 years, 10 months ago (2017-02-22 17:57:48 UTC) #2
mlamouri (slow - plz ping)
https://codereview.chromium.org/2707043004/diff/1/third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp File third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp (right): https://codereview.chromium.org/2707043004/diff/1/third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp#newcode779 third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp:779: time = duration; I do not understand why this ...
3 years, 9 months ago (2017-02-27 17:48:12 UTC) #3
johnme
Addressed review comment - thanks! https://codereview.chromium.org/2707043004/diff/1/third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp File third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp (right): https://codereview.chromium.org/2707043004/diff/1/third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp#newcode779 third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp:779: time = duration; On ...
3 years, 9 months ago (2017-02-28 18:02:56 UTC) #4
mlamouri (slow - plz ping)
lgtm
3 years, 9 months ago (2017-02-28 18:06:04 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2707043004/20001
3 years, 9 months ago (2017-02-28 18:30:34 UTC) #7
commit-bot: I haz the power
3 years, 9 months ago (2017-02-28 20:35:00 UTC) #10
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/6d7ae217f9f1a7772046c5447f73...

Powered by Google App Engine
This is Rietveld 408576698