| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2004, 2005, 2006, 2010, 2011 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2010, 2011 Apple Inc. All rights reserved. |
| 6 * Copyright (C) 2010 Google Inc. All rights reserved. | 6 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 #define HTMLOptionElement_h | 26 #define HTMLOptionElement_h |
| 27 | 27 |
| 28 #include "core/CoreExport.h" | 28 #include "core/CoreExport.h" |
| 29 #include "core/html/HTMLElement.h" | 29 #include "core/html/HTMLElement.h" |
| 30 | 30 |
| 31 namespace blink { | 31 namespace blink { |
| 32 | 32 |
| 33 class ExceptionState; | 33 class ExceptionState; |
| 34 class HTMLDataListElement; | 34 class HTMLDataListElement; |
| 35 class HTMLSelectElement; | 35 class HTMLSelectElement; |
| 36 class ComputedStyle; | |
| 37 | 36 |
| 38 class CORE_EXPORT HTMLOptionElement final : public HTMLElement { | 37 class CORE_EXPORT HTMLOptionElement final : public HTMLElement { |
| 39 DEFINE_WRAPPERTYPEINFO(); | 38 DEFINE_WRAPPERTYPEINFO(); |
| 40 | 39 |
| 41 public: | 40 public: |
| 42 static HTMLOptionElement* create(Document&); | 41 static HTMLOptionElement* create(Document&); |
| 43 static HTMLOptionElement* createForJSConstructor(Document&, | 42 static HTMLOptionElement* createForJSConstructor(Document&, |
| 44 const String& data, | 43 const String& data, |
| 45 const AtomicString& value, | 44 const AtomicString& value, |
| 46 bool defaultSelected, | 45 bool defaultSelected, |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 void detachLayoutTree(const AttachContext& = AttachContext()) override; | 101 void detachLayoutTree(const AttachContext& = AttachContext()) override; |
| 103 void parseAttribute(const QualifiedName&, | 102 void parseAttribute(const QualifiedName&, |
| 104 const AtomicString&, | 103 const AtomicString&, |
| 105 const AtomicString&) override; | 104 const AtomicString&) override; |
| 106 InsertionNotificationRequest insertedInto(ContainerNode*) override; | 105 InsertionNotificationRequest insertedInto(ContainerNode*) override; |
| 107 void removedFrom(ContainerNode*) override; | 106 void removedFrom(ContainerNode*) override; |
| 108 void accessKeyAction(bool) override; | 107 void accessKeyAction(bool) override; |
| 109 void childrenChanged(const ChildrenChange&) override; | 108 void childrenChanged(const ChildrenChange&) override; |
| 110 String innerText() override; | 109 String innerText() override; |
| 111 | 110 |
| 112 // <option> never has a layoutObject so we manually manage a cached style. | |
| 113 void updateNonComputedStyle(); | |
| 114 ComputedStyle* nonLayoutObjectComputedStyle() const override; | |
| 115 PassRefPtr<ComputedStyle> customStyleForLayoutObject() override; | |
| 116 void didAddUserAgentShadowRoot(ShadowRoot&) override; | 111 void didAddUserAgentShadowRoot(ShadowRoot&) override; |
| 117 | 112 |
| 118 String collectOptionInnerText() const; | 113 String collectOptionInnerText() const; |
| 119 | 114 |
| 120 void updateLabel(); | 115 void updateLabel(); |
| 121 | 116 |
| 122 // Represents 'selectedness'. | 117 // Represents 'selectedness'. |
| 123 // https://html.spec.whatwg.org/multipage/forms.html#concept-option-selectedne
ss | 118 // https://html.spec.whatwg.org/multipage/forms.html#concept-option-selectedne
ss |
| 124 bool m_isSelected; | 119 bool m_isSelected; |
| 125 // Represents 'dirtiness'. | 120 // Represents 'dirtiness'. |
| 126 // https://html.spec.whatwg.org/multipage/forms.html#concept-option-dirtiness | 121 // https://html.spec.whatwg.org/multipage/forms.html#concept-option-dirtiness |
| 127 bool m_isDirty = false; | 122 bool m_isDirty = false; |
| 128 RefPtr<ComputedStyle> m_style; | |
| 129 }; | 123 }; |
| 130 | 124 |
| 131 } // namespace blink | 125 } // namespace blink |
| 132 | 126 |
| 133 #endif // HTMLOptionElement_h | 127 #endif // HTMLOptionElement_h |
| OLD | NEW |