Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(196)

Issue 10918017: Merge 126839 - REGRESSION(r109480): Form state for iframe content is not restored (Closed)

Created:
8 years, 3 months ago by tkent
Modified:
8 years, 3 months ago
Reviewers:
tkent
CC:
chromium-reviews
Base URL:
http://svn.webkit.org/repository/webkit/branches/chromium/1229/
Visibility:
Public.

Description

Merge 126839 - REGRESSION(r109480): Form state for iframe content is not restored https://bugs.webkit.org/show_bug.cgi?id=90870 Reviewed by Jochen Eisinger. Source/WebCore: Since r109480, we have restored form state only for documents loaded by FrameLoader::loadItem(). However we should restore form state for documents in sub-frames of documents loaded by FrameLoader::loadItem(). Test: fast/loader/form-state-restore-with-frames.html * history/HistoryItem.cpp: (WebCore::HistoryItem::isAncestorOf): Added. A function to search descendants for the specified HistoryItem. This is used by isAssociatedToRequestedHistoryItem(). * history/HistoryItem.h: (HistoryItem): Declare isAncestorOf(). * loader/HistoryController.cpp: (WebCore::HistoryController::saveDocumentState): Don't save form state for detached document. This is needed because saveDocumentState() is called twice; before document detach and after document detach. We need to avoid the latter call because formElementsState() for a detached document produces an empty state. (WebCore::isAssociatedToRequestedHistoryItem): Added. This function checks the current HistoryItem is associated to the HistoryItem specified to FrameLoader::loadItem(). (WebCore::HistoryController::restoreDocumentState): Uses isAssociatedToRequestedHistoryItem(). LayoutTests: * fast/loader/form-state-restore-with-frames.html: Added. * fast/loader/form-state-restore-with-frames-expected.txt: Added. * fast/loader/resources/form-state-restore-with-frames-1.html: Added. TBR=tkent@chromium.org Committed: https://trac.webkit.org/changeset/127221

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+28 lines, --1 lines) Patch
A + LayoutTests/fast/loader/form-state-restore-with-frames.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/fast/loader/form-state-restore-with-frames-expected.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/fast/loader/resources/form-state-restore-with-frames-1.html View 0 chunks +-1 lines, --1 lines 0 comments Download
M Source/WebCore/history/HistoryItem.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/WebCore/history/HistoryItem.cpp View 1 chunk +12 lines, -0 lines 0 comments Download
M Source/WebCore/loader/HistoryController.cpp View 3 chunks +18 lines, -2 lines 0 comments Download

Messages

Total messages: 1 (0 generated)
tkent
8 years, 3 months ago (2012-08-31 01:13:28 UTC) #1

          

Powered by Google App Engine
This is Rietveld 408576698