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

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

Issue 23464095: WTF::notFound looks too much like a local variable. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/html/HTMLEmbedElement.cpp ('k') | Source/core/html/HTMLImportLoader.cpp » ('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 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 removeFromVector(m_associatedElements, e); 571 removeFromVector(m_associatedElements, e);
572 } 572 }
573 573
574 bool HTMLFormElement::isURLAttribute(const Attribute& attribute) const 574 bool HTMLFormElement::isURLAttribute(const Attribute& attribute) const
575 { 575 {
576 return attribute.name() == actionAttr || HTMLElement::isURLAttribute(attribu te); 576 return attribute.name() == actionAttr || HTMLElement::isURLAttribute(attribu te);
577 } 577 }
578 578
579 void HTMLFormElement::registerImgElement(HTMLImageElement* e) 579 void HTMLFormElement::registerImgElement(HTMLImageElement* e)
580 { 580 {
581 ASSERT(m_imageElements.find(e) == notFound); 581 ASSERT(m_imageElements.find(e) == kNotFound);
582 m_imageElements.append(e); 582 m_imageElements.append(e);
583 } 583 }
584 584
585 void HTMLFormElement::removeImgElement(HTMLImageElement* e) 585 void HTMLFormElement::removeImgElement(HTMLImageElement* e)
586 { 586 {
587 ASSERT(m_imageElements.find(e) != notFound); 587 ASSERT(m_imageElements.find(e) != kNotFound);
588 removeFromPastNamesMap(*e); 588 removeFromPastNamesMap(*e);
589 removeFromVector(m_imageElements, e); 589 removeFromVector(m_imageElements, e);
590 } 590 }
591 591
592 PassRefPtr<HTMLCollection> HTMLFormElement::elements() 592 PassRefPtr<HTMLCollection> HTMLFormElement::elements()
593 { 593 {
594 return ensureCachedHTMLCollection(FormControls); 594 return ensureCachedHTMLCollection(FormControls);
595 } 595 }
596 596
597 String HTMLFormElement::name() const 597 String HTMLFormElement::name() const
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 Node* HTMLFormElement::elementFromPastNamesMap(const AtomicString& pastName) con st 689 Node* HTMLFormElement::elementFromPastNamesMap(const AtomicString& pastName) con st
690 { 690 {
691 if (pastName.isEmpty() || !m_pastNamesMap) 691 if (pastName.isEmpty() || !m_pastNamesMap)
692 return 0; 692 return 0;
693 Node* node = m_pastNamesMap->get(pastName.impl()); 693 Node* node = m_pastNamesMap->get(pastName.impl());
694 #if !ASSERT_DISABLED 694 #if !ASSERT_DISABLED
695 if (!node) 695 if (!node)
696 return 0; 696 return 0;
697 ASSERT_WITH_SECURITY_IMPLICATION(toHTMLElement(node)->form() == this); 697 ASSERT_WITH_SECURITY_IMPLICATION(toHTMLElement(node)->form() == this);
698 if (node->hasTagName(imgTag)) { 698 if (node->hasTagName(imgTag)) {
699 ASSERT_WITH_SECURITY_IMPLICATION(m_imageElements.find(node) != notFound) ; 699 ASSERT_WITH_SECURITY_IMPLICATION(m_imageElements.find(node) != kNotFound );
700 } else if (node->hasTagName(objectTag)) { 700 } else if (node->hasTagName(objectTag)) {
701 ASSERT_WITH_SECURITY_IMPLICATION(m_associatedElements.find(toHTMLObjectE lement(node)) != notFound); 701 ASSERT_WITH_SECURITY_IMPLICATION(m_associatedElements.find(toHTMLObjectE lement(node)) != kNotFound);
702 } else { 702 } else {
703 ASSERT_WITH_SECURITY_IMPLICATION(m_associatedElements.find(toHTMLFormCon trolElement(node)) != notFound); 703 ASSERT_WITH_SECURITY_IMPLICATION(m_associatedElements.find(toHTMLFormCon trolElement(node)) != kNotFound);
704 } 704 }
705 #endif 705 #endif
706 return node; 706 return node;
707 } 707 }
708 708
709 void HTMLFormElement::addToPastNamesMap(Node* element, const AtomicString& pastN ame) 709 void HTMLFormElement::addToPastNamesMap(Node* element, const AtomicString& pastN ame)
710 { 710 {
711 if (pastName.isEmpty()) 711 if (pastName.isEmpty())
712 return; 712 return;
713 if (!m_pastNamesMap) 713 if (!m_pastNamesMap)
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 } 786 }
787 787
788 void HTMLFormElement::setDemoted(bool demoted) 788 void HTMLFormElement::setDemoted(bool demoted)
789 { 789 {
790 if (demoted) 790 if (demoted)
791 UseCounter::count(&document(), UseCounter::DemotedFormElement); 791 UseCounter::count(&document(), UseCounter::DemotedFormElement);
792 m_wasDemoted = demoted; 792 m_wasDemoted = demoted;
793 } 793 }
794 794
795 } // namespace 795 } // namespace
OLDNEW
« no previous file with comments | « Source/core/html/HTMLEmbedElement.cpp ('k') | Source/core/html/HTMLImportLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698