Bug 88583 - Update the TextTrackCue Constructor
Summary: Update the TextTrackCue Constructor
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Anna Cavender
URL:
Keywords:
Depends on:
Blocks: 85035
  Show dependency treegraph
 
Reported: 2012-06-07 15:22 PDT by Victor Carbune
Modified: 2012-08-22 14:24 PDT (History)
7 users (show)

See Also:


Attachments
Patch (9.94 KB, patch)
2012-08-21 22:44 PDT, Anna Cavender
no flags Details | Formatted Diff | Diff
adding check for NaN (12.48 KB, patch)
2012-08-22 11:09 PDT, Anna Cavender
no flags Details | Formatted Diff | Diff
Patch for landing (12.77 KB, patch)
2012-08-22 12:40 PDT, Anna Cavender
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Carbune 2012-06-07 15:22:38 PDT
The TextTrackCue constructor has been changed to:
[Constructor(double startTime, double endTime, DOMString text)]

http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#texttrackcue
Comment 1 Anna Cavender 2012-08-21 22:44:09 PDT
Created attachment 159863 [details]
Patch
Comment 2 Anna Cavender 2012-08-22 11:09:34 PDT
Created attachment 159967 [details]
adding check for NaN
Comment 3 Eric Carlson 2012-08-22 11:35:01 PDT
Comment on attachment 159967 [details]
adding check for NaN

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

> Source/WebCore/html/track/TextTrackCue.cpp:92
> +    : m_id(emptyString())

I don't think we need to distinguishable between a null and an empty string so this should be unnecessary.

> Source/WebCore/html/track/TextTrackCue.h:93
> +    void parseSettings(const String&);

parseSettings was OK as a private method name but not so much as public method name because, for example, we don't necessarily need to parse the settings string immediately (although we do now) . The spec talks about "WebVTT cue settings" so how about "setCueSettings" instead?
Comment 4 Anna Cavender 2012-08-22 12:26:58 PDT
Comment on attachment 159967 [details]
adding check for NaN

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

Thanks!

>> Source/WebCore/html/track/TextTrackCue.cpp:92
>> +    : m_id(emptyString())
> 
> I don't think we need to distinguishable between a null and an empty string so this should be unnecessary.

OK.  Gone.

>> Source/WebCore/html/track/TextTrackCue.h:93
>> +    void parseSettings(const String&);
> 
> parseSettings was OK as a private method name but not so much as public method name because, for example, we don't necessarily need to parse the settings string immediately (although we do now) . The spec talks about "WebVTT cue settings" so how about "setCueSettings" instead?

Done.
Comment 5 Anna Cavender 2012-08-22 12:40:17 PDT
Created attachment 159993 [details]
Patch for landing
Comment 6 WebKit Review Bot 2012-08-22 14:24:07 PDT
Comment on attachment 159993 [details]
Patch for landing

Clearing flags on attachment: 159993

Committed r126350: <http://trac.webkit.org/changeset/126350>
Comment 7 WebKit Review Bot 2012-08-22 14:24:11 PDT
All reviewed patches have been landed.  Closing bug.