| 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 reserv
ed. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights |
| 6 * reserved. |
| 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
| 7 * | 8 * |
| 8 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 11 * License as published by the Free Software Foundation; either |
| 11 * version 2 of the License, or (at your option) any later version. | 12 * version 2 of the License, or (at your option) any later version. |
| 12 * | 13 * |
| 13 * This library is distributed in the hope that it will be useful, | 14 * This library is distributed in the hope that it will be useful, |
| 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 } | 123 } |
| 123 | 124 |
| 124 PassRefPtr<ComputedStyle> HTMLOptGroupElement::customStyleForLayoutObject() { | 125 PassRefPtr<ComputedStyle> HTMLOptGroupElement::customStyleForLayoutObject() { |
| 125 updateNonComputedStyle(); | 126 updateNonComputedStyle(); |
| 126 return m_style; | 127 return m_style; |
| 127 } | 128 } |
| 128 | 129 |
| 129 String HTMLOptGroupElement::groupLabelText() const { | 130 String HTMLOptGroupElement::groupLabelText() const { |
| 130 String itemText = getAttribute(labelAttr); | 131 String itemText = getAttribute(labelAttr); |
| 131 | 132 |
| 132 // In WinIE, leading and trailing whitespace is ignored in options and optgrou
ps. We match this behavior. | 133 // In WinIE, leading and trailing whitespace is ignored in options and |
| 134 // optgroups. We match this behavior. |
| 133 itemText = itemText.stripWhiteSpace(); | 135 itemText = itemText.stripWhiteSpace(); |
| 134 // We want to collapse our whitespace too. This will match other browsers. | 136 // We want to collapse our whitespace too. This will match other browsers. |
| 135 itemText = itemText.simplifyWhiteSpace(); | 137 itemText = itemText.simplifyWhiteSpace(); |
| 136 | 138 |
| 137 return itemText; | 139 return itemText; |
| 138 } | 140 } |
| 139 | 141 |
| 140 HTMLSelectElement* HTMLOptGroupElement::ownerSelectElement() const { | 142 HTMLSelectElement* HTMLOptGroupElement::ownerSelectElement() const { |
| 141 // TODO(tkent): We should return only the parent <select>. | 143 // TODO(tkent): We should return only the parent <select>. |
| 142 return Traversal<HTMLSelectElement>::firstAncestor(*this); | 144 return Traversal<HTMLSelectElement>::firstAncestor(*this); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 label.setTextContent(labelText); | 179 label.setTextContent(labelText); |
| 178 label.setAttribute(aria_labelAttr, AtomicString(labelText)); | 180 label.setAttribute(aria_labelAttr, AtomicString(labelText)); |
| 179 } | 181 } |
| 180 | 182 |
| 181 HTMLDivElement& HTMLOptGroupElement::optGroupLabelElement() const { | 183 HTMLDivElement& HTMLOptGroupElement::optGroupLabelElement() const { |
| 182 return *toHTMLDivElement(userAgentShadowRoot()->getElementById( | 184 return *toHTMLDivElement(userAgentShadowRoot()->getElementById( |
| 183 ShadowElementNames::optGroupLabel())); | 185 ShadowElementNames::optGroupLabel())); |
| 184 } | 186 } |
| 185 | 187 |
| 186 } // namespace blink | 188 } // namespace blink |
| OLD | NEW |