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

Unified Diff: Source/core/dom/Document.cpp

Issue 66643004: Remove QualifiedName argument from most HTMLElement::create functions (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Hack for XML prefix Created 7 years, 1 month 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
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 308b749a5a1b821bb9f7eb4eedd88d72bd87a0a6..37b1d3a415933a33882f47f2ee9ca0f7d7a2f8a2 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -994,6 +994,9 @@ PassRefPtr<Element> Document::createElement(const QualifiedName& qName, bool cre
else
e = Element::create(qName, &document());
+ if (e->prefix() != qName.prefix())
+ e->setTagNameForCreateElementNS(qName);
+
// <image> uses imgTag so we need a special rule.
ASSERT((qName.matches(imageTag) && e->tagQName().matches(imgTag) && e->tagQName().prefix() == qName.prefix()) || qName == e->tagQName());

Powered by Google App Engine
This is Rietveld 408576698