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

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

Issue 61773005: Rename WebKit namespace to blink (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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/WebScrollbarThemePainter.cpp ('k') | Source/web/WebSecurityOrigin.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 encodedString->append("{searchTerms}", 13); 228 encodedString->append("{searchTerms}", 13);
229 isElementFound = true; 229 isElementFound = true;
230 } else 230 } else
231 FormDataBuilder::encodeStringAsFormData(*encodedString, j->data( )); 231 FormDataBuilder::encodeStringAsFormData(*encodedString, j->data( ));
232 } 232 }
233 } 233 }
234 return isElementFound; 234 return isElementFound;
235 } 235 }
236 } // namespace 236 } // namespace
237 237
238 namespace WebKit { 238 namespace blink {
239 239
240 WebSearchableFormData::WebSearchableFormData(const WebFormElement& form, const W ebInputElement& selectedInputElement) 240 WebSearchableFormData::WebSearchableFormData(const WebFormElement& form, const W ebInputElement& selectedInputElement)
241 { 241 {
242 RefPtr<HTMLFormElement> formElement = form.operator PassRefPtr<HTMLFormEleme nt>(); 242 RefPtr<HTMLFormElement> formElement = form.operator PassRefPtr<HTMLFormEleme nt>();
243 HTMLInputElement* inputElement = selectedInputElement.operator PassRefPtr<HT MLInputElement>().get(); 243 HTMLInputElement* inputElement = selectedInputElement.operator PassRefPtr<HT MLInputElement>().get();
244 244
245 // Only consider forms that GET data. 245 // Only consider forms that GET data.
246 // Allow HTTPS only when an input element is provided. 246 // Allow HTTPS only when an input element is provided.
247 if (equalIgnoringCase(formElement->getAttribute(methodAttr), "post") 247 if (equalIgnoringCase(formElement->getAttribute(methodAttr), "post")
248 || (!IsHTTPFormSubmit(formElement.get()) && !inputElement)) 248 || (!IsHTTPFormSubmit(formElement.get()) && !inputElement))
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 return; 287 return;
288 288
289 String action(formElement->action()); 289 String action(formElement->action());
290 KURL url(formElement->document().completeURL(action.isNull() ? "" : action)) ; 290 KURL url(formElement->document().completeURL(action.isNull() ? "" : action)) ;
291 RefPtr<FormData> formData = FormData::create(encodedString); 291 RefPtr<FormData> formData = FormData::create(encodedString);
292 url.setQuery(formData->flattenToString()); 292 url.setQuery(formData->flattenToString());
293 m_url = url; 293 m_url = url;
294 m_encoding = String(encoding.name()); 294 m_encoding = String(encoding.name());
295 } 295 }
296 296
297 } // namespace WebKit 297 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebScrollbarThemePainter.cpp ('k') | Source/web/WebSecurityOrigin.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698