| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 struct SelectorCheckingContext { | 69 struct SelectorCheckingContext { |
| 70 STACK_ALLOCATED(); | 70 STACK_ALLOCATED(); |
| 71 public: | 71 public: |
| 72 // Initial selector constructor | 72 // Initial selector constructor |
| 73 SelectorCheckingContext(Element* element, VisitedMatchType visitedMatchT
ype) | 73 SelectorCheckingContext(Element* element, VisitedMatchType visitedMatchT
ype) |
| 74 : selector(nullptr) | 74 : selector(nullptr) |
| 75 , element(element) | 75 , element(element) |
| 76 , previousElement(nullptr) | 76 , previousElement(nullptr) |
| 77 , scope(nullptr) | 77 , scope(nullptr) |
| 78 , visitedMatchType(visitedMatchType) | 78 , visitedMatchType(visitedMatchType) |
| 79 , pseudoId(NOPSEUDO) | 79 , pseudoId(PseudoIdNone) |
| 80 , isSubSelector(false) | 80 , isSubSelector(false) |
| 81 , inRightmostCompound(true) | 81 , inRightmostCompound(true) |
| 82 , hasScrollbarPseudo(false) | 82 , hasScrollbarPseudo(false) |
| 83 , hasSelectionPseudo(false) | 83 , hasSelectionPseudo(false) |
| 84 , treatShadowHostAsNormalScope(false) | 84 , treatShadowHostAsNormalScope(false) |
| 85 { | 85 { |
| 86 } | 86 } |
| 87 | 87 |
| 88 const CSSSelector* selector; | 88 const CSSSelector* selector; |
| 89 RawPtrWillBeMember<Element> element; | 89 RawPtrWillBeMember<Element> element; |
| 90 RawPtrWillBeMember<Element> previousElement; | 90 RawPtrWillBeMember<Element> previousElement; |
| 91 RawPtrWillBeMember<const ContainerNode> scope; | 91 RawPtrWillBeMember<const ContainerNode> scope; |
| 92 VisitedMatchType visitedMatchType; | 92 VisitedMatchType visitedMatchType; |
| 93 PseudoId pseudoId; | 93 PseudoId pseudoId; |
| 94 bool isSubSelector; | 94 bool isSubSelector; |
| 95 bool inRightmostCompound; | 95 bool inRightmostCompound; |
| 96 bool hasScrollbarPseudo; | 96 bool hasScrollbarPseudo; |
| 97 bool hasSelectionPseudo; | 97 bool hasSelectionPseudo; |
| 98 bool treatShadowHostAsNormalScope; | 98 bool treatShadowHostAsNormalScope; |
| 99 }; | 99 }; |
| 100 | 100 |
| 101 struct MatchResult { | 101 struct MatchResult { |
| 102 STACK_ALLOCATED(); | 102 STACK_ALLOCATED(); |
| 103 MatchResult() | 103 MatchResult() |
| 104 : dynamicPseudo(NOPSEUDO) | 104 : dynamicPseudo(PseudoIdNone) |
| 105 , specificity(0) { } | 105 , specificity(0) { } |
| 106 | 106 |
| 107 PseudoId dynamicPseudo; | 107 PseudoId dynamicPseudo; |
| 108 unsigned specificity; | 108 unsigned specificity; |
| 109 }; | 109 }; |
| 110 | 110 |
| 111 bool match(const SelectorCheckingContext& context, MatchResult& result) cons
t | 111 bool match(const SelectorCheckingContext& context, MatchResult& result) cons
t |
| 112 { | 112 { |
| 113 ASSERT(context.selector); | 113 ASSERT(context.selector); |
| 114 return matchSelector(context, result) == SelectorMatches; | 114 return matchSelector(context, result) == SelectorMatches; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 141 Mode m_mode; | 141 Mode m_mode; |
| 142 bool m_isUARule; | 142 bool m_isUARule; |
| 143 ComputedStyle* m_elementStyle; | 143 ComputedStyle* m_elementStyle; |
| 144 RawPtrWillBeMember<LayoutScrollbar> m_scrollbar; | 144 RawPtrWillBeMember<LayoutScrollbar> m_scrollbar; |
| 145 ScrollbarPart m_scrollbarPart; | 145 ScrollbarPart m_scrollbarPart; |
| 146 }; | 146 }; |
| 147 | 147 |
| 148 } // namespace blink | 148 } // namespace blink |
| 149 | 149 |
| 150 #endif | 150 #endif |
| OLD | NEW |