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 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
693 } | 693 } |
694 } | 694 } |
695 return hasInvalidControls; | 695 return hasInvalidControls; |
696 } | 696 } |
697 | 697 |
698 Element* HTMLFormElement::elementFromPastNamesMap(const AtomicString& pastName) | 698 Element* HTMLFormElement::elementFromPastNamesMap(const AtomicString& pastName) |
699 { | 699 { |
700 if (pastName.isEmpty() || !m_pastNamesMap) | 700 if (pastName.isEmpty() || !m_pastNamesMap) |
701 return 0; | 701 return 0; |
702 Element* element = m_pastNamesMap->get(pastName); | 702 Element* element = m_pastNamesMap->get(pastName); |
703 #if !ASSERT_DISABLED | 703 #if ASSERT_ENABLED |
704 if (!element) | 704 if (!element) |
705 return 0; | 705 return 0; |
706 ASSERT_WITH_SECURITY_IMPLICATION(toHTMLElement(element)->formOwner() == this
); | 706 ASSERT_WITH_SECURITY_IMPLICATION(toHTMLElement(element)->formOwner() == this
); |
707 if (isHTMLImageElement(*element)) { | 707 if (isHTMLImageElement(*element)) { |
708 ASSERT_WITH_SECURITY_IMPLICATION(imageElements().find(element) != kNotFo
und); | 708 ASSERT_WITH_SECURITY_IMPLICATION(imageElements().find(element) != kNotFo
und); |
709 } else if (isHTMLObjectElement(*element)) { | 709 } else if (isHTMLObjectElement(*element)) { |
710 ASSERT_WITH_SECURITY_IMPLICATION(associatedElements().find(toHTMLObjectE
lement(element)) != kNotFound); | 710 ASSERT_WITH_SECURITY_IMPLICATION(associatedElements().find(toHTMLObjectE
lement(element)) != kNotFound); |
711 } else { | 711 } else { |
712 ASSERT_WITH_SECURITY_IMPLICATION(associatedElements().find(toHTMLFormCon
trolElement(element)) != kNotFound); | 712 ASSERT_WITH_SECURITY_IMPLICATION(associatedElements().find(toHTMLFormCon
trolElement(element)) != kNotFound); |
713 } | 713 } |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
799 } | 799 } |
800 | 800 |
801 void HTMLFormElement::setDemoted(bool demoted) | 801 void HTMLFormElement::setDemoted(bool demoted) |
802 { | 802 { |
803 if (demoted) | 803 if (demoted) |
804 UseCounter::count(document(), UseCounter::DemotedFormElement); | 804 UseCounter::count(document(), UseCounter::DemotedFormElement); |
805 m_wasDemoted = demoted; | 805 m_wasDemoted = demoted; |
806 } | 806 } |
807 | 807 |
808 } // namespace | 808 } // namespace |
OLD | NEW |