Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(787)

Unified Diff: Source/core/html/HTMLSelectElement.cpp

Issue 415343003: Option Groups with display: none should not show the children option elements (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/html/HTMLSelectElement.cpp
diff --git a/Source/core/html/HTMLSelectElement.cpp b/Source/core/html/HTMLSelectElement.cpp
index f6ecf4f839dcf973bdfd7731b2e537ae8f922f4f..a02da902d3096c00b8519a3789b0236cbd0d584f 100644
--- a/Source/core/html/HTMLSelectElement.cpp
+++ b/Source/core/html/HTMLSelectElement.cpp
@@ -536,6 +536,10 @@ int HTMLSelectElement::nextValidIndex(int listIndex, SkipDirection direction, in
HTMLElement* element = listItems[listIndex];
if (!isHTMLOptionElement(*element))
continue;
+ if (RenderStyle* style = element->renderStyle() ? element->renderStyle() : element->computedStyle()) {
+ if (style->display() == NONE)
+ continue;
+ }
if (element->isDisabledFormControl())
continue;
if (!usesMenuList() && !element->renderer())

Powered by Google App Engine
This is Rietveld 408576698