| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 bool matchesEnabledPseudoClass() const override; | 99 bool matchesEnabledPseudoClass() const override; |
| 101 void attachLayoutTree(const AttachContext& = AttachContext()) override; | 100 void attachLayoutTree(const AttachContext& = AttachContext()) override; |
| 102 void detachLayoutTree(const AttachContext& = AttachContext()) override; | 101 void detachLayoutTree(const AttachContext& = AttachContext()) override; |
| 103 void parseAttribute(const AttributeModificationParams&) override; | 102 void parseAttribute(const AttributeModificationParams&) override; |
| 104 InsertionNotificationRequest insertedInto(ContainerNode*) override; | 103 InsertionNotificationRequest insertedInto(ContainerNode*) override; |
| 105 void removedFrom(ContainerNode*) override; | 104 void removedFrom(ContainerNode*) override; |
| 106 void accessKeyAction(bool) override; | 105 void accessKeyAction(bool) override; |
| 107 void childrenChanged(const ChildrenChange&) override; | 106 void childrenChanged(const ChildrenChange&) override; |
| 108 String innerText() override; | 107 String innerText() override; |
| 109 | 108 |
| 110 // <option> never has a layoutObject so we manually manage a cached style. | |
| 111 void updateNonComputedStyle(); | |
| 112 ComputedStyle* nonLayoutObjectComputedStyle() const override; | |
| 113 PassRefPtr<ComputedStyle> customStyleForLayoutObject() override; | |
| 114 void didAddUserAgentShadowRoot(ShadowRoot&) override; | 109 void didAddUserAgentShadowRoot(ShadowRoot&) override; |
| 115 | 110 |
| 116 String collectOptionInnerText() const; | 111 String collectOptionInnerText() const; |
| 117 | 112 |
| 118 void updateLabel(); | 113 void updateLabel(); |
| 119 | 114 |
| 120 // Represents 'selectedness'. | 115 // Represents 'selectedness'. |
| 121 // https://html.spec.whatwg.org/multipage/forms.html#concept-option-selectedne
ss | 116 // https://html.spec.whatwg.org/multipage/forms.html#concept-option-selectedne
ss |
| 122 bool m_isSelected; | 117 bool m_isSelected; |
| 123 // Represents 'dirtiness'. | 118 // Represents 'dirtiness'. |
| 124 // https://html.spec.whatwg.org/multipage/forms.html#concept-option-dirtiness | 119 // https://html.spec.whatwg.org/multipage/forms.html#concept-option-dirtiness |
| 125 bool m_isDirty = false; | 120 bool m_isDirty = false; |
| 126 RefPtr<ComputedStyle> m_style; | |
| 127 }; | 121 }; |
| 128 | 122 |
| 129 } // namespace blink | 123 } // namespace blink |
| 130 | 124 |
| 131 #endif // HTMLOptionElement_h | 125 #endif // HTMLOptionElement_h |
| OLD | NEW |