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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 { | 176 { |
177 if (name == valueAttr) { | 177 if (name == valueAttr) { |
178 if (HTMLDataListElement* dataList = ownerDataListElement()) | 178 if (HTMLDataListElement* dataList = ownerDataListElement()) |
179 dataList->optionElementChildrenChanged(); | 179 dataList->optionElementChildrenChanged(); |
180 } else if (name == disabledAttr) { | 180 } else if (name == disabledAttr) { |
181 bool oldDisabled = m_disabled; | 181 bool oldDisabled = m_disabled; |
182 m_disabled = !value.isNull(); | 182 m_disabled = !value.isNull(); |
183 if (oldDisabled != m_disabled) { | 183 if (oldDisabled != m_disabled) { |
184 didAffectSelector(AffectedSelectorDisabled | AffectedSelectorEnabled
); | 184 didAffectSelector(AffectedSelectorDisabled | AffectedSelectorEnabled
); |
185 if (renderer() && renderer()->style()->hasAppearance()) | 185 if (renderer() && renderer()->style()->hasAppearance()) |
186 RenderTheme::theme().stateChanged(renderer(), EnabledState); | 186 RenderTheme::theme().stateChanged(renderer(), EnabledControlStat
e); |
187 } | 187 } |
188 } else if (name == selectedAttr) { | 188 } else if (name == selectedAttr) { |
189 if (bool willBeSelected = !value.isNull()) | 189 if (bool willBeSelected = !value.isNull()) |
190 setSelected(willBeSelected); | 190 setSelected(willBeSelected); |
191 } else | 191 } else |
192 HTMLElement::parseAttribute(name, value); | 192 HTMLElement::parseAttribute(name, value); |
193 } | 193 } |
194 | 194 |
195 String HTMLOptionElement::value() const | 195 String HTMLOptionElement::value() const |
196 { | 196 { |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 // Check for parent optgroup having display NONE | 372 // Check for parent optgroup having display NONE |
373 if (parent && isHTMLOptGroupElement(*parent)) { | 373 if (parent && isHTMLOptGroupElement(*parent)) { |
374 if (toHTMLOptGroupElement(*parent).isDisplayNone()) | 374 if (toHTMLOptGroupElement(*parent).isDisplayNone()) |
375 return true; | 375 return true; |
376 } | 376 } |
377 RenderStyle* style = nonRendererStyle(); | 377 RenderStyle* style = nonRendererStyle(); |
378 return style && style->display() == NONE; | 378 return style && style->display() == NONE; |
379 } | 379 } |
380 | 380 |
381 } // namespace WebCore | 381 } // namespace WebCore |
OLD | NEW |