| 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 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 return select->spatialNavigationFocusedOption() == this; | 410 return select->spatialNavigationFocusedOption() == this; |
| 411 } | 411 } |
| 412 | 412 |
| 413 bool HTMLOptionElement::isDisplayNone() const { | 413 bool HTMLOptionElement::isDisplayNone() const { |
| 414 // If the style is not set, then the node is still unattached. | 414 // If the style is not set, then the node is still unattached. |
| 415 // We have to wait till it gets attached to read the display property. | 415 // We have to wait till it gets attached to read the display property. |
| 416 const ComputedStyle* style = nonLayoutObjectComputedStyle(); | 416 const ComputedStyle* style = nonLayoutObjectComputedStyle(); |
| 417 if (!style) | 417 if (!style) |
| 418 return false; | 418 return false; |
| 419 | 419 |
| 420 if (style->display() != EDisplay::None) { | 420 if (style->display() != EDisplay::kNone) { |
| 421 // We need to check the parent's display property. Parent's | 421 // We need to check the parent's display property. Parent's |
| 422 // display:none doesn't override children's display properties in | 422 // display:none doesn't override children's display properties in |
| 423 // ComputedStyle. | 423 // ComputedStyle. |
| 424 Element* parent = parentElement(); | 424 Element* parent = parentElement(); |
| 425 DCHECK(parent); | 425 DCHECK(parent); |
| 426 if (isHTMLOptGroupElement(*parent)) { | 426 if (isHTMLOptGroupElement(*parent)) { |
| 427 const ComputedStyle* parentStyle = parent->computedStyle() | 427 const ComputedStyle* parentStyle = parent->computedStyle() |
| 428 ? parent->computedStyle() | 428 ? parent->computedStyle() |
| 429 : parent->ensureComputedStyle(); | 429 : parent->ensureComputedStyle(); |
| 430 return !parentStyle || parentStyle->display() == EDisplay::None; | 430 return !parentStyle || parentStyle->display() == EDisplay::kNone; |
| 431 } | 431 } |
| 432 } | 432 } |
| 433 return style->display() == EDisplay::None; | 433 return style->display() == EDisplay::kNone; |
| 434 } | 434 } |
| 435 | 435 |
| 436 String HTMLOptionElement::innerText() { | 436 String HTMLOptionElement::innerText() { |
| 437 // A workaround for crbug.com/424578. We add ShadowRoot to an OPTION, but | 437 // A workaround for crbug.com/424578. We add ShadowRoot to an OPTION, but |
| 438 // innerText behavior for Shadow DOM is unclear. We just return the same | 438 // innerText behavior for Shadow DOM is unclear. We just return the same |
| 439 // string before adding ShadowRoot. | 439 // string before adding ShadowRoot. |
| 440 return textContent(); | 440 return textContent(); |
| 441 } | 441 } |
| 442 | 442 |
| 443 } // namespace blink | 443 } // namespace blink |
| OLD | NEW |