Bug 133350 - Perserve caption selection in fullscreen.
Summary: Perserve caption selection in fullscreen.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: iPhone / iPad Unspecified
: P2 Normal
Assignee: Jeremy Jones
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-28 11:00 PDT by Jeremy Jones
Modified: 2014-05-29 09:42 PDT (History)
9 users (show)

See Also:


Attachments
Patch (4.79 KB, patch)
2014-05-28 11:10 PDT, Jeremy Jones
no flags Details | Formatted Diff | Diff
Patch (4.47 KB, patch)
2014-05-28 17:04 PDT, Jeremy Jones
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Jones 2014-05-28 11:00:58 PDT
Perserve caption selection in fullscreen.
Comment 1 Jeremy Jones 2014-05-28 11:01:53 PDT
radar://17046725
Comment 2 Jeremy Jones 2014-05-28 11:10:00 PDT
Created attachment 232206 [details]
Patch
Comment 3 Eric Carlson 2014-05-28 11:22:58 PDT
Comment on attachment 232206 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=232206&action=review

> Source/WebCore/ChangeLog:8
> +        Use the logic from the line player to calculate the selected caption index.

Nit: "from the line player" -> "from the inline player"

> Source/WebCore/platform/ios/WebVideoFullscreenModelMediaElement.mm:297
> +    if (trackList && m_mediaElement->document().page() && m_mediaElement->mediaControlsHost()) {

This should be an early return.

> Source/WebCore/platform/ios/WebVideoFullscreenModelMediaElement.mm:303
> +        Vector<String> legibleOptions;

Nit: I had to read through the code to figure out what "legibleOptions" meant, so something like "trackDisplayNames" might be better.

> Source/WebCore/platform/ios/WebVideoFullscreenModelMediaElement.mm:326
> +        if (offIndex && displayMode == MediaControlsHost::forcedOnlyKeyword() && !trackMenuItemSelected) {

Nit: "!trackMenuItemSelected" is cheaper than "displayMode == MediaControlsHost::forcedOnlyKeyword()" so it should be first.
Comment 4 Jeremy Jones 2014-05-28 17:04:32 PDT
Created attachment 232222 [details]
Patch
Comment 5 WebKit Commit Bot 2014-05-29 09:41:58 PDT
Comment on attachment 232222 [details]
Patch

Clearing flags on attachment: 232222

Committed r169450: <http://trac.webkit.org/changeset/169450>
Comment 6 WebKit Commit Bot 2014-05-29 09:42:02 PDT
All reviewed patches have been landed.  Closing bug.