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

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

Issue 180003002: Consistently use on-heap collections for StyleRuleBase descendants. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: addressed reviewers comments Created 6 years, 10 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
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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 class RuleData; 64 class RuleData;
65 class Settings; 65 class Settings;
66 class StyleKeyframe; 66 class StyleKeyframe;
67 class StylePropertySet; 67 class StylePropertySet;
68 class StyleResolverStats; 68 class StyleResolverStats;
69 class StyleRule; 69 class StyleRule;
70 class StyleRuleKeyframes; 70 class StyleRuleKeyframes;
71 class StyleRulePage; 71 class StyleRulePage;
72 class ViewportStyleResolver; 72 class ViewportStyleResolver;
73 73
74 struct MatchResult; 74 class MatchResult;
75 75
76 enum StyleSharingBehavior { 76 enum StyleSharingBehavior {
77 AllowStyleSharing, 77 AllowStyleSharing,
78 DisallowStyleSharing, 78 DisallowStyleSharing,
79 }; 79 };
80 80
81 // MatchOnlyUserAgentRules is used in media queries, where relative units 81 // MatchOnlyUserAgentRules is used in media queries, where relative units
82 // are interpreted according to the document root element style, and styled only 82 // are interpreted according to the document root element style, and styled only
83 // from the User Agent Stylesheet rules. 83 // from the User Agent Stylesheet rules.
84 enum RuleMatchingBehavior { 84 enum RuleMatchingBehavior {
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 }; 262 };
263 template <StyleResolver::StyleApplicationPass pass> 263 template <StyleResolver::StyleApplicationPass pass>
264 static inline bool isPropertyForPass(CSSPropertyID); 264 static inline bool isPropertyForPass(CSSPropertyID);
265 template <StyleApplicationPass pass> 265 template <StyleApplicationPass pass>
266 void applyMatchedProperties(StyleResolverState&, const MatchResult&, bool im portant, int startIndex, int endIndex, bool inheritedOnly); 266 void applyMatchedProperties(StyleResolverState&, const MatchResult&, bool im portant, int startIndex, int endIndex, bool inheritedOnly);
267 template <StyleApplicationPass pass> 267 template <StyleApplicationPass pass>
268 void applyProperties(StyleResolverState&, const StylePropertySet* properties , StyleRule*, bool isImportant, bool inheritedOnly, PropertyWhitelistType = Prop ertyWhitelistNone); 268 void applyProperties(StyleResolverState&, const StylePropertySet* properties , StyleRule*, bool isImportant, bool inheritedOnly, PropertyWhitelistType = Prop ertyWhitelistNone);
269 template <StyleApplicationPass pass> 269 template <StyleApplicationPass pass>
270 void applyAnimatedProperties(StyleResolverState&, const AnimationEffect::Com positableValueMap&); 270 void applyAnimatedProperties(StyleResolverState&, const AnimationEffect::Com positableValueMap&);
271 void matchPageRules(MatchResult&, RuleSet*, bool isLeftPage, bool isFirstPag e, const String& pageName); 271 void matchPageRules(MatchResult&, RuleSet*, bool isLeftPage, bool isFirstPag e, const String& pageName);
272 void matchPageRulesForList(Vector<StyleRulePage*>& matchedRules, const Vecto r<StyleRulePage*>&, bool isLeftPage, bool isFirstPage, const String& pageName); 272 void matchPageRulesForList(WillBeHeapVector<RawPtrWillBeMember<StyleRulePage > >& matchedRules, const WillBeHeapVector<RawPtrWillBeMember<StyleRulePage> >&, bool isLeftPage, bool isFirstPage, const String& pageName);
273 void collectViewportRules(); 273 void collectViewportRules();
274 Settings* documentSettings() { return m_document.settings(); } 274 Settings* documentSettings() { return m_document.settings(); }
275 275
276 bool isLeftPage(int pageIndex) const; 276 bool isLeftPage(int pageIndex) const;
277 bool isRightPage(int pageIndex) const { return !isLeftPage(pageIndex); } 277 bool isRightPage(int pageIndex) const { return !isLeftPage(pageIndex); }
278 bool isFirstPage(int pageIndex) const; 278 bool isFirstPage(int pageIndex) const;
279 String pageName(int pageIndex) const; 279 String pageName(int pageIndex) const;
280 280
281 bool pseudoStyleForElementInternal(Element&, const PseudoStyleRequest&, Rend erStyle* parentStyle, StyleResolverState&); 281 bool pseudoStyleForElementInternal(Element&, const PseudoStyleRequest&, Rend erStyle* parentStyle, StyleResolverState&);
282 282
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 OwnPtr<StyleResolverStats> m_styleResolverStatsTotals; 324 OwnPtr<StyleResolverStats> m_styleResolverStatsTotals;
325 unsigned m_styleResolverStatsSequence; 325 unsigned m_styleResolverStatsSequence;
326 326
327 // Use only for Internals::updateStyleAndReturnAffectedElementCount. 327 // Use only for Internals::updateStyleAndReturnAffectedElementCount.
328 unsigned m_accessCount; 328 unsigned m_accessCount;
329 }; 329 };
330 330
331 } // namespace WebCore 331 } // namespace WebCore
332 332
333 #endif // StyleResolver_h 333 #endif // StyleResolver_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698