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 13 matching lines...) Expand all Loading... |
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
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 #ifndef HTMLOutputElement_h | 31 #ifndef HTMLOutputElement_h |
32 #define HTMLOutputElement_h | 32 #define HTMLOutputElement_h |
33 | 33 |
34 #include "core/dom/DOMSettableTokenList.h" | 34 #include "core/dom/DOMTokenList.h" |
35 #include "core/html/HTMLFormControlElement.h" | 35 #include "core/html/HTMLFormControlElement.h" |
36 | 36 |
37 namespace blink { | 37 namespace blink { |
38 | 38 |
39 class CORE_EXPORT HTMLOutputElement final : public HTMLFormControlElement, priva
te DOMSettableTokenListObserver { | 39 class CORE_EXPORT HTMLOutputElement final : public HTMLFormControlElement, priva
te DOMTokenListObserver { |
40 DEFINE_WRAPPERTYPEINFO(); | 40 DEFINE_WRAPPERTYPEINFO(); |
41 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(HTMLOutputElement); | 41 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(HTMLOutputElement); |
42 public: | 42 public: |
43 static PassRefPtrWillBeRawPtr<HTMLOutputElement> create(Document&, HTMLFormE
lement*); | 43 static PassRefPtrWillBeRawPtr<HTMLOutputElement> create(Document&, HTMLFormE
lement*); |
44 ~HTMLOutputElement() override; | 44 ~HTMLOutputElement() override; |
45 | 45 |
46 bool willValidate() const override { return false; } | 46 bool willValidate() const override { return false; } |
47 | 47 |
48 String value() const; | 48 String value() const; |
49 void setValue(const String&); | 49 void setValue(const String&); |
50 String defaultValue() const; | 50 String defaultValue() const; |
51 void setDefaultValue(const String&); | 51 void setDefaultValue(const String&); |
52 void setFor(const AtomicString&); | 52 void setFor(const AtomicString&); |
53 DOMSettableTokenList* htmlFor() const; | 53 DOMTokenList* htmlFor() const; |
54 | 54 |
55 bool canContainRangeEndPoint() const override { return false; } | 55 bool canContainRangeEndPoint() const override { return false; } |
56 | 56 |
57 DECLARE_VIRTUAL_TRACE(); | 57 DECLARE_VIRTUAL_TRACE(); |
58 | 58 |
59 private: | 59 private: |
60 HTMLOutputElement(Document&, HTMLFormElement*); | 60 HTMLOutputElement(Document&, HTMLFormElement*); |
61 | 61 |
62 void parseAttribute(const QualifiedName&, const AtomicString&, const AtomicS
tring&) override; | 62 void parseAttribute(const QualifiedName&, const AtomicString&, const AtomicS
tring&) override; |
63 const AtomicString& formControlType() const override; | 63 const AtomicString& formControlType() const override; |
64 bool isEnumeratable() const override { return true; } | 64 bool isEnumeratable() const override { return true; } |
65 bool supportLabels() const override { return true; } | 65 bool supportLabels() const override { return true; } |
66 bool supportsFocus() const override; | 66 bool supportsFocus() const override; |
67 void childrenChanged(const ChildrenChange&) override; | 67 void childrenChanged(const ChildrenChange&) override; |
68 void resetImpl() override; | 68 void resetImpl() override; |
69 | 69 |
70 void valueWasSet() final; | 70 void valueWasSet() final; |
71 | 71 |
72 bool m_isDefaultValueMode; | 72 bool m_isDefaultValueMode; |
73 String m_defaultValue; | 73 String m_defaultValue; |
74 RefPtrWillBeMember<DOMSettableTokenList> m_tokens; | 74 RefPtrWillBeMember<DOMTokenList> m_tokens; |
75 }; | 75 }; |
76 | 76 |
77 } // namespace blink | 77 } // namespace blink |
78 | 78 |
79 #endif // HTMLOutputElement_h | 79 #endif // HTMLOutputElement_h |
OLD | NEW |