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

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

Issue 96653004: Remove support for the obsolete <isindex> tag. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Test. Created 6 years, 9 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/devtools/front_end/ElementsTreeOutline.js ('k') | no next file » | 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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 if (control->isDisabledFormControl() || control->name().isNull()) 207 if (control->isDisabledFormControl() || control->name().isNull())
208 continue; 208 continue;
209 209
210 FormDataList dataList(*encoding); 210 FormDataList dataList(*encoding);
211 if (!control->appendFormData(dataList, false)) 211 if (!control->appendFormData(dataList, false))
212 continue; 212 continue;
213 213
214 const Vector<FormDataList::Item>& items = dataList.items(); 214 const Vector<FormDataList::Item>& items = dataList.items();
215 215
216 for (Vector<FormDataList::Item>::const_iterator j(items.begin()); j != i tems.end(); ++j) { 216 for (Vector<FormDataList::Item>::const_iterator j(items.begin()); j != i tems.end(); ++j) {
217 // Handle ISINDEX / <input name=isindex> specially, but only if it's 217 if (!encodedString->isEmpty())
218 // the first entry. 218 encodedString->append('&');
219 if (!encodedString->isEmpty() || j->data() != "isindex") { 219 FormDataBuilder::encodeStringAsFormData(*encodedString, j->data());
220 if (!encodedString->isEmpty()) 220 encodedString->append('=');
221 encodedString->append('&');
222 FormDataBuilder::encodeStringAsFormData(*encodedString, j->data( ));
223 encodedString->append('=');
224 }
225 ++j; 221 ++j;
226 if (control == textElement) { 222 if (control == textElement) {
227 encodedString->append("{searchTerms}", 13); 223 encodedString->append("{searchTerms}", 13);
228 isElementFound = true; 224 isElementFound = true;
229 } else 225 } else
230 FormDataBuilder::encodeStringAsFormData(*encodedString, j->data( )); 226 FormDataBuilder::encodeStringAsFormData(*encodedString, j->data( ));
231 } 227 }
232 } 228 }
233 return isElementFound; 229 return isElementFound;
234 } 230 }
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 283
288 String action(formElement->action()); 284 String action(formElement->action());
289 KURL url(formElement->document().completeURL(action.isNull() ? "" : action)) ; 285 KURL url(formElement->document().completeURL(action.isNull() ? "" : action)) ;
290 RefPtr<FormData> formData = FormData::create(encodedString); 286 RefPtr<FormData> formData = FormData::create(encodedString);
291 url.setQuery(formData->flattenToString()); 287 url.setQuery(formData->flattenToString());
292 m_url = url; 288 m_url = url;
293 m_encoding = String(encoding.name()); 289 m_encoding = String(encoding.name());
294 } 290 }
295 291
296 } // namespace blink 292 } // namespace blink
OLDNEW
« no previous file with comments | « Source/devtools/front_end/ElementsTreeOutline.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698