Changeset 139803 in webkit
- Timestamp:
- Jan 15, 2013 3:49:31 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r139799 r139803 1 2013-01-15 Dima Gorbik <dgorbik@apple.com> 2 3 Implement matching by the voice attribute for WebVTT ::cue pseudo element 4 https://bugs.webkit.org/show_bug.cgi?id=106762 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-15 Levi Weintraub <leviw@chromium.org> 2 13 -
trunk/LayoutTests/media/track/captions-webvtt/styling.vtt
r139714 r139803 20 20 00:01.200 --> 00:01.400 21 21 <c>Aliquam sollicitudin</c> <v>massa ac magna vulputate dignissim</v> <b>posuere et fermentum</b> 22 23 5 24 00:01.400 --> 00:01.600 25 <v>Aliquam sollicitudin</v> <v Mark>massa ac magna vulputate dignissim</v> <v Nancy>posuere et fermentum</v> 26 -
trunk/LayoutTests/media/track/track-css-matching-expected.txt
r139714 r139803 46 46 EXPECTED (getComputedStyle(cueNode).color == 'rgb(0, 128, 0)') OK 47 47 EXPECTED (getComputedStyle(cueNode).color == 'rgb(0, 128, 0)') OK 48 49 RUN(video.currentTime = 1.5) 50 EVENT(seeked) 51 52 53 5. Test that cues are being matched properly by the voice attribute. 54 EXPECTED (getComputedStyle(cueNode).color == 'rgb(255, 255, 0)') OK 55 EXPECTED (getComputedStyle(cueNode).color == 'rgb(255, 0, 0)') OK 56 EXPECTED (getComputedStyle(cueNode).color == 'rgb(0, 128, 0)') OK 48 57 END OF TEST 49 58 -
trunk/LayoutTests/media/track/track-css-matching.html
r139714 r139803 11 11 video::cue(c) {color: purple} 12 12 video::cue(v) {color: yellow} 13 video::cue(v[voice="Mark"]) {color: red} 14 video::cue(v[voice="Nancy"]) {color: green} 13 15 video::cue(b) {color: lime} 14 16 video::cue(.red, .red2) { color:red } … … 22 24 var cueNode; 23 25 var seekedCount = 0; 24 var seekTimes = [0.3, 0.5, 0.7, 0.9, 1.1, 1.3 ];26 var seekTimes = [0.3, 0.5, 0.7, 0.9, 1.1, 1.3, 1.5]; 25 27 26 28 var info = [["rgb(255, 0, 0)", "rgb(0, 128, 0)", "rgb(255, 0, 0)"], … … 29 31 ["rgb(128, 0, 128)", "rgb(128, 0, 128)", "rgb(128, 0, 128)"], 30 32 ["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)"]]; 33 ["rgb(0, 128, 0)", "rgb(0, 128, 0)", "rgb(0, 128, 0)"], 34 ["rgb(255, 255, 0)", "rgb(255, 0, 0)", "rgb(0, 128, 0)"]]; 32 35 33 36 var description = ["1. Test that cues are being matched properly by the class name", 34 37 "2. Test that cues are being matched properly by the ':future' pseudo class.", "", "", 35 38 "3. Test that cues are being matched properly by tag.", 36 "4. Test that cues are being matched properly by id."]; 39 "4. Test that cues are being matched properly by id.", 40 "5. Test that cues are being matched properly by the voice attribute."]; 37 41 38 42 function skipNonElements(root) -
trunk/Source/WebCore/ChangeLog
r139802 r139803 1 2013-01-15 Dima Gorbik <dgorbik@apple.com> 2 Implement matching by the voice attribute for WebVTT ::cue pseudo element 3 https://bugs.webkit.org/show_bug.cgi?id=106762 4 5 Reviewed by Eric Carlson. 6 7 Implemented matching cue WebVTT elements by a voice attribute by adding a WebVTT specific voice attribute. 8 For DOM trees title attribute is used instead as this is required by specs. 9 10 * html/track/TextTrackCue.cpp: 11 (WebCore::TextTrackCue::copyWebVTTNodeToDOMTree): set a title argument instead of a voice attribute for the DOM tree. 12 * html/track/TextTrackCue.h: 13 (WebCore::TextTrackCue::voiceAttributeName): 14 * html/track/WebVTTParser.cpp: 15 (WebCore::WebVTTParser::constructTreeFromToken): 16 1 17 2013-01-15 Simon Fraser <simon.fraser@apple.com> 2 18 -
trunk/Source/WebCore/html/track/TextTrackCue.cpp
r139714 r139803 496 496 clonedNode = HTMLSpanElement::create(spanTag, static_cast<Document*>(m_scriptExecutionContext)); 497 497 toElement(clonedNode.get())->setAttribute(classAttr, toElement(node)->getAttribute(classAttr)); 498 toElement(clonedNode.get())->setAttribute(titleAttr, toElement(node)->getAttribute( titleAttr));498 toElement(clonedNode.get())->setAttribute(titleAttr, toElement(node)->getAttribute(voiceAttributeName())); 499 499 } else 500 500 clonedNode = node->cloneNode(false); -
trunk/Source/WebCore/html/track/TextTrackCue.h
r139692 r139803 90 90 return cTag; 91 91 } 92 93 static const QualifiedName& voiceAttributeName() 94 { 95 DEFINE_STATIC_LOCAL(QualifiedName, voiceAttr, (nullAtom, "voice", nullAtom)); 96 return voiceAttr; 97 } 92 98 93 99 virtual ~TextTrackCue(); -
trunk/Source/WebCore/html/track/WebVTTParser.cpp
r139692 r139803 368 368 child->setAttribute(classAttr, AtomicString(m_token.classes().data(), m_token.classes().size())); 369 369 if (child->hasTagName(TextTrackCue::voiceElementTagName())) 370 child->setAttribute( titleAttr, AtomicString(m_token.annotation().data(), m_token.annotation().size()));370 child->setAttribute(TextTrackCue::voiceAttributeName(), AtomicString(m_token.annotation().data(), m_token.annotation().size())); 371 371 m_currentNode->parserAppendChild(child); 372 372 m_currentNode = child;
Note: See TracChangeset
for help on using the changeset viewer.