Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Side by Side Diff: Source/core/css/SelectorChecker.h

Issue 1133743004: Make right-most compound check explicit. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | Source/core/css/SelectorChecker.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 STACK_ALLOCATED(); 52 STACK_ALLOCATED();
53 public: 53 public:
54 // Initial selector constructor 54 // Initial selector constructor
55 SelectorCheckingContext(const CSSSelector& selector, Element* element, V isitedMatchType visitedMatchType) 55 SelectorCheckingContext(const CSSSelector& selector, Element* element, V isitedMatchType visitedMatchType)
56 : selector(&selector) 56 : selector(&selector)
57 , element(element) 57 , element(element)
58 , previousElement(nullptr) 58 , previousElement(nullptr)
59 , scope(nullptr) 59 , scope(nullptr)
60 , visitedMatchType(visitedMatchType) 60 , visitedMatchType(visitedMatchType)
61 , pseudoId(NOPSEUDO) 61 , pseudoId(NOPSEUDO)
62 , elementStyle(0) 62 , elementStyle(nullptr)
63 , scrollbar(nullptr) 63 , scrollbar(nullptr)
64 , scrollbarPart(NoPart) 64 , scrollbarPart(NoPart)
65 , isSubSelector(false) 65 , isSubSelector(false)
66 , inRightmostCompound(true)
66 , hasScrollbarPseudo(false) 67 , hasScrollbarPseudo(false)
67 , hasSelectionPseudo(false) 68 , hasSelectionPseudo(false)
68 , isUARule(false) 69 , isUARule(false)
69 , scopeContainsLastMatchedElement(false) 70 , scopeContainsLastMatchedElement(false)
70 , treatShadowHostAsNormalScope(false) 71 , treatShadowHostAsNormalScope(false)
71 { 72 {
72 } 73 }
73 74
74 const CSSSelector* selector; 75 const CSSSelector* selector;
75 RawPtrWillBeMember<Element> element; 76 RawPtrWillBeMember<Element> element;
76 RawPtrWillBeMember<Element> previousElement; 77 RawPtrWillBeMember<Element> previousElement;
77 RawPtrWillBeMember<const ContainerNode> scope; 78 RawPtrWillBeMember<const ContainerNode> scope;
78 VisitedMatchType visitedMatchType; 79 VisitedMatchType visitedMatchType;
79 PseudoId pseudoId; 80 PseudoId pseudoId;
80 ComputedStyle* elementStyle; 81 ComputedStyle* elementStyle;
81 RawPtrWillBeMember<LayoutScrollbar> scrollbar; 82 RawPtrWillBeMember<LayoutScrollbar> scrollbar;
82 ScrollbarPart scrollbarPart; 83 ScrollbarPart scrollbarPart;
83 bool isSubSelector; 84 bool isSubSelector;
85 bool inRightmostCompound;
84 bool hasScrollbarPseudo; 86 bool hasScrollbarPseudo;
85 bool hasSelectionPseudo; 87 bool hasSelectionPseudo;
86 bool isUARule; 88 bool isUARule;
87 bool scopeContainsLastMatchedElement; 89 bool scopeContainsLastMatchedElement;
88 bool treatShadowHostAsNormalScope; 90 bool treatShadowHostAsNormalScope;
89 }; 91 };
90 92
91 struct MatchResult { 93 struct MatchResult {
92 MatchResult() 94 MatchResult()
93 : dynamicPseudo(NOPSEUDO) 95 : dynamicPseudo(NOPSEUDO)
(...skipping 23 matching lines...) Expand all
117 bool checkScrollbarPseudoClass(const SelectorCheckingContext&) const; 119 bool checkScrollbarPseudoClass(const SelectorCheckingContext&) const;
118 bool checkPseudoHost(const SelectorCheckingContext&, unsigned*) const; 120 bool checkPseudoHost(const SelectorCheckingContext&, unsigned*) const;
119 bool checkPseudoNot(const SelectorCheckingContext&) const; 121 bool checkPseudoNot(const SelectorCheckingContext&) const;
120 122
121 Mode m_mode; 123 Mode m_mode;
122 }; 124 };
123 125
124 } 126 }
125 127
126 #endif 128 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/core/css/SelectorChecker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698