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

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

Issue 181653002: Have Document::formController() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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 92f5c6dd47b0fc04183972ac590261bdfc925442..73650f1c7b0250f5057316ed139b92e275adefb1 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -1431,11 +1431,11 @@ Node::NodeType Document::nodeType() const
return DOCUMENT_NODE;
}
-FormController* Document::formController()
+FormController& Document::formController()
{
if (!m_formController)
m_formController = FormController::create();
- return m_formController.get();
+ return *m_formController;
}
Vector<String> Document::formElementsState() const
@@ -1449,7 +1449,7 @@ void Document::setStateForNewFormElements(const Vector<String>& stateVector)
{
if (!stateVector.size() && !m_formController)
return;
- formController()->setStateForNewFormElements(stateVector);
+ formController().setStateForNewFormElements(stateVector);
}
FrameView* Document::view() const
« 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