[webkit-reviews] review granted: [Bug 131311] Use displayNameForTrack instead of textTrack->label() for captions. : [Attachment 230618] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu May 1 16:14:30 PDT 2014
Darin Adler <darin at apple.com> has granted Jeremy Jones <jeremyj-wk at apple.com>'s
request for review:
Bug 131311: Use displayNameForTrack instead of textTrack->label() for captions.
https://bugs.webkit.org/show_bug.cgi?id=131311
Attachment 230618: Patch
https://bugs.webkit.org/attachment.cgi?id=230618&action=review
------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=230618&action=review
> Source/WebCore/platform/ios/WebVideoFullscreenModelMediaElement.h:53
> + void updateLegibleOptions();
This class has a strange organization. Normally in WebKit we put the private
members last and explicitly mark the section private.
> Source/WebCore/platform/ios/WebVideoFullscreenModelMediaElement.mm:126
> + } else if (event->type() == eventNames().addtrackEvent
> + || event->type() == eventNames().removetrackEvent)
I think this would read better on a single line.
> Source/WebCore/platform/ios/WebVideoFullscreenModelMediaElement.mm:231
> + CaptionUserPreferences* captionPreferences =
m_mediaElement->document().page()->group().captionPreferences();
If this can never be null it should be a reference instead of a pointer.
> Source/WebCore/platform/ios/WebVideoFullscreenModelMediaElement.mm:238
> + for (unsigned i = 0, length = m_legibleTracksForMenu.size(); i < length;
++i) {
> + RefPtr<TextTrack> textTrack = m_legibleTracksForMenu[i];
> +
legibleOptions.append(captionPreferences->displayNameForTrack(textTrack.get()))
;
> + }
This should use a modern C++ for loop:
for (auto& track : m_legibleTracksForMenu)
legibleOptions.append(preferences.displayNameForTrack(track.get()));
More information about the webkit-reviews
mailing list