| OLD | NEW |
| 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 736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 747 m_pastNamesMap = adoptPtr(new PastNamesMap); | 747 m_pastNamesMap = adoptPtr(new PastNamesMap); |
| 748 m_pastNamesMap->set(pastName.impl(), element); | 748 m_pastNamesMap->set(pastName.impl(), element); |
| 749 } | 749 } |
| 750 | 750 |
| 751 void HTMLFormElement::removeFromPastNamesMap(HTMLElement& element) | 751 void HTMLFormElement::removeFromPastNamesMap(HTMLElement& element) |
| 752 { | 752 { |
| 753 if (!m_pastNamesMap) | 753 if (!m_pastNamesMap) |
| 754 return; | 754 return; |
| 755 PastNamesMap::iterator end = m_pastNamesMap->end(); | 755 PastNamesMap::iterator end = m_pastNamesMap->end(); |
| 756 for (PastNamesMap::iterator it = m_pastNamesMap->begin(); it != end; ++it) { | 756 for (PastNamesMap::iterator it = m_pastNamesMap->begin(); it != end; ++it) { |
| 757 if (it->value.get() == &element) { | 757 if (it->value == &element) { |
| 758 it->value = 0; | 758 it->value = 0; |
| 759 // Keep looping. Single element can have multiple names. | 759 // Keep looping. Single element can have multiple names. |
| 760 } | 760 } |
| 761 } | 761 } |
| 762 } | 762 } |
| 763 | 763 |
| 764 void HTMLFormElement::getNamedElements(const AtomicString& name, Vector<RefPtr<N
ode> >& namedItems) | 764 void HTMLFormElement::getNamedElements(const AtomicString& name, Vector<RefPtr<N
ode> >& namedItems) |
| 765 { | 765 { |
| 766 // http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#do
m-form-nameditem | 766 // http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#do
m-form-nameditem |
| 767 elements()->namedItems(name, namedItems); | 767 elements()->namedItems(name, namedItems); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 819 } | 819 } |
| 820 | 820 |
| 821 void HTMLFormElement::setDemoted(bool demoted) | 821 void HTMLFormElement::setDemoted(bool demoted) |
| 822 { | 822 { |
| 823 if (demoted) | 823 if (demoted) |
| 824 UseCounter::count(document(), UseCounter::DemotedFormElement); | 824 UseCounter::count(document(), UseCounter::DemotedFormElement); |
| 825 m_wasDemoted = demoted; | 825 m_wasDemoted = demoted; |
| 826 } | 826 } |
| 827 | 827 |
| 828 } // namespace | 828 } // namespace |
| OLD | NEW |