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

Unified Diff: Source/core/css/SelectorChecker.cpp

Issue 18970003: Introduce isHTMLOptGroupElement and toHTMLOptGroupElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 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/css/SelectorChecker.cpp
diff --git a/Source/core/css/SelectorChecker.cpp b/Source/core/css/SelectorChecker.cpp
index 3fad960151009494ae69ac1a5490b89629b2fa74..fbdace1458721db258e347f61ef982408e6190ca 100644
--- a/Source/core/css/SelectorChecker.cpp
+++ b/Source/core/css/SelectorChecker.cpp
@@ -44,6 +44,7 @@
#include "core/html/HTMLDocument.h"
#include "core/html/HTMLFrameElementBase.h"
#include "core/html/HTMLInputElement.h"
+#include "core/html/HTMLOptGroupElement.h"
#include "core/html/HTMLOptionElement.h"
#include "core/html/parser/HTMLParserIdioms.h"
#include "core/inspector/InspectorInstrumentation.h"
@@ -617,7 +618,7 @@ bool SelectorChecker::checkOne(const SelectorCheckingContext& context, const Sib
}
break;
case CSSSelector::PseudoEnabled:
- if (element && (element->isFormControlElement() || element->hasTagName(optionTag) || element->hasTagName(optgroupTag)))
+ if (element && (element->isFormControlElement() || element->hasTagName(optionTag) || isHTMLOptGroupElement(element)))
return !element->isDisabledFormControl();
break;
case CSSSelector::PseudoFullPageMedia:
@@ -626,7 +627,7 @@ bool SelectorChecker::checkOne(const SelectorCheckingContext& context, const Sib
case CSSSelector::PseudoDefault:
return element && element->isDefaultButtonForForm();
case CSSSelector::PseudoDisabled:
- if (element && (element->isFormControlElement() || element->hasTagName(optionTag) || element->hasTagName(optgroupTag)))
+ if (element && (element->isFormControlElement() || element->hasTagName(optionTag) || isHTMLOptGroupElement(element)))
return element->isDisabledFormControl();
break;
case CSSSelector::PseudoReadOnly:
« no previous file with comments | « Source/core/accessibility/AccessibilityListBoxOption.cpp ('k') | Source/core/css/resolver/StyleResolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698