| 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 reserv
ed. |
| 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 PassRefPtr<RenderStyle> HTMLOptGroupElement::customStyleForRenderer() | 118 PassRefPtr<RenderStyle> HTMLOptGroupElement::customStyleForRenderer() |
| 119 { | 119 { |
| 120 // styleForRenderer is called whenever a new style should be associated | 120 // styleForRenderer is called whenever a new style should be associated |
| 121 // with an Element so now is a good time to update our cached style. | 121 // with an Element so now is a good time to update our cached style. |
| 122 updateNonRenderStyle(); | 122 updateNonRenderStyle(); |
| 123 return m_style; | 123 return m_style; |
| 124 } | 124 } |
| 125 | 125 |
| 126 String HTMLOptGroupElement::groupLabelText() const | 126 String HTMLOptGroupElement::groupLabelText() const |
| 127 { | 127 { |
| 128 String itemText = document().displayStringModifiedByEncoding(getAttribute(la
belAttr)); | 128 String itemText = getAttribute(labelAttr); |
| 129 | 129 |
| 130 // In WinIE, leading and trailing whitespace is ignored in options and optgr
oups. We match this behavior. | 130 // In WinIE, leading and trailing whitespace is ignored in options and optgr
oups. We match this behavior. |
| 131 itemText = itemText.stripWhiteSpace(); | 131 itemText = itemText.stripWhiteSpace(); |
| 132 // We want to collapse our whitespace too. This will match other browsers. | 132 // We want to collapse our whitespace too. This will match other browsers. |
| 133 itemText = itemText.simplifyWhiteSpace(); | 133 itemText = itemText.simplifyWhiteSpace(); |
| 134 | 134 |
| 135 return itemText; | 135 return itemText; |
| 136 } | 136 } |
| 137 | 137 |
| 138 HTMLSelectElement* HTMLOptGroupElement::ownerSelectElement() const | 138 HTMLSelectElement* HTMLOptGroupElement::ownerSelectElement() const |
| (...skipping 10 matching lines...) Expand all Loading... |
| 149 | 149 |
| 150 void HTMLOptGroupElement::accessKeyAction(bool) | 150 void HTMLOptGroupElement::accessKeyAction(bool) |
| 151 { | 151 { |
| 152 HTMLSelectElement* select = ownerSelectElement(); | 152 HTMLSelectElement* select = ownerSelectElement(); |
| 153 // send to the parent to bring focus to the list box | 153 // send to the parent to bring focus to the list box |
| 154 if (select && !select->focused()) | 154 if (select && !select->focused()) |
| 155 select->accessKeyAction(false); | 155 select->accessKeyAction(false); |
| 156 } | 156 } |
| 157 | 157 |
| 158 } // namespace | 158 } // namespace |
| OLD | NEW |