Changeset 142772 in webkit
- Timestamp:
- Feb 13, 2013 12:23:49 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r142770 r142772 1 2013-02-13 Eric Seidel <eric@webkit.org> 2 3 Use fancy new Vector-based String constructors in the WebVTT parser 4 https://bugs.webkit.org/show_bug.cgi?id=109619 5 6 Reviewed by Benjamin Poulain. 7 8 No change in behavior. Added some FIXMEs for future perf optimization. 9 10 * html/track/WebVTTParser.cpp: 11 (WebCore::WebVTTParser::constructTreeFromToken): 12 1 13 2013-02-13 Morten Stenshorne <mstensho@opera.com> 2 14 -
trunk/Source/WebCore/html/track/WebVTTParser.cpp
r142043 r142772 374 374 void WebVTTParser::constructTreeFromToken(Document* document) 375 375 { 376 AtomicString tokenTagName(m_token.name().data(), m_token.name().size()); 377 QualifiedName tagName(nullAtom, tokenTagName, xhtmlNamespaceURI); 376 QualifiedName tagName(nullAtom, AtomicString(m_token.name()), xhtmlNamespaceURI); 378 377 379 378 // http://dev.w3.org/html5/webvtt/#webvtt-cue-text-dom-construction-rules … … 381 380 switch (m_token.type()) { 382 381 case WebVTTTokenTypes::Character: { 383 String content(m_token.characters() .data(), m_token.characters().size());382 String content(m_token.characters()); // FIXME: This should be 8bit if possible. 384 383 RefPtr<Text> child = Text::create(document, content); 385 384 m_currentNode->parserAppendChild(child); … … 393 392 if (child) { 394 393 if (m_token.classes().size() > 0) 395 child->setAttribute(classAttr, AtomicString(m_token.classes() .data(), m_token.classes().size()));394 child->setAttribute(classAttr, AtomicString(m_token.classes())); 396 395 397 396 if (child->webVTTNodeType() == WebVTTNodeTypeVoice) 398 child->setAttribute(WebVTTElement::voiceAttributeName(), AtomicString(m_token.annotation() .data(), m_token.annotation().size()));397 child->setAttribute(WebVTTElement::voiceAttributeName(), AtomicString(m_token.annotation())); 399 398 else if (child->webVTTNodeType() == WebVTTNodeTypeLanguage) { 400 m_languageStack.append(AtomicString(m_token.annotation() .data(), m_token.annotation().size()));399 m_languageStack.append(AtomicString(m_token.annotation())); 401 400 child->setAttribute(WebVTTElement::langAttributeName(), m_languageStack.last()); 402 401 } … … 421 420 unsigned position = 0; 422 421 double time = collectTimeStamp(m_token.characters().data(), &position); 422 // FIXME: This should use an 8bit string if possible. 423 423 if (time != malformedTime) 424 m_currentNode->parserAppendChild(ProcessingInstruction::create(document, "timestamp", String(m_token.characters() .data(), m_token.characters().size())));424 m_currentNode->parserAppendChild(ProcessingInstruction::create(document, "timestamp", String(m_token.characters()))); 425 425 break; 426 426 }
Note: See TracChangeset
for help on using the changeset viewer.