WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
130491
Merge Misc. WebVTT Updates from Blink
https://bugs.webkit.org/show_bug.cgi?id=130491
Summary
Merge Misc. WebVTT Updates from Blink
Brent Fulgham
Reported
2014-03-19 18:06:55 PDT
This bug merges a set of WebVTT changes from Blink: 1. Remove virtual destructor for WebVTTParser fb62b2b54944bd19026192c049a1db250756fc12
https://codereview.chromium.org/40323003
ch.dumez@samsung.com
2. Make WebVTTParser::collectTimeStamp static 29176fb0b394a97e85f4dabc07e18329f3ceae41
https://codereview.chromium.org/54463002
fs@opera.com
3. Handle empty lines in the 'TimingsAndSettings' state in the WebVTTParser 29476f839a08cb17c5a3fc713f7e454e7cea9c60
https://codereview.chromium.org/55853002
fs@opera.com
4. Make metadata state local in the WebVTT parser ba2378ef873e786cf2937034e012669cdd37dfe8
https://codereview.chromium.org/65343003
fs@opera.com
5. The WebVTT parsing algorithm allows empty cue text 1915b9aa1bba45aebf28531b40ae627ecf9a3d59
https://codereview.chromium.org/62833005
fs@opera.com
6. Update WebVTT parser spec references ea46dbd0f1f29779a1cd4f59b19361b803f09a9b
https://codereview.chromium.org/64273013
fs@opera.com
7. Add new helper VTTParser::collectDigitsToInt 9eb4bb6b627357bb94d66386a4123ec004cccfc4
https://codereview.chromium.org/101513002
fs@opera.com
8. Make VTTParser::collectDigitsToInt non-copying 192a843b32eafb77bf92c50ec50d334ba935028a
https://codereview.chromium.org/102403002
fs@opera.com
9. Simplify VTTParser::collectTimeStamp 15f9efcc952fcf73184e28fb9db79633c1fa6653
https://codereview.chromium.org/104443002
fs@opera.com
10. Replace character vectors with StringBuilders in the WebVTT tokenizer 74fd66b451a464683f7cb748855b1740a54b2c16
https://codereview.chromium.org/75243004
fs@opera.com
Attachments
Patch
(40.00 KB, patch)
2014-03-19 18:15 PDT
,
Brent Fulgham
eric.carlson
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Brent Fulgham
Comment 1
2014-03-19 18:15:47 PDT
Created
attachment 227240
[details]
Patch
Eric Carlson
Comment 2
2014-03-19 18:29:25 PDT
Comment on
attachment 227240
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=227240&action=review
> Source/WebCore/html/track/VTTCue.cpp:989 > // NOTE: toInt ignores trailing non-digit characters, such as '%'.
This comment is no longer necessary because we don't use toInt.
> LayoutTests/ChangeLog:31 > + * media/track/track-webvtt-tc027-empty-cue-expected.txt: Marke one test as expected to fail, since
Nit: "Marke"
Brent Fulgham
Comment 3
2014-03-19 19:55:42 PDT
Committed
r165942
: <
http://trac.webkit.org/changeset/165942
>
Xabier Rodríguez Calvar
Comment 4
2014-03-20 01:52:19 PDT
Comment on
attachment 227240
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=227240&action=review
I had a very quick look at the style without entering the contents and made a small comment
> Source/WebCore/html/track/VTTCue.cpp:973 > + if (!WebVTTParser::collectDigitsToInt(input, &position, number))
This API seems a bit incoherent to me because in a case you pass a pointer to a number and in the other case you pass a reference to a number. For my taste it is more logical and less error prone to stick to one. If you ask me, I'd go for the pointer.
> Source/WebCore/html/track/WebVTTParser.cpp:61 > +unsigned WebVTTParser::collectDigitsToInt(const String& input, unsigned* position, int& number)
Me previous content refers to this API, of course.
Eric Carlson
Comment 5
2014-03-20 07:56:42 PDT
(In reply to
comment #4
)
> (From update of
attachment 227240
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=227240&action=review
> > I had a very quick look at the style without entering the contents and made a small comment > > > Source/WebCore/html/track/VTTCue.cpp:973 > > + if (!WebVTTParser::collectDigitsToInt(input, &position, number)) > > This API seems a bit incoherent to me because in a case you pass a pointer to a number and in the other case you pass a reference to a number. For my taste it is more logical and less error prone to stick to one. If you ask me, I'd go for the pointer. >
Good point, I should have thought of that! I vote for passing a reference for both position and value because neither can ever be NULL.
Xabier Rodríguez Calvar
Comment 6
2014-03-21 04:21:19 PDT
(In reply to
comment #5
)
> (In reply to
comment #4
) > > (From update of
attachment 227240
[details]
[details]) > > View in context:
https://bugs.webkit.org/attachment.cgi?id=227240&action=review
> > > > I had a very quick look at the style without entering the contents and made a small comment > > > > > Source/WebCore/html/track/VTTCue.cpp:973 > > > + if (!WebVTTParser::collectDigitsToInt(input, &position, number)) > > > > This API seems a bit incoherent to me because in a case you pass a pointer to a number and in the other case you pass a reference to a number. For my taste it is more logical and less error prone to stick to one. If you ask me, I'd go for the pointer. > > > > Good point, I should have thought of that! > > I vote for passing a reference for both position and value because neither can ever be NULL.
Of course your vote weights more than mine, but I'd prefer pointer because the in/out becomes completely clear without the need of specifying any const as parameters are passed as value by default. Maybe it's a reminiscence of my pure C programming skills ;)
Xabier Rodríguez Calvar
Comment 7
2014-03-21 04:25:22 PDT
(In reply to
comment #5
)
> > This API seems a bit incoherent to me because in a case you pass a pointer to a number and in the other case you pass a reference to a number. For my taste it is more logical and less error prone to stick to one. If you ask me, I'd go for the pointer. > > > > Good point, I should have thought of that!
Btw, I don't know if Brent thinks of a small follow up patch to fix this nit.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug