| 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 if (!isHTMLOptionElement(*items[i])) | 161 if (!isHTMLOptionElement(*items[i])) |
| 162 continue; | 162 continue; |
| 163 if (items[i].get() == this) | 163 if (items[i].get() == this) |
| 164 return optionIndex; | 164 return optionIndex; |
| 165 ++optionIndex; | 165 ++optionIndex; |
| 166 } | 166 } |
| 167 | 167 |
| 168 return 0; | 168 return 0; |
| 169 } | 169 } |
| 170 | 170 |
| 171 int HTMLOptionElement::listIndex() const |
| 172 { |
| 173 if (HTMLSelectElement* selectElement = ownerSelectElement()) |
| 174 return selectElement->listIndexForOption(*this); |
| 175 return -1; |
| 176 } |
| 177 |
| 171 void HTMLOptionElement::parseAttribute(const QualifiedName& name, const AtomicSt
ring& value) | 178 void HTMLOptionElement::parseAttribute(const QualifiedName& name, const AtomicSt
ring& value) |
| 172 { | 179 { |
| 173 if (name == valueAttr) { | 180 if (name == valueAttr) { |
| 174 if (HTMLDataListElement* dataList = ownerDataListElement()) | 181 if (HTMLDataListElement* dataList = ownerDataListElement()) |
| 175 dataList->optionElementChildrenChanged(); | 182 dataList->optionElementChildrenChanged(); |
| 176 } else if (name == disabledAttr) { | 183 } else if (name == disabledAttr) { |
| 177 bool oldDisabled = m_disabled; | 184 bool oldDisabled = m_disabled; |
| 178 m_disabled = !value.isNull(); | 185 m_disabled = !value.isNull(); |
| 179 if (oldDisabled != m_disabled) { | 186 if (oldDisabled != m_disabled) { |
| 180 pseudoStateChanged(CSSSelector::PseudoDisabled); | 187 pseudoStateChanged(CSSSelector::PseudoDisabled); |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 ASSERT(parent); | 408 ASSERT(parent); |
| 402 if (isHTMLOptGroupElement(*parent)) { | 409 if (isHTMLOptGroupElement(*parent)) { |
| 403 RenderStyle* parentStyle = parent->renderStyle() ? parent->renderSty
le() : parent->computedStyle(); | 410 RenderStyle* parentStyle = parent->renderStyle() ? parent->renderSty
le() : parent->computedStyle(); |
| 404 return !parentStyle || parentStyle->display() == NONE; | 411 return !parentStyle || parentStyle->display() == NONE; |
| 405 } | 412 } |
| 406 } | 413 } |
| 407 return m_style->display() == NONE; | 414 return m_style->display() == NONE; |
| 408 } | 415 } |
| 409 | 416 |
| 410 } // namespace blink | 417 } // namespace blink |
| OLD | NEW |