| Index: Source/core/html/HTMLOptionElement.cpp
|
| diff --git a/Source/core/html/HTMLOptionElement.cpp b/Source/core/html/HTMLOptionElement.cpp
|
| index a02a889367e73b3afbc50809de3ccd44a1c21b21..d58b7a3bb95e55259dcc8ffebde2e38a130d9d21 100644
|
| --- a/Source/core/html/HTMLOptionElement.cpp
|
| +++ b/Source/core/html/HTMLOptionElement.cpp
|
| @@ -286,6 +286,15 @@ void HTMLOptionElement::setLabel(const AtomicString& label)
|
| void HTMLOptionElement::updateNonRenderStyle()
|
| {
|
| m_style = originalStyleForRenderer();
|
| + if (m_style->display() != NONE) {
|
| + HTMLElement* parent = Traversal<HTMLElement>::firstAncestor(*this);
|
| + ASSERT(parent);
|
| + if (parent->hasTagName(optgroupTag)) {
|
| + RenderStyle* parentStyle = parent->renderStyle() ? parent->renderStyle() : parent->computedStyle();
|
| + if (parentStyle && parentStyle->display() == NONE)
|
| + m_style->setDisplay(NONE);
|
| + }
|
| + }
|
| if (HTMLSelectElement* select = ownerSelectElement())
|
| select->updateListOnRenderer();
|
| }
|
|
|