Index: Source/core/html/HTMLOptionElement.cpp |
diff --git a/Source/core/html/HTMLOptionElement.cpp b/Source/core/html/HTMLOptionElement.cpp |
index abeb8577912a63d3971ce0dbd0ded390cc7e47b7..356721ca07ff79f2efaca552b30847983c65abe4 100644 |
--- a/Source/core/html/HTMLOptionElement.cpp |
+++ b/Source/core/html/HTMLOptionElement.cpp |
@@ -282,7 +282,12 @@ void HTMLOptionElement::setLabel(const AtomicString& label) |
void HTMLOptionElement::updateNonRenderStyle() |
{ |
+ bool oldDisplayNoneStatus = isDisplayNone(); |
m_style = originalStyleForRenderer(); |
+ if (oldDisplayNoneStatus != isDisplayNone()) { |
+ if (HTMLSelectElement* select = ownerSelectElement()) |
+ select->updateListOnRenderer(); |
+ } |
} |
RenderStyle* HTMLOptionElement::nonRendererStyle() const |
@@ -364,4 +369,10 @@ HTMLFormElement* HTMLOptionElement::form() const |
return 0; |
} |
+bool HTMLOptionElement::isDisplayNone() const |
+{ |
+ RenderStyle* style = nonRendererStyle(); |
+ return style && style->display() == NONE; |
keishi
2014/04/11 15:07:09
We should check parent optgroup.isDisplayNone
spartha
2014/04/12 18:53:22
Done.
|
+} |
+ |
} // namespace WebCore |