Index: Source/core/rendering/RenderMenuList.cpp |
diff --git a/Source/core/rendering/RenderMenuList.cpp b/Source/core/rendering/RenderMenuList.cpp |
index 57ac3b845c3a872b4546cb08d9fab7f77e7551d6..adcb5f707767688e2eee60ec4c8039359fc7e3ac 100644 |
--- a/Source/core/rendering/RenderMenuList.cpp |
+++ b/Source/core/rendering/RenderMenuList.cpp |
@@ -503,7 +503,8 @@ PopupMenuStyle RenderMenuList::itemStyle(unsigned listIndex) const |
RenderStyle* style = element->renderStyle() ? element->renderStyle() : element->computedStyle(); |
return style ? PopupMenuStyle(resolveColor(style, CSSPropertyColor), itemBackgroundColor, style->font(), style->visibility() == VISIBLE, |
- style->display() == NONE, style->textIndent(), style->direction(), isOverride(style->unicodeBidi()), |
+ isHTMLOptionElement(*element) ? toHTMLOptionElement(*element).isDisplayNone() : style->display() == NONE, |
+ style->textIndent(), style->direction(), isOverride(style->unicodeBidi()), |
itemHasCustomBackgroundColor ? PopupMenuStyle::CustomBackgroundColor : PopupMenuStyle::DefaultBackgroundColor) : menuStyle(); |
} |