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); |
keishi
2014/08/04 03:04:03
I don't think we should be changing the style of t
spartha
2014/08/04 15:59:02
Done.
|
+ } |
+ } |
if (HTMLSelectElement* select = ownerSelectElement()) |
select->updateListOnRenderer(); |
} |