Index: Source/core/html/HTMLOptionElement.cpp |
diff --git a/Source/core/html/HTMLOptionElement.cpp b/Source/core/html/HTMLOptionElement.cpp |
index c0b02f12ef71b46fdeb0ba02b6d1e17bed4813ba..6d38c9a367fae85256d93fa68824b4fb0019650c 100644 |
--- a/Source/core/html/HTMLOptionElement.cpp |
+++ b/Source/core/html/HTMLOptionElement.cpp |
@@ -293,7 +293,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 |
@@ -375,4 +380,10 @@ HTMLFormElement* HTMLOptionElement::form() const |
return 0; |
} |
+bool HTMLOptionElement::isDisplayNone() const |
+{ |
+ RenderStyle* style = nonRendererStyle(); |
+ return style && style->display() == NONE; |
+} |
+ |
} // namespace WebCore |