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 946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
957 case CSSSelector::PseudoRoot: | 957 case CSSSelector::PseudoRoot: |
958 return element == element.document().documentElement(); | 958 return element == element.document().documentElement(); |
959 case CSSSelector::PseudoLang: | 959 case CSSSelector::PseudoLang: |
960 { | 960 { |
961 AtomicString value; | 961 AtomicString value; |
962 if (element.isVTTElement()) | 962 if (element.isVTTElement()) |
963 value = toVTTElement(element).language(); | 963 value = toVTTElement(element).language(); |
964 else | 964 else |
965 value = element.computeInheritedLanguage(); | 965 value = element.computeInheritedLanguage(); |
966 const AtomicString& argument = selector.argument(); | 966 const AtomicString& argument = selector.argument(); |
967 if (value.isEmpty() || !value.startsWith(argument, TextCaseInsensiti
ve)) | 967 if (value.isEmpty() || !startsWithIgnoringASCIICase(value, argument)
) |
968 break; | 968 break; |
969 if (value.length() != argument.length() && value[argument.length()]
!= '-') | 969 if (value.length() != argument.length() && value[argument.length()]
!= '-') |
970 break; | 970 break; |
971 return true; | 971 return true; |
972 } | 972 } |
973 case CSSSelector::PseudoFullScreen: | 973 case CSSSelector::PseudoFullScreen: |
974 // While a Document is in the fullscreen state, and the document's curre
nt fullscreen | 974 // While a Document is in the fullscreen state, and the document's curre
nt fullscreen |
975 // element is an element in the document, the 'full-screen' pseudoclass
applies to | 975 // element is an element in the document, the 'full-screen' pseudoclass
applies to |
976 // that element. Also, an <iframe>, <object> or <embed> element whose ch
ild browsing | 976 // that element. Also, an <iframe>, <object> or <embed> element whose ch
ild browsing |
977 // context's Document is in the fullscreen state has the 'full-screen' p
seudoclass applied. | 977 // context's Document is in the fullscreen state has the 'full-screen' p
seudoclass applied. |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1200 } | 1200 } |
1201 | 1201 |
1202 bool SelectorChecker::matchesFocusPseudoClass(const Element& element) | 1202 bool SelectorChecker::matchesFocusPseudoClass(const Element& element) |
1203 { | 1203 { |
1204 if (InspectorInstrumentation::forcePseudoState(const_cast<Element*>(&element
), CSSSelector::PseudoFocus)) | 1204 if (InspectorInstrumentation::forcePseudoState(const_cast<Element*>(&element
), CSSSelector::PseudoFocus)) |
1205 return true; | 1205 return true; |
1206 return element.focused() && isFrameFocused(element); | 1206 return element.focused() && isFrameFocused(element); |
1207 } | 1207 } |
1208 | 1208 |
1209 } | 1209 } |
OLD | NEW |