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

Unified Diff: chrome/renderer/autofill/form_manager.cc

Issue 7044032: Heuristics for grabber-google.com.out (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 6 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 | « no previous file | chrome/renderer/autofill/form_manager_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/autofill/form_manager.cc
diff --git a/chrome/renderer/autofill/form_manager.cc b/chrome/renderer/autofill/form_manager.cc
index b1e721ab79bbe2b99502a7f7336e6acb84647f0f..adac984d4625f89433b13c3ae227f9a55ca6057a 100644
--- a/chrome/renderer/autofill/form_manager.cc
+++ b/chrome/renderer/autofill/form_manager.cc
@@ -77,6 +77,10 @@ bool IsScriptElement(const WebElement& element) {
return element.hasTagName("script");
}
+bool IsNoScriptElement(const WebElement& element) {
+ return element.hasTagName("noscript");
+}
+
bool IsAutofillableElement(const WebFormControlElement& element) {
const WebInputElement* input_element = toWebInputElement(&element);
return IsTextInput(input_element) || IsSelectElement(element);
@@ -98,8 +102,11 @@ string16 FindChildTextInner(const WebNode& node, int depth) {
// excluded.
if (node.isElementNode()) {
const WebElement element = node.toConst<WebElement>();
- if (IsOptionElement(element) || IsScriptElement(element))
+ if (IsOptionElement(element) ||
+ IsScriptElement(element) ||
+ IsNoScriptElement(element)) {
return element_text;
+ }
}
string16 node_text = node.nodeValue();
« no previous file with comments | « no previous file | chrome/renderer/autofill/form_manager_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698