Changeset 141795 in webkit
- Timestamp:
- Feb 4, 2013 1:00:26 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r141791 r141795 1 2013-02-04 Dima Gorbik <dgorbik@apple.com> 2 3 Implemet :lang() pseudo class support for the WebVTT ::cue pseudo element 4 https://bugs.webkit.org/show_bug.cgi?id=105478 5 6 Reviewed by Antti Koivisto. 7 8 * media/track/captions-webvtt/styling-lang.vtt: 9 * media/track/track-css-matching-lang-expected.txt: 10 * media/track/track-css-matching-lang.html: 11 1 12 2013-02-04 Tom Sepez <tsepez@chromiium.org> 2 13 -
trunk/LayoutTests/media/track/captions-webvtt/styling-lang.vtt
r140877 r141795 2 2 3 3 1 4 00:00.000 --> 00:0 1.0004 00:00.000 --> 00:00.500 5 5 <lang en><c>English<lang ru><c> Русский<lang en><c> English again</c></lang></c></lang></c></lang> 6 7 2 8 00:00.500 --> 00:01.000 9 <lang en><i>English<lang ru><b> Русский<lang en><u> English again</u></lang></b></lang></i></lang> -
trunk/LayoutTests/media/track/track-css-matching-lang-expected.txt
r140877 r141795 5 5 EXPECTED (getComputedStyle(cueNode).color == 'rgb(255, 0, 0)') OK 6 6 EXPECTED (getComputedStyle(cueNode).color == 'rgb(0, 128, 0)') OK 7 8 RUN(video.currentTime = 0.6) 9 EVENT(seeked) 10 EXPECTED (getComputedStyle(cueNode).color == 'rgb(128, 0, 128)') OK 11 EXPECTED (getComputedStyle(cueNode).color == 'rgb(0, 255, 0)') OK 12 EXPECTED (getComputedStyle(cueNode).color == 'rgb(128, 0, 128)') OK 7 13 END OF TEST 8 14 -
trunk/LayoutTests/media/track/track-css-matching-lang.html
r140877 r141795 9 9 10 10 <style> 11 ::cue(:lang(ru)) { color: lime; } 12 ::cue(:lang(en)) { color: purple; } 11 13 ::cue(c[lang="ru"]) { color: red; } 12 14 ::cue(c[lang="en"]) { color: green; } … … 17 19 var cueNode; 18 20 var seekedCount = 0; 19 var seekTimes = [0.1 ];21 var seekTimes = [0.1, 0.6]; 20 22 21 var info = [["rgb(0, 128, 0)", "rgb(255, 0, 0)", "rgb(0, 128, 0)"]]; 23 var info = [["rgb(0, 128, 0)", "rgb(255, 0, 0)", "rgb(0, 128, 0)"], 24 ["rgb(128, 0, 128)", "rgb(0, 255, 0)", "rgb(128, 0, 128)"]]; 22 25 23 26 function seeked() -
trunk/Source/WebCore/ChangeLog
r141792 r141795 1 2013-02-04 Dima Gorbik <dgorbik@apple.com> 2 3 Implemet :lang() pseudo class support for the WebVTT ::cue pseudo element 4 https://bugs.webkit.org/show_bug.cgi?id=105478 5 6 Reviewed by Antti Koivisto. 7 8 In WebVTT lang is preprocessed and stored in the lang attribute of the element, 9 so we access it instead of walking up the tree the way it is done in HTML. 10 11 Existing tests were modified to cover this case. 12 13 * css/SelectorChecker.cpp: 14 (WebCore::SelectorChecker::checkOne): 15 1 16 2013-02-04 Tim Horton <timothy_horton@apple.com> 2 17 -
trunk/Source/WebCore/css/SelectorChecker.cpp
r141529 r141795 820 820 case CSSSelector::PseudoLang: 821 821 { 822 AtomicString value = element->computeInheritedLanguage(); 822 AtomicString value; 823 #if ENABLE(VIDEO_TRACK) 824 if (element->isWebVTTElement()) 825 value = element->getAttribute(langAttr); 826 else 827 #endif 828 value = element->computeInheritedLanguage(); 823 829 const AtomicString& argument = selector->argument(); 824 830 if (value.isEmpty() || !value.startsWith(argument, false))
Note: See TracChangeset
for help on using the changeset viewer.