| 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 932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 943 nextElement = NodeRenderingTraversal::parentElement(next
Element); | 943 nextElement = NodeRenderingTraversal::parentElement(next
Element); |
| 944 } while (nextElement); | 944 } while (nextElement); |
| 945 } | 945 } |
| 946 if (matched) { | 946 if (matched) { |
| 947 if (specificity) | 947 if (specificity) |
| 948 *specificity = maxSpecificity; | 948 *specificity = maxSpecificity; |
| 949 return true; | 949 return true; |
| 950 } | 950 } |
| 951 } | 951 } |
| 952 break; | 952 break; |
| 953 case CSSSelector::PseudoSpatialNavigationFocus: |
| 954 return context.isUARule && matchesSpatialNavigationFocusPseudoClass(
element); |
| 953 | 955 |
| 954 case CSSSelector::PseudoHorizontal: | 956 case CSSSelector::PseudoHorizontal: |
| 955 case CSSSelector::PseudoVertical: | 957 case CSSSelector::PseudoVertical: |
| 956 case CSSSelector::PseudoDecrement: | 958 case CSSSelector::PseudoDecrement: |
| 957 case CSSSelector::PseudoIncrement: | 959 case CSSSelector::PseudoIncrement: |
| 958 case CSSSelector::PseudoStart: | 960 case CSSSelector::PseudoStart: |
| 959 case CSSSelector::PseudoEnd: | 961 case CSSSelector::PseudoEnd: |
| 960 case CSSSelector::PseudoDoubleButton: | 962 case CSSSelector::PseudoDoubleButton: |
| 961 case CSSSelector::PseudoSingleButton: | 963 case CSSSelector::PseudoSingleButton: |
| 962 case CSSSelector::PseudoNoButton: | 964 case CSSSelector::PseudoNoButton: |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1115 return element.document().frame() && element.document().frame()->selection()
.isFocusedAndActive(); | 1117 return element.document().frame() && element.document().frame()->selection()
.isFocusedAndActive(); |
| 1116 } | 1118 } |
| 1117 | 1119 |
| 1118 bool SelectorChecker::matchesFocusPseudoClass(const Element& element) | 1120 bool SelectorChecker::matchesFocusPseudoClass(const Element& element) |
| 1119 { | 1121 { |
| 1120 if (InspectorInstrumentation::forcePseudoState(const_cast<Element*>(&element
), CSSSelector::PseudoFocus)) | 1122 if (InspectorInstrumentation::forcePseudoState(const_cast<Element*>(&element
), CSSSelector::PseudoFocus)) |
| 1121 return true; | 1123 return true; |
| 1122 return element.focused() && isFrameFocused(element); | 1124 return element.focused() && isFrameFocused(element); |
| 1123 } | 1125 } |
| 1124 | 1126 |
| 1127 bool SelectorChecker::matchesSpatialNavigationFocusPseudoClass(const Element& el
ement) |
| 1128 { |
| 1129 return isHTMLOptionElement(element) && toHTMLOptionElement(element).spatialN
avigationFocused() && isFrameFocused(element); |
| 1130 } |
| 1131 |
| 1125 template | 1132 template |
| 1126 SelectorChecker::Match SelectorChecker::match(const SelectorCheckingContext&, co
nst DOMSiblingTraversalStrategy&, MatchResult*) const; | 1133 SelectorChecker::Match SelectorChecker::match(const SelectorCheckingContext&, co
nst DOMSiblingTraversalStrategy&, MatchResult*) const; |
| 1127 | 1134 |
| 1128 template | 1135 template |
| 1129 SelectorChecker::Match SelectorChecker::match(const SelectorCheckingContext&, co
nst ShadowDOMSiblingTraversalStrategy&, MatchResult*) const; | 1136 SelectorChecker::Match SelectorChecker::match(const SelectorCheckingContext&, co
nst ShadowDOMSiblingTraversalStrategy&, MatchResult*) const; |
| 1130 | 1137 |
| 1131 } | 1138 } |
| OLD | NEW |