OLD | NEW |
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 17 matching lines...) Expand all Loading... |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #include "core/html/HTMLOutputElement.h" | 31 #include "core/html/HTMLOutputElement.h" |
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, | 38 inline HTMLOutputElement::HTMLOutputElement(Document& document) |
39 HTMLFormElement* form) | 39 : HTMLFormControlElement(HTMLNames::outputTag, document), |
40 : HTMLFormControlElement(HTMLNames::outputTag, document, form), | |
41 m_isDefaultValueMode(true), | 40 m_isDefaultValueMode(true), |
42 m_defaultValue(""), | 41 m_defaultValue(""), |
43 m_tokens(DOMTokenList::create(this)) {} | 42 m_tokens(DOMTokenList::create(this)) {} |
44 | 43 |
45 HTMLOutputElement::~HTMLOutputElement() {} | 44 HTMLOutputElement::~HTMLOutputElement() {} |
46 | 45 |
47 HTMLOutputElement* HTMLOutputElement::create(Document& document, | 46 HTMLOutputElement* HTMLOutputElement::create(Document& document) { |
48 HTMLFormElement* form) { | 47 return new HTMLOutputElement(document); |
49 return new HTMLOutputElement(document, form); | |
50 } | 48 } |
51 | 49 |
52 const AtomicString& HTMLOutputElement::formControlType() const { | 50 const AtomicString& HTMLOutputElement::formControlType() const { |
53 DEFINE_STATIC_LOCAL(const AtomicString, output, ("output")); | 51 DEFINE_STATIC_LOCAL(const AtomicString, output, ("output")); |
54 return output; | 52 return output; |
55 } | 53 } |
56 | 54 |
57 bool HTMLOutputElement::isDisabledFormControl() const { | 55 bool HTMLOutputElement::isDisabledFormControl() const { |
58 return false; | 56 return false; |
59 } | 57 } |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 return HTMLElement::tabIndex(); | 132 return HTMLElement::tabIndex(); |
135 } | 133 } |
136 | 134 |
137 DEFINE_TRACE(HTMLOutputElement) { | 135 DEFINE_TRACE(HTMLOutputElement) { |
138 visitor->trace(m_tokens); | 136 visitor->trace(m_tokens); |
139 HTMLFormControlElement::trace(visitor); | 137 HTMLFormControlElement::trace(visitor); |
140 DOMTokenListObserver::trace(visitor); | 138 DOMTokenListObserver::trace(visitor); |
141 } | 139 } |
142 | 140 |
143 } // namespace blink | 141 } // namespace blink |
OLD | NEW |