WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
Bug 190369
[WebVTT] Support inline WebVTT styles
https://bugs.webkit.org/show_bug.cgi?id=190369
Summary
[WebVTT] Support inline WebVTT styles
Per Arne Vollan
Reported
2018-10-08 13:10:18 PDT
Inline WebVTT styles are currently not supported in WebKit, see
https://w3c.github.io/webvtt/#styling
.
Attachments
Patch
(19.70 KB, patch)
2018-10-08 14:00 PDT
,
Per Arne Vollan
no flags
Details
Formatted Diff
Diff
Patch
(18.47 KB, patch)
2018-10-15 10:48 PDT
,
Per Arne Vollan
eric.carlson
: review+
Details
Formatted Diff
Diff
Patch
(18.47 KB, patch)
2018-10-16 09:46 PDT
,
Per Arne Vollan
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Per Arne Vollan
Comment 1
2018-10-08 13:10:59 PDT
rdar://problem/29265907
Per Arne Vollan
Comment 2
2018-10-08 14:00:27 PDT
Created
attachment 351812
[details]
Patch
Eric Carlson
Comment 3
2018-10-09 06:27:56 PDT
Comment on
attachment 351812
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=351812&action=review
> Source/WebCore/dom/ExtensionStyleSheets.cpp:151 > + for (auto styleSheet : *owningPage->webVTTStyleSheets()) {
const auto&
> Source/WebCore/dom/ExtensionStyleSheets.cpp:154 > + m_injectedAuthorStyleSheets.append(WTFMove(sheet));
Won't this make the style apply to *every* <track> in the document? Styles in a WebVTT file should only apply to the cues in one track.
> Source/WebCore/html/track/LoadableTextTrack.cpp:137 > +void LoadableTextTrack::newStyleSheetsAvailable(TextTrackLoader* loader)
TextTrackLoader&, and please file a bug about changing all TextTrackLoader* method parameters in this class.
> Source/WebCore/html/track/LoadableTextTrack.cpp:142 > + for (auto cssString : newStyleSheets)
const auto& cssString
> Source/WebCore/html/track/LoadableTextTrack.cpp:144 > + if (!newStyleSheets.isEmpty())
You could return immediately above if the vector is empty.
> Source/WebCore/html/track/WebVTTParser.cpp:359 > + if (line.startsWith("STYLE") && line.substring(regionIdentifierLength).isAllSpecialCharacters<isASpace>())
You need a new constant, "regionIdentifierLength" is wrong for STYLE
> LayoutTests/media/track/track-cue-css.html:19 > + waitForEvent('seeked', seeked);
Nit: this could be simplified to "waitForEvent('seeked', endTest);"
Per Arne Vollan
Comment 4
2018-10-15 10:48:28 PDT
Created
attachment 352345
[details]
Patch
Eric Carlson
Comment 5
2018-10-15 13:56:45 PDT
Comment on
attachment 352345
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=352345&action=review
> Source/WebCore/html/track/WebVTTParser.h:176 > + ParseState collectStyleSheet(const String& line);
Nit: "line" isn't necessary.
> Source/WebCore/loader/TextTrackLoader.h:75 > + void newStyleSheetsParsed() override;
Nit: override -> final
Per Arne Vollan
Comment 6
2018-10-16 09:46:54 PDT
Created
attachment 352464
[details]
Patch
Per Arne Vollan
Comment 7
2018-10-16 10:25:06 PDT
(In reply to Eric Carlson from
comment #5
)
> Comment on
attachment 352345
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=352345&action=review
> > > Source/WebCore/html/track/WebVTTParser.h:176 > > + ParseState collectStyleSheet(const String& line); > > Nit: "line" isn't necessary. > > > Source/WebCore/loader/TextTrackLoader.h:75 > > + void newStyleSheetsParsed() override; > > Nit: override -> final
Thanks for reviewing!
WebKit Commit Bot
Comment 8
2018-10-16 10:29:41 PDT
Comment on
attachment 352464
[details]
Patch Clearing flags on attachment: 352464 Committed
r237187
: <
https://trac.webkit.org/changeset/237187
>
Truitt Savell
Comment 9
2018-10-18 08:21:30 PDT
Looks like the new test media/track/track-cue-css.html added in
https://trac.webkit.org/changeset/237187/webkit
is a flakey image failure. History:
https://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=media%2Ftrack%2Ftrack-cue-css.html
Diff:
https://build.webkit.org/results/Apple%20High%20Sierra%20Release%20WK1%20(Tests)/r237255%20(8670)/media/track/track-cue-css-diffs.html
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