| 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 | 87 |
| 88 return element; | 88 return element; |
| 89 } | 89 } |
| 90 | 90 |
| 91 void HTMLOptionElement::attach(const AttachContext& context) | 91 void HTMLOptionElement::attach(const AttachContext& context) |
| 92 { | 92 { |
| 93 AttachContext optionContext(context); | 93 AttachContext optionContext(context); |
| 94 if (context.resolvedStyle) { | 94 if (context.resolvedStyle) { |
| 95 ASSERT(!m_style || m_style == context.resolvedStyle); | 95 ASSERT(!m_style || m_style == context.resolvedStyle); |
| 96 m_style = context.resolvedStyle; | 96 m_style = context.resolvedStyle; |
| 97 } else { | 97 } else if (parentComputedStyle()) { |
| 98 updateNonComputedStyle(); | 98 updateNonComputedStyle(); |
| 99 optionContext.resolvedStyle = m_style.get(); | 99 optionContext.resolvedStyle = m_style.get(); |
| 100 } | 100 } |
| 101 HTMLElement::attach(optionContext); | 101 HTMLElement::attach(optionContext); |
| 102 } | 102 } |
| 103 | 103 |
| 104 void HTMLOptionElement::detach(const AttachContext& context) | 104 void HTMLOptionElement::detach(const AttachContext& context) |
| 105 { | 105 { |
| 106 m_style.clear(); | 106 m_style.clear(); |
| 107 HTMLElement::detach(context); | 107 HTMLElement::detach(context); |
| (...skipping 364 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 |