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) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights |
6 * reserved. | 6 * reserved. |
7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 15 matching lines...) Expand all Loading... |
26 #include "core/html/HTMLOptGroupElement.h" | 26 #include "core/html/HTMLOptGroupElement.h" |
27 | 27 |
28 #include "core/HTMLNames.h" | 28 #include "core/HTMLNames.h" |
29 #include "core/dom/NodeComputedStyle.h" | 29 #include "core/dom/NodeComputedStyle.h" |
30 #include "core/dom/Text.h" | 30 #include "core/dom/Text.h" |
31 #include "core/editing/EditingUtilities.h" | 31 #include "core/editing/EditingUtilities.h" |
32 #include "core/html/HTMLContentElement.h" | 32 #include "core/html/HTMLContentElement.h" |
33 #include "core/html/HTMLDivElement.h" | 33 #include "core/html/HTMLDivElement.h" |
34 #include "core/html/HTMLSelectElement.h" | 34 #include "core/html/HTMLSelectElement.h" |
35 #include "core/html/shadow/ShadowElementNames.h" | 35 #include "core/html/shadow/ShadowElementNames.h" |
| 36 #include "core/style/ComputedStyle.h" |
36 #include "wtf/StdLibExtras.h" | 37 #include "wtf/StdLibExtras.h" |
37 #include "wtf/text/CharacterNames.h" | 38 #include "wtf/text/CharacterNames.h" |
38 | 39 |
39 namespace blink { | 40 namespace blink { |
40 | 41 |
41 using namespace HTMLNames; | 42 using namespace HTMLNames; |
42 | 43 |
43 inline HTMLOptGroupElement::HTMLOptGroupElement(Document& document) | 44 inline HTMLOptGroupElement::HTMLOptGroupElement(Document& document) |
44 : HTMLElement(optgroupTag, document) { | 45 : HTMLElement(optgroupTag, document) { |
45 setHasCustomStyleCallbacks(); | 46 setHasCustomStyleCallbacks(); |
46 } | 47 } |
47 | 48 |
| 49 // An explicit empty destructor should be in HTMLOptGroupElement.cpp, because |
| 50 // if an implicit destructor is used or an empty destructor is defined in |
| 51 // HTMLOptGroupElement.h, when including HTMLOptGroupElement.h, |
| 52 // msvc tries to expand the destructor and causes |
| 53 // a compile error because of lack of ComputedStyle definition. |
| 54 HTMLOptGroupElement::~HTMLOptGroupElement() {} |
| 55 |
48 HTMLOptGroupElement* HTMLOptGroupElement::create(Document& document) { | 56 HTMLOptGroupElement* HTMLOptGroupElement::create(Document& document) { |
49 HTMLOptGroupElement* optGroupElement = new HTMLOptGroupElement(document); | 57 HTMLOptGroupElement* optGroupElement = new HTMLOptGroupElement(document); |
50 optGroupElement->ensureUserAgentShadowRoot(); | 58 optGroupElement->ensureUserAgentShadowRoot(); |
51 return optGroupElement; | 59 return optGroupElement; |
52 } | 60 } |
53 | 61 |
54 bool HTMLOptGroupElement::isDisabledFormControl() const { | 62 bool HTMLOptGroupElement::isDisabledFormControl() const { |
55 return fastHasAttribute(disabledAttr); | 63 return fastHasAttribute(disabledAttr); |
56 } | 64 } |
57 | 65 |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 label.setTextContent(labelText); | 187 label.setTextContent(labelText); |
180 label.setAttribute(aria_labelAttr, AtomicString(labelText)); | 188 label.setAttribute(aria_labelAttr, AtomicString(labelText)); |
181 } | 189 } |
182 | 190 |
183 HTMLDivElement& HTMLOptGroupElement::optGroupLabelElement() const { | 191 HTMLDivElement& HTMLOptGroupElement::optGroupLabelElement() const { |
184 return *toHTMLDivElementOrDie(userAgentShadowRoot()->getElementById( | 192 return *toHTMLDivElementOrDie(userAgentShadowRoot()->getElementById( |
185 ShadowElementNames::optGroupLabel())); | 193 ShadowElementNames::optGroupLabel())); |
186 } | 194 } |
187 | 195 |
188 } // namespace blink | 196 } // namespace blink |
OLD | NEW |