Changeset 109480 in webkit
- Timestamp:
- Mar 1, 2012, 6:29:59 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 5 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/loader/form-state-restore-with-locked-back-forward-list-expected.txt (added)
-
LayoutTests/fast/loader/form-state-restore-with-locked-back-forward-list.html (added)
-
LayoutTests/fast/loader/resources/form-state-restore-with-locked-back-forward-list-2.html (added)
-
LayoutTests/fast/loader/resources/form-state-restore-with-locked-back-forward-list-3.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/loader/FrameLoader.cpp (modified) (2 diffs)
-
Source/WebCore/loader/FrameLoader.h (modified) (2 diffs)
-
Source/WebCore/loader/HistoryController.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r109468 r109480 1 2012-03-01 Kent Tamura <tkent@chromium.org> 2 3 REGRESSION(r106388): Form state is restored to a wrong document. 4 https://bugs.webkit.org/show_bug.cgi?id=79206 5 6 Reviewed by Brady Eidson. 7 8 * fast/loader/form-state-restore-with-locked-back-forward-list-expected.txt: Added. 9 * fast/loader/form-state-restore-with-locked-back-forward-list.html: Added. 10 * fast/loader/resources/form-state-restore-with-locked-back-forward-list-2.html: Added. 11 * fast/loader/resources/form-state-restore-with-locked-back-forward-list-3.html: Added. 12 1 13 2012-03-01 Adam Klein <adamk@chromium.org> 2 14 -
trunk/Source/WebCore/ChangeLog
r109476 r109480 1 2012-03-01 Kent Tamura <tkent@chromium.org> 2 3 REGRESSION(r106388): Form state is restored to a wrong document. 4 https://bugs.webkit.org/show_bug.cgi?id=79206 5 6 Reviewed by Brady Eidson. 7 8 In some cases, the URL of the current HistoryItem and the document 9 URL are mismatched. 10 A form state should be restored only if the document was loaded 11 with a HistoryItem and the document is not loaded as a 12 redirection. 13 14 Test: fast/loader/form-state-restore-with-locked-back-forward-list.html 15 16 * loader/FrameLoader.cpp: 17 (WebCore::FrameLoader::checkCompleted): Clear m_requestedHistoryItem. 18 (WebCore::FrameLoader::loadItem): 19 Save the requested HistoryItem for didLoadWithLodItem(). 20 * loader/FrameLoader.h: 21 (WebCore::FrameLoader::requestedHistoryItem): 22 Added. Accessor for m_requestedHistoryItem. 23 * loader/HistoryController.cpp: 24 (WebCore::HistoryController::restoreDocumentState): 25 Restore a form state only if the current document was loaded with 26 FrameLoader::loadItem() and not redirection. 27 1 28 2012-03-01 Xingnan Wang <xingnan.wang@intel.com> 2 29 -
trunk/Source/WebCore/loader/FrameLoader.cpp
r109369 r109480 739 739 // OK, completed. 740 740 m_isComplete = true; 741 m_requestedHistoryItem = 0; 741 742 m_frame->document()->setReadyState(Document::Complete); 742 743 … … 3174 3175 void FrameLoader::loadItem(HistoryItem* item, FrameLoadType loadType) 3175 3176 { 3177 m_requestedHistoryItem = item; 3176 3178 HistoryItem* currentItem = history()->currentItem(); 3177 3179 bool sameDocumentNavigation = currentItem && item->shouldDoSameDocumentNavigationTo(currentItem); -
trunk/Source/WebCore/loader/FrameLoader.h
r106492 r109480 120 120 void open(CachedFrameBase&); 121 121 void loadItem(HistoryItem*, FrameLoadType); 122 HistoryItem* requestedHistoryItem() const { return m_requestedHistoryItem.get(); } 122 123 123 124 static void reportLocalLoadFailed(Frame*, const String& url); … … 438 439 439 440 KURL m_previousUrl; 441 RefPtr<HistoryItem> m_requestedHistoryItem; 440 442 }; 441 443 -
trunk/Source/WebCore/loader/HistoryController.cpp
r105574 r109480 201 201 if (!itemToRestore) 202 202 return; 203 204 LOG(Loading, "WebCoreLoading %s: restoring form state from %p", m_frame->tree()->uniqueName().string().utf8().data(), itemToRestore); 205 doc->setStateForNewFormElements(itemToRestore->documentState()); 203 if (m_frame->loader()->requestedHistoryItem() == m_currentItem.get() && !m_frame->loader()->documentLoader()->isClientRedirect()) { 204 LOG(Loading, "WebCoreLoading %s: restoring form state from %p", m_frame->tree()->uniqueName().string().utf8().data(), itemToRestore); 205 doc->setStateForNewFormElements(itemToRestore->documentState()); 206 } 206 207 } 207 208
Note:
See TracChangeset
for help on using the changeset viewer.