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

Unified Diff: third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp

Issue 2042413002: Notify the HTMLDocumentParser on document element available (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: insertedByParser after actual insertion point Created 4 years, 6 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 | « third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp
diff --git a/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp b/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp
index e37795ac23d1f47a5d024f958271a9cc5993463d..a8511a0fa78abc38215c43e8df81deb2ca79ed8d 100644
--- a/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp
+++ b/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp
@@ -1022,10 +1022,11 @@ void XMLDocumentParser::startElementNs(const AtomicString& localName, const Atom
else
pushCurrentNode(newElement);
- if (isHTMLHtmlElement(*newElement))
+ // Note: |insertedByParser| will perform dispatching if this is an
+ // HTMLHtmlElement.
+ if (isHTMLHtmlElement(*newElement) && isFirstElement) {
toHTMLHtmlElement(*newElement).insertedByParser();
-
- if (!m_parsingFragment && isFirstElement && document()->frame()) {
+ } else if (!m_parsingFragment && isFirstElement && document()->frame()) {
document()->frame()->loader().dispatchDocumentElementAvailable();
document()->frame()->loader().runScriptsAtDocumentElementAvailable();
// runScriptsAtDocumentElementAvailable might have invalidated the document.
« no previous file with comments | « third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698