| 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, 2007, 2010 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2010 Apple Inc. All rights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| 11 * | 11 * |
| 12 * This library is distributed in the hope that it will be useful, | 12 * This library is distributed in the hope that it will be useful, |
| 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 * Library General Public License for more details. | 15 * Library General Public License for more details. |
| 16 * | 16 * |
| 17 * You should have received a copy of the GNU Library General Public License | 17 * You should have received a copy of the GNU Library General Public License |
| 18 * along with this library; see the file COPYING.LIB. If not, write to | 18 * along with this library; see the file COPYING.LIB. If not, write to |
| 19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 20 * Boston, MA 02110-1301, USA. | 20 * Boston, MA 02110-1301, USA. |
| 21 * | 21 * |
| 22 */ | 22 */ |
| 23 | 23 |
| 24 #ifndef HTMLOptGroupElement_h | 24 #ifndef HTMLOptGroupElement_h |
| 25 #define HTMLOptGroupElement_h | 25 #define HTMLOptGroupElement_h |
| 26 | 26 |
| 27 #include "core/CoreExport.h" | 27 #include "core/CoreExport.h" |
| 28 #include "core/html/HTMLElement.h" | 28 #include "core/html/HTMLElement.h" |
| 29 #include "core/style/ComputedStyle.h" | |
| 30 | 29 |
| 31 namespace blink { | 30 namespace blink { |
| 32 | 31 |
| 32 class ComputedStyle; |
| 33 class HTMLSelectElement; | 33 class HTMLSelectElement; |
| 34 class HTMLDivElement; | 34 class HTMLDivElement; |
| 35 | 35 |
| 36 class CORE_EXPORT HTMLOptGroupElement final : public HTMLElement { | 36 class CORE_EXPORT HTMLOptGroupElement final : public HTMLElement { |
| 37 DEFINE_WRAPPERTYPEINFO(); | 37 DEFINE_WRAPPERTYPEINFO(); |
| 38 | 38 |
| 39 public: | 39 public: |
| 40 static HTMLOptGroupElement* create(Document&); | 40 static HTMLOptGroupElement* create(Document&); |
| 41 | 41 |
| 42 bool isDisabledFormControl() const override; | 42 bool isDisabledFormControl() const override; |
| 43 String defaultToolTip() const override; | 43 String defaultToolTip() const override; |
| 44 HTMLSelectElement* ownerSelectElement() const; | 44 HTMLSelectElement* ownerSelectElement() const; |
| 45 | 45 |
| 46 String groupLabelText() const; | 46 String groupLabelText() const; |
| 47 HTMLDivElement& optGroupLabelElement() const; | 47 HTMLDivElement& optGroupLabelElement() const; |
| 48 | 48 |
| 49 private: | 49 private: |
| 50 explicit HTMLOptGroupElement(Document&); | 50 explicit HTMLOptGroupElement(Document&); |
| 51 ~HTMLOptGroupElement(); |
| 51 | 52 |
| 52 bool supportsFocus() const override; | 53 bool supportsFocus() const override; |
| 53 void parseAttribute(const QualifiedName&, | 54 void parseAttribute(const QualifiedName&, |
| 54 const AtomicString&, | 55 const AtomicString&, |
| 55 const AtomicString&) override; | 56 const AtomicString&) override; |
| 56 void accessKeyAction(bool sendMouseEvents) override; | 57 void accessKeyAction(bool sendMouseEvents) override; |
| 57 void didAddUserAgentShadowRoot(ShadowRoot&) override; | 58 void didAddUserAgentShadowRoot(ShadowRoot&) override; |
| 58 void attachLayoutTree(const AttachContext& = AttachContext()) override; | 59 void attachLayoutTree(const AttachContext& = AttachContext()) override; |
| 59 void detachLayoutTree(const AttachContext& = AttachContext()) override; | 60 void detachLayoutTree(const AttachContext& = AttachContext()) override; |
| 60 bool matchesEnabledPseudoClass() const override; | 61 bool matchesEnabledPseudoClass() const override; |
| 61 InsertionNotificationRequest insertedInto(ContainerNode*) override; | 62 InsertionNotificationRequest insertedInto(ContainerNode*) override; |
| 62 void removedFrom(ContainerNode*) override; | 63 void removedFrom(ContainerNode*) override; |
| 63 | 64 |
| 64 // <optgroup> might not have a layoutObject so we manually manage a cached | 65 // <optgroup> might not have a layoutObject so we manually manage a cached |
| 65 // style. | 66 // style. |
| 66 void updateNonComputedStyle(); | 67 void updateNonComputedStyle(); |
| 67 ComputedStyle* nonLayoutObjectComputedStyle() const override; | 68 ComputedStyle* nonLayoutObjectComputedStyle() const override; |
| 68 PassRefPtr<ComputedStyle> customStyleForLayoutObject() override; | 69 PassRefPtr<ComputedStyle> customStyleForLayoutObject() override; |
| 69 | 70 |
| 70 void updateGroupLabel(); | 71 void updateGroupLabel(); |
| 71 | 72 |
| 72 RefPtr<ComputedStyle> m_style; | 73 RefPtr<ComputedStyle> m_style; |
| 73 }; | 74 }; |
| 74 | 75 |
| 75 } // namespace blink | 76 } // namespace blink |
| 76 | 77 |
| 77 #endif // HTMLOptGroupElement_h | 78 #endif // HTMLOptGroupElement_h |
| OLD | NEW |