Changeset 241203 in webkit
- Timestamp:
- Feb 8, 2019 11:48:04 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r241200 r241203 1 2019-02-08 Per Arne Vollan <pvollan@apple.com> 2 3 [WebVTT] Inline WebVTT styles should start with '::cue' 4 https://bugs.webkit.org/show_bug.cgi?id=194227 5 <rdar://problem/47791087> 6 7 Reviewed by Eric Carlson. 8 9 * media/track/captions-webvtt/css-styling.vtt: 10 1 11 2019-02-08 Youenn Fablet <youenn@apple.com> 2 12 -
trunk/LayoutTests/media/track/captions-webvtt/css-styling.vtt
r239181 r241203 13 13 14 14 STYLE 15 video::cue {15 ::cue { 16 16 color: green; 17 17 font-size: 15px; 18 } 19 20 NOTE the following style block has a syntax error. 21 22 STYLE 23 ::cue { 24 color: blue 25 font-size: 25px; 26 } 27 28 STYLE 29 video::cue { 30 color: blue; 31 font-size: 25px; 18 32 } 19 33 -
trunk/Source/WebCore/ChangeLog
r241200 r241203 1 2019-02-08 Per Arne Vollan <pvollan@apple.com> 2 3 [WebVTT] Inline WebVTT styles should start with '::cue' 4 https://bugs.webkit.org/show_bug.cgi?id=194227 5 <rdar://problem/47791087> 6 7 Reviewed by Eric Carlson. 8 9 Check that the CSS string starts with '::cue' and is successfully parsed before adding it 10 to the CSS stylesheet list. Also, the caption preferences CSS string should start with 11 '::cue', since it is added inside the video shadow root element. 12 13 Test: media/track/track-cue-css.html 14 15 * html/track/WebVTTParser.cpp: 16 (WebCore::WebVTTParser::checkAndStoreStyleSheet): 17 * page/CaptionUserPreferencesMediaAF.cpp: 18 (WebCore::CaptionUserPreferencesMediaAF::captionsStyleSheetOverride const): 19 1 20 2019-02-08 Youenn Fablet <youenn@apple.com> 2 21 -
trunk/Source/WebCore/html/track/WebVTTParser.cpp
r239535 r241203 40 40 #include "ISOVTTCue.h" 41 41 #include "ProcessingInstruction.h" 42 #include "StyleSheetContents.h" 42 43 #include "Text.h" 43 44 #include "VTTScanner.h" … … 368 369 if (!line.isEmpty() && !line.contains("-->")) 369 370 return false; 371 372 auto styleSheet = m_currentStyleSheet.stripWhiteSpace(); 373 374 // Inline VTT styles must start with ::cue. 375 if (!styleSheet.startsWith("::cue")) { 376 m_currentStyleSheet = emptyString(); 377 return true; 378 } 379 380 auto contents = StyleSheetContents::create(); 381 if (!contents->parseString(styleSheet)) { 382 m_currentStyleSheet = emptyString(); 383 return true; 384 } 370 385 371 386 m_styleSheets.append(WTFMove(m_currentStyleSheet)); -
trunk/Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp
r240892 r241203 568 568 String background = captionsBackgroundCSS(); 569 569 if (!background.isEmpty() || !captionsColor.isEmpty() || !edgeStyle.isEmpty() || !fontName.isEmpty()) { 570 captionsOverrideStyleSheet.appendLiteral(" video::");570 captionsOverrideStyleSheet.appendLiteral(" ::"); 571 571 captionsOverrideStyleSheet.append(TextTrackCue::cueShadowPseudoId()); 572 572 captionsOverrideStyleSheet.append('{'); … … 587 587 String windowCornerRadius = windowRoundedCornerRadiusCSS(); 588 588 if (!windowColor.isEmpty() || !windowCornerRadius.isEmpty()) { 589 captionsOverrideStyleSheet.appendLiteral(" video::");589 captionsOverrideStyleSheet.appendLiteral(" ::"); 590 590 captionsOverrideStyleSheet.append(VTTCue::cueBackdropShadowPseudoId()); 591 591 captionsOverrideStyleSheet.append('{');
Note: See TracChangeset
for help on using the changeset viewer.