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

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

Issue 1329843002: Support per property CSS Animation stacks (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Lint Created 5 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/animation/css/CSSAnimations.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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 }; 68 };
69 69
70 enum RuleMatchingBehavior { 70 enum RuleMatchingBehavior {
71 MatchAllRules, 71 MatchAllRules,
72 MatchAllRulesExcludingSMIL 72 MatchAllRulesExcludingSMIL
73 }; 73 };
74 74
75 const unsigned styleSharingListSize = 15; 75 const unsigned styleSharingListSize = 15;
76 const unsigned styleSharingMaxDepth = 32; 76 const unsigned styleSharingMaxDepth = 32;
77 typedef WillBeHeapDeque<RawPtrWillBeMember<Element>, styleSharingListSize> Style SharingList; 77 typedef WillBeHeapDeque<RawPtrWillBeMember<Element>, styleSharingListSize> Style SharingList;
78 using ActiveInterpolationsMap = HashMap<PropertyHandle, Vector<RefPtr<Interpolat ion>, 1>>;
78 79
79 // This class selects a ComputedStyle for a given element based on a collection of stylesheets. 80 // This class selects a ComputedStyle for a given element based on a collection of stylesheets.
80 class CORE_EXPORT StyleResolver final : public NoBaseWillBeGarbageCollectedFinal ized<StyleResolver> { 81 class CORE_EXPORT StyleResolver final : public NoBaseWillBeGarbageCollectedFinal ized<StyleResolver> {
81 WTF_MAKE_NONCOPYABLE(StyleResolver); WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED (StyleResolver); 82 WTF_MAKE_NONCOPYABLE(StyleResolver); WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED (StyleResolver);
82 public: 83 public:
83 explicit StyleResolver(Document&); 84 explicit StyleResolver(Document&);
84 virtual ~StyleResolver(); 85 virtual ~StyleResolver();
85 86
86 // FIXME: StyleResolver should not be keeping tree-walk state. 87 // FIXME: StyleResolver should not be keeping tree-walk state.
87 // These should move to some global tree-walk state, or should be contained in a 88 // These should move to some global tree-walk state, or should be contained in a
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 209
209 void applyMatchedProperties(StyleResolverState&, const MatchResult&); 210 void applyMatchedProperties(StyleResolverState&, const MatchResult&);
210 bool applyAnimatedProperties(StyleResolverState&, const Element* animatingEl ement); 211 bool applyAnimatedProperties(StyleResolverState&, const Element* animatingEl ement);
211 void applyCallbackSelectors(StyleResolverState&); 212 void applyCallbackSelectors(StyleResolverState&);
212 213
213 template <CSSPropertyPriority priority> 214 template <CSSPropertyPriority priority>
214 void applyMatchedProperties(StyleResolverState&, const MatchedPropertiesRang e&, bool important, bool inheritedOnly); 215 void applyMatchedProperties(StyleResolverState&, const MatchedPropertiesRang e&, bool important, bool inheritedOnly);
215 template <CSSPropertyPriority priority> 216 template <CSSPropertyPriority priority>
216 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);
217 template <CSSPropertyPriority priority> 218 template <CSSPropertyPriority priority>
218 void applyAnimatedProperties(StyleResolverState&, const HashMap<PropertyHand le, RefPtr<Interpolation>>&); 219 void applyAnimatedProperties(StyleResolverState&, const ActiveInterpolations Map&);
219 template <CSSPropertyPriority priority> 220 template <CSSPropertyPriority priority>
220 void applyAllProperty(StyleResolverState&, CSSValue*, bool inheritedOnly, Pr opertyWhitelistType); 221 void applyAllProperty(StyleResolverState&, CSSValue*, bool inheritedOnly, Pr opertyWhitelistType);
221 222
222 bool pseudoStyleForElementInternal(Element&, const PseudoStyleRequest&, cons t ComputedStyle* parentStyle, StyleResolverState&); 223 bool pseudoStyleForElementInternal(Element&, const PseudoStyleRequest&, cons t ComputedStyle* parentStyle, StyleResolverState&);
223 bool hasAuthorBackground(const StyleResolverState&); 224 bool hasAuthorBackground(const StyleResolverState&);
224 bool hasAuthorBorder(const StyleResolverState&); 225 bool hasAuthorBorder(const StyleResolverState&);
225 226
226 PassRefPtrWillBeRawPtr<PseudoElement> createPseudoElement(Element* parent, P seudoId); 227 PassRefPtrWillBeRawPtr<PseudoElement> createPseudoElement(Element* parent, P seudoId);
227 228
228 Document& document() { return *m_document; } 229 Document& document() { return *m_document; }
(...skipping 30 matching lines...) Expand all
259 260
260 OwnPtr<StyleResolverStats> m_styleResolverStats; 261 OwnPtr<StyleResolverStats> m_styleResolverStats;
261 262
262 // Use only for Internals::updateStyleAndReturnAffectedElementCount. 263 // Use only for Internals::updateStyleAndReturnAffectedElementCount.
263 unsigned m_accessCount; 264 unsigned m_accessCount;
264 }; 265 };
265 266
266 } // namespace blink 267 } // namespace blink
267 268
268 #endif // StyleResolver_h 269 #endif // StyleResolver_h
OLDNEW
« no previous file with comments | « Source/core/animation/css/CSSAnimations.cpp ('k') | Source/core/css/resolver/StyleResolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698