Unreviewed, another attempt to fix the Windows build after r227479.
authorwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 Jan 2018 09:17:30 +0000 (09:17 +0000)
committerwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 Jan 2018 09:17:30 +0000 (09:17 +0000)
* WebFrame.cpp:
(WebFrame::elementWithName):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227481 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKitLegacy/win/ChangeLog
Source/WebKitLegacy/win/WebFrame.cpp

index ee315ab..3eeab64 100644 (file)
@@ -1,5 +1,12 @@
 2018-01-24  Wenson Hsieh  <wenson_hsieh@apple.com>
 
+        Unreviewed, another attempt to fix the Windows build after r227479.
+
+        * WebFrame.cpp:
+        (WebFrame::elementWithName):
+
+2018-01-24  Wenson Hsieh  <wenson_hsieh@apple.com>
+
         Unreviewed, try to fix the Windows build after r227479.
 
         Tweak some Windows WebKitLegacy code to use updated HTMLFormElement methods.
index f5a87a4..b63ae97 100644 (file)
@@ -1089,10 +1089,10 @@ HRESULT WebFrame::elementWithName(BSTR name, IDOMElement* form, IDOMElement** el
     HTMLFormElement* formElement = formElementFromDOMElement(form);
     if (formElement) {
         AtomicString targetName((UChar*)name, SysStringLen(name));
-        for (auto& element : formElement->copyAssociatedElementsVector()) {
-            if (!is<HTMLFormControlElement>(element.get()))
+        for (auto& associatedElement : formElement->copyAssociatedElementsVector()) {
+            if (!is<HTMLFormControlElement>(associatedElement.get()))
                 continue;
-            auto& elt = downcast<HTMLFormControlElement>(element.get());
+            auto& elt = downcast<HTMLFormControlElement>(associatedElement.get());
             // Skip option elements, other duds.
             if (elt.name() == targetName) {
                 *element = DOMElement::createInstance(&elt);