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

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

Issue 561813003: Prepare blink to unify definitions of load completion (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add document.close() to scroll-left-while-loading.html Created 6 years, 2 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 | « Source/core/dom/Document.h ('k') | Source/core/dom/ProcessingInstruction.cpp » ('j') | 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 1ba1c37be97857a0af5a58294172928398765e58..9a9c6c6d656340bc45596b3040bd555583b748b0 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -2490,8 +2490,10 @@ void Document::implicitClose()
ASSERT(!inStyleRecalc());
if (processingLoadEvent() || !m_parser)
return;
- if (frame() && frame()->navigationScheduler().locationChangePending())
+ if (frame() && frame()->navigationScheduler().locationChangePending()) {
+ suppressLoadEvent();
return;
+ }
// The call to dispatchWindowLoadEvent can detach the LocalDOMWindow and cause it (and its
// attached Document) to be destroyed.
@@ -4417,12 +4419,16 @@ void Document::applyXSLTransform(ProcessingInstruction* pi)
String resultMIMEType;
String newSource;
String resultEncoding;
- if (!processor->transformToString(this, resultMIMEType, newSource, resultEncoding))
+ setParsing(true);
+ if (!processor->transformToString(this, resultMIMEType, newSource, resultEncoding)) {
+ setParsing(false);
return;
+ }
// FIXME: If the transform failed we should probably report an error (like Mozilla does).
LocalFrame* ownerFrame = frame();
processor->createDocumentFromSource(newSource, resultEncoding, resultMIMEType, this, ownerFrame);
InspectorInstrumentation::frameDocumentUpdated(ownerFrame);
+ setParsing(false);
}
void Document::setTransformSource(PassOwnPtr<TransformSource> source)
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/dom/ProcessingInstruction.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698