Title: [115774] trunk
- Revision
- 115774
- Author
- [email protected]
- Date
- 2012-05-01 18:23:10 -0700 (Tue, 01 May 2012)
Log Message
Source/WebCore: REGRESSION(r115654): PDFs come up blank
https://bugs.webkit.org/show_bug.cgi?id=85275
Reviewed by Alexey Proskuryakov.
Test: http/tests/loading/pdf-commit-load-callbacks.html
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::finishedLoading): The load needs to be
committed before we call finishedLoading on the
FrameLoaderClient.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::transitionToCommitted): We're guaranteeing
that receivedFirstData() will be called other ways (namely,
DocumentLoader won't finish without doing so). This call now
causes custom representations to double-commit, which is bad.
LayoutTests: Test for https://bugs.webkit.org/show_bug.cgi?id=85275.
Reviewed by Alexey Proskuryakov.
* http/tests/loading/pdf-commit-load-callbacks-expected.txt: Added.
* http/tests/loading/pdf-commit-load-callbacks.html: Added.
* platform/chromium/http/tests/loading: Added.
* platform/chromium/http/tests/loading/pdf-commit-load-callbacks-expected.txt: Added.
* platform/wk2/Skipped: New test requires layoutTestController.dumpResourceLoadCallbacks(),
which isn't support for wk2 yet.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (115773 => 115774)
--- trunk/LayoutTests/ChangeLog 2012-05-02 01:09:53 UTC (rev 115773)
+++ trunk/LayoutTests/ChangeLog 2012-05-02 01:23:10 UTC (rev 115774)
@@ -1,3 +1,16 @@
+2012-05-01 Nate Chapin <[email protected]>
+
+ Test for https://bugs.webkit.org/show_bug.cgi?id=85275.
+
+ Reviewed by Alexey Proskuryakov.
+
+ * http/tests/loading/pdf-commit-load-callbacks-expected.txt: Added.
+ * http/tests/loading/pdf-commit-load-callbacks.html: Added.
+ * platform/chromium/http/tests/loading: Added.
+ * platform/chromium/http/tests/loading/pdf-commit-load-callbacks-expected.txt: Added.
+ * platform/wk2/Skipped: New test requires layoutTestController.dumpResourceLoadCallbacks(),
+ which isn't support for wk2 yet.
+
2012-05-01 Eric Seidel <[email protected]>
Add support for seamless attribute as well as seamless sandbox flag and default CSS styling
Added: trunk/LayoutTests/http/tests/loading/pdf-commit-load-callbacks-expected.txt (0 => 115774)
--- trunk/LayoutTests/http/tests/loading/pdf-commit-load-callbacks-expected.txt (rev 0)
+++ trunk/LayoutTests/http/tests/loading/pdf-commit-load-callbacks-expected.txt 2012-05-02 01:23:10 UTC (rev 115774)
@@ -0,0 +1,11 @@
+main frame - didStartProvisionalLoadForFrame
+main frame - didCommitLoadForFrame
+frame "<!--framePath //<!--frame0-->-->" - didStartProvisionalLoadForFrame
+main frame - didFinishDocumentLoadForFrame
+frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame
+frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
+frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame
+main frame - didHandleOnloadEventsForFrame
+frame "<!--framePath //<!--frame0-->-->" - didFinishLoadForFrame
+main frame - didFinishLoadForFrame
+
Added: trunk/LayoutTests/http/tests/loading/pdf-commit-load-callbacks.html (0 => 115774)
--- trunk/LayoutTests/http/tests/loading/pdf-commit-load-callbacks.html (rev 0)
+++ trunk/LayoutTests/http/tests/loading/pdf-commit-load-callbacks.html 2012-05-02 01:23:10 UTC (rev 115774)
@@ -0,0 +1,5 @@
+<script>
+if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+</script>
+<iframe src=""
Added: trunk/LayoutTests/platform/chromium/http/tests/loading/pdf-commit-load-callbacks-expected.txt (0 => 115774)
--- trunk/LayoutTests/platform/chromium/http/tests/loading/pdf-commit-load-callbacks-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/chromium/http/tests/loading/pdf-commit-load-callbacks-expected.txt 2012-05-02 01:23:10 UTC (rev 115774)
@@ -0,0 +1,8 @@
+main frame - didStartProvisionalLoadForFrame
+main frame - didCommitLoadForFrame
+frame "<!--framePath //<!--frame0-->-->" - didStartProvisionalLoadForFrame
+main frame - didFinishDocumentLoadForFrame
+main frame - didHandleOnloadEventsForFrame
+frame "<!--framePath //<!--frame0-->-->" - didFailProvisionalLoadWithError
+main frame - didFinishLoadForFrame
+
Modified: trunk/LayoutTests/platform/wk2/Skipped (115773 => 115774)
--- trunk/LayoutTests/platform/wk2/Skipped 2012-05-02 01:09:53 UTC (rev 115773)
+++ trunk/LayoutTests/platform/wk2/Skipped 2012-05-02 01:23:10 UTC (rev 115774)
@@ -383,6 +383,7 @@
fast/loader/main-document-url-for-non-http-loads.html
fast/loader/user-style-sheet-resource-load-callbacks.html
http/tests/loading/307-after-303-after-post.html
+http/tests/loading/pdf-commit-load-callbacks.html
http/tests/loading/redirect-methods.html
http/tests/misc/favicon-loads-with-images-disabled.html
http/tests/misc/favicon-loads-with-icon-loading-override.html
Modified: trunk/Source/WebCore/ChangeLog (115773 => 115774)
--- trunk/Source/WebCore/ChangeLog 2012-05-02 01:09:53 UTC (rev 115773)
+++ trunk/Source/WebCore/ChangeLog 2012-05-02 01:23:10 UTC (rev 115774)
@@ -1,3 +1,22 @@
+2012-05-01 Nate Chapin <[email protected]>
+
+ REGRESSION(r115654): PDFs come up blank
+ https://bugs.webkit.org/show_bug.cgi?id=85275
+
+ Reviewed by Alexey Proskuryakov.
+
+ Test: http/tests/loading/pdf-commit-load-callbacks.html
+
+ * loader/DocumentLoader.cpp:
+ (WebCore::DocumentLoader::finishedLoading): The load needs to be
+ committed before we call finishedLoading on the
+ FrameLoaderClient.
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::transitionToCommitted): We're guaranteeing
+ that receivedFirstData() will be called other ways (namely,
+ DocumentLoader won't finish without doing so). This call now
+ causes custom representations to double-commit, which is bad.
+
2012-05-01 Eric Seidel <[email protected]>
Add support for seamless attribute as well as seamless sandbox flag and default CSS styling
Modified: trunk/Source/WebCore/loader/DocumentLoader.cpp (115773 => 115774)
--- trunk/Source/WebCore/loader/DocumentLoader.cpp 2012-05-02 01:09:53 UTC (rev 115773)
+++ trunk/Source/WebCore/loader/DocumentLoader.cpp 2012-05-02 01:23:10 UTC (rev 115774)
@@ -287,13 +287,14 @@
commitIfReady();
if (!frameLoader() || frameLoader()->stateMachine()->creatingInitialEmptyDocument())
return;
- if (!maybeCreateArchive())
+
+ if (!maybeCreateArchive()) {
+ // If this is an empty document, it will not have actually been created yet. Commit dummy data so that
+ // DocumentWriter::begin() gets called and creates the Document.
+ if (!m_gotFirstByte)
+ commitData(0, 0);
frameLoader()->client()->finishedLoading(this);
-
- // If this is an empty document, it will not have actually been created yet. Commit dummy data so that
- // DocumentWriter::begin() gets called and creates the Document.
- if (!m_gotFirstByte)
- commitData(0, 0);
+ }
m_writer.end();
if (!m_mainDocumentError.isNull())
Modified: trunk/Source/WebCore/loader/FrameLoader.cpp (115773 => 115774)
--- trunk/Source/WebCore/loader/FrameLoader.cpp 2012-05-02 01:09:53 UTC (rev 115773)
+++ trunk/Source/WebCore/loader/FrameLoader.cpp 2012-05-02 01:23:10 UTC (rev 115774)
@@ -1821,9 +1821,6 @@
if (!m_stateMachine.committedFirstRealDocumentLoad())
m_stateMachine.advanceTo(FrameLoaderStateMachine::DisplayingInitialEmptyDocumentPostCommit);
-
- if (!m_client->hasHTMLView())
- receivedFirstData();
}
void FrameLoader::clientRedirectCancelledOrFinished(bool cancelWithLoadInProgress)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes