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 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
772 break; | 772 break; |
773 case CSSSelector::PseudoFocus: | 773 case CSSSelector::PseudoFocus: |
774 if (m_mode == ResolvingStyle) { | 774 if (m_mode == ResolvingStyle) { |
775 if (context.elementStyle) | 775 if (context.elementStyle) |
776 context.elementStyle->setAffectedByFocus(); | 776 context.elementStyle->setAffectedByFocus(); |
777 else | 777 else |
778 element.setChildrenOrSiblingsAffectedByFocus(); | 778 element.setChildrenOrSiblingsAffectedByFocus(); |
779 } | 779 } |
780 return matchesFocusPseudoClass(element); | 780 return matchesFocusPseudoClass(element); |
781 case CSSSelector::PseudoHover: | 781 case CSSSelector::PseudoHover: |
782 // If we're in quirks mode, then hover should never match anchors with n
o | 782 if (shouldMatchHoverOrActive(context)) { |
783 // href and *:hover should not match anything. This is important for sit
es like wsj.com. | |
784 if (m_strictParsing || context.isSubSelector || element.isLink()) { | |
785 if (m_mode == ResolvingStyle) { | 783 if (m_mode == ResolvingStyle) { |
786 if (context.elementStyle) | 784 if (context.elementStyle) |
787 context.elementStyle->setAffectedByHover(); | 785 context.elementStyle->setAffectedByHover(); |
788 else | 786 else |
789 element.setChildrenOrSiblingsAffectedByHover(); | 787 element.setChildrenOrSiblingsAffectedByHover(); |
790 } | 788 } |
791 if (element.hovered() || InspectorInstrumentation::forcePseudoState(
&element, CSSSelector::PseudoHover)) | 789 if (element.hovered() || InspectorInstrumentation::forcePseudoState(
&element, CSSSelector::PseudoHover)) |
792 return true; | 790 return true; |
793 } | 791 } |
794 break; | 792 break; |
795 case CSSSelector::PseudoActive: | 793 case CSSSelector::PseudoActive: |
796 // If we're in quirks mode, then :active should never match anchors with
no | 794 if (shouldMatchHoverOrActive(context)) { |
797 // href and *:active should not match anything. | |
798 if (m_strictParsing || context.isSubSelector || element.isLink()) { | |
799 if (m_mode == ResolvingStyle) { | 795 if (m_mode == ResolvingStyle) { |
800 if (context.elementStyle) | 796 if (context.elementStyle) |
801 context.elementStyle->setAffectedByActive(); | 797 context.elementStyle->setAffectedByActive(); |
802 else | 798 else |
803 element.setChildrenOrSiblingsAffectedByActive(); | 799 element.setChildrenOrSiblingsAffectedByActive(); |
804 } | 800 } |
805 if (element.active() || InspectorInstrumentation::forcePseudoState(&
element, CSSSelector::PseudoActive)) | 801 if (element.active() || InspectorInstrumentation::forcePseudoState(&
element, CSSSelector::PseudoActive)) |
806 return true; | 802 return true; |
807 } | 803 } |
808 break; | 804 break; |
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1173 return isHTMLSelectElement(element) && !toHTMLSelectElement(element).usesMen
uList(); | 1169 return isHTMLSelectElement(element) && !toHTMLSelectElement(element).usesMen
uList(); |
1174 } | 1170 } |
1175 | 1171 |
1176 template | 1172 template |
1177 SelectorChecker::Match SelectorChecker::match(const SelectorCheckingContext&, co
nst DOMSiblingTraversalStrategy&, MatchResult*) const; | 1173 SelectorChecker::Match SelectorChecker::match(const SelectorCheckingContext&, co
nst DOMSiblingTraversalStrategy&, MatchResult*) const; |
1178 | 1174 |
1179 template | 1175 template |
1180 SelectorChecker::Match SelectorChecker::match(const SelectorCheckingContext&, co
nst ShadowDOMSiblingTraversalStrategy&, MatchResult*) const; | 1176 SelectorChecker::Match SelectorChecker::match(const SelectorCheckingContext&, co
nst ShadowDOMSiblingTraversalStrategy&, MatchResult*) const; |
1181 | 1177 |
1182 } | 1178 } |
OLD | NEW |