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

Unified Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2710983003: Move HistoryItem handling to DocumentLoader (Closed)
Patch Set: Address kinuko's comments Created 3 years, 9 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 | « no previous file | third_party/WebKit/Source/core/frame/History.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index a1481a308f4261799da7bd1290155e90156eb33d..6dcfb95222660dd619731a2f9d0b19cf1815fbb9 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -1632,10 +1632,9 @@ Node::NodeType Document::getNodeType() const {
FormController& Document::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());
+ HistoryItem* historyItem = loader() ? loader()->historyItem() : nullptr;
+ if (historyItem)
+ historyItem->setDocumentState(m_formController->formElementsState());
}
return *m_formController;
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/History.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698