Diff
Modified: trunk/LayoutTests/ChangeLog (142554 => 142555)
--- trunk/LayoutTests/ChangeLog 2013-02-12 01:05:39 UTC (rev 142554)
+++ trunk/LayoutTests/ChangeLog 2013-02-12 01:07:33 UTC (rev 142555)
@@ -1,3 +1,20 @@
+2013-02-11 Adam Barth <[email protected]>
+
+ Load event fires too early with threaded HTML parser (take 2)
+ https://bugs.webkit.org/show_bug.cgi?id=109485
+
+ Reviewed by Eric Seidel.
+
+ This patch also fixes a bug whereby removing an iframe during the load
+ event would trigger DumpRenderTree to dump the test in the middle of
+ the load event. We now wait until the load event is over.
+
+ * compositing/iframes/remove-iframe-crash-expected.txt:
+ * fast/frames/iframe-access-screen-of-deleted-expected.txt:
+ * fast/frames/remove-frame-during-load-event-expected.txt: Added.
+ * fast/frames/remove-frame-during-load-event.html: Added.
+ * http/tests/misc/xslt-bad-import-expected.txt:
+
2013-02-11 Nico Weber <[email protected]>
Remove web intents code
Modified: trunk/LayoutTests/compositing/iframes/remove-iframe-crash-expected.txt (142554 => 142555)
--- trunk/LayoutTests/compositing/iframes/remove-iframe-crash-expected.txt 2013-02-12 01:05:39 UTC (rev 142554)
+++ trunk/LayoutTests/compositing/iframes/remove-iframe-crash-expected.txt 2013-02-12 01:07:33 UTC (rev 142555)
@@ -1,2 +1 @@
-
This test should not crash.
Modified: trunk/LayoutTests/fast/frames/iframe-access-screen-of-deleted-expected.txt (142554 => 142555)
--- trunk/LayoutTests/fast/frames/iframe-access-screen-of-deleted-expected.txt 2013-02-12 01:05:39 UTC (rev 142554)
+++ trunk/LayoutTests/fast/frames/iframe-access-screen-of-deleted-expected.txt 2013-02-12 01:07:33 UTC (rev 142555)
@@ -1,2 +1 @@
-
This tests that accessing screen attributes doesn't crash even if containing frame is removed from the parent.
Added: trunk/LayoutTests/fast/frames/remove-frame-during-load-event-expected.txt (0 => 142555)
--- trunk/LayoutTests/fast/frames/remove-frame-during-load-event-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/frames/remove-frame-during-load-event-expected.txt 2013-02-12 01:07:33 UTC (rev 142555)
@@ -0,0 +1,3 @@
+ALERT: PASS (1 of 3)
+ALERT: PASS (2 of 3)
+PASS (3 of 3)
Added: trunk/LayoutTests/fast/frames/remove-frame-during-load-event.html (0 => 142555)
--- trunk/LayoutTests/fast/frames/remove-frame-during-load-event.html (rev 0)
+++ trunk/LayoutTests/fast/frames/remove-frame-during-load-event.html 2013-02-12 01:07:33 UTC (rev 142555)
@@ -0,0 +1,23 @@
+<html>
+<head>
+<script>
+if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.dumpChildFramesAsText();
+}
+
+function runTests() {
+ alert("PASS (1 of 3)");
+ var f = document.getElementById('theframe');
+ f.parentNode.removeChild(f);
+ alert("PASS (2 of 3)");
+}
+</script>
+</head>
+<body _onload_="runTests()">
+<iframe id="theframe" src=""
+<div>
+PASS (3 of 3)
+</div>
+</body>
+</html>
Modified: trunk/LayoutTests/http/tests/misc/xslt-bad-import-expected.txt (142554 => 142555)
--- trunk/LayoutTests/http/tests/misc/xslt-bad-import-expected.txt 2013-02-12 01:05:39 UTC (rev 142554)
+++ trunk/LayoutTests/http/tests/misc/xslt-bad-import-expected.txt 2013-02-12 01:07:33 UTC (rev 142555)
@@ -1,2 +1 @@
-
This test passes if it does not crash.
Modified: trunk/LayoutTests/platform/chromium-win/compositing/iframes/remove-iframe-crash-expected.txt (142554 => 142555)
--- trunk/LayoutTests/platform/chromium-win/compositing/iframes/remove-iframe-crash-expected.txt 2013-02-12 01:05:39 UTC (rev 142554)
+++ trunk/LayoutTests/platform/chromium-win/compositing/iframes/remove-iframe-crash-expected.txt 2013-02-12 01:07:33 UTC (rev 142555)
@@ -1,2 +1 @@
-
This test should not crash.
Modified: trunk/Source/WebCore/ChangeLog (142554 => 142555)
--- trunk/Source/WebCore/ChangeLog 2013-02-12 01:05:39 UTC (rev 142554)
+++ trunk/Source/WebCore/ChangeLog 2013-02-12 01:07:33 UTC (rev 142555)
@@ -1,3 +1,20 @@
+2013-02-11 Adam Barth <[email protected]>
+
+ Load event fires too early with threaded HTML parser (take 2)
+ https://bugs.webkit.org/show_bug.cgi?id=109485
+
+ Reviewed by Eric Seidel.
+
+ This patch restores the code that was removed in
+ http://trac.webkit.org/changeset/142492 and adds code to
+ DocumentLoader.cpp to avoid the regression.
+
+ * dom/Document.cpp:
+ (WebCore::Document::hasActiveParser):
+ (WebCore::Document::decrementActiveParserCount):
+ * loader/DocumentLoader.cpp:
+ (WebCore::DocumentLoader::isLoadingInAPISense):
+
2013-02-11 Eric Seidel <[email protected]>
Fold HTMLTokenizerState back into HTMLTokenizer now that MarkupTokenizerBase is RFG
Modified: trunk/Source/WebCore/dom/Document.cpp (142554 => 142555)
--- trunk/Source/WebCore/dom/Document.cpp 2013-02-12 01:05:39 UTC (rev 142554)
+++ trunk/Source/WebCore/dom/Document.cpp 2013-02-12 01:07:33 UTC (rev 142555)
@@ -5771,12 +5771,15 @@
bool Document::hasActiveParser()
{
- return m_parser && m_parser->processingData();
+ return m_activeParserCount || (m_parser && m_parser->processingData());
}
void Document::decrementActiveParserCount()
{
--m_activeParserCount;
+ if (!frame())
+ return;
+ frame()->loader()->checkLoadComplete();
}
void Document::setContextFeatures(PassRefPtr<ContextFeatures> features)
Modified: trunk/Source/WebCore/loader/DocumentLoader.cpp (142554 => 142555)
--- trunk/Source/WebCore/loader/DocumentLoader.cpp 2013-02-12 01:05:39 UTC (rev 142554)
+++ trunk/Source/WebCore/loader/DocumentLoader.cpp 2013-02-12 01:07:33 UTC (rev 142555)
@@ -478,6 +478,8 @@
return true;
if (m_cachedResourceLoader->requestCount())
return true;
+ if (doc->processingLoadEvent())
+ return true;
if (doc->hasActiveParser())
return true;
}