Closed
Bug 1278748
Opened 8 years ago
Closed 8 years ago
[webvtt] Fix the fail for "webvtt/webvtt-file-format-parsing/webvtt-file-parsing/001.html"
Categories
(Core :: Audio/Video: Playback, defect, P3)
Tracking
()
RESOLVED
FIXED
mozilla50
Tracking | Status | |
---|---|---|
firefox50 | --- | fixed |
People
(Reporter: alwu, Assigned: alwu)
References
(Blocks 1 open bug)
Details
Attachments
(7 files)
58 bytes,
text/x-review-board-request
|
rillian
:
review+
|
Details |
58 bytes,
text/x-review-board-request
|
rillian
:
review+
|
Details |
58 bytes,
text/x-review-board-request
|
rillian
:
review+
|
Details |
58 bytes,
text/x-review-board-request
|
rillian
:
review+
|
Details |
58 bytes,
text/x-review-board-request
|
rillian
:
review+
|
Details |
58 bytes,
text/x-review-board-request
|
rillian
:
review+
|
Details |
58 bytes,
text/x-review-board-request
|
rillian
:
review+
|
Details |
Need to pass more tests!
Updated•8 years ago
|
Priority: -- → P2
Assignee | ||
Comment 1•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/61194/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/61194/
Assignee | ||
Comment 2•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/61196/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/61196/
Assignee | ||
Comment 3•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/61198/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/61198/
Assignee | ||
Comment 4•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/61200/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/61200/
Assignee | ||
Comment 5•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/61202/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/61202/
Assignee | ||
Comment 6•8 years ago
|
||
This file still has 9 fails, I'm working on that.
Assignee | ||
Comment 7•8 years ago
|
||
The remaining fails are related with the parsing algorithm, it's little complex.
Therefore, I open the bug1283803 to solve it independently.
Assignee | ||
Comment 8•8 years ago
|
||
Assignee | ||
Comment 9•8 years ago
|
||
There are some mistakes in the parsing rule part in the spec, so I'm discussing it [1] with the spec's author.
[1] https://github.com/w3c/webvtt/issues/310
Assignee | ||
Comment 10•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/62338/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/62338/
Assignee | ||
Comment 11•8 years ago
|
||
Comment on attachment 8766205 [details]
Bug 1278748 - part1 : cue's attribute can be set multiple times.
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/61194/diff/1-2/
Assignee | ||
Comment 12•8 years ago
|
||
Comment on attachment 8766206 [details]
Bug 1278748 - part2 : correct default value of webidl's property.
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/61196/diff/1-2/
Assignee | ||
Comment 13•8 years ago
|
||
Comment on attachment 8766207 [details]
Bug 1278748 - part3 : change align from 'middle' to 'center'.
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/61198/diff/1-2/
Assignee | ||
Comment 14•8 years ago
|
||
Comment on attachment 8766208 [details]
Bug 1278748 - part4 : should not throw error if the correct signature doesn't follow with new line.
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/61200/diff/1-2/
Assignee | ||
Comment 15•8 years ago
|
||
Comment on attachment 8766209 [details]
Bug 1278748 - part5 : the value of position and line are double.
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/61202/diff/1-2/
Mass change P2 -> P3
Priority: P2 → P3
Assignee | ||
Comment 17•8 years ago
|
||
Definition of the space character : https://html.spec.whatwg.org/multipage/infrastructure.html#space-character
Review commit: https://reviewboard.mozilla.org/r/62598/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/62598/
Attachment #8768301 -
Flags: review?(giles)
Attachment #8766205 -
Flags: review?(giles)
Attachment #8766206 -
Flags: review?(giles)
Attachment #8766207 -
Flags: review?(giles)
Attachment #8766208 -
Flags: review?(giles)
Attachment #8766209 -
Flags: review?(giles)
Attachment #8767939 -
Flags: review?(giles)
Assignee | ||
Comment 18•8 years ago
|
||
Comment on attachment 8766205 [details]
Bug 1278748 - part1 : cue's attribute can be set multiple times.
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/61194/diff/2-3/
Assignee | ||
Comment 19•8 years ago
|
||
Comment on attachment 8766206 [details]
Bug 1278748 - part2 : correct default value of webidl's property.
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/61196/diff/2-3/
Assignee | ||
Comment 20•8 years ago
|
||
Comment on attachment 8766207 [details]
Bug 1278748 - part3 : change align from 'middle' to 'center'.
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/61198/diff/2-3/
Assignee | ||
Comment 21•8 years ago
|
||
Comment on attachment 8766208 [details]
Bug 1278748 - part4 : should not throw error if the correct signature doesn't follow with new line.
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/61200/diff/2-3/
Assignee | ||
Comment 22•8 years ago
|
||
Comment on attachment 8766209 [details]
Bug 1278748 - part5 : the value of position and line are double.
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/61202/diff/2-3/
Assignee | ||
Comment 23•8 years ago
|
||
Comment on attachment 8767939 [details]
Bug 1278748 - part6 : modify timestamp parsing rule.
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/62338/diff/1-2/
Comment 24•8 years ago
|
||
Comment on attachment 8766205 [details]
Bug 1278748 - part1 : cue's attribute can be set multiple times.
https://reviewboard.mozilla.org/r/61194/#review59536
Attachment #8766205 -
Flags: review?(giles) → review+
Comment 25•8 years ago
|
||
Comment on attachment 8766206 [details]
Bug 1278748 - part2 : correct default value of webidl's property.
https://reviewboard.mozilla.org/r/61196/#review59540
Attachment #8766206 -
Flags: review?(giles) → review+
Comment 26•8 years ago
|
||
Comment on attachment 8766207 [details]
Bug 1278748 - part3 : change align from 'middle' to 'center'.
https://reviewboard.mozilla.org/r/61198/#review59542
Attachment #8766207 -
Flags: review?(giles) → review+
Comment 27•8 years ago
|
||
Comment on attachment 8766208 [details]
Bug 1278748 - part4 : should not throw error if the correct signature doesn't follow with new line.
https://reviewboard.mozilla.org/r/61200/#review59544
Attachment #8766208 -
Flags: review?(giles) → review+
Comment 28•8 years ago
|
||
Comment on attachment 8766209 [details]
Bug 1278748 - part5 : the value of position and line are double.
https://reviewboard.mozilla.org/r/61202/#review59546
Attachment #8766209 -
Flags: review?(giles) → review+
Updated•8 years ago
|
Attachment #8767939 -
Flags: review?(giles) → review+
Comment 29•8 years ago
|
||
Comment on attachment 8767939 [details]
Bug 1278748 - part6 : modify timestamp parsing rule.
https://reviewboard.mozilla.org/r/62338/#review59556
::: dom/media/webvtt/vtt.jsm:77
(Diff revision 2)
> + }
> return (h | 0) * 3600 + (m | 0) * 60 + (s | 0) + (f | 0) / 1000;
> }
>
> - var m = input.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);
> - if (!m) {
> + var timestamp = input.match(/^(\d+:)?\d{2}:\d{2}\.\d+/);
> + if (!timestamp) {
Do you need to capture the first stanza here? I don't see `timestamp[1]` referenced.
Might be worth capturing the milliseconds field though, so you can use the regexp to do the work of the later split to check the length.
Comment 30•8 years ago
|
||
Comment on attachment 8768301 [details]
Bug 1278748 - part7 : vertical tab isn't a space characters.
https://reviewboard.mozilla.org/r/62598/#review59564
Nice that the test caught this error!
Attachment #8768301 -
Flags: review?(giles) → review+
Assignee | ||
Comment 31•8 years ago
|
||
Comment on attachment 8766205 [details]
Bug 1278748 - part1 : cue's attribute can be set multiple times.
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/61194/diff/3-4/
Assignee | ||
Comment 32•8 years ago
|
||
Comment on attachment 8766206 [details]
Bug 1278748 - part2 : correct default value of webidl's property.
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/61196/diff/3-4/
Assignee | ||
Comment 33•8 years ago
|
||
Comment on attachment 8766207 [details]
Bug 1278748 - part3 : change align from 'middle' to 'center'.
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/61198/diff/3-4/
Assignee | ||
Comment 34•8 years ago
|
||
Comment on attachment 8766208 [details]
Bug 1278748 - part4 : should not throw error if the correct signature doesn't follow with new line.
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/61200/diff/3-4/
Assignee | ||
Comment 35•8 years ago
|
||
Comment on attachment 8766209 [details]
Bug 1278748 - part5 : the value of position and line are double.
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/61202/diff/3-4/
Assignee | ||
Comment 36•8 years ago
|
||
Comment on attachment 8767939 [details]
Bug 1278748 - part6 : modify timestamp parsing rule.
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/62338/diff/2-3/
Assignee | ||
Comment 37•8 years ago
|
||
Comment on attachment 8768301 [details]
Bug 1278748 - part7 : vertical tab isn't a space characters.
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/62598/diff/1-2/
Assignee | ||
Updated•8 years ago
|
Attachment #8767939 -
Flags: review+ → review?(giles)
Assignee | ||
Comment 38•8 years ago
|
||
Just for record, we fix 17 web-platform-tests in this bug.
Comment 39•8 years ago
|
||
Comment on attachment 8767939 [details]
Bug 1278748 - part6 : modify timestamp parsing rule.
https://reviewboard.mozilla.org/r/62338/#review60488
Thanks for fixing all this up. 14 new tests passing is really good!
::: dom/media/webvtt/vtt.jsm:81
(Diff revision 3)
> + }
> return (h | 0) * 3600 + (m | 0) * 60 + (s | 0) + (f | 0) / 1000;
> }
>
> - var m = input.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);
> - if (!m) {
> + var timestamp = input.match(/^((\d+:)?(\d{2}):(\d{2}))\.(\d+)/);
> + if (!timestamp || timestamp.length !== 6) {
That's better, thanks. The logic of the timestamp[1] capture is a little non-obvious, but I'm not sure a comment helps with a regex unless it's a whole paragraph explaining the technique.
Attachment #8767939 -
Flags: review?(giles) → review+
Assignee | ||
Comment 40•8 years ago
|
||
(In reply to Ralph Giles (:rillian) needinfo me from comment #39)
> That's better, thanks. The logic of the timestamp[1] capture is a little
> non-obvious, but I'm not sure a comment helps with a regex unless it's a
> whole paragraph explaining the technique.
Ah, I think we could modify the regex not to capture the timestamp[1].
Thanks!
Assignee | ||
Comment 41•8 years ago
|
||
Comment on attachment 8766205 [details]
Bug 1278748 - part1 : cue's attribute can be set multiple times.
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/61194/diff/4-5/
Assignee | ||
Comment 42•8 years ago
|
||
Comment on attachment 8766206 [details]
Bug 1278748 - part2 : correct default value of webidl's property.
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/61196/diff/4-5/
Assignee | ||
Comment 43•8 years ago
|
||
Comment on attachment 8766207 [details]
Bug 1278748 - part3 : change align from 'middle' to 'center'.
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/61198/diff/4-5/
Assignee | ||
Comment 44•8 years ago
|
||
Comment on attachment 8766208 [details]
Bug 1278748 - part4 : should not throw error if the correct signature doesn't follow with new line.
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/61200/diff/4-5/
Assignee | ||
Comment 45•8 years ago
|
||
Comment on attachment 8766209 [details]
Bug 1278748 - part5 : the value of position and line are double.
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/61202/diff/4-5/
Assignee | ||
Comment 46•8 years ago
|
||
Comment on attachment 8767939 [details]
Bug 1278748 - part6 : modify timestamp parsing rule.
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/62338/diff/3-4/
Assignee | ||
Comment 47•8 years ago
|
||
Comment on attachment 8768301 [details]
Bug 1278748 - part7 : vertical tab isn't a space characters.
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/62598/diff/2-3/
Comment 48•8 years ago
|
||
Pushed by alwu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bd048078af43
part1 : cue's attribute can be set multiple times. r=rillian
https://hg.mozilla.org/integration/autoland/rev/7c48311a55d2
part2 : correct default value of webidl's property. r=rillian
https://hg.mozilla.org/integration/autoland/rev/c32d76936446
part3 : change align from 'middle' to 'center'. r=rillian
https://hg.mozilla.org/integration/autoland/rev/59c445c3e604
part4 : should not throw error if the correct signature doesn't follow with new line. r=rillian
https://hg.mozilla.org/integration/autoland/rev/2905747bae6e
part5 : the value of position and line are double. r=rillian
https://hg.mozilla.org/integration/autoland/rev/3414ed32d520
part6 : modify timestamp parsing rule. r=rillian
https://hg.mozilla.org/integration/autoland/rev/9b1032ae8fac
part7 : vertical tab isn't a space characters. r=rillian
Comment 49•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/bd048078af43
https://hg.mozilla.org/mozilla-central/rev/7c48311a55d2
https://hg.mozilla.org/mozilla-central/rev/c32d76936446
https://hg.mozilla.org/mozilla-central/rev/59c445c3e604
https://hg.mozilla.org/mozilla-central/rev/2905747bae6e
https://hg.mozilla.org/mozilla-central/rev/3414ed32d520
https://hg.mozilla.org/mozilla-central/rev/9b1032ae8fac
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox50:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in
before you can comment on or make changes to this bug.
Description
•