| Index: Source/core/html/HTMLOptionElement.cpp
|
| diff --git a/Source/core/html/HTMLOptionElement.cpp b/Source/core/html/HTMLOptionElement.cpp
|
| index abeb8577912a63d3971ce0dbd0ded390cc7e47b7..278fa753269893e640e06135f0cc445d069fb8f7 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,16 @@ HTMLFormElement* HTMLOptionElement::form() const
|
| return 0;
|
| }
|
|
|
| +bool HTMLOptionElement::isDisplayNone() const
|
| +{
|
| + ContainerNode* parent = parentNode();
|
| + // Check for parent optgroup having display NONE
|
| + if (parent && isHTMLOptGroupElement(*parent)) {
|
| + if (toHTMLOptGroupElement(*parent).isDisplayNone())
|
| + return true;
|
| + }
|
| + RenderStyle* style = nonRendererStyle();
|
| + return style && style->display() == NONE;
|
| +}
|
| +
|
| } // namespace WebCore
|
|
|