WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
168168
REGRESSION: Subtitles menu in media controls allows multiple items to be selected
https://bugs.webkit.org/show_bug.cgi?id=168168
Summary
REGRESSION: Subtitles menu in media controls allows multiple items to be sele...
mitz
Reported
2017-02-11 08:06:36 PST
To reproduce this bug, navigate to a video URL. Click the Subtitles button in the controls to bring up the menu. Click an item that isn’t selected, then click the Subtitles button again, and notice how the item is now selected, but the previously-selected item is selected too. Notice that you can toggle the selected state of each item independently of the others.
Attachments
Patch
(8.79 KB, patch)
2017-02-17 06:49 PST
,
Antoine Quint
dino
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Antoine Quint
Comment 1
2017-02-13 01:59:10 PST
Indeed, this isn't as expected. I was mistakenly thinking we should support this since the media API supports it, but this is not what we want to do from a UI perspective.
Radar WebKit Bug Importer
Comment 2
2017-02-13 01:59:25 PST
<
rdar://problem/30488605
>
Antoine Quint
Comment 3
2017-02-17 06:49:07 PST
Created
attachment 301924
[details]
Patch
Dean Jackson
Comment 4
2017-02-17 11:48:23 PST
Comment on
attachment 301924
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=301924&action=review
> Source/WebCore/Modules/modern-media-controls/media/tracks-support.js:109 > + this._audioTracks().forEach((audioTrack, index) => audioTrack.enabled = index === trackIndex);
I'm not sure if this is allowed in WebKit style, but I'd appreciate () around the equality test. Err... maybe not. "Whatever, dude. Whatever."
> LayoutTests/media/modern-media-controls/tracks-support/tracks-support-click-track-in-panel.html:4 > +<video src="../../content/CC+Subtitles.mov" style="position: absolute; left: 0; top: 0; width: 640px; height: 360px;" controls autoplay></video>
Why did you have to do this?
> LayoutTests/media/modern-media-controls/tracks-support/tracks-support-click-track-in-panel.html:62 > + const newSelectedTrack = Array.from(media.audioTracks).findIndex(track => track.enabled);
Wow. I'd either forgotten or never heard of findIndex.
Antoine Quint
Comment 5
2017-02-17 13:31:40 PST
(In reply to
comment #4
)
> Comment on
attachment 301924
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=301924&action=review
> > > Source/WebCore/Modules/modern-media-controls/media/tracks-support.js:109 > > + this._audioTracks().forEach((audioTrack, index) => audioTrack.enabled = index === trackIndex); > > I'm not sure if this is allowed in WebKit style, but I'd appreciate () > around the equality test. Err... maybe not. "Whatever, dude. Whatever."
I guess I'll just leave it as-is then.
> > LayoutTests/media/modern-media-controls/tracks-support/tracks-support-click-track-in-panel.html:4 > > +<video src="../../content/CC+Subtitles.mov" style="position: absolute; left: 0; top: 0; width: 640px; height: 360px;" controls autoplay></video> > > Why did you have to do this?
I think this made obtaining metrics more predictable as logs were added to the document.
> > LayoutTests/media/modern-media-controls/tracks-support/tracks-support-click-track-in-panel.html:62 > > + const newSelectedTrack = Array.from(media.audioTracks).findIndex(track => track.enabled); > > Wow. I'd either forgotten or never heard of findIndex.
I implemented it 3 years ago, my only call to fame in the JSC world :)
Antoine Quint
Comment 6
2017-02-17 13:33:59 PST
Committed
r212571
: <
http://trac.webkit.org/changeset/212571
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug