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

Side by Side Diff: sky/engine/core/css/resolver/StyleResolver.h

Issue 772363002: Remove code to collect rules when matching. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 | « sky/engine/core/css/SelectorChecker.h ('k') | sky/engine/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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 122
123 void processScopedRules(const RuleSet& authorRules, CSSStyleSheet*, unsigned sheetIndex, ContainerNode& scope); 123 void processScopedRules(const RuleSet& authorRules, CSSStyleSheet*, unsigned sheetIndex, ContainerNode& scope);
124 124
125 void lazyAppendAuthorStyleSheets(unsigned firstNew, const Vector<RefPtr<CSSS tyleSheet> >&); 125 void lazyAppendAuthorStyleSheets(unsigned firstNew, const Vector<RefPtr<CSSS tyleSheet> >&);
126 void removePendingAuthorStyleSheets(const Vector<RefPtr<CSSStyleSheet> >&); 126 void removePendingAuthorStyleSheets(const Vector<RefPtr<CSSStyleSheet> >&);
127 void appendPendingAuthorStyleSheets(); 127 void appendPendingAuthorStyleSheets();
128 bool hasPendingAuthorStyleSheets() const { return m_pendingStyleSheets.size( ) > 0 || m_needCollectFeatures; } 128 bool hasPendingAuthorStyleSheets() const { return m_pendingStyleSheets.size( ) > 0 || m_needCollectFeatures; }
129 129
130 void styleTreeResolveScopedKeyframesRules(const Element*, Vector<RawPtr<Scop edStyleResolver>, 8>&); 130 void styleTreeResolveScopedKeyframesRules(const Element*, Vector<RawPtr<Scop edStyleResolver>, 8>&);
131 131
132 // These methods will give back the set of rules that matched for a given el ement (or a pseudo-element).
133 enum CSSRuleFilter {
134 UAAndUserCSSRules = 1 << 1,
135 AuthorCSSRules = 1 << 2,
136 EmptyCSSRules = 1 << 3,
137 CrossOriginCSSRules = 1 << 4,
138 AllButEmptyCSSRules = UAAndUserCSSRules | AuthorCSSRules | CrossOriginCS SRules,
139 AllCSSRules = AllButEmptyCSSRules | EmptyCSSRules,
140 };
141 PassRefPtr<CSSRuleList> cssRulesForElement(Element*, unsigned rulesToInclude = AllButEmptyCSSRules);
142 PassRefPtr<CSSRuleList> pseudoCSSRulesForElement(Element*, PseudoId, unsigne d rulesToInclude = AllButEmptyCSSRules);
143 PassRefPtr<StyleRuleList> styleRulesForElement(Element*, unsigned rulesToInc lude);
144
145 // |properties| is an array with |count| elements. 132 // |properties| is an array with |count| elements.
146 void applyPropertiesToStyle(const CSSPropertyValue* properties, size_t count , RenderStyle*); 133 void applyPropertiesToStyle(const CSSPropertyValue* properties, size_t count , RenderStyle*);
147 134
148 void addMediaQueryResults(const MediaQueryResultList&); 135 void addMediaQueryResults(const MediaQueryResultList&);
149 MediaQueryResultList* viewportDependentMediaQueryResults() { return &m_viewp ortDependentMediaQueryResults; } 136 MediaQueryResultList* viewportDependentMediaQueryResults() { return &m_viewp ortDependentMediaQueryResults; }
150 bool hasViewportDependentMediaQueries() const { return !m_viewportDependentM ediaQueryResults.isEmpty(); } 137 bool hasViewportDependentMediaQueries() const { return !m_viewportDependentM ediaQueryResults.isEmpty(); }
151 bool mediaQueryAffectedByViewportChange() const; 138 bool mediaQueryAffectedByViewportChange() const;
152 139
153 // FIXME: Rename to reflect the purpose, like didChangeFontSize or something . 140 // FIXME: Rename to reflect the purpose, like didChangeFontSize or something .
154 void invalidateMatchedPropertiesCache(); 141 void invalidateMatchedPropertiesCache();
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 OwnPtr<StyleResolverStats> m_styleResolverStatsTotals; 249 OwnPtr<StyleResolverStats> m_styleResolverStatsTotals;
263 unsigned m_styleResolverStatsSequence; 250 unsigned m_styleResolverStatsSequence;
264 251
265 // Use only for Internals::updateStyleAndReturnAffectedElementCount. 252 // Use only for Internals::updateStyleAndReturnAffectedElementCount.
266 unsigned m_accessCount; 253 unsigned m_accessCount;
267 }; 254 };
268 255
269 } // namespace blink 256 } // namespace blink
270 257
271 #endif // SKY_ENGINE_CORE_CSS_RESOLVER_STYLERESOLVER_H_ 258 #endif // SKY_ENGINE_CORE_CSS_RESOLVER_STYLERESOLVER_H_
OLDNEW
« no previous file with comments | « sky/engine/core/css/SelectorChecker.h ('k') | sky/engine/core/css/resolver/StyleResolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698