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

Side by Side Diff: Source/web/WebSearchableFormData.cpp

Issue 270573008: Oilpan: Prepare to support garbage-collected Node in WebNode hierarchy. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add FIXME comments Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/web/WebRange.cpp ('k') | Source/web/WebSelectElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 } 228 }
229 } 229 }
230 return isElementFound; 230 return isElementFound;
231 } 231 }
232 } // namespace 232 } // namespace
233 233
234 namespace blink { 234 namespace blink {
235 235
236 WebSearchableFormData::WebSearchableFormData(const WebFormElement& form, const W ebInputElement& selectedInputElement) 236 WebSearchableFormData::WebSearchableFormData(const WebFormElement& form, const W ebInputElement& selectedInputElement)
237 { 237 {
238 RefPtr<HTMLFormElement> formElement = form.operator PassRefPtr<HTMLFormEleme nt>(); 238 RefPtrWillBeRawPtr<HTMLFormElement> formElement = static_cast<PassRefPtrWill BeRawPtr<HTMLFormElement> >(form);
239 HTMLInputElement* inputElement = selectedInputElement.operator PassRefPtr<HT MLInputElement>().get(); 239 HTMLInputElement* inputElement = static_cast<PassRefPtrWillBeRawPtr<HTMLInpu tElement> >(selectedInputElement).get();
240 240
241 // Only consider forms that GET data. 241 // Only consider forms that GET data.
242 // Allow HTTPS only when an input element is provided. 242 // Allow HTTPS only when an input element is provided.
243 if (equalIgnoringCase(formElement->getAttribute(methodAttr), "post") 243 if (equalIgnoringCase(formElement->getAttribute(methodAttr), "post")
244 || (!IsHTTPFormSubmit(formElement.get()) && !inputElement)) 244 || (!IsHTTPFormSubmit(formElement.get()) && !inputElement))
245 return; 245 return;
246 246
247 Vector<char> encodedString; 247 Vector<char> encodedString;
248 WTF::TextEncoding encoding; 248 WTF::TextEncoding encoding;
249 249
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 284
285 String action(formElement->action()); 285 String action(formElement->action());
286 KURL url(formElement->document().completeURL(action.isNull() ? "" : action)) ; 286 KURL url(formElement->document().completeURL(action.isNull() ? "" : action)) ;
287 RefPtr<FormData> formData = FormData::create(encodedString); 287 RefPtr<FormData> formData = FormData::create(encodedString);
288 url.setQuery(formData->flattenToString()); 288 url.setQuery(formData->flattenToString());
289 m_url = url; 289 m_url = url;
290 m_encoding = String(encoding.name()); 290 m_encoding = String(encoding.name());
291 } 291 }
292 292
293 } // namespace blink 293 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebRange.cpp ('k') | Source/web/WebSelectElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698