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

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: 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
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 94af56c0c40277a1b7c5976aefe59891e6418b9f..3163af1a419d824a7448c4a8e47fb4a06d38f0ec 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -427,7 +427,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)
@@ -1465,15 +1464,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());
abarth-chromium 2014/04/17 23:41:24 It seems slightly odd that getting the formControl
Nate Chapin 2014/04/17 23:48:19 Right. I didn't see a cleaner way to hook this up.
+ }
return *m_formController;
}
-Vector<String> Document::formElementsState() const
+DocumentState* Document::formElementsState() const
{
if (!m_formController)
- return Vector<String>();
+ return 0;
return m_formController->formElementsState();
}

Powered by Google App Engine
This is Rietveld 408576698