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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
99 m_style = originalStyleForRenderer(); | 99 m_style = originalStyleForRenderer(); |
100 } | 100 } |
101 | 101 |
102 RenderStyle* HTMLOptGroupElement::nonRendererStyle() const | 102 RenderStyle* HTMLOptGroupElement::nonRendererStyle() const |
103 { | 103 { |
104 return m_style.get(); | 104 return m_style.get(); |
105 } | 105 } |
106 | 106 |
107 PassRefPtr<RenderStyle> HTMLOptGroupElement::customStyleForRenderer() | 107 PassRefPtr<RenderStyle> HTMLOptGroupElement::customStyleForRenderer() |
108 { | 108 { |
109 if (!needsAttach()) | |
110 updateNonRenderStyle(); | |
esprehn
2014/02/14 00:46:20
Why do you skip this for reattach?
rune
2014/02/14 09:42:08
Done.
| |
109 return m_style; | 111 return m_style; |
110 } | 112 } |
111 | 113 |
112 void HTMLOptGroupElement::willRecalcStyle(StyleRecalcChange change) | |
113 { | |
114 if (!needsAttach() && (needsStyleRecalc() || change >= Inherit)) | |
115 updateNonRenderStyle(); | |
116 } | |
117 | |
118 String HTMLOptGroupElement::groupLabelText() const | 114 String HTMLOptGroupElement::groupLabelText() const |
119 { | 115 { |
120 String itemText = getAttribute(labelAttr); | 116 String itemText = getAttribute(labelAttr); |
121 | 117 |
122 // In WinIE, leading and trailing whitespace is ignored in options and optgr oups. We match this behavior. | 118 // In WinIE, leading and trailing whitespace is ignored in options and optgr oups. We match this behavior. |
123 itemText = itemText.stripWhiteSpace(); | 119 itemText = itemText.stripWhiteSpace(); |
124 // We want to collapse our whitespace too. This will match other browsers. | 120 // We want to collapse our whitespace too. This will match other browsers. |
125 itemText = itemText.simplifyWhiteSpace(); | 121 itemText = itemText.simplifyWhiteSpace(); |
126 | 122 |
127 return itemText; | 123 return itemText; |
(...skipping 13 matching lines...) Expand all Loading... | |
141 | 137 |
142 void HTMLOptGroupElement::accessKeyAction(bool) | 138 void HTMLOptGroupElement::accessKeyAction(bool) |
143 { | 139 { |
144 HTMLSelectElement* select = ownerSelectElement(); | 140 HTMLSelectElement* select = ownerSelectElement(); |
145 // send to the parent to bring focus to the list box | 141 // send to the parent to bring focus to the list box |
146 if (select && !select->focused()) | 142 if (select && !select->focused()) |
147 select->accessKeyAction(false); | 143 select->accessKeyAction(false); |
148 } | 144 } |
149 | 145 |
150 } // namespace | 146 } // namespace |
OLD | NEW |