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

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

Issue 145393004: Update components/autofill code to use WebElementCollection instead of WebNodeCollection (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 10 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 | « components/autofill/content/renderer/autofill_agent.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/content/renderer/form_autofill_util.cc
diff --git a/components/autofill/content/renderer/form_autofill_util.cc b/components/autofill/content/renderer/form_autofill_util.cc
index e0ed2226c17b7b5416dc5b7371272c87945d85c1..0657f78a4f64bdd7ba7056470281269ed797bb4a 100644
--- a/components/autofill/content/renderer/form_autofill_util.cc
+++ b/components/autofill/content/renderer/form_autofill_util.cc
@@ -21,6 +21,7 @@
#include "third_party/WebKit/public/platform/WebVector.h"
#include "third_party/WebKit/public/web/WebDocument.h"
#include "third_party/WebKit/public/web/WebElement.h"
+#include "third_party/WebKit/public/web/WebElementCollection.h"
#include "third_party/WebKit/public/web/WebExceptionCode.h"
#include "third_party/WebKit/public/web/WebFormControlElement.h"
#include "third_party/WebKit/public/web/WebFormElement.h"
@@ -28,7 +29,6 @@
#include "third_party/WebKit/public/web/WebInputElement.h"
#include "third_party/WebKit/public/web/WebLabelElement.h"
#include "third_party/WebKit/public/web/WebNode.h"
-#include "third_party/WebKit/public/web/WebNodeCollection.h"
#include "third_party/WebKit/public/web/WebNodeList.h"
#include "third_party/WebKit/public/web/WebOptionElement.h"
#include "third_party/WebKit/public/web/WebSelectElement.h"
@@ -36,6 +36,7 @@
using blink::WebDocument;
using blink::WebElement;
+using blink::WebElementCollection;
using blink::WebExceptionCode;
using blink::WebFormControlElement;
using blink::WebFormElement;
@@ -43,7 +44,6 @@ using blink::WebFrame;
using blink::WebInputElement;
using blink::WebLabelElement;
using blink::WebNode;
-using blink::WebNodeCollection;
using blink::WebNodeList;
using blink::WebOptionElement;
using blink::WebSelectElement;
@@ -907,9 +907,9 @@ bool WebFormElementToFormData(
// element's name as a key into the <name, FormFieldData> map to find the
// previously created FormFieldData and set the FormFieldData's label to the
// label.firstChild().nodeValue() of the label element.
- WebNodeCollection labels = form_element.getElementsByTagName(kLabel);
+ WebElementCollection labels = form_element.getElementsByTagName(kLabel);
DCHECK(!labels.isNull());
- for (WebNode item = labels.firstItem(); !item.isNull();
+ for (WebElement item = labels.firstItem(); !item.isNull();
item = labels.nextItem()) {
WebLabelElement label = item.to<WebLabelElement>();
WebFormControlElement field_element =
« no previous file with comments | « components/autofill/content/renderer/autofill_agent.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698