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 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 5 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
6 * Copyright (C) 2004, 2005, 2006, 2010 Apple Inc. All rights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2010 Apple Inc. All rights reserved. |
7 * Copyright (C) 2010 Google Inc. All rights reserved. | 7 * Copyright (C) 2010 Google Inc. All rights reserved. |
8 * Copyright (C) 2011 Motorola Mobility, Inc. All rights reserved. | 8 * Copyright (C) 2011 Motorola Mobility, Inc. All rights reserved. |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 bool HTMLOptionElement::matchesDefaultPseudoClass() const | 118 bool HTMLOptionElement::matchesDefaultPseudoClass() const |
119 { | 119 { |
120 return fastHasAttribute(selectedAttr); | 120 return fastHasAttribute(selectedAttr); |
121 } | 121 } |
122 | 122 |
123 bool HTMLOptionElement::matchesEnabledPseudoClass() const | 123 bool HTMLOptionElement::matchesEnabledPseudoClass() const |
124 { | 124 { |
125 return !isDisabledFormControl(); | 125 return !isDisabledFormControl(); |
126 } | 126 } |
127 | 127 |
| 128 bool HTMLOptionElement::matchesDisabledPseudoClass() const |
| 129 { |
| 130 return isDisabledFormControl(); |
| 131 } |
| 132 |
128 String HTMLOptionElement::displayLabel() const | 133 String HTMLOptionElement::displayLabel() const |
129 { | 134 { |
130 Document& document = this->document(); | 135 Document& document = this->document(); |
131 String text; | 136 String text; |
132 | 137 |
133 // WinIE does not use the label attribute, so as a quirk, we ignore it. | 138 // WinIE does not use the label attribute, so as a quirk, we ignore it. |
134 if (!document.inQuirksMode()) | 139 if (!document.inQuirksMode()) |
135 text = fastGetAttribute(labelAttr); | 140 text = fastGetAttribute(labelAttr); |
136 | 141 |
137 // FIXME: The following treats an element with the label attribute set to | 142 // FIXME: The following treats an element with the label attribute set to |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 ASSERT(parent); | 477 ASSERT(parent); |
473 if (isHTMLOptGroupElement(*parent)) { | 478 if (isHTMLOptGroupElement(*parent)) { |
474 const ComputedStyle* parentStyle = parent->computedStyle() ? parent-
>computedStyle() : parent->ensureComputedStyle(); | 479 const ComputedStyle* parentStyle = parent->computedStyle() ? parent-
>computedStyle() : parent->ensureComputedStyle(); |
475 return !parentStyle || parentStyle->display() == NONE; | 480 return !parentStyle || parentStyle->display() == NONE; |
476 } | 481 } |
477 } | 482 } |
478 return m_style->display() == NONE; | 483 return m_style->display() == NONE; |
479 } | 484 } |
480 | 485 |
481 } // namespace blink | 486 } // namespace blink |
OLD | NEW |