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

Unified Diff: components/autofill/content/renderer/page_click_tracker.cc

Issue 295603002: Use toWebTextAreaElement in GetTextWebTextAreaElement (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: removed hasTagName 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/content/renderer/page_click_tracker.cc
diff --git a/components/autofill/content/renderer/page_click_tracker.cc b/components/autofill/content/renderer/page_click_tracker.cc
index 112d8e86633de60d91579ec4ddd3ee43be741fc5..d7690fbe7c593a64d34ade078322106d0fbe16e2 100644
--- a/components/autofill/content/renderer/page_click_tracker.cc
+++ b/components/autofill/content/renderer/page_click_tracker.cc
@@ -52,9 +52,11 @@ const WebTextAreaElement GetTextWebTextAreaElement(const WebNode& node) {
if (!node.isElementNode())
return WebTextAreaElement();
const WebElement element = node.toConst<WebElement>();
- if (!element.hasTagName("textarea"))
+ const WebTextAreaElement* textarea_element =
+ blink::toWebTextAreaElement(&element);
+ if (!textarea_element)
return WebTextAreaElement();
- return element.toConst<WebTextAreaElement>();
+ return *textarea_element;
}
// Checks to see if a text field was the previously selected node and is now
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698