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

Side by Side Diff: Source/core/css/resolver/StyleResolver.h

Issue 54543011: Have StyleResolverParentPusher / SelectorFilter deal with references (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month 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 | « Source/core/css/SelectorFilter.cpp ('k') | Source/core/css/resolver/StyleResolver.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 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 class StyleResolver : public FontSelectorClient { 176 class StyleResolver : public FontSelectorClient {
177 WTF_MAKE_NONCOPYABLE(StyleResolver); WTF_MAKE_FAST_ALLOCATED; 177 WTF_MAKE_NONCOPYABLE(StyleResolver); WTF_MAKE_FAST_ALLOCATED;
178 public: 178 public:
179 StyleResolver(Document&, bool matchAuthorAndUserStyles); 179 StyleResolver(Document&, bool matchAuthorAndUserStyles);
180 ~StyleResolver(); 180 ~StyleResolver();
181 181
182 // FIXME: StyleResolver should not be keeping tree-walk state. 182 // FIXME: StyleResolver should not be keeping tree-walk state.
183 // These should move to some global tree-walk state, or should be contained in a 183 // These should move to some global tree-walk state, or should be contained in a
184 // TreeWalkContext or similar which is passed in to StyleResolver methods wh en available. 184 // TreeWalkContext or similar which is passed in to StyleResolver methods wh en available.
185 // Using these during tree walk will allow style selector to optimize child and descendant selector lookups. 185 // Using these during tree walk will allow style selector to optimize child and descendant selector lookups.
186 void pushParentElement(Element*); 186 void pushParentElement(Element&);
187 void popParentElement(Element*); 187 void popParentElement(Element&);
188 void pushParentShadowRoot(const ShadowRoot&); 188 void pushParentShadowRoot(const ShadowRoot&);
189 void popParentShadowRoot(const ShadowRoot&); 189 void popParentShadowRoot(const ShadowRoot&);
190 190
191 PassRefPtr<RenderStyle> styleForElement(Element*, RenderStyle* parentStyle = 0, StyleSharingBehavior = AllowStyleSharing, 191 PassRefPtr<RenderStyle> styleForElement(Element*, RenderStyle* parentStyle = 0, StyleSharingBehavior = AllowStyleSharing,
192 RuleMatchingBehavior = MatchAllRules, RenderRegion* regionForStyling = 0 ); 192 RuleMatchingBehavior = MatchAllRules, RenderRegion* regionForStyling = 0 );
193 193
194 // FIXME: The following logic related to animations and keyframes should be factored out of StyleResolver 194 // FIXME: The following logic related to animations and keyframes should be factored out of StyleResolver
195 void resolveKeyframes(Element*, const RenderStyle*, const AtomicString& anim ationName, TimingFunction* defaultTimingFunction, Vector<std::pair<KeyframeAnima tionEffect::KeyframeVector, RefPtr<TimingFunction> > >&); 195 void resolveKeyframes(Element*, const RenderStyle*, const AtomicString& anim ationName, TimingFunction* defaultTimingFunction, Vector<std::pair<KeyframeAnima tionEffect::KeyframeVector, RefPtr<TimingFunction> > >&);
196 void keyframeStylesForAnimation(Element*, const RenderStyle*, KeyframeList&) ; 196 void keyframeStylesForAnimation(Element*, const RenderStyle*, KeyframeList&) ;
197 const StyleRuleKeyframes* matchScopedKeyframesRule(const Element*, const Str ingImpl* animationName); 197 const StyleRuleKeyframes* matchScopedKeyframesRule(const Element*, const Str ingImpl* animationName);
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 PseudoId ignoreDynamicPseudo = NOPSEUDO; 380 PseudoId ignoreDynamicPseudo = NOPSEUDO;
381 if (selectorChecker.match(selectorCheckingContext, ignoreDynamicPseudo, DOMSiblingTraversalStrategy()) == SelectorChecker::SelectorMatches) 381 if (selectorChecker.match(selectorCheckingContext, ignoreDynamicPseudo, DOMSiblingTraversalStrategy()) == SelectorChecker::SelectorMatches)
382 return true; 382 return true;
383 } 383 }
384 return false; 384 return false;
385 } 385 }
386 386
387 } // namespace WebCore 387 } // namespace WebCore
388 388
389 #endif // StyleResolver_h 389 #endif // StyleResolver_h
OLDNEW
« no previous file with comments | « Source/core/css/SelectorFilter.cpp ('k') | Source/core/css/resolver/StyleResolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698