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

Unified Diff: Source/core/dom/Document.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.h ('k') | Source/core/html/HTMLFormControlElementWithState.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 371d825f7c2f8e38035823459ed3b3ec4e837fad..da432d87afd24a4c55bafcbbbd3f019598fc2943 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -428,7 +428,6 @@ Document::Document(const DocumentInit& initializer, DocumentClassFlags documentC
, m_visuallyOrdered(false)
, m_readyState(Complete)
, m_isParsing(false)
- , m_historyItemDocumentStateDirty(false)
, m_gotoAnchorNeededAfterStylesheetsLoad(false)
, m_containsValidityStyleRules(false)
, m_updateFocusAppearanceRestoresSelection(false)
@@ -1464,15 +1463,18 @@ Node::NodeType Document::nodeType() const
FormController& Document::formController()
{
- if (!m_formController)
+ if (!m_formController) {
m_formController = FormController::create();
+ if (m_frame && m_frame->loader().currentItem() && m_frame->loader().currentItem()->isCurrentDocument(this))
+ m_frame->loader().currentItem()->setDocumentState(m_formController->formElementsState());
+ }
return *m_formController;
}
-Vector<String> Document::formElementsState() const
+DocumentState* Document::formElementsState() const
{
if (!m_formController)
- return Vector<String>();
+ return 0;
return m_formController->formElementsState();
}
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/html/HTMLFormControlElementWithState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698