| 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 20 matching lines...) Expand all Loading... |
| 31 #include "core/css/CSSSelector.h" | 31 #include "core/css/CSSSelector.h" |
| 32 #include "core/dom/Element.h" | 32 #include "core/dom/Element.h" |
| 33 #include "platform/scroll/ScrollTypes.h" | 33 #include "platform/scroll/ScrollTypes.h" |
| 34 | 34 |
| 35 namespace blink { | 35 namespace blink { |
| 36 | 36 |
| 37 class CSSSelector; | 37 class CSSSelector; |
| 38 class ContainerNode; | 38 class ContainerNode; |
| 39 class Element; | 39 class Element; |
| 40 class LayoutScrollbar; | 40 class LayoutScrollbar; |
| 41 class LayoutStyle; | 41 class ComputedStyle; |
| 42 | 42 |
| 43 class SelectorChecker { | 43 class SelectorChecker { |
| 44 WTF_MAKE_NONCOPYABLE(SelectorChecker); | 44 WTF_MAKE_NONCOPYABLE(SelectorChecker); |
| 45 public: | 45 public: |
| 46 enum Match { SelectorMatches, SelectorFailsLocally, SelectorFailsAllSiblings
, SelectorFailsCompletely }; | 46 enum Match { SelectorMatches, SelectorFailsLocally, SelectorFailsAllSiblings
, SelectorFailsCompletely }; |
| 47 enum VisitedMatchType { VisitedMatchDisabled, VisitedMatchEnabled }; | 47 enum VisitedMatchType { VisitedMatchDisabled, VisitedMatchEnabled }; |
| 48 enum Mode { ResolvingStyle = 0, CollectingStyleRules, CollectingCSSRules, Qu
eryingRules, SharingRules }; | 48 enum Mode { ResolvingStyle = 0, CollectingStyleRules, CollectingCSSRules, Qu
eryingRules, SharingRules }; |
| 49 SelectorChecker(Document&, Mode); | 49 SelectorChecker(Document&, Mode); |
| 50 | 50 |
| 51 struct SelectorCheckingContext { | 51 struct SelectorCheckingContext { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 70 , treatShadowHostAsNormalScope(false) | 70 , treatShadowHostAsNormalScope(false) |
| 71 { | 71 { |
| 72 } | 72 } |
| 73 | 73 |
| 74 const CSSSelector* selector; | 74 const CSSSelector* selector; |
| 75 RawPtrWillBeMember<Element> element; | 75 RawPtrWillBeMember<Element> element; |
| 76 RawPtrWillBeMember<Element> previousElement; | 76 RawPtrWillBeMember<Element> previousElement; |
| 77 RawPtrWillBeMember<const ContainerNode> scope; | 77 RawPtrWillBeMember<const ContainerNode> scope; |
| 78 VisitedMatchType visitedMatchType; | 78 VisitedMatchType visitedMatchType; |
| 79 PseudoId pseudoId; | 79 PseudoId pseudoId; |
| 80 LayoutStyle* elementStyle; | 80 ComputedStyle* elementStyle; |
| 81 RawPtrWillBeMember<LayoutScrollbar> scrollbar; | 81 RawPtrWillBeMember<LayoutScrollbar> scrollbar; |
| 82 ScrollbarPart scrollbarPart; | 82 ScrollbarPart scrollbarPart; |
| 83 unsigned isSubSelector : 1; | 83 unsigned isSubSelector : 1; |
| 84 unsigned hasScrollbarPseudo : 1; | 84 unsigned hasScrollbarPseudo : 1; |
| 85 unsigned hasSelectionPseudo : 1; | 85 unsigned hasSelectionPseudo : 1; |
| 86 unsigned isUARule : 1; | 86 unsigned isUARule : 1; |
| 87 unsigned scopeContainsLastMatchedElement : 1; | 87 unsigned scopeContainsLastMatchedElement : 1; |
| 88 unsigned treatShadowHostAsNormalScope : 1; | 88 unsigned treatShadowHostAsNormalScope : 1; |
| 89 }; | 89 }; |
| 90 | 90 |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 { | 174 { |
| 175 // If we're in quirks mode, then :hover and :active should never match ancho
rs with no | 175 // If we're in quirks mode, then :hover and :active should never match ancho
rs with no |
| 176 // href and *:hover and *:active should not match anything. This is specifie
d in | 176 // href and *:hover and *:active should not match anything. This is specifie
d in |
| 177 // https://quirks.spec.whatwg.org/#the-:active-and-:hover-quirk | 177 // https://quirks.spec.whatwg.org/#the-:active-and-:hover-quirk |
| 178 return m_strictParsing || context.isSubSelector || (context.selector->relati
on() == CSSSelector::SubSelector && context.selector->tagHistory()) || context.e
lement->isLink(); | 178 return m_strictParsing || context.isSubSelector || (context.selector->relati
on() == CSSSelector::SubSelector && context.selector->tagHistory()) || context.e
lement->isLink(); |
| 179 } | 179 } |
| 180 | 180 |
| 181 } | 181 } |
| 182 | 182 |
| 183 #endif | 183 #endif |
| OLD | NEW |