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

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

Issue 1371723002: Devtools Animations: Add method to fetch CSS keyframed animations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 void finishAppendAuthorStyleSheets(); 115 void finishAppendAuthorStyleSheets();
116 116
117 void lazyAppendAuthorStyleSheets(unsigned firstNew, const WillBeHeapVector<R efPtrWillBeMember<CSSStyleSheet>>&); 117 void lazyAppendAuthorStyleSheets(unsigned firstNew, const WillBeHeapVector<R efPtrWillBeMember<CSSStyleSheet>>&);
118 void removePendingAuthorStyleSheets(const WillBeHeapVector<RefPtrWillBeMembe r<CSSStyleSheet>>&); 118 void removePendingAuthorStyleSheets(const WillBeHeapVector<RefPtrWillBeMembe r<CSSStyleSheet>>&);
119 void appendPendingAuthorStyleSheets(); 119 void appendPendingAuthorStyleSheets();
120 bool hasPendingAuthorStyleSheets() const { return m_pendingStyleSheets.size( ) > 0 || m_needCollectFeatures; } 120 bool hasPendingAuthorStyleSheets() const { return m_pendingStyleSheets.size( ) > 0 || m_needCollectFeatures; }
121 121
122 SelectorFilter& selectorFilter() { return m_selectorFilter; } 122 SelectorFilter& selectorFilter() { return m_selectorFilter; }
123 123
124 StyleRuleKeyframes* findKeyframesRule(const Element*, const AtomicString& an imationName); 124 StyleRuleKeyframes* findKeyframesRule(const Element*, const AtomicString& an imationName);
125 CSSKeyframesRule* findCSSKeyframesRule(const Element*, const AtomicString& a nimationName);
125 126
126 // These methods will give back the set of rules that matched for a given el ement (or a pseudo-element). 127 // These methods will give back the set of rules that matched for a given el ement (or a pseudo-element).
127 enum CSSRuleFilter { 128 enum CSSRuleFilter {
128 UAAndUserCSSRules = 1 << 1, 129 UAAndUserCSSRules = 1 << 1,
129 AuthorCSSRules = 1 << 2, 130 AuthorCSSRules = 1 << 2,
130 EmptyCSSRules = 1 << 3, 131 EmptyCSSRules = 1 << 3,
131 CrossOriginCSSRules = 1 << 4, 132 CrossOriginCSSRules = 1 << 4,
132 AllButEmptyCSSRules = UAAndUserCSSRules | AuthorCSSRules | CrossOriginCS SRules, 133 AllButEmptyCSSRules = UAAndUserCSSRules | AuthorCSSRules | CrossOriginCS SRules,
133 AllCSSRules = AllButEmptyCSSRules | EmptyCSSRules, 134 AllCSSRules = AllButEmptyCSSRules | EmptyCSSRules,
134 }; 135 };
135 PassRefPtrWillBeRawPtr<CSSRuleList> cssRulesForElement(Element*, unsigned ru lesToInclude = AllButEmptyCSSRules); 136 PassRefPtrWillBeRawPtr<CSSRuleList> cssRulesForElement(Element*, unsigned ru lesToInclude = AllButEmptyCSSRules);
136 PassRefPtrWillBeRawPtr<CSSRuleList> pseudoCSSRulesForElement(Element*, Pseud oId, unsigned rulesToInclude = AllButEmptyCSSRules); 137 PassRefPtrWillBeRawPtr<CSSRuleList> pseudoCSSRulesForElement(Element*, Pseud oId, unsigned rulesToInclude = AllButEmptyCSSRules);
137 PassRefPtrWillBeRawPtr<StyleRuleList> styleRulesForElement(Element*, unsigne d rulesToInclude); 138 PassRefPtrWillBeRawPtr<StyleRuleList> styleRulesForElement(Element*, unsigne d rulesToInclude);
139 PassRefPtrWillBeRawPtr<CSSRuleList> keyframesRulesForElement(Element*);
138 140
139 void computeFont(ComputedStyle*, const StylePropertySet&); 141 void computeFont(ComputedStyle*, const StylePropertySet&);
140 142
141 ViewportStyleResolver* viewportStyleResolver() { return m_viewportStyleResol ver.get(); } 143 ViewportStyleResolver* viewportStyleResolver() { return m_viewportStyleResol ver.get(); }
142 144
143 void addMediaQueryResults(const MediaQueryResultList&); 145 void addMediaQueryResults(const MediaQueryResultList&);
144 MediaQueryResultList* viewportDependentMediaQueryResults() { return &m_viewp ortDependentMediaQueryResults; } 146 MediaQueryResultList* viewportDependentMediaQueryResults() { return &m_viewp ortDependentMediaQueryResults; }
145 bool hasViewportDependentMediaQueries() const { return !m_viewportDependentM ediaQueryResults.isEmpty(); } 147 bool hasViewportDependentMediaQueries() const { return !m_viewportDependentM ediaQueryResults.isEmpty(); }
146 bool mediaQueryAffectedByViewportChange() const; 148 bool mediaQueryAffectedByViewportChange() const;
147 149
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 void applyProperties(StyleResolverState&, const StylePropertySet* properties , bool isImportant, bool inheritedOnly, PropertyWhitelistType = PropertyWhitelis tNone); 222 void applyProperties(StyleResolverState&, const StylePropertySet* properties , bool isImportant, bool inheritedOnly, PropertyWhitelistType = PropertyWhitelis tNone);
221 template <CSSPropertyPriority priority> 223 template <CSSPropertyPriority priority>
222 void applyAnimatedProperties(StyleResolverState&, const ActiveInterpolations Map&); 224 void applyAnimatedProperties(StyleResolverState&, const ActiveInterpolations Map&);
223 template <CSSPropertyPriority priority> 225 template <CSSPropertyPriority priority>
224 void applyAllProperty(StyleResolverState&, CSSValue*, bool inheritedOnly, Pr opertyWhitelistType); 226 void applyAllProperty(StyleResolverState&, CSSValue*, bool inheritedOnly, Pr opertyWhitelistType);
225 227
226 bool pseudoStyleForElementInternal(Element&, const PseudoStyleRequest&, cons t ComputedStyle* parentStyle, StyleResolverState&); 228 bool pseudoStyleForElementInternal(Element&, const PseudoStyleRequest&, cons t ComputedStyle* parentStyle, StyleResolverState&);
227 bool hasAuthorBackground(const StyleResolverState&); 229 bool hasAuthorBackground(const StyleResolverState&);
228 bool hasAuthorBorder(const StyleResolverState&); 230 bool hasAuthorBorder(const StyleResolverState&);
229 231
232 CSSKeyframesRule* findCSSKeyframesRule(PassRefPtrWillBeRawPtr<CSSRuleList>, StyleRuleKeyframes*);
233
230 PassRefPtrWillBeRawPtr<PseudoElement> createPseudoElement(Element* parent, P seudoId); 234 PassRefPtrWillBeRawPtr<PseudoElement> createPseudoElement(Element* parent, P seudoId);
231 235
232 Document& document() { return *m_document; } 236 Document& document() { return *m_document; }
233 237
234 static ComputedStyle* s_styleNotYetAvailable; 238 static ComputedStyle* s_styleNotYetAvailable;
235 239
236 MatchedPropertiesCache m_matchedPropertiesCache; 240 MatchedPropertiesCache m_matchedPropertiesCache;
237 241
238 OwnPtr<MediaQueryEvaluator> m_medium; 242 OwnPtr<MediaQueryEvaluator> m_medium;
239 MediaQueryResultList m_viewportDependentMediaQueryResults; 243 MediaQueryResultList m_viewportDependentMediaQueryResults;
(...skipping 23 matching lines...) Expand all
263 267
264 OwnPtr<StyleResolverStats> m_styleResolverStats; 268 OwnPtr<StyleResolverStats> m_styleResolverStats;
265 269
266 // Use only for Internals::updateStyleAndReturnAffectedElementCount. 270 // Use only for Internals::updateStyleAndReturnAffectedElementCount.
267 unsigned m_accessCount; 271 unsigned m_accessCount;
268 }; 272 };
269 273
270 } // namespace blink 274 } // namespace blink
271 275
272 #endif // StyleResolver_h 276 #endif // StyleResolver_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698