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 916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
927 case CSSSelector::PseudoFullScreen: | 927 case CSSSelector::PseudoFullScreen: |
928 // While a Document is in the fullscreen state, and the document's curre
nt fullscreen | 928 // While a Document is in the fullscreen state, and the document's curre
nt fullscreen |
929 // element is an element in the document, the 'full-screen' pseudoclass
applies to | 929 // element is an element in the document, the 'full-screen' pseudoclass
applies to |
930 // that element. Also, an <iframe>, <object> or <embed> element whose ch
ild browsing | 930 // that element. Also, an <iframe>, <object> or <embed> element whose ch
ild browsing |
931 // context's Document is in the fullscreen state has the 'full-screen' p
seudoclass applied. | 931 // context's Document is in the fullscreen state has the 'full-screen' p
seudoclass applied. |
932 if (isHTMLFrameElementBase(element) && element.containsFullScreenElement
()) | 932 if (isHTMLFrameElementBase(element) && element.containsFullScreenElement
()) |
933 return true; | 933 return true; |
934 return Fullscreen::isActiveFullScreenElement(element); | 934 return Fullscreen::isActiveFullScreenElement(element); |
935 case CSSSelector::PseudoFullScreenAncestor: | 935 case CSSSelector::PseudoFullScreenAncestor: |
936 return element.containsFullScreenElement(); | 936 return element.containsFullScreenElement(); |
937 case CSSSelector::PseudoFullScreenDocument: | |
938 // While a Document is in the fullscreen state, the 'full-screen-documen
t' pseudoclass applies | |
939 // to all elements of that Document. | |
940 return Fullscreen::isFullScreen(element.document()); | |
941 case CSSSelector::PseudoInRange: | 937 case CSSSelector::PseudoInRange: |
942 if (m_mode == ResolvingStyle) | 938 if (m_mode == ResolvingStyle) |
943 element.document().setContainsValidityStyleRules(); | 939 element.document().setContainsValidityStyleRules(); |
944 return element.isInRange(); | 940 return element.isInRange(); |
945 case CSSSelector::PseudoOutOfRange: | 941 case CSSSelector::PseudoOutOfRange: |
946 if (m_mode == ResolvingStyle) | 942 if (m_mode == ResolvingStyle) |
947 element.document().setContainsValidityStyleRules(); | 943 element.document().setContainsValidityStyleRules(); |
948 return element.isOutOfRange(); | 944 return element.isOutOfRange(); |
949 case CSSSelector::PseudoFutureCue: | 945 case CSSSelector::PseudoFutureCue: |
950 return element.isVTTElement() && !toVTTElement(element).isPastNode(); | 946 return element.isVTTElement() && !toVTTElement(element).isPastNode(); |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1181 } | 1177 } |
1182 | 1178 |
1183 bool SelectorChecker::matchesFocusPseudoClass(const Element& element) | 1179 bool SelectorChecker::matchesFocusPseudoClass(const Element& element) |
1184 { | 1180 { |
1185 if (InspectorInstrumentation::forcePseudoState(const_cast<Element*>(&element
), CSSSelector::PseudoFocus)) | 1181 if (InspectorInstrumentation::forcePseudoState(const_cast<Element*>(&element
), CSSSelector::PseudoFocus)) |
1186 return true; | 1182 return true; |
1187 return element.focused() && isFrameFocused(element); | 1183 return element.focused() && isFrameFocused(element); |
1188 } | 1184 } |
1189 | 1185 |
1190 } | 1186 } |
OLD | NEW |