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

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: Fixed assert failure in linux dbg build Created 6 years, 4 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
« no previous file with comments | « Source/core/html/HTMLOptionElement.cpp ('k') | Source/core/rendering/RenderMenuList.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLSelectElement.cpp
diff --git a/Source/core/html/HTMLSelectElement.cpp b/Source/core/html/HTMLSelectElement.cpp
index f6ecf4f839dcf973bdfd7731b2e537ae8f922f4f..acb51faef4f7a06fab12f3fd3a439479da511eab 100644
--- a/Source/core/html/HTMLSelectElement.cpp
+++ b/Source/core/html/HTMLSelectElement.cpp
@@ -36,6 +36,7 @@
#include "core/dom/Attribute.h"
#include "core/dom/ElementTraversal.h"
#include "core/dom/NodeListsNodeData.h"
+#include "core/dom/NodeRenderStyle.h"
#include "core/dom/NodeTraversal.h"
#include "core/events/GestureEvent.h"
#include "core/events/KeyboardEvent.h"
@@ -536,6 +537,8 @@ int HTMLSelectElement::nextValidIndex(int listIndex, SkipDirection direction, in
HTMLElement* element = listItems[listIndex];
if (!isHTMLOptionElement(*element))
continue;
+ if (toHTMLOptionElement(*element).isDisplayNone())
+ continue;
if (element->isDisabledFormControl())
continue;
if (!usesMenuList() && !element->renderer())
« no previous file with comments | « Source/core/html/HTMLOptionElement.cpp ('k') | Source/core/rendering/RenderMenuList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698