Index: Source/core/html/HTMLOptionElement.cpp |
diff --git a/Source/core/html/HTMLOptionElement.cpp b/Source/core/html/HTMLOptionElement.cpp |
index c0b02f12ef71b46fdeb0ba02b6d1e17bed4813ba..78bcb851428b9577b2a82e9b2d4c325391380b1f 100644 |
--- a/Source/core/html/HTMLOptionElement.cpp |
+++ b/Source/core/html/HTMLOptionElement.cpp |
@@ -303,7 +303,12 @@ RenderStyle* HTMLOptionElement::nonRendererStyle() const |
PassRefPtr<RenderStyle> HTMLOptionElement::customStyleForRenderer() |
{ |
+ RefPtr<RenderStyle> oldStyle = m_style; |
updateNonRenderStyle(); |
+ if ((m_style->display() == NONE || (!oldStyle || oldStyle->display() == NONE)) && (!oldStyle || (m_style->display() != oldStyle->display()))) { |
+ if (HTMLSelectElement* select = ownerSelectElement()) |
+ select->updateListOnRenderer(); |
esprehn
2014/03/20 17:09:25
This is not the correct place to do this.
spartha
2014/03/21 05:13:26
Since we don't have a renderer associated with thi
|
+ } |
return m_style; |
} |
@@ -375,4 +380,12 @@ HTMLFormElement* HTMLOptionElement::form() const |
return 0; |
} |
+bool HTMLOptionElement::isDisplayNone() const |
+{ |
+ RenderStyle* style = nonRendererStyle(); |
+ if (style && style->display() == NONE) |
esprehn
2014/03/20 17:09:25
return style && style->display() == NONE;
spartha
2014/03/21 05:13:26
Done.
|
+ return false; |
+ return true; |
+} |
+ |
} // namespace WebCore |