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

Side by Side Diff: Source/core/css/DocumentRuleSets.h

Issue 13973026: remove memoryinstrumentation Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove the rest part of MemoryInstrumentation Created 7 years, 8 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/css/CSSVariableValue.h ('k') | Source/core/css/DocumentRuleSets.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 * Copyright (C) 2013 Google Inc. All rights reserved. 4 * Copyright (C) 2013 Google Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 29 matching lines...) Expand all
40 class MediaQueryEvaluator; 40 class MediaQueryEvaluator;
41 class RuleSet; 41 class RuleSet;
42 class StyleScopeResolver; 42 class StyleScopeResolver;
43 43
44 class ShadowDistributedRules { 44 class ShadowDistributedRules {
45 public: 45 public:
46 void addRule(StyleRule*, size_t selectorIndex, ContainerNode* scope, AddRule Flags); 46 void addRule(StyleRule*, size_t selectorIndex, ContainerNode* scope, AddRule Flags);
47 void collectMatchRequests(bool includeEmptyRules, Vector<MatchRequest>&); 47 void collectMatchRequests(bool includeEmptyRules, Vector<MatchRequest>&);
48 void clear() { m_shadowDistributedRuleSetMap.clear(); } 48 void clear() { m_shadowDistributedRuleSetMap.clear(); }
49 bool isEmpty() const { return m_shadowDistributedRuleSetMap.isEmpty(); } 49 bool isEmpty() const { return m_shadowDistributedRuleSetMap.isEmpty(); }
50 void reportMemoryUsage(MemoryObjectInfo*) const;
51 private: 50 private:
52 typedef HashMap<const ContainerNode*, OwnPtr<RuleSet> > ShadowDistributedRul eSetMap; 51 typedef HashMap<const ContainerNode*, OwnPtr<RuleSet> > ShadowDistributedRul eSetMap;
53 ShadowDistributedRuleSetMap m_shadowDistributedRuleSetMap; 52 ShadowDistributedRuleSetMap m_shadowDistributedRuleSetMap;
54 }; 53 };
55 54
56 class DocumentRuleSets { 55 class DocumentRuleSets {
57 public: 56 public:
58 DocumentRuleSets(); 57 DocumentRuleSets();
59 ~DocumentRuleSets(); 58 ~DocumentRuleSets();
60 RuleSet* authorStyle() const { return m_authorStyle.get(); } 59 RuleSet* authorStyle() const { return m_authorStyle.get(); }
61 RuleSet* userStyle() const { return m_userStyle.get(); } 60 RuleSet* userStyle() const { return m_userStyle.get(); }
62 RuleFeatureSet& features() { return m_features; } 61 RuleFeatureSet& features() { return m_features; }
63 const RuleFeatureSet& features() const { return m_features; } 62 const RuleFeatureSet& features() const { return m_features; }
64 RuleSet* sibling() const { return m_siblingRuleSet.get(); } 63 RuleSet* sibling() const { return m_siblingRuleSet.get(); }
65 RuleSet* uncommonAttribute() const { return m_uncommonAttributeRuleSet.get() ; } 64 RuleSet* uncommonAttribute() const { return m_uncommonAttributeRuleSet.get() ; }
66 65
67 void initUserStyle(DocumentStyleSheetCollection*, const MediaQueryEvaluator& , StyleResolver&); 66 void initUserStyle(DocumentStyleSheetCollection*, const MediaQueryEvaluator& , StyleResolver&);
68 void resetAuthorStyle(); 67 void resetAuthorStyle();
69 void appendAuthorStyleSheets(unsigned firstNew, const Vector<RefPtr<CSSStyle Sheet> >&, MediaQueryEvaluator*, InspectorCSSOMWrappers&, bool isViewSource, Sty leResolver*); 68 void appendAuthorStyleSheets(unsigned firstNew, const Vector<RefPtr<CSSStyle Sheet> >&, MediaQueryEvaluator*, InspectorCSSOMWrappers&, bool isViewSource, Sty leResolver*);
70 69
71 void collectFeatures(bool isViewSource, StyleScopeResolver*); 70 void collectFeatures(bool isViewSource, StyleScopeResolver*);
72 void reportMemoryUsage(MemoryObjectInfo*) const;
73 ShadowDistributedRules& shadowDistributedRules() { return m_shadowDistribute dRules; } 71 ShadowDistributedRules& shadowDistributedRules() { return m_shadowDistribute dRules; }
74 72
75 private: 73 private:
76 void collectRulesFromUserStyleSheets(const Vector<RefPtr<CSSStyleSheet> >&, RuleSet& userStyle, const MediaQueryEvaluator&, StyleResolver&); 74 void collectRulesFromUserStyleSheets(const Vector<RefPtr<CSSStyleSheet> >&, RuleSet& userStyle, const MediaQueryEvaluator&, StyleResolver&);
77 OwnPtr<RuleSet> m_authorStyle; 75 OwnPtr<RuleSet> m_authorStyle;
78 OwnPtr<RuleSet> m_userStyle; 76 OwnPtr<RuleSet> m_userStyle;
79 RuleFeatureSet m_features; 77 RuleFeatureSet m_features;
80 OwnPtr<RuleSet> m_siblingRuleSet; 78 OwnPtr<RuleSet> m_siblingRuleSet;
81 OwnPtr<RuleSet> m_uncommonAttributeRuleSet; 79 OwnPtr<RuleSet> m_uncommonAttributeRuleSet;
82 ShadowDistributedRules m_shadowDistributedRules; 80 ShadowDistributedRules m_shadowDistributedRules;
83 }; 81 };
84 82
85 } // namespace WebCore 83 } // namespace WebCore
86 84
87 #endif // DocumentRuleSets_h 85 #endif // DocumentRuleSets_h
OLDNEW
« no previous file with comments | « Source/core/css/CSSVariableValue.h ('k') | Source/core/css/DocumentRuleSets.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698