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 21 matching lines...) Expand all Loading... |
32 #define HTMLOutputElement_h | 32 #define HTMLOutputElement_h |
33 | 33 |
34 #include "core/html/DOMSettableTokenList.h" | 34 #include "core/html/DOMSettableTokenList.h" |
35 #include "core/html/HTMLFormControlElement.h" | 35 #include "core/html/HTMLFormControlElement.h" |
36 #include <wtf/OwnPtr.h> | 36 #include <wtf/OwnPtr.h> |
37 | 37 |
38 namespace WebCore { | 38 namespace WebCore { |
39 | 39 |
40 class HTMLOutputElement : public HTMLFormControlElement { | 40 class HTMLOutputElement : public HTMLFormControlElement { |
41 public: | 41 public: |
42 static PassRefPtr<HTMLOutputElement> create(const QualifiedName&, Document*,
HTMLFormElement*); | 42 static Result<HTMLOutputElement> create(const QualifiedName&, Document*, HTM
LFormElement*); |
43 | 43 |
44 virtual bool willValidate() const { return false; } | 44 virtual bool willValidate() const { return false; } |
45 | 45 |
46 String value() const; | 46 String value() const; |
47 void setValue(const String&); | 47 void setValue(const String&); |
48 String defaultValue() const; | 48 String defaultValue() const; |
49 void setDefaultValue(const String&); | 49 void setDefaultValue(const String&); |
50 void setFor(const String&); | 50 void setFor(const String&); |
51 DOMSettableTokenList* htmlFor() const; | 51 DOMSettableTokenList* htmlFor() const; |
52 | 52 |
53 virtual bool canContainRangeEndPoint() const { return false; } | 53 virtual bool canContainRangeEndPoint() const { return false; } |
54 | 54 |
| 55 virtual void acceptHeapVisitor(Visitor*) const OVERRIDE; |
| 56 |
55 private: | 57 private: |
56 HTMLOutputElement(const QualifiedName&, Document*, HTMLFormElement*); | 58 HTMLOutputElement(const QualifiedName&, Document*, HTMLFormElement*); |
57 | 59 |
58 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; | 60 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; |
59 virtual const AtomicString& formControlType() const; | 61 virtual const AtomicString& formControlType() const; |
60 virtual bool isEnumeratable() const { return true; } | 62 virtual bool isEnumeratable() const { return true; } |
61 virtual bool supportLabels() const OVERRIDE { return true; } | 63 virtual bool supportLabels() const OVERRIDE { return true; } |
62 virtual bool supportsFocus() const; | 64 virtual bool supportsFocus() const; |
63 virtual void childrenChanged(bool createdByParser = false, Node* beforeChang
e = 0, Node* afterChange = 0, int childCountDelta = 0); | 65 virtual void childrenChanged(bool createdByParser = false, Node* beforeChang
e = 0, Node* afterChange = 0, int childCountDelta = 0); |
64 virtual void reset(); | 66 virtual void reset(); |
65 | 67 |
66 void setTextContentInternal(const String&); | 68 void setTextContentInternal(const String&); |
67 | 69 |
68 bool m_isDefaultValueMode; | 70 bool m_isDefaultValueMode; |
69 bool m_isSetTextContentInProgress; | 71 bool m_isSetTextContentInProgress; |
70 String m_defaultValue; | 72 String m_defaultValue; |
71 RefPtr<DOMSettableTokenList> m_tokens; | 73 RefPtr<DOMSettableTokenList> m_tokens; |
72 }; | 74 }; |
73 | 75 |
74 } // namespace | 76 } // namespace |
75 | 77 |
76 #endif | 78 #endif |
OLD | NEW |