[Webkit-unassigned] [Bug 113062] Cleanup text track selection logic
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Mar 22 13:25:40 PDT 2013
https://bugs.webkit.org/show_bug.cgi?id=113062
--- Comment #14 from Eric Carlson <eric.carlson at apple.com> 2013-03-22 13:28:07 PST ---
(In reply to comment #13)
> (From update of attachment 194603 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=194603&action=review
>
> r+, with a couple of nits.
>
> > Source/WebCore/page/CaptionUserPreferences.cpp:80
> > + setUserPrefersCaptions(false);
> > + setUserPrefersCaptions(false);
>
> Should the second line be "setUserPrefersSubtitles(false)"?
>
Oops, thanks!
> > Source/WebCore/page/CaptionUserPreferences.cpp:220
> > + return (languages.size() - languageMatchIndex) * 10;
>
> Why 10? This could be a constant which explains its importance.
>
I added a comment to clarify.
> > Source/WebCore/page/CaptionUserPreferencesMac.mm:634
> > + if (track->kind() == track->subtitlesKeyword())
> > + trackScore = 3;
> > + else {
> > + if (!track->isClosedCaptions())
> > + trackScore = 2;
> > + else
> > + trackScore = 1;
> > + }
> > + }
>
> This is confusingly structured. Could you make this an 'if...else if... else' instead?
>
Fixed
Thanks!
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the webkit-unassigned
mailing list