| 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 } | 108 } |
| 109 | 109 |
| 110 bool HTMLOptionElement::supportsFocus() const | 110 bool HTMLOptionElement::supportsFocus() const |
| 111 { | 111 { |
| 112 RefPtrWillBeRawPtr<HTMLSelectElement> select = ownerSelectElement(); | 112 RefPtrWillBeRawPtr<HTMLSelectElement> select = ownerSelectElement(); |
| 113 if (select && select->usesMenuList()) | 113 if (select && select->usesMenuList()) |
| 114 return false; | 114 return false; |
| 115 return HTMLElement::supportsFocus(); | 115 return HTMLElement::supportsFocus(); |
| 116 } | 116 } |
| 117 | 117 |
| 118 bool HTMLOptionElement::isDefaultButtonForForm() const |
| 119 { |
| 120 return fastHasAttribute(selectedAttr); |
| 121 } |
| 122 |
| 118 String HTMLOptionElement::displayLabel() const | 123 String HTMLOptionElement::displayLabel() const |
| 119 { | 124 { |
| 120 Document& document = this->document(); | 125 Document& document = this->document(); |
| 121 String text; | 126 String text; |
| 122 | 127 |
| 123 // WinIE does not use the label attribute, so as a quirk, we ignore it. | 128 // WinIE does not use the label attribute, so as a quirk, we ignore it. |
| 124 if (!document.inQuirksMode()) | 129 if (!document.inQuirksMode()) |
| 125 text = fastGetAttribute(labelAttr); | 130 text = fastGetAttribute(labelAttr); |
| 126 | 131 |
| 127 // FIXME: The following treats an element with the label attribute set to | 132 // FIXME: The following treats an element with the label attribute set to |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 475 ASSERT(parent); | 480 ASSERT(parent); |
| 476 if (isHTMLOptGroupElement(*parent)) { | 481 if (isHTMLOptGroupElement(*parent)) { |
| 477 const ComputedStyle* parentStyle = parent->computedStyle() ? parent-
>computedStyle() : parent->ensureComputedStyle(); | 482 const ComputedStyle* parentStyle = parent->computedStyle() ? parent-
>computedStyle() : parent->ensureComputedStyle(); |
| 478 return !parentStyle || parentStyle->display() == NONE; | 483 return !parentStyle || parentStyle->display() == NONE; |
| 479 } | 484 } |
| 480 } | 485 } |
| 481 return m_style->display() == NONE; | 486 return m_style->display() == NONE; |
| 482 } | 487 } |
| 483 | 488 |
| 484 } // namespace blink | 489 } // namespace blink |
| OLD | NEW |