WebKit Bugzilla
Attachment 361516 Details for
Bug 194227
: [WebVTT] Inline WebVTT styles should start with '::cue'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-194227-20190208105231.patch (text/plain), 4.67 KB, created by
Per Arne Vollan
on 2019-02-08 10:52:31 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Per Arne Vollan
Created:
2019-02-08 10:52:31 PST
Size:
4.67 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 241197) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,22 @@ >+2019-02-08 Per Arne Vollan <pvollan@apple.com> >+ >+ [WebVTT] Inline WebVTT styles should start with '::cue' >+ https://bugs.webkit.org/show_bug.cgi?id=194227 >+ <rdar://problem/47791087> >+ >+ Reviewed by Eric Carlson. >+ >+ Check that the CSS string starts with '::cue' and is successfully parsed before adding it >+ to the CSS stylesheet list. Also, the caption preferences CSS string should start with >+ '::cue', since it is added inside the video shadow root element. >+ >+ Test: media/track/track-cue-css.html >+ >+ * html/track/WebVTTParser.cpp: >+ (WebCore::WebVTTParser::checkAndStoreStyleSheet): >+ * page/CaptionUserPreferencesMediaAF.cpp: >+ (WebCore::CaptionUserPreferencesMediaAF::captionsStyleSheetOverride const): >+ > 2019-02-08 Sihui Liu <sihui_liu@apple.com> > > IndexedDB tests leak documents >Index: Source/WebCore/html/track/WebVTTParser.cpp >=================================================================== >--- Source/WebCore/html/track/WebVTTParser.cpp (revision 241197) >+++ Source/WebCore/html/track/WebVTTParser.cpp (working copy) >@@ -39,6 +39,7 @@ > #include "HTMLParserIdioms.h" > #include "ISOVTTCue.h" > #include "ProcessingInstruction.h" >+#include "StyleSheetContents.h" > #include "Text.h" > #include "VTTScanner.h" > #include "WebVTTElement.h" >@@ -368,6 +369,20 @@ bool WebVTTParser::checkAndStoreStyleShe > if (!line.isEmpty() && !line.contains("-->")) > return false; > >+ auto styleSheet = m_currentStyleSheet.stripWhiteSpace(); >+ >+ // Inline VTT styles must start with ::cue. >+ if (!styleSheet.startsWith("::cue")) { >+ m_currentStyleSheet = emptyString(); >+ return true; >+ } >+ >+ auto contents = StyleSheetContents::create(); >+ if (!contents->parseString(styleSheet)) { >+ m_currentStyleSheet = emptyString(); >+ return true; >+ } >+ > m_styleSheets.append(WTFMove(m_currentStyleSheet)); > return true; > } >Index: Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp >=================================================================== >--- Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp (revision 241197) >+++ Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp (working copy) >@@ -567,7 +567,7 @@ String CaptionUserPreferencesMediaAF::ca > String fontName = captionsDefaultFontCSS(); > String background = captionsBackgroundCSS(); > if (!background.isEmpty() || !captionsColor.isEmpty() || !edgeStyle.isEmpty() || !fontName.isEmpty()) { >- captionsOverrideStyleSheet.appendLiteral(" video::"); >+ captionsOverrideStyleSheet.appendLiteral(" ::"); > captionsOverrideStyleSheet.append(TextTrackCue::cueShadowPseudoId()); > captionsOverrideStyleSheet.append('{'); > >@@ -586,7 +586,7 @@ String CaptionUserPreferencesMediaAF::ca > String windowColor = captionsWindowCSS(); > String windowCornerRadius = windowRoundedCornerRadiusCSS(); > if (!windowColor.isEmpty() || !windowCornerRadius.isEmpty()) { >- captionsOverrideStyleSheet.appendLiteral(" video::"); >+ captionsOverrideStyleSheet.appendLiteral(" ::"); > captionsOverrideStyleSheet.append(VTTCue::cueBackdropShadowPseudoId()); > captionsOverrideStyleSheet.append('{'); > >Index: LayoutTests/ChangeLog >=================================================================== >--- LayoutTests/ChangeLog (revision 241197) >+++ LayoutTests/ChangeLog (working copy) >@@ -1,3 +1,13 @@ >+2019-02-08 Per Arne Vollan <pvollan@apple.com> >+ >+ [WebVTT] Inline WebVTT styles should start with '::cue' >+ https://bugs.webkit.org/show_bug.cgi?id=194227 >+ <rdar://problem/47791087> >+ >+ Reviewed by Eric Carlson. >+ >+ * media/track/captions-webvtt/css-styling.vtt: >+ > 2019-02-08 Eric Liang <ericliang@apple.com> > > Check if receive AXPressDidFail notification when performing AXPress action on disabled MenuList. >Index: LayoutTests/media/track/captions-webvtt/css-styling.vtt >=================================================================== >--- LayoutTests/media/track/captions-webvtt/css-styling.vtt (revision 241197) >+++ LayoutTests/media/track/captions-webvtt/css-styling.vtt (working copy) >@@ -12,11 +12,25 @@ font-size: 15px; > } > > STYLE >-video::cue { >+::cue { > color: green; > font-size: 15px; > } > >+NOTE the following style block has a syntax error. >+ >+STYLE >+::cue { >+color: blue >+font-size: 25px; >+} >+ >+STYLE >+video::cue { >+color: blue; >+font-size: 25px; >+} >+ > hello > 00:00:00.000 --> 00:00:10.000 > <b>Hello</b> first cue.
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194227
:
361081
|
361083
|
361514
|
361516
|
361956
|
361959
|
362030
|
362045
|
362069
|
362120