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

Unified Diff: Source/core/html/HTMLFormControlElementWithState.cpp

Issue 239993011: Lazily generate HistoryItem's serialized form state (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Merged to trunk Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/html/forms/FormController.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLFormControlElementWithState.cpp
diff --git a/Source/core/html/HTMLFormControlElementWithState.cpp b/Source/core/html/HTMLFormControlElementWithState.cpp
index 4ecb0e9cf39b4079e98374b39f08002d3c0f7f65..23375e1dd90e7eead4a1ef73fca98dbffdf09b9e 100644
--- a/Source/core/html/HTMLFormControlElementWithState.cpp
+++ b/Source/core/html/HTMLFormControlElementWithState.cpp
@@ -29,6 +29,7 @@
#include "core/frame/LocalFrame.h"
#include "core/html/HTMLFormElement.h"
#include "core/html/forms/FormController.h"
+#include "core/loader/FrameLoaderClient.h"
#include "core/page/Chrome.h"
#include "core/page/ChromeClient.h"
@@ -70,13 +71,13 @@ void HTMLFormControlElementWithState::notifyFormStateChanged()
// selection before the document is active (or even in a frame).
if (!document().isActive())
return;
- document().frame()->loader().markDocumentStateDirty();
+ document().frame()->loader().client()->didUpdateCurrentHistoryItem();
}
bool HTMLFormControlElementWithState::shouldSaveAndRestoreFormControlState() const
{
// We don't save/restore control state in a form with autocomplete=off.
- return inActiveDocument() && shouldAutocomplete();
+ return inDocument() && shouldAutocomplete();
}
FormControlState HTMLFormControlElementWithState::saveFormControlState() const
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/html/forms/FormController.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698