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

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

Issue 1629403003: Merge DOMSettableTokensList into DOMTokensList (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed non-oilpan inheritance Created 4 years, 10 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) 2010 Google Inc. All rights reserved. 2 * Copyright (c) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 21 matching lines...) Expand all
32 32
33 #include "bindings/core/v8/ExceptionStatePlaceholder.h" 33 #include "bindings/core/v8/ExceptionStatePlaceholder.h"
34 #include "core/HTMLNames.h" 34 #include "core/HTMLNames.h"
35 35
36 namespace blink { 36 namespace blink {
37 37
38 inline HTMLOutputElement::HTMLOutputElement(Document& document, HTMLFormElement* form) 38 inline HTMLOutputElement::HTMLOutputElement(Document& document, HTMLFormElement* form)
39 : HTMLFormControlElement(HTMLNames::outputTag, document, form) 39 : HTMLFormControlElement(HTMLNames::outputTag, document, form)
40 , m_isDefaultValueMode(true) 40 , m_isDefaultValueMode(true)
41 , m_defaultValue("") 41 , m_defaultValue("")
42 , m_tokens(DOMSettableTokenList::create(this)) 42 , m_tokens(DOMTokenList::create(this))
43 { 43 {
44 } 44 }
45 45
46 HTMLOutputElement::~HTMLOutputElement() 46 HTMLOutputElement::~HTMLOutputElement()
47 { 47 {
48 #if !ENABLE(OILPAN) 48 #if !ENABLE(OILPAN)
49 m_tokens->setObserver(nullptr); 49 m_tokens->setObserver(nullptr);
50 #endif 50 #endif
51 } 51 }
52 52
(...skipping 14 matching lines...) Expand all
67 } 67 }
68 68
69 void HTMLOutputElement::parseAttribute(const QualifiedName& name, const AtomicSt ring& oldValue, const AtomicString& value) 69 void HTMLOutputElement::parseAttribute(const QualifiedName& name, const AtomicSt ring& oldValue, const AtomicString& value)
70 { 70 {
71 if (name == HTMLNames::forAttr) 71 if (name == HTMLNames::forAttr)
72 setFor(value); 72 setFor(value);
73 else 73 else
74 HTMLFormControlElement::parseAttribute(name, oldValue, value); 74 HTMLFormControlElement::parseAttribute(name, oldValue, value);
75 } 75 }
76 76
77 DOMSettableTokenList* HTMLOutputElement::htmlFor() const 77 DOMTokenList* HTMLOutputElement::htmlFor() const
78 { 78 {
79 return m_tokens.get(); 79 return m_tokens.get();
80 } 80 }
81 81
82 void HTMLOutputElement::setFor(const AtomicString& value) 82 void HTMLOutputElement::setFor(const AtomicString& value)
83 { 83 {
84 m_tokens->setValue(value); 84 m_tokens->setValue(value);
85 } 85 }
86 86
87 void HTMLOutputElement::childrenChanged(const ChildrenChange& change) 87 void HTMLOutputElement::childrenChanged(const ChildrenChange& change)
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 // when the element's value mode flag to "default". 136 // when the element's value mode flag to "default".
137 if (m_isDefaultValueMode) 137 if (m_isDefaultValueMode)
138 setTextContent(value); 138 setTextContent(value);
139 } 139 }
140 140
141 141
142 DEFINE_TRACE(HTMLOutputElement) 142 DEFINE_TRACE(HTMLOutputElement)
143 { 143 {
144 visitor->trace(m_tokens); 144 visitor->trace(m_tokens);
145 HTMLFormControlElement::trace(visitor); 145 HTMLFormControlElement::trace(visitor);
146 DOMSettableTokenListObserver::trace(visitor); 146 DOMTokenListObserver::trace(visitor);
147 } 147 }
148 148
149 } // namespace blink 149 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLOutputElement.h ('k') | third_party/WebKit/Source/core/html/HTMLOutputElement.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698