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

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

Issue 843773002: Only match style from element's TreeScope for normal rules. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed custom pseudo and ::cue regressions Created 5 years, 11 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
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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 void adjustRenderStyle(StyleResolverState&, Element*); 209 void adjustRenderStyle(StyleResolverState&, Element*);
210 210
211 void appendCSSStyleSheet(CSSStyleSheet&); 211 void appendCSSStyleSheet(CSSStyleSheet&);
212 void addRulesFromSheet(CSSStyleSheet&, TreeScope*, unsigned); 212 void addRulesFromSheet(CSSStyleSheet&, TreeScope*, unsigned);
213 void processScopedRules(const RuleSet& authorRules, CSSStyleSheet*, unsigned sheetIndex, ContainerNode& scope); 213 void processScopedRules(const RuleSet& authorRules, CSSStyleSheet*, unsigned sheetIndex, ContainerNode& scope);
214 214
215 void collectPseudoRulesForElement(Element*, ElementRuleCollector&, PseudoId, unsigned rulesToInclude); 215 void collectPseudoRulesForElement(Element*, ElementRuleCollector&, PseudoId, unsigned rulesToInclude);
216 void matchRuleSet(ElementRuleCollector&, RuleSet*); 216 void matchRuleSet(ElementRuleCollector&, RuleSet*);
217 void matchUARules(ElementRuleCollector&); 217 void matchUARules(ElementRuleCollector&);
218 void matchAuthorRules(Element*, ElementRuleCollector&, bool includeEmptyRule s); 218 void matchAuthorRules(Element*, ElementRuleCollector&, bool includeEmptyRule s);
219 void matchAuthorRulesForShadowHost(Element*, ElementRuleCollector&, bool inc ludeEmptyRules, WillBeHeapVector<RawPtrWillBeMember<ScopedStyleResolver>, 8>& re solvers, WillBeHeapVector<RawPtrWillBeMember<ScopedStyleResolver>, 8>& resolvers InShadowTree); 219 void matchAuthorRulesForShadowHost(Element*, ElementRuleCollector&, bool inc ludeEmptyRules, WillBeHeapVector<RawPtrWillBeMember<ScopedStyleResolver>, 8>& re solversInShadowTree);
220 void matchAllRules(StyleResolverState&, ElementRuleCollector&, bool includeS MILProperties); 220 void matchAllRules(StyleResolverState&, ElementRuleCollector&, bool includeS MILProperties);
221 void collectFeatures(); 221 void collectFeatures();
222 void resetRuleFeatures(); 222 void resetRuleFeatures();
223 223
224 bool fastRejectSelector(const RuleData&) const; 224 bool fastRejectSelector(const RuleData&) const;
225 225
226 void applyMatchedProperties(StyleResolverState&, const MatchResult&); 226 void applyMatchedProperties(StyleResolverState&, const MatchResult&);
227 bool applyAnimatedProperties(StyleResolverState&, const Element* animatingEl ement); 227 bool applyAnimatedProperties(StyleResolverState&, const Element* animatingEl ement);
228 void applyCallbackSelectors(StyleResolverState&); 228 void applyCallbackSelectors(StyleResolverState&);
229 229
230 void resolveScopedStyles(const Element*, WillBeHeapVector<RawPtrWillBeMember <ScopedStyleResolver>, 8>&);
231
232 enum StyleApplicationPass { 230 enum StyleApplicationPass {
233 HighPriorityProperties, 231 HighPriorityProperties,
234 LowPriorityProperties 232 LowPriorityProperties
235 }; 233 };
236 template <StyleResolver::StyleApplicationPass pass> 234 template <StyleResolver::StyleApplicationPass pass>
237 static inline CSSPropertyID firstCSSPropertyId(); 235 static inline CSSPropertyID firstCSSPropertyId();
238 template <StyleResolver::StyleApplicationPass pass> 236 template <StyleResolver::StyleApplicationPass pass>
239 static inline CSSPropertyID lastCSSPropertyId(); 237 static inline CSSPropertyID lastCSSPropertyId();
240 template <StyleResolver::StyleApplicationPass pass> 238 template <StyleResolver::StyleApplicationPass pass>
241 static inline bool isPropertyForPass(CSSPropertyID); 239 static inline bool isPropertyForPass(CSSPropertyID);
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 OwnPtr<StyleResolverStats> m_styleResolverStatsTotals; 297 OwnPtr<StyleResolverStats> m_styleResolverStatsTotals;
300 unsigned m_styleResolverStatsSequence; 298 unsigned m_styleResolverStatsSequence;
301 299
302 // Use only for Internals::updateStyleAndReturnAffectedElementCount. 300 // Use only for Internals::updateStyleAndReturnAffectedElementCount.
303 unsigned m_accessCount; 301 unsigned m_accessCount;
304 }; 302 };
305 303
306 } // namespace blink 304 } // namespace blink
307 305
308 #endif // StyleResolver_h 306 #endif // StyleResolver_h
OLDNEW
« no previous file with comments | « Source/core/css/resolver/ScopedStyleResolver.cpp ('k') | Source/core/css/resolver/StyleResolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698