Chromium Code Reviews| 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; |
| } |