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

Unified Diff: Source/web/WebSearchableFormData.cpp

Issue 23819007: Have Node::document() return a reference instead of a pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 4 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/web/WebPluginContainerImpl.cpp ('k') | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebSearchableFormData.cpp
diff --git a/Source/web/WebSearchableFormData.cpp b/Source/web/WebSearchableFormData.cpp
index 08a51d460b7b67498bed4845fc82e1515355b55d..67d2ead385342c6ed1b0391c236877bcc0439ca5 100644
--- a/Source/web/WebSearchableFormData.cpp
+++ b/Source/web/WebSearchableFormData.cpp
@@ -65,9 +65,9 @@ void GetFormEncoding(const HTMLFormElement* form, WTF::TextEncoding* encoding)
if (encoding->isValid())
return;
}
- if (!form->document()->loader())
+ if (!form->document().loader())
return;
- *encoding = WTF::TextEncoding(form->document()->encoding());
+ *encoding = WTF::TextEncoding(form->document().encoding());
}
// Returns true if the submit request results in an HTTP URL.
@@ -76,7 +76,7 @@ bool IsHTTPFormSubmit(const HTMLFormElement* form)
// FIXME: This function is insane. This is an overly complicated way to get this information.
String action(form->action());
// The isNull() check is trying to avoid completeURL returning KURL() when passed a null string.
- return form->document()->completeURL(action.isNull() ? "" : action).protocolIs("http");
+ return form->document().completeURL(action.isNull() ? "" : action).protocolIs("http");
}
// If the form does not have an activated submit button, the first submit
@@ -290,7 +290,7 @@ WebSearchableFormData::WebSearchableFormData(const WebFormElement& form, const W
return;
String action(formElement->action());
- KURL url(formElement->document()->completeURL(action.isNull() ? "" : action));
+ KURL url(formElement->document().completeURL(action.isNull() ? "" : action));
RefPtr<FormData> formData = FormData::create(encodedString);
url.setQuery(formData->flattenToString());
m_url = url;
« no previous file with comments | « Source/web/WebPluginContainerImpl.cpp ('k') | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698