Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(752)

Unified Diff: Source/core/html/track/WebVTTElement.cpp

Issue 16019013: Use HTMLElementFactory to create equivalent elements in WebVTTElement. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rename expected results file into proper directory. Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/media/track/opera/interfaces/TextTrackCue/getCueAsHTMLCrash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/track/WebVTTElement.cpp
diff --git a/Source/core/html/track/WebVTTElement.cpp b/Source/core/html/track/WebVTTElement.cpp
index b2f9adb01d7b9fd6f1367171c94c2d918771ce2c..009aaa74f305353223e7bba2104c701e9e353b19 100644
--- a/Source/core/html/track/WebVTTElement.cpp
+++ b/Source/core/html/track/WebVTTElement.cpp
@@ -24,9 +24,10 @@
*/
#include "config.h"
-
#include "core/html/track/WebVTTElement.h"
+#include "HTMLElementFactory.h"
+
namespace WebCore {
static const QualifiedName& nodeTypeToTagName(WebVTTNodeType nodeType)
@@ -89,24 +90,24 @@ PassRefPtr<HTMLElement> WebVTTElement::createEquivalentHTMLElement(Document* doc
case WebVTTNodeTypeClass:
case WebVTTNodeTypeLanguage:
case WebVTTNodeTypeVoice:
- htmlElement = HTMLElement::create(HTMLNames::spanTag, document);
+ htmlElement = HTMLElementFactory::createHTMLElement(HTMLNames::spanTag, document);
htmlElement.get()->setAttribute(HTMLNames::titleAttr, getAttribute(voiceAttributeName()));
htmlElement.get()->setAttribute(HTMLNames::langAttr, getAttribute(langAttributeName()));
break;
case WebVTTNodeTypeItalic:
- htmlElement = HTMLElement::create(HTMLNames::iTag, document);
+ htmlElement = HTMLElementFactory::createHTMLElement(HTMLNames::iTag, document);
break;
case WebVTTNodeTypeBold:
- htmlElement = HTMLElement::create(HTMLNames::bTag, document);
+ htmlElement = HTMLElementFactory::createHTMLElement(HTMLNames::bTag, document);
break;
case WebVTTNodeTypeUnderline:
- htmlElement = HTMLElement::create(HTMLNames::uTag, document);
+ htmlElement = HTMLElementFactory::createHTMLElement(HTMLNames::uTag, document);
break;
case WebVTTNodeTypeRuby:
- htmlElement = HTMLElement::create(HTMLNames::rubyTag, document);
+ htmlElement = HTMLElementFactory::createHTMLElement(HTMLNames::rubyTag, document);
break;
case WebVTTNodeTypeRubyText:
- htmlElement = HTMLElement::create(HTMLNames::rtTag, document);
+ htmlElement = HTMLElementFactory::createHTMLElement(HTMLNames::rtTag, document);
break;
default:
ASSERT_NOT_REACHED();
« no previous file with comments | « LayoutTests/media/track/opera/interfaces/TextTrackCue/getCueAsHTMLCrash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698