Changeset 139714 in webkit
- Timestamp:
- Jan 14, 2013 9:22:43 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r139709 r139714 1 2013-01-14 Dima Gorbik <dgorbik@apple.com> 2 3 Implement ID selector matching for the WebVTT ::cue pseudo element 4 https://bugs.webkit.org/show_bug.cgi?id=105481 5 6 Reviewed by Eric Carlson. 7 8 * media/track/captions-webvtt/styling.vtt: 9 * media/track/track-css-matching-expected.txt: 10 * media/track/track-css-matching.html: 11 1 12 2013-01-14 Dominic Cooney <dominicc@chromium.org> 2 13 -
trunk/LayoutTests/media/track/captions-webvtt/styling.vtt
r139692 r139714 16 16 00:01.000 --> 00:01.200 17 17 <c>Aliquam sollicitudin</c> <v>massa ac magna vulputate dignissim</v> <b>posuere et fermentum</b> 18 19 testcue 20 00:01.200 --> 00:01.400 21 <c>Aliquam sollicitudin</c> <v>massa ac magna vulputate dignissim</v> <b>posuere et fermentum</b> -
trunk/LayoutTests/media/track/track-css-matching-expected.txt
r139692 r139714 1 1. Test that cues are being matched properly by the class name2 1 EVENT(canplaythrough) 3 2 EVENT(seeked) 3 4 5 1. Test that cues are being matched properly by the class name 4 6 EXPECTED (getComputedStyle(cueNode).color == 'rgb(255, 0, 0)') OK 5 7 EXPECTED (getComputedStyle(cueNode).color == 'rgb(0, 128, 0)') OK … … 35 37 EXPECTED (getComputedStyle(cueNode).color == 'rgb(255, 255, 0)') OK 36 38 EXPECTED (getComputedStyle(cueNode).color == 'rgb(0, 255, 0)') OK 39 40 RUN(video.currentTime = 1.3) 41 EVENT(seeked) 42 43 44 4. Test that cues are being matched properly by id. 45 EXPECTED (getComputedStyle(cueNode).color == 'rgb(0, 128, 0)') OK 46 EXPECTED (getComputedStyle(cueNode).color == 'rgb(0, 128, 0)') OK 47 EXPECTED (getComputedStyle(cueNode).color == 'rgb(0, 128, 0)') OK 37 48 END OF TEST 38 49 -
trunk/LayoutTests/media/track/track-css-matching.html
r139692 r139714 14 14 video::cue(.red, .red2) { color:red } 15 15 #testvideo::cue(.green) { color:green } 16 video::cue(#testcue) {color: green} 16 17 video::cue(:future) {color: gray} 17 18 </style> … … 21 22 var cueNode; 22 23 var seekedCount = 0; 24 var seekTimes = [0.3, 0.5, 0.7, 0.9, 1.1, 1.3]; 25 23 26 var info = [["rgb(255, 0, 0)", "rgb(0, 128, 0)", "rgb(255, 0, 0)"], 24 27 ["rgb(128, 0, 128)", "rgb(128, 128, 128)", "rgb(128, 128, 128)"], 25 28 ["rgb(128, 0, 128)", "rgb(128, 0, 128)", "rgb(128, 128, 128)"], 26 29 ["rgb(128, 0, 128)", "rgb(128, 0, 128)", "rgb(128, 0, 128)"], 27 ["rgb(128, 0, 128)", "rgb(255, 255, 0)", "rgb(0, 255, 0)"]]; 28 var seekTimes = [0.3, 0.5, 0.7, 0.9, 1.1, 1.3]; 30 ["rgb(128, 0, 128)", "rgb(255, 255, 0)", "rgb(0, 255, 0)"], 31 ["rgb(0, 128, 0)", "rgb(0, 128, 0)", "rgb(0, 128, 0)"]]; 32 33 var description = ["1. Test that cues are being matched properly by the class name", 34 "2. Test that cues are being matched properly by the ':future' pseudo class.", "", "", 35 "3. Test that cues are being matched properly by tag.", 36 "4. Test that cues are being matched properly by id."]; 29 37 30 38 function skipNonElements(root) … … 36 44 return nextElementSibling; 37 45 } 38 46 39 47 function seeked() 40 48 { … … 42 50 return; 43 51 44 if (seekedCount == 1) { 45 consoleWrite(""); 46 consoleWrite(""); 47 consoleWrite("2. Test that cues are being matched properly by the ':future' pseudo class."); 48 } else if (seekedCount == 4) { 49 consoleWrite(""); 50 consoleWrite(""); 51 consoleWrite("3. Test that cues are being matched properly by tag."); 52 if (description[seekedCount] != "") { 53 consoleWrite("<br>"); 54 consoleWrite(description[seekedCount]); 52 55 } 53 56 … … 70 73 function loaded() 71 74 { 72 consoleWrite("1. Test that cues are being matched properly by the class name");73 75 findMediaElement(); 74 76 video.src = findMediaFile('video', '../content/test'); -
trunk/Source/WebCore/ChangeLog
r139711 r139714 1 2013-01-14 Dima Gorbik <dgorbik@apple.com> 2 3 Implement ID selector matching for the WebVTT ::cue pseudo element 4 https://bugs.webkit.org/show_bug.cgi?id=105481 5 6 Reviewed by Eric Carlson. 7 8 Implemented matching cue WebVTT elements by an identifier. Identifiers of all WebVTT nodes in the rendering tree for 9 a given cue are set to match the cue identifier. 10 11 Existing tests were modified to cover this case. 12 13 * html/track/TextTrackCue.cpp: 14 (WebCore::TextTrackCue::markFutureAndPastNodes): 15 1 16 2013-01-14 Mark Pilgrim <pilgrim@chromium.org> 2 17 … … 126 141 * rendering/RenderListItem.h: 127 142 128 2013-01-1 4Dima Gorbik <dgorbik@apple.com>143 2013-01-13 Dima Gorbik <dgorbik@apple.com> 129 144 130 145 Implement element type selectors for the WebVTT ::cue pseudo class -
trunk/Source/WebCore/html/track/TextTrackCue.cpp
r139692 r139714 695 695 isPastNode = false; 696 696 } 697 698 if (child->isElementNode()) 697 698 if (child->isElementNode()) { 699 699 toElement(child)->setWebVTTNodeType(isPastNode ? WebVTTNodeTypePast : WebVTTNodeTypeFuture); 700 // Make an elemenet id match a cue id for style matching purposes. 701 if (!m_id.isEmpty()) 702 toElement(child)->setIdAttribute(AtomicString(m_id.characters(), m_id.length())); 703 } 700 704 } 701 705 }
Note: See TracChangeset
for help on using the changeset viewer.