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

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

Issue 161753003: Use more direct Element creation methods (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 90e8afb08463db1fc27d15d38f0514117fc655b1..e16e9271ac324fa36b123150381e4c5e5f67f8b9 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -713,7 +713,7 @@ PassRefPtr<Element> Document::createElement(const AtomicString& name, ExceptionS
if (isXHTMLDocument() || isHTMLDocument())
return HTMLElementFactory::createHTMLElement(isHTMLDocument() ? name.lower() : name, *this, 0, false);
- return createElement(QualifiedName(nullAtom, name, nullAtom), false);
+ return Element::create(QualifiedName(nullAtom, name, nullAtom), this);
}
PassRefPtr<Element> Document::createElement(const AtomicString& localName, const AtomicString& typeExtension, ExceptionState& exceptionState)
@@ -1337,7 +1337,7 @@ void Document::setTitle(const String& title)
m_titleElement = 0;
else if (!m_titleElement) {
if (HTMLElement* headElement = head()) {
- m_titleElement = createElement(titleTag, false);
+ m_titleElement = HTMLTitleElement::create(*this);
Inactive 2014/02/13 17:26:22 This no longer updates m_sawElementsInKnownNamespa
headElement->appendChild(m_titleElement);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698