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

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

Issue 488763002: Introduce HTMLDataListOptionsCollection subclass for HTMLCollection (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2010 Apple Inc. All rights reserved. 3 * Copyright (C) 2010 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 18 matching lines...) Expand all
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32 #include "config.h" 32 #include "config.h"
33 #include "core/html/HTMLDataListElement.h" 33 #include "core/html/HTMLDataListElement.h"
34 34
35 #include "core/HTMLNames.h" 35 #include "core/HTMLNames.h"
36 #include "core/dom/IdTargetObserverRegistry.h" 36 #include "core/dom/IdTargetObserverRegistry.h"
37 #include "core/dom/NodeListsNodeData.h" 37 #include "core/dom/NodeListsNodeData.h"
38 #include "core/frame/UseCounter.h" 38 #include "core/frame/UseCounter.h"
39 #include "core/html/HTMLDataListOptionsCollection.h"
39 40
40 namespace blink { 41 namespace blink {
41 42
42 inline HTMLDataListElement::HTMLDataListElement(Document& document) 43 inline HTMLDataListElement::HTMLDataListElement(Document& document)
43 : HTMLElement(HTMLNames::datalistTag, document) 44 : HTMLElement(HTMLNames::datalistTag, document)
44 { 45 {
45 ScriptWrappable::init(this); 46 ScriptWrappable::init(this);
46 } 47 }
47 48
48 PassRefPtrWillBeRawPtr<HTMLDataListElement> HTMLDataListElement::create(Document & document) 49 PassRefPtrWillBeRawPtr<HTMLDataListElement> HTMLDataListElement::create(Document & document)
49 { 50 {
50 UseCounter::count(document, UseCounter::DataListElement); 51 UseCounter::count(document, UseCounter::DataListElement);
51 return adoptRefWillBeNoop(new HTMLDataListElement(document)); 52 return adoptRefWillBeNoop(new HTMLDataListElement(document));
52 } 53 }
53 54
54 PassRefPtrWillBeRawPtr<HTMLCollection> HTMLDataListElement::options() 55 PassRefPtrWillBeRawPtr<HTMLDataListOptionsCollection> HTMLDataListElement::optio ns()
55 { 56 {
56 return ensureCachedCollection<HTMLCollection>(DataListOptions); 57 return ensureCachedCollection<HTMLDataListOptionsCollection>(DataListOptions );
57 } 58 }
58 59
59 void HTMLDataListElement::childrenChanged(const ChildrenChange& change) 60 void HTMLDataListElement::childrenChanged(const ChildrenChange& change)
60 { 61 {
61 HTMLElement::childrenChanged(change); 62 HTMLElement::childrenChanged(change);
62 if (!change.byParser) 63 if (!change.byParser)
63 treeScope().idTargetObserverRegistry().notifyObservers(getIdAttribute()) ; 64 treeScope().idTargetObserverRegistry().notifyObservers(getIdAttribute()) ;
64 } 65 }
65 66
66 void HTMLDataListElement::finishParsingChildren() 67 void HTMLDataListElement::finishParsingChildren()
67 { 68 {
68 treeScope().idTargetObserverRegistry().notifyObservers(getIdAttribute()); 69 treeScope().idTargetObserverRegistry().notifyObservers(getIdAttribute());
69 } 70 }
70 71
71 void HTMLDataListElement::optionElementChildrenChanged() 72 void HTMLDataListElement::optionElementChildrenChanged()
72 { 73 {
73 treeScope().idTargetObserverRegistry().notifyObservers(getIdAttribute()); 74 treeScope().idTargetObserverRegistry().notifyObservers(getIdAttribute());
74 } 75 }
75 76
76 } // namespace blink 77 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698