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

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

Issue 2710983003: Move HistoryItem handling to DocumentLoader (Closed)
Patch Set: Experiment to fix DCHECKing tests 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
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 4ba216fdc155a192f52295d013dd8ba229258402..88fd97fb0bcc4c731f0b225f5fa112f2cdfbca80 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))
Nate Chapin 2017/03/27 21:02:01 This is the sole use of isCurrentDocument(), and d
- 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') | third_party/WebKit/Source/core/frame/History.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698