Chromium Code Reviews| 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 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 we're in quirks mode, then hover should never match anchors with n o |
| 783 // href and *:hover should not match anything. This is important for sit es like wsj.com. | 783 // href and *:hover should not match anything. This is important for sit es like wsj.com. |
|
kochi
2015/01/15 10:04:11
Could you move this comment and the comment for Ps
rune
2015/01/15 10:29:02
Done.
I removed the reference to wsj.com since th
| |
| 784 if (m_strictParsing || context.isSubSelector || element.isLink()) { | 784 if (shouldMatchHoverOrActive(context)) { |
| 785 if (m_mode == ResolvingStyle) { | 785 if (m_mode == ResolvingStyle) { |
| 786 if (context.elementStyle) | 786 if (context.elementStyle) |
| 787 context.elementStyle->setAffectedByHover(); | 787 context.elementStyle->setAffectedByHover(); |
| 788 else | 788 else |
| 789 element.setChildrenOrSiblingsAffectedByHover(); | 789 element.setChildrenOrSiblingsAffectedByHover(); |
| 790 } | 790 } |
| 791 if (element.hovered() || InspectorInstrumentation::forcePseudoState( &element, CSSSelector::PseudoHover)) | 791 if (element.hovered() || InspectorInstrumentation::forcePseudoState( &element, CSSSelector::PseudoHover)) |
| 792 return true; | 792 return true; |
| 793 } | 793 } |
| 794 break; | 794 break; |
| 795 case CSSSelector::PseudoActive: | 795 case CSSSelector::PseudoActive: |
| 796 // If we're in quirks mode, then :active should never match anchors with no | 796 // If we're in quirks mode, then :active should never match anchors with no |
| 797 // href and *:active should not match anything. | 797 // href and *:active should not match anything. |
| 798 if (m_strictParsing || context.isSubSelector || element.isLink()) { | 798 if (shouldMatchHoverOrActive(context)) { |
| 799 if (m_mode == ResolvingStyle) { | 799 if (m_mode == ResolvingStyle) { |
| 800 if (context.elementStyle) | 800 if (context.elementStyle) |
| 801 context.elementStyle->setAffectedByActive(); | 801 context.elementStyle->setAffectedByActive(); |
| 802 else | 802 else |
| 803 element.setChildrenOrSiblingsAffectedByActive(); | 803 element.setChildrenOrSiblingsAffectedByActive(); |
| 804 } | 804 } |
| 805 if (element.active() || InspectorInstrumentation::forcePseudoState(& element, CSSSelector::PseudoActive)) | 805 if (element.active() || InspectorInstrumentation::forcePseudoState(& element, CSSSelector::PseudoActive)) |
| 806 return true; | 806 return true; |
| 807 } | 807 } |
| 808 break; | 808 break; |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1173 return isHTMLSelectElement(element) && !toHTMLSelectElement(element).usesMen uList(); | 1173 return isHTMLSelectElement(element) && !toHTMLSelectElement(element).usesMen uList(); |
| 1174 } | 1174 } |
| 1175 | 1175 |
| 1176 template | 1176 template |
| 1177 SelectorChecker::Match SelectorChecker::match(const SelectorCheckingContext&, co nst DOMSiblingTraversalStrategy&, MatchResult*) const; | 1177 SelectorChecker::Match SelectorChecker::match(const SelectorCheckingContext&, co nst DOMSiblingTraversalStrategy&, MatchResult*) const; |
| 1178 | 1178 |
| 1179 template | 1179 template |
| 1180 SelectorChecker::Match SelectorChecker::match(const SelectorCheckingContext&, co nst ShadowDOMSiblingTraversalStrategy&, MatchResult*) const; | 1180 SelectorChecker::Match SelectorChecker::match(const SelectorCheckingContext&, co nst ShadowDOMSiblingTraversalStrategy&, MatchResult*) const; |
| 1181 | 1181 |
| 1182 } | 1182 } |
| OLD | NEW |