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

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

Powered by Google App Engine
This is Rietveld 408576698