Changeset 69432 in webkit
- Timestamp:
- Oct 8, 2010 5:01:57 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r69430 r69432 1 2010-10-08 Mihai Parparita <mihaip@chromium.org> 2 3 Reviewed by Adam Barth. 4 5 popstate events are lost when network connection is in progress 6 https://bugs.webkit.org/show_bug.cgi?id=42940 7 8 Add test case where we have an image request that never finishes while 9 using pushState and history.back(). 10 11 * http/tests/history/popstate-fires-with-pending-requests-expected.txt: Added. 12 * http/tests/history/popstate-fires-with-pending-requests.html: Added. 13 * http/tests/history/resources/slow-image.php: Added. 14 1 15 2010-10-08 Abhishek Arya <inferno@chromium.org> 2 16 -
trunk/WebCore/ChangeLog
r69431 r69432 1 2010-10-08 Mihai Parparita <mihaip@chromium.org> 2 3 Reviewed by Adam Barth. 4 5 popstate events are lost when network connection is in progress 6 https://bugs.webkit.org/show_bug.cgi?id=42940 7 8 Instead of checking FrameLoader::isComplete() (which isn't true if the 9 document's resource loader has requests outstanding), check that the 10 document's readyState is complete, as the spec says. 11 12 Test: http/tests/history/popstate-fires-with-pending-requests.html 13 14 * dom/Document.cpp: 15 (WebCore::Document::statePopped): 16 * loader/FrameLoader.cpp: 17 (WebCore::FrameLoader::didBeginDocument): Added call to set readyState 18 to Loading earlier. Otherwise, readyState's initial value is Complete, 19 and we only set it to Loading in Document::implicitOpen (which is called 20 after FrameLoader::didBeginDocument by DocumentWriter::begin), so we 21 could end up in Document::statePopped and have the readyState be 22 Complete, even if we hadn't even begin loading the document. 23 1 24 2010-10-08 Daniel Cheng <dcheng@chromium.org> 2 25 -
trunk/WebCore/dom/Document.cpp
r69406 r69432 4429 4429 void Document::statePopped(SerializedScriptValue* stateObject) 4430 4430 { 4431 Frame* f = frame(); 4432 if (!f) 4433 return; 4434 4435 if (f->loader()->isComplete()) 4431 if (!frame()) 4432 return; 4433 4434 // Per step 11 of section 6.5.9 (history traversal) of the HTML5 spec, we 4435 // defer firing of popstate until we're in the complete state. 4436 if (m_readyState == Complete) 4436 4437 enqueuePopstateEvent(stateObject); 4437 4438 else -
trunk/WebCore/loader/FrameLoader.cpp
r69039 r69432 659 659 m_didCallImplicitClose = false; 660 660 m_isLoadingMainResource = true; 661 m_frame->document()->setReadyState(Document::Loading); 661 662 662 663 if (m_pendingStateObject) {
Note: See TracChangeset
for help on using the changeset viewer.