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

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

Issue 327323002: Start removing the double-negative !ASSERT_DISABLED (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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/HTMLCanvasElement.cpp ('k') | Source/core/html/HTMLSelectElement.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 682 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « Source/core/html/HTMLCanvasElement.cpp ('k') | Source/core/html/HTMLSelectElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698