OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) | 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) |
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) | 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) |
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. | 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. |
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. | 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. |
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
(...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
831 case CSSSelector::PseudoReadOnly: | 831 case CSSSelector::PseudoReadOnly: |
832 return element.matchesReadOnlyPseudoClass(); | 832 return element.matchesReadOnlyPseudoClass(); |
833 case CSSSelector::PseudoReadWrite: | 833 case CSSSelector::PseudoReadWrite: |
834 return element.matchesReadWritePseudoClass(); | 834 return element.matchesReadWritePseudoClass(); |
835 case CSSSelector::PseudoOptional: | 835 case CSSSelector::PseudoOptional: |
836 return element.isOptionalFormControl(); | 836 return element.isOptionalFormControl(); |
837 case CSSSelector::PseudoRequired: | 837 case CSSSelector::PseudoRequired: |
838 return element.isRequiredFormControl(); | 838 return element.isRequiredFormControl(); |
839 case CSSSelector::PseudoValid: | 839 case CSSSelector::PseudoValid: |
840 element.document().setContainsValidityStyleRules(); | 840 element.document().setContainsValidityStyleRules(); |
841 return element.willValidate() && element.isValidFormControlElement(); | 841 return element.matchesValidityPseudoClasses() && element.isValidElement(
); |
842 case CSSSelector::PseudoInvalid: | 842 case CSSSelector::PseudoInvalid: |
843 element.document().setContainsValidityStyleRules(); | 843 element.document().setContainsValidityStyleRules(); |
844 return element.willValidate() && !element.isValidFormControlElement(); | 844 return element.matchesValidityPseudoClasses() && !element.isValidElement
(); |
845 case CSSSelector::PseudoChecked: | 845 case CSSSelector::PseudoChecked: |
846 { | 846 { |
847 if (isHTMLInputElement(element)) { | 847 if (isHTMLInputElement(element)) { |
848 HTMLInputElement& inputElement = toHTMLInputElement(element); | 848 HTMLInputElement& inputElement = toHTMLInputElement(element); |
849 // Even though WinIE allows checked and indeterminate to | 849 // Even though WinIE allows checked and indeterminate to |
850 // co-exist, the CSS selector spec says that you can't be | 850 // co-exist, the CSS selector spec says that you can't be |
851 // both checked and indeterminate. We will behave like WinIE | 851 // both checked and indeterminate. We will behave like WinIE |
852 // behind the scenes and just obey the CSS spec here in the | 852 // behind the scenes and just obey the CSS spec here in the |
853 // test for matching the pseudo. | 853 // test for matching the pseudo. |
854 if (inputElement.shouldAppearChecked() && !inputElement.shouldAp
pearIndeterminate()) | 854 if (inputElement.shouldAppearChecked() && !inputElement.shouldAp
pearIndeterminate()) |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1180 return isHTMLSelectElement(element) && !toHTMLSelectElement(element).usesMen
uList(); | 1180 return isHTMLSelectElement(element) && !toHTMLSelectElement(element).usesMen
uList(); |
1181 } | 1181 } |
1182 | 1182 |
1183 template | 1183 template |
1184 SelectorChecker::Match SelectorChecker::match(const SelectorCheckingContext&, co
nst DOMSiblingTraversalStrategy&, MatchResult*) const; | 1184 SelectorChecker::Match SelectorChecker::match(const SelectorCheckingContext&, co
nst DOMSiblingTraversalStrategy&, MatchResult*) const; |
1185 | 1185 |
1186 template | 1186 template |
1187 SelectorChecker::Match SelectorChecker::match(const SelectorCheckingContext&, co
nst ShadowDOMSiblingTraversalStrategy&, MatchResult*) const; | 1187 SelectorChecker::Match SelectorChecker::match(const SelectorCheckingContext&, co
nst ShadowDOMSiblingTraversalStrategy&, MatchResult*) const; |
1188 | 1188 |
1189 } | 1189 } |
OLD | NEW |