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

Side by Side Diff: Source/core/html/HTMLFormElement.cpp

Issue 137433008: Have HTMLCollection::item() return an Element as per specification (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
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 unified diff | Download patch
« no previous file with comments | « Source/core/html/HTMLFormElement.h ('k') | Source/core/html/HTMLFormElement.idl » ('j') | 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed.
6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 { 176 {
177 const Vector<FormAssociatedElement*>& elements = associatedElements(); 177 const Vector<FormAssociatedElement*>& elements = associatedElements();
178 unsigned len = 0; 178 unsigned len = 0;
179 for (unsigned i = 0; i < elements.size(); ++i) { 179 for (unsigned i = 0; i < elements.size(); ++i) {
180 if (elements[i]->isEnumeratable()) 180 if (elements[i]->isEnumeratable())
181 ++len; 181 ++len;
182 } 182 }
183 return len; 183 return len;
184 } 184 }
185 185
186 Node* HTMLFormElement::item(unsigned index) 186 Element* HTMLFormElement::item(unsigned index)
187 { 187 {
188 return elements()->item(index); 188 return elements()->item(index);
189 } 189 }
190 190
191 void HTMLFormElement::submitImplicitly(Event* event, bool fromImplicitSubmission Trigger) 191 void HTMLFormElement::submitImplicitly(Event* event, bool fromImplicitSubmission Trigger)
192 { 192 {
193 int submissionTriggerCount = 0; 193 int submissionTriggerCount = 0;
194 bool seenDefaultButton = false; 194 bool seenDefaultButton = false;
195 const Vector<FormAssociatedElement*>& elements = associatedElements(); 195 const Vector<FormAssociatedElement*>& elements = associatedElements();
196 for (unsigned i = 0; i < elements.size(); ++i) { 196 for (unsigned i = 0; i < elements.size(); ++i) {
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 } 817 }
818 818
819 void HTMLFormElement::setDemoted(bool demoted) 819 void HTMLFormElement::setDemoted(bool demoted)
820 { 820 {
821 if (demoted) 821 if (demoted)
822 UseCounter::count(document(), UseCounter::DemotedFormElement); 822 UseCounter::count(document(), UseCounter::DemotedFormElement);
823 m_wasDemoted = demoted; 823 m_wasDemoted = demoted;
824 } 824 }
825 825
826 } // namespace 826 } // namespace
OLDNEW
« no previous file with comments | « Source/core/html/HTMLFormElement.h ('k') | Source/core/html/HTMLFormElement.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698