Changeset 162450 in webkit
- Timestamp:
- Jan 21, 2014, 10:44:03 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r162442 r162450 1 2014-01-21 Eric Carlson <eric.carlson@apple.com> 2 3 Add ‎ ‏ and to WebVTT parser 4 https://bugs.webkit.org/show_bug.cgi?id=85112 5 6 Reviewed by Jer Noble. 7 8 * media/track/captions-webvtt/tc022-entities.vtt: 9 * media/track/track-webvtt-tc022-entities-expected.txt: 10 * media/track/track-webvtt-tc022-entities.html: 11 1 12 2014-01-21 Mihai Tica <mitica@adobe.com> 2 13 -
trunk/LayoutTests/media/track/captions-webvtt/tc022-entities.vtt
r112898 r162450 1 1 WEBVTT 2 Cue content with escape characters for &, <, and >.2 Cue content with escape characters for &, <, >, LRM, RLM and non-breaking space. 3 3 4 4 1 5 5 00:00:00.000 --> 00:00:30.500 align:start position:20% 6 This cue has an amp & character.6 This cue has an amp character: & 7 7 8 8 2 9 9 00:00:31.000 --> 00:01:00.500 align:start position:20% 10 This cue has a less than < character.10 This cue has a less than character: < 11 11 12 12 3 13 13 00:01:01.000 --> 00:02:00.500 align:start position:20% 14 This cue has a greater than > character. 14 This cue has a greater than character: > 15 16 4 17 00:02:01.000 --> 00:03:00.500 align:start position:20% 18 This cue has a right-to-left mark (RLM): ‏ 19 20 5 21 00:03:01.000 --> 00:04:00.500 align:start position:20% 22 This cue has a left-to-right mark (LRM): ‎ 23 24 6 25 00:04:01.000 --> 00:05:00.500 align:start position:20% 26 This cue has a non-breakable space (NBSP): -
trunk/LayoutTests/media/track/track-webvtt-tc022-entities-expected.txt
r158743 r162450 4 4 5 5 *** Testing text track 0 6 EXPECTED (cues.length == '3') OK 7 EXPECTED (cues[0].getCueAsHTML().textContent == 'This cue has an amp & character.') OK 8 EXPECTED (cues[1].getCueAsHTML().textContent == 'This cue has a less than < character.') OK 9 EXPECTED (cues[2].getCueAsHTML().textContent == 'This cue has a greater than > character.') OK 6 EXPECTED (cues.length == '6') OK 7 EXPECTED (cues[0].getCueAsHTML().textContent == 'This cue has an amp character: &') OK 8 EXPECTED (cues[1].getCueAsHTML().textContent == 'This cue has a less than character: <') OK 9 EXPECTED (cues[2].getCueAsHTML().textContent == 'This cue has a greater than character: >') OK 10 EXPECTED (cues[3].getCueAsHTML().textContent == 'This cue has a right-to-left mark (RLM): ') OK 11 EXPECTED (cues[4].getCueAsHTML().textContent == 'This cue has a left-to-right mark (LRM): ') OK 12 EXPECTED (cues[5].getCueAsHTML().textContent == 'This cue has a non-breakable space (NBSP): ') OK 10 13 11 14 *** Testing text track 1 -
trunk/LayoutTests/media/track/track-webvtt-tc022-entities.html
r102212 r162450 25 25 var expected = 26 26 { 27 length : 3,27 length : 6, 28 28 tests: 29 29 [ 30 30 { 31 31 property : "getCueAsHTML().textContent", 32 values : ["This cue has an amp & character.", 33 "This cue has a less than < character.", 34 "This cue has a greater than > character."], 32 values : [ 33 "This cue has an amp character: \u0026", 34 "This cue has a less than character: \u003C", 35 "This cue has a greater than character: \u003E", 36 "This cue has a right-to-left mark (RLM): \u200f", 37 "This cue has a left-to-right mark (LRM): \u200e", 38 "This cue has a non-breakable space (NBSP): \u00a0" 39 ], 35 40 }, 36 41 ], -
trunk/Source/WebCore/ChangeLog
r162447 r162450 1 2014-01-21 Eric Carlson <eric.carlson@apple.com> 2 3 Add ‎ ‏ and to WebVTT parser 4 https://bugs.webkit.org/show_bug.cgi?id=85112 5 6 Reviewed by Jer Noble. 7 8 No new tests, track-webvtt-tc022-entities.html was updated to test this. 9 10 * html/track/WebVTTTokenizer.cpp: 11 (WebCore::WebVTTTokenizer::nextToken): Support RLM, LRM, and NBSP entities. 12 1 13 2014-01-21 Commit Queue <commit-queue@webkit.org> 2 14 -
trunk/Source/WebCore/html/track/WebVTTTokenizer.cpp
r142497 r162450 36 36 37 37 #include "MarkupTokenizerInlines.h" 38 #include <wtf/unicode/CharacterNames.h> 38 39 39 40 namespace WebCore { … … 108 109 else if (vectorEqualsString(m_buffer, ">")) 109 110 bufferCharacter('>'); 111 else if (vectorEqualsString(m_buffer, "&lrm")) 112 bufferCharacter(leftToRightMark); 113 else if (vectorEqualsString(m_buffer, "&rlm")) 114 bufferCharacter(rightToLeftMark); 115 else if (vectorEqualsString(m_buffer, " ")) 116 bufferCharacter(noBreakSpace); 110 117 else { 111 118 m_buffer.append(static_cast<LChar>(cc));
Note:
See TracChangeset
for help on using the changeset viewer.