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

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

Issue 2709033003: Migrate WTF::HashMap::get() to ::at() (Closed)
Patch Set: rebase Created 3 years, 9 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
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 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
6 * reserved. 6 * reserved.
7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 } 699 }
700 700
701 bool HTMLFormElement::reportValidity() { 701 bool HTMLFormElement::reportValidity() {
702 return validateInteractively(); 702 return validateInteractively();
703 } 703 }
704 704
705 Element* HTMLFormElement::elementFromPastNamesMap( 705 Element* HTMLFormElement::elementFromPastNamesMap(
706 const AtomicString& pastName) { 706 const AtomicString& pastName) {
707 if (pastName.isEmpty() || !m_pastNamesMap) 707 if (pastName.isEmpty() || !m_pastNamesMap)
708 return 0; 708 return 0;
709 Element* element = m_pastNamesMap->get(pastName); 709 Element* element = m_pastNamesMap->at(pastName);
710 #if DCHECK_IS_ON() 710 #if DCHECK_IS_ON()
711 if (!element) 711 if (!element)
712 return 0; 712 return 0;
713 SECURITY_DCHECK(toHTMLElement(element)->formOwner() == this); 713 SECURITY_DCHECK(toHTMLElement(element)->formOwner() == this);
714 if (isHTMLImageElement(*element)) { 714 if (isHTMLImageElement(*element)) {
715 SECURITY_DCHECK(imageElements().find(element) != kNotFound); 715 SECURITY_DCHECK(imageElements().find(element) != kNotFound);
716 } else if (isHTMLObjectElement(*element)) { 716 } else if (isHTMLObjectElement(*element)) {
717 SECURITY_DCHECK(listedElements().find(toHTMLObjectElement(element)) != 717 SECURITY_DCHECK(listedElements().find(toHTMLObjectElement(element)) !=
718 kNotFound); 718 kNotFound);
719 } else { 719 } else {
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 for (const auto& control : listedElements()) { 826 for (const auto& control : listedElements()) {
827 if (!control->isFormControlElement()) 827 if (!control->isFormControlElement())
828 continue; 828 continue;
829 if (toHTMLFormControlElement(control)->canBeSuccessfulSubmitButton()) 829 if (toHTMLFormControlElement(control)->canBeSuccessfulSubmitButton())
830 toHTMLFormControlElement(control)->pseudoStateChanged( 830 toHTMLFormControlElement(control)->pseudoStateChanged(
831 CSSSelector::PseudoDefault); 831 CSSSelector::PseudoDefault);
832 } 832 }
833 } 833 }
834 834
835 } // namespace blink 835 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLElement.cpp ('k') | third_party/WebKit/Source/core/html/forms/InputType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698