Bug 157735 - Modernize Track classes' code
Summary: Modernize Track classes' code
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-15 20:37 PDT by Chris Dumez
Modified: 2016-05-16 09:36 PDT (History)
4 users (show)

See Also:


Attachments
Patch (60.24 KB, patch)
2016-05-15 20:45 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (61.74 KB, patch)
2016-05-15 21:05 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (61.82 KB, patch)
2016-05-16 09:07 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2016-05-15 20:37:54 PDT
Modernize Track classes' code a bit.
Comment 1 Chris Dumez 2016-05-15 20:45:26 PDT
Created attachment 278995 [details]
Patch
Comment 2 Chris Dumez 2016-05-15 21:05:24 PDT
Created attachment 278996 [details]
Patch
Comment 3 Eric Carlson 2016-05-16 09:04:09 PDT
Comment on attachment 278996 [details]
Patch

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

> Source/WebCore/html/HTMLMediaElement.cpp:4015
> +            TextTrack* track = trackList.item(i);

Why not use auto& here?

> Source/WebCore/html/track/VideoTrackList.cpp:90
> +        auto& track = downcast<VideoTrack>(*m_inbandTracks[i]);
> +        if (track.selected())

Nit: is the local necessary?
Comment 4 Chris Dumez 2016-05-16 09:05:08 PDT
Comment on attachment 278996 [details]
Patch

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

>> Source/WebCore/html/HTMLMediaElement.cpp:4015
>> +            TextTrack* track = trackList.item(i);
> 
> Why not use auto& here?

Will do.

>> Source/WebCore/html/track/VideoTrackList.cpp:90
>> +        if (track.selected())
> 
> Nit: is the local necessary?

I guess not :) Will update.
Comment 5 Chris Dumez 2016-05-16 09:07:13 PDT
Created attachment 279020 [details]
Patch
Comment 6 WebKit Commit Bot 2016-05-16 09:36:30 PDT
Comment on attachment 279020 [details]
Patch

Clearing flags on attachment: 279020

Committed r200943: <http://trac.webkit.org/changeset/200943>
Comment 7 WebKit Commit Bot 2016-05-16 09:36:35 PDT
All reviewed patches have been landed.  Closing bug.