Index: third_party/WebKit/Source/core/css/SelectorChecker.cpp |
diff --git a/third_party/WebKit/Source/core/css/SelectorChecker.cpp b/third_party/WebKit/Source/core/css/SelectorChecker.cpp |
index 2396d13e18564ae2a3f21645e43d69d9d792e84f..2a4dc1c5e378d0fdcec1fd9dddf087ada2bd062d 100644 |
--- a/third_party/WebKit/Source/core/css/SelectorChecker.cpp |
+++ b/third_party/WebKit/Source/core/css/SelectorChecker.cpp |
@@ -831,7 +831,16 @@ bool SelectorChecker::checkPseudoClass(const SelectorCheckingContext& context, M |
case CSSSelector::PseudoFullPageMedia: |
return element.document().isMediaDocument(); |
case CSSSelector::PseudoDefault: |
- return element.isDefaultButtonForForm(); |
+ if (element.isDefaultButtonForForm()) |
+ return true; |
+ if (isHTMLInputElement(element)) { |
tkent
2016/03/03 06:46:02
You shouldn't add code here. You should override
ramya.v
2016/03/03 10:29:19
Done.
|
+ HTMLInputElement& inputElement = toHTMLInputElement(element); |
+ if (inputElement.shouldAppearChecked() && !inputElement.shouldAppearIndeterminate()) |
tkent
2016/03/03 06:46:02
The specification doesn't ask to check them. It s
ramya.v
2016/03/03 10:29:19
Done.
|
+ return true; |
+ } else if (isHTMLOptionElement(element) && toHTMLOptionElement(element).selected()) { |
tkent
2016/03/03 06:46:02
The specification doesn't ask to check |selected|
ramya.v
2016/03/03 10:29:19
Done.
|
+ return true; |
+ } |
+ break; |
case CSSSelector::PseudoDisabled: |
// TODO(esprehn): Why not just always return isDisabledFormControl()? |
// Can it be true for elements not in the list below? |