| 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 848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 859 return true; | 859 return true; |
| 860 } else if (isHTMLOptionElement(element) && toHTMLOptionElement(eleme
nt).selected()) { | 860 } else if (isHTMLOptionElement(element) && toHTMLOptionElement(eleme
nt).selected()) { |
| 861 return true; | 861 return true; |
| 862 } | 862 } |
| 863 break; | 863 break; |
| 864 } | 864 } |
| 865 case CSSSelector::PseudoIndeterminate: | 865 case CSSSelector::PseudoIndeterminate: |
| 866 return element.shouldAppearIndeterminate(); | 866 return element.shouldAppearIndeterminate(); |
| 867 case CSSSelector::PseudoRoot: | 867 case CSSSelector::PseudoRoot: |
| 868 return element == element.document().documentElement(); | 868 return element == element.document().documentElement(); |
| 869 case CSSSelector::PseudoDir: |
| 870 { |
| 871 const AtomicString& argument = selector.argument(); |
| 872 if (element.directionality() == LTR) |
| 873 return equalIgnoringASCIICase(argument, "ltr"); |
| 874 return equalIgnoringASCIICase(argument, "rtl"); |
| 875 } |
| 869 case CSSSelector::PseudoLang: | 876 case CSSSelector::PseudoLang: |
| 870 { | 877 { |
| 871 AtomicString value; | 878 AtomicString value; |
| 872 if (element.isVTTElement()) | 879 if (element.isVTTElement()) |
| 873 value = toVTTElement(element).language(); | 880 value = toVTTElement(element).language(); |
| 874 else | 881 else |
| 875 value = element.computeInheritedLanguage(); | 882 value = element.computeInheritedLanguage(); |
| 876 const AtomicString& argument = selector.argument(); | 883 const AtomicString& argument = selector.argument(); |
| 877 if (value.isEmpty() || !value.startsWith(argument, TextCaseASCIIInse
nsitive)) | 884 if (value.isEmpty() || !value.startsWith(argument, TextCaseASCIIInse
nsitive)) |
| 878 break; | 885 break; |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1135 } | 1142 } |
| 1136 | 1143 |
| 1137 bool SelectorChecker::matchesFocusPseudoClass(const Element& element) | 1144 bool SelectorChecker::matchesFocusPseudoClass(const Element& element) |
| 1138 { | 1145 { |
| 1139 if (InspectorInstrumentation::forcePseudoState(const_cast<Element*>(&element
), CSSSelector::PseudoFocus)) | 1146 if (InspectorInstrumentation::forcePseudoState(const_cast<Element*>(&element
), CSSSelector::PseudoFocus)) |
| 1140 return true; | 1147 return true; |
| 1141 return element.focused() && isFrameFocused(element); | 1148 return element.focused() && isFrameFocused(element); |
| 1142 } | 1149 } |
| 1143 | 1150 |
| 1144 } // namespace blink | 1151 } // namespace blink |
| OLD | NEW |