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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 | 206 |
207 void HTMLOptionElement::parseAttribute(const QualifiedName& name, const AtomicSt
ring& oldValue, const AtomicString& value) | 207 void HTMLOptionElement::parseAttribute(const QualifiedName& name, const AtomicSt
ring& oldValue, const AtomicString& value) |
208 { | 208 { |
209 if (name == valueAttr) { | 209 if (name == valueAttr) { |
210 if (HTMLDataListElement* dataList = ownerDataListElement()) | 210 if (HTMLDataListElement* dataList = ownerDataListElement()) |
211 dataList->optionElementChildrenChanged(); | 211 dataList->optionElementChildrenChanged(); |
212 } else if (name == disabledAttr) { | 212 } else if (name == disabledAttr) { |
213 if (oldValue.isNull() != value.isNull()) { | 213 if (oldValue.isNull() != value.isNull()) { |
214 pseudoStateChanged(CSSSelector::PseudoDisabled); | 214 pseudoStateChanged(CSSSelector::PseudoDisabled); |
215 pseudoStateChanged(CSSSelector::PseudoEnabled); | 215 pseudoStateChanged(CSSSelector::PseudoEnabled); |
216 if (layoutObject()) | 216 if (hasLayoutObject()) |
217 LayoutTheme::theme().controlStateChanged(*layoutObject(), Enable
dControlState); | 217 LayoutTheme::theme().controlStateChanged(*layoutObject(), Enable
dControlState); |
218 } | 218 } |
219 } else if (name == selectedAttr) { | 219 } else if (name == selectedAttr) { |
220 if (oldValue.isNull() != value.isNull() && !m_isDirty) | 220 if (oldValue.isNull() != value.isNull() && !m_isDirty) |
221 setSelected(!value.isNull()); | 221 setSelected(!value.isNull()); |
222 pseudoStateChanged(CSSSelector::PseudoDefault); | 222 pseudoStateChanged(CSSSelector::PseudoDefault); |
223 } else if (name == labelAttr) { | 223 } else if (name == labelAttr) { |
224 updateLabel(); | 224 updateLabel(); |
225 } else { | 225 } else { |
226 HTMLElement::parseAttribute(name, oldValue, value); | 226 HTMLElement::parseAttribute(name, oldValue, value); |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 ASSERT(parent); | 472 ASSERT(parent); |
473 if (isHTMLOptGroupElement(*parent)) { | 473 if (isHTMLOptGroupElement(*parent)) { |
474 const ComputedStyle* parentStyle = parent->computedStyle() ? parent-
>computedStyle() : parent->ensureComputedStyle(); | 474 const ComputedStyle* parentStyle = parent->computedStyle() ? parent-
>computedStyle() : parent->ensureComputedStyle(); |
475 return !parentStyle || parentStyle->display() == NONE; | 475 return !parentStyle || parentStyle->display() == NONE; |
476 } | 476 } |
477 } | 477 } |
478 return m_style->display() == NONE; | 478 return m_style->display() == NONE; |
479 } | 479 } |
480 | 480 |
481 } // namespace blink | 481 } // namespace blink |
OLD | NEW |