Title: [143056] branches/chromium/1410
Revision
143056
Author
aba...@webkit.org
Date
2013-02-15 14:49:58 -0800 (Fri, 15 Feb 2013)

Log Message

Merge 142492
> document.write during window.onload can trigger DumpRenderTree to dump the render tree
> https://bugs.webkit.org/show_bug.cgi?id=109465
> 
> Reviewed by Eric Seidel.
> 
> Source/WebCore:
> 
> This patch is a partial revert of
> http://trac.webkit.org/changeset/142378. It's not safe to call
> checkComplete during the load event. We'll need to find another way of
> calling checkComplete at the right time.
> 
> Test: fast/parser/document-write-during-load.html
> 
> * dom/Document.cpp:
> (WebCore::Document::decrementActiveParserCount):
> 
> LayoutTests:
> 
> * fast/parser/document-write-during-load-expected.txt: Added.
> * fast/parser/document-write-during-load.html: Added.
> 

TBR=aba...@webkit.org
Review URL: https://codereview.chromium.org/12287016

Modified Paths

Added Paths

Diff

Copied: branches/chromium/1410/LayoutTests/fast/parser/document-write-during-load-expected.txt (from rev 142492, trunk/LayoutTests/fast/parser/document-write-during-load-expected.txt) (0 => 143056)


--- branches/chromium/1410/LayoutTests/fast/parser/document-write-during-load-expected.txt	                        (rev 0)
+++ branches/chromium/1410/LayoutTests/fast/parser/document-write-during-load-expected.txt	2013-02-15 22:49:58 UTC (rev 143056)
@@ -0,0 +1,3 @@
+ALERT: Ready
+ALERT: PASS
+

Copied: branches/chromium/1410/LayoutTests/fast/parser/document-write-during-load.html (from rev 142492, trunk/LayoutTests/fast/parser/document-write-during-load.html) (0 => 143056)


--- branches/chromium/1410/LayoutTests/fast/parser/document-write-during-load.html	                        (rev 0)
+++ branches/chromium/1410/LayoutTests/fast/parser/document-write-during-load.html	2013-02-15 22:49:58 UTC (rev 143056)
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<script>
+if (window.testRunner)
+    testRunner.dumpAsText();
+</script>
+<div id="parent" style="width: 200px; height: 200px;">
+<iframe id="iframe" seamless src=""
+</div>
+<script>
+window._onload_ = function () {
+    window.iframe = document.getElementById("iframe");
+    alert("Ready");
+    window.iframe.contentDocument.write("<!DOCTYPE html><html style='width: 100px; height: 100px; background-color: green'></html>");
+    alert("PASS");
+}
+</script>

Modified: branches/chromium/1410/Source/WebCore/dom/Document.cpp (143055 => 143056)


--- branches/chromium/1410/Source/WebCore/dom/Document.cpp	2013-02-15 22:48:00 UTC (rev 143055)
+++ branches/chromium/1410/Source/WebCore/dom/Document.cpp	2013-02-15 22:49:58 UTC (rev 143056)
@@ -5771,15 +5771,12 @@
 
 bool Document::hasActiveParser()
 {
-    return m_activeParserCount || (m_parser && m_parser->processingData());
+    return m_parser && m_parser->processingData();
 }
 
 void Document::decrementActiveParserCount()
 {
     --m_activeParserCount;
-    if (!frame())
-        return;
-    frame()->loader()->checkLoadComplete();
 }
 
 void Document::setContextFeatures(PassRefPtr<ContextFeatures> features)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to