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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 } | 390 } |
391 | 391 |
392 bool HTMLOptionElement::spatialNavigationFocused() const | 392 bool HTMLOptionElement::spatialNavigationFocused() const |
393 { | 393 { |
394 HTMLSelectElement* select = ownerSelectElement(); | 394 HTMLSelectElement* select = ownerSelectElement(); |
395 if (!select || !select->focused()) | 395 if (!select || !select->focused()) |
396 return false; | 396 return false; |
397 return select->spatialNavigationFocusedOption() == this; | 397 return select->spatialNavigationFocusedOption() == this; |
398 } | 398 } |
399 | 399 |
| 400 bool HTMLOptionElement::isDisplayNone() const |
| 401 { |
| 402 // If m_style is not set, then the node is still unattached. |
| 403 // We have to wait till it gets attached to read the display property. |
| 404 if (!m_style) |
| 405 return false; |
| 406 |
| 407 if (m_style->display() != NONE) { |
| 408 Element* parent = parentElement(); |
| 409 ASSERT(parent); |
| 410 if (isHTMLOptGroupElement(*parent)) { |
| 411 RenderStyle* parentStyle = parent->renderStyle() ? parent->renderSty
le() : parent->computedStyle(); |
| 412 return !parentStyle || parentStyle->display() == NONE; |
| 413 } |
| 414 } |
| 415 return m_style->display() == NONE; |
| 416 } |
| 417 |
400 } // namespace blink | 418 } // namespace blink |
OLD | NEW |