| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 STACK_ALLOCATED(); | 45 STACK_ALLOCATED(); |
| 46 public: | 46 public: |
| 47 enum VisitedMatchType { VisitedMatchDisabled, VisitedMatchEnabled }; | 47 enum VisitedMatchType { VisitedMatchDisabled, VisitedMatchEnabled }; |
| 48 enum Mode { ResolvingStyle, CollectingStyleRules, CollectingCSSRules, Queryi
ngRules, SharingRules }; | 48 enum Mode { ResolvingStyle, CollectingStyleRules, CollectingCSSRules, Queryi
ngRules, SharingRules }; |
| 49 | 49 |
| 50 struct Init { | 50 struct Init { |
| 51 STACK_ALLOCATED(); | 51 STACK_ALLOCATED(); |
| 52 public: | 52 public: |
| 53 Mode mode = ResolvingStyle; | 53 Mode mode = ResolvingStyle; |
| 54 bool isUARule = false; | 54 bool isUARule = false; |
| 55 bool isQuerySelector = false; |
| 55 ComputedStyle* elementStyle = nullptr; | 56 ComputedStyle* elementStyle = nullptr; |
| 56 RawPtrWillBeMember<LayoutScrollbar> scrollbar = nullptr; | 57 RawPtrWillBeMember<LayoutScrollbar> scrollbar = nullptr; |
| 57 ScrollbarPart scrollbarPart = NoPart; | 58 ScrollbarPart scrollbarPart = NoPart; |
| 58 }; | 59 }; |
| 59 | 60 |
| 60 explicit SelectorChecker(const Init& init) | 61 explicit SelectorChecker(const Init& init) |
| 61 : m_mode(init.mode) | 62 : m_mode(init.mode) |
| 62 , m_isUARule(init.isUARule) | 63 , m_isUARule(init.isUARule) |
| 64 , m_isQuerySelector(init.isQuerySelector) |
| 63 , m_elementStyle(init.elementStyle) | 65 , m_elementStyle(init.elementStyle) |
| 64 , m_scrollbar(init.scrollbar) | 66 , m_scrollbar(init.scrollbar) |
| 65 , m_scrollbarPart(init.scrollbarPart) | 67 , m_scrollbarPart(init.scrollbarPart) |
| 66 { | 68 { |
| 67 } | 69 } |
| 68 | 70 |
| 69 struct SelectorCheckingContext { | 71 struct SelectorCheckingContext { |
| 70 STACK_ALLOCATED(); | 72 STACK_ALLOCATED(); |
| 71 public: | 73 public: |
| 72 // Initial selector constructor | 74 // Initial selector constructor |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 Match matchForPseudoContent(const SelectorCheckingContext&, const Element&,
MatchResult&) const; | 135 Match matchForPseudoContent(const SelectorCheckingContext&, const Element&,
MatchResult&) const; |
| 134 Match matchForPseudoShadow(const SelectorCheckingContext&, const ContainerNo
de*, MatchResult&) const; | 136 Match matchForPseudoShadow(const SelectorCheckingContext&, const ContainerNo
de*, MatchResult&) const; |
| 135 bool checkPseudoClass(const SelectorCheckingContext&, MatchResult&) const; | 137 bool checkPseudoClass(const SelectorCheckingContext&, MatchResult&) const; |
| 136 bool checkPseudoElement(const SelectorCheckingContext&, MatchResult&) const; | 138 bool checkPseudoElement(const SelectorCheckingContext&, MatchResult&) const; |
| 137 bool checkScrollbarPseudoClass(const SelectorCheckingContext&, MatchResult&)
const; | 139 bool checkScrollbarPseudoClass(const SelectorCheckingContext&, MatchResult&)
const; |
| 138 bool checkPseudoHost(const SelectorCheckingContext&, MatchResult&) const; | 140 bool checkPseudoHost(const SelectorCheckingContext&, MatchResult&) const; |
| 139 bool checkPseudoNot(const SelectorCheckingContext&, MatchResult&) const; | 141 bool checkPseudoNot(const SelectorCheckingContext&, MatchResult&) const; |
| 140 | 142 |
| 141 Mode m_mode; | 143 Mode m_mode; |
| 142 bool m_isUARule; | 144 bool m_isUARule; |
| 145 bool m_isQuerySelector; |
| 143 ComputedStyle* m_elementStyle; | 146 ComputedStyle* m_elementStyle; |
| 144 RawPtrWillBeMember<LayoutScrollbar> m_scrollbar; | 147 RawPtrWillBeMember<LayoutScrollbar> m_scrollbar; |
| 145 ScrollbarPart m_scrollbarPart; | 148 ScrollbarPart m_scrollbarPart; |
| 146 }; | 149 }; |
| 147 | 150 |
| 148 } // namespace blink | 151 } // namespace blink |
| 149 | 152 |
| 150 #endif | 153 #endif |
| OLD | NEW |