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

Unified Diff: sky/engine/core/html/parser/HTMLConstructionSite.cpp

Issue 942933003: Remove almost all clients of isHTMLElement (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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 | « sky/engine/core/html/parser/HTMLConstructionSite.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/html/parser/HTMLConstructionSite.cpp
diff --git a/sky/engine/core/html/parser/HTMLConstructionSite.cpp b/sky/engine/core/html/parser/HTMLConstructionSite.cpp
index 1d6c8b1f909d9e94561de838de6ea33551f8dfd5..b9aaa5691f86c3067fcf4659d0c682ffb732f887 100644
--- a/sky/engine/core/html/parser/HTMLConstructionSite.cpp
+++ b/sky/engine/core/html/parser/HTMLConstructionSite.cpp
@@ -275,7 +275,7 @@ void HTMLConstructionSite::finishedParsing()
void HTMLConstructionSite::insertHTMLElement(AtomicHTMLToken* token)
{
- RefPtr<HTMLElement> element = createHTMLElement(token);
+ RefPtr<Element> element = createElement(token);
attachLater(currentNode(), element);
m_openElements.push(element.release());
}
@@ -286,7 +286,7 @@ void HTMLConstructionSite::insertSelfClosingHTMLElement(AtomicHTMLToken* token)
// Normally HTMLElementStack is responsible for calling finishParsingChildren,
// but self-closing elements are never in the element stack so the stack
// doesn't get a chance to tell them that we're done parsing their children.
- attachLater(currentNode(), createHTMLElement(token), true);
+ attachLater(currentNode(), createElement(token), true);
// FIXME: Do we want to acknowledge the token's self-closing flag?
// http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#acknowledge-self-closing-flag
}
@@ -316,14 +316,6 @@ void HTMLConstructionSite::insertTextNode(const String& string)
m_pendingText.append(dummyTask.parent, string);
}
-PassRefPtr<Element> HTMLConstructionSite::createElement(AtomicHTMLToken* token, const AtomicString& namespaceURI)
-{
- QualifiedName tagName(token->name());
- RefPtr<Element> element = ownerDocumentForCurrentNode().createElement(tagName, true);
- setAttributes(element.get(), token);
- return element.release();
-}
-
inline Document& HTMLConstructionSite::ownerDocumentForCurrentNode()
{
if (isHTMLTemplateElement(*currentNode()))
@@ -331,10 +323,10 @@ inline Document& HTMLConstructionSite::ownerDocumentForCurrentNode()
return currentNode()->document();
}
-PassRefPtr<HTMLElement> HTMLConstructionSite::createHTMLElement(AtomicHTMLToken* token)
+PassRefPtr<Element> HTMLConstructionSite::createElement(AtomicHTMLToken* token)
{
Document& document = ownerDocumentForCurrentNode();
- RefPtr<HTMLElement> element = HTMLElementFactory::createHTMLElement(token->name(), document, true);
+ RefPtr<Element> element = HTMLElementFactory::createElement(token->name(), document, true);
setAttributes(element.get(), token);
return element.release();
}
« no previous file with comments | « sky/engine/core/html/parser/HTMLConstructionSite.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698