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

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

Issue 334713006: Use stricter typing for NodeLists throughout the code base (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase 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/HTMLFormElement.h ('k') | Source/core/html/HTMLObjectElement.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 25 matching lines...) Expand all
36 #include "core/events/AutocompleteErrorEvent.h" 36 #include "core/events/AutocompleteErrorEvent.h"
37 #include "core/events/Event.h" 37 #include "core/events/Event.h"
38 #include "core/events/GenericEventQueue.h" 38 #include "core/events/GenericEventQueue.h"
39 #include "core/events/ScopedEventQueue.h" 39 #include "core/events/ScopedEventQueue.h"
40 #include "core/frame/DOMWindow.h" 40 #include "core/frame/DOMWindow.h"
41 #include "core/frame/LocalFrame.h" 41 #include "core/frame/LocalFrame.h"
42 #include "core/frame/UseCounter.h" 42 #include "core/frame/UseCounter.h"
43 #include "core/frame/csp/ContentSecurityPolicy.h" 43 #include "core/frame/csp/ContentSecurityPolicy.h"
44 #include "core/html/HTMLCollection.h" 44 #include "core/html/HTMLCollection.h"
45 #include "core/html/HTMLDialogElement.h" 45 #include "core/html/HTMLDialogElement.h"
46 #include "core/html/HTMLFormControlsCollection.h"
46 #include "core/html/HTMLImageElement.h" 47 #include "core/html/HTMLImageElement.h"
47 #include "core/html/HTMLInputElement.h" 48 #include "core/html/HTMLInputElement.h"
48 #include "core/html/HTMLObjectElement.h" 49 #include "core/html/HTMLObjectElement.h"
49 #include "core/html/RadioNodeList.h" 50 #include "core/html/RadioNodeList.h"
50 #include "core/html/forms/FormController.h" 51 #include "core/html/forms/FormController.h"
51 #include "core/loader/FrameLoader.h" 52 #include "core/loader/FrameLoader.h"
52 #include "core/loader/FrameLoaderClient.h" 53 #include "core/loader/FrameLoaderClient.h"
53 #include "core/loader/MixedContentChecker.h" 54 #include "core/loader/MixedContentChecker.h"
54 #include "core/rendering/RenderTextControl.h" 55 #include "core/rendering/RenderTextControl.h"
55 #include "platform/UserGestureIndicator.h" 56 #include "platform/UserGestureIndicator.h"
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 #endif 553 #endif
553 554
554 void HTMLFormElement::didAssociateByParser() 555 void HTMLFormElement::didAssociateByParser()
555 { 556 {
556 if (!m_didFinishParsingChildren) 557 if (!m_didFinishParsingChildren)
557 return; 558 return;
558 m_hasElementsAssociatedByParser = true; 559 m_hasElementsAssociatedByParser = true;
559 UseCounter::count(document(), UseCounter::FormAssociationByParser); 560 UseCounter::count(document(), UseCounter::FormAssociationByParser);
560 } 561 }
561 562
562 PassRefPtrWillBeRawPtr<HTMLCollection> HTMLFormElement::elements() 563 PassRefPtrWillBeRawPtr<HTMLFormControlsCollection> HTMLFormElement::elements()
563 { 564 {
564 return ensureCachedHTMLCollection(FormControls); 565 return toHTMLFormControlsCollection(ensureCachedHTMLCollection(FormControls) .get());
565 } 566 }
566 567
567 void HTMLFormElement::collectAssociatedElements(Node& root, FormAssociatedElemen t::List& elements) const 568 void HTMLFormElement::collectAssociatedElements(Node& root, FormAssociatedElemen t::List& elements) const
568 { 569 {
569 elements.clear(); 570 elements.clear();
570 for (HTMLElement* element = Traversal<HTMLElement>::firstWithin(root); eleme nt; element = Traversal<HTMLElement>::next(*element)) { 571 for (HTMLElement* element = Traversal<HTMLElement>::firstWithin(root); eleme nt; element = Traversal<HTMLElement>::next(*element)) {
571 FormAssociatedElement* associatedElement = 0; 572 FormAssociatedElement* associatedElement = 0;
572 if (element->isFormControlElement()) 573 if (element->isFormControlElement())
573 associatedElement = toHTMLFormControlElement(element); 574 associatedElement = toHTMLFormControlElement(element);
574 else if (isHTMLObjectElement(*element)) 575 else if (isHTMLObjectElement(*element))
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 } 799 }
799 800
800 void HTMLFormElement::setDemoted(bool demoted) 801 void HTMLFormElement::setDemoted(bool demoted)
801 { 802 {
802 if (demoted) 803 if (demoted)
803 UseCounter::count(document(), UseCounter::DemotedFormElement); 804 UseCounter::count(document(), UseCounter::DemotedFormElement);
804 m_wasDemoted = demoted; 805 m_wasDemoted = demoted;
805 } 806 }
806 807
807 } // namespace 808 } // namespace
OLDNEW
« no previous file with comments | « Source/core/html/HTMLFormElement.h ('k') | Source/core/html/HTMLObjectElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698