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

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

Issue 1807323002: [WeakMemoryCache 1a] Make Reference from Inspector to Resource weak, remove removedFromMemoryCache() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010, 2012 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 size_t clientSize() const { return m_loadingClients.size() + m_completedClie nts.size(); } 134 size_t clientSize() const { return m_loadingClients.size() + m_completedClie nts.size(); }
135 bool hasOneClient() { return clientSize() == 1; } 135 bool hasOneClient() { return clientSize() == 1; }
136 void clientLoadCompleted(CSSStyleSheet*); 136 void clientLoadCompleted(CSSStyleSheet*);
137 void clientLoadStarted(CSSStyleSheet*); 137 void clientLoadStarted(CSSStyleSheet*);
138 138
139 bool isMutable() const { return m_isMutable; } 139 bool isMutable() const { return m_isMutable; }
140 void setMutable() { m_isMutable = true; } 140 void setMutable() { m_isMutable = true; }
141 141
142 void removeSheetFromCache(Document*); 142 void removeSheetFromCache(Document*);
143 143
144 bool isInMemoryCache() const { return m_isInMemoryCache; } 144 bool isReferencedFromResource() const { return m_isReferencedFromResource; }
yhirano 2016/04/27 11:00:06 It may be a good idea to add a comment that a Styl
hiroshige 2016/04/28 08:06:33 Done.
145 void addedToMemoryCache(); 145 void setReferencedFromResource(bool);
146 void removedFromMemoryCache();
147 146
148 void setHasMediaQueries(); 147 void setHasMediaQueries();
149 bool hasMediaQueries() const { return m_hasMediaQueries; } 148 bool hasMediaQueries() const { return m_hasMediaQueries; }
150 149
151 bool didLoadErrorOccur() const { return m_didLoadErrorOccur; } 150 bool didLoadErrorOccur() const { return m_didLoadErrorOccur; }
152 151
153 RuleSet& ruleSet() { ASSERT(m_ruleSet); return *m_ruleSet.get(); } 152 RuleSet& ruleSet() { ASSERT(m_ruleSet); return *m_ruleSet.get(); }
154 RuleSet& ensureRuleSet(const MediaQueryEvaluator&, AddRuleFlags); 153 RuleSet& ensureRuleSet(const MediaQueryEvaluator&, AddRuleFlags);
155 void clearRuleSet(); 154 void clearRuleSet();
156 155
(...skipping 17 matching lines...) Expand all
174 HeapVector<Member<StyleRuleImport>> m_importRules; 173 HeapVector<Member<StyleRuleImport>> m_importRules;
175 HeapVector<Member<StyleRuleNamespace>> m_namespaceRules; 174 HeapVector<Member<StyleRuleNamespace>> m_namespaceRules;
176 HeapVector<Member<StyleRuleBase>> m_childRules; 175 HeapVector<Member<StyleRuleBase>> m_childRules;
177 using PrefixNamespaceURIMap = HashMap<AtomicString, AtomicString>; 176 using PrefixNamespaceURIMap = HashMap<AtomicString, AtomicString>;
178 PrefixNamespaceURIMap m_namespaces; 177 PrefixNamespaceURIMap m_namespaces;
179 AtomicString m_defaultNamespace; 178 AtomicString m_defaultNamespace;
180 179
181 bool m_hasSyntacticallyValidCSSHeader : 1; 180 bool m_hasSyntacticallyValidCSSHeader : 1;
182 bool m_didLoadErrorOccur : 1; 181 bool m_didLoadErrorOccur : 1;
183 bool m_isMutable : 1; 182 bool m_isMutable : 1;
184 bool m_isInMemoryCache : 1; 183 bool m_isReferencedFromResource : 1;
185 bool m_hasFontFaceRule : 1; 184 bool m_hasFontFaceRule : 1;
186 bool m_hasMediaQueries : 1; 185 bool m_hasMediaQueries : 1;
187 bool m_hasSingleOwnerDocument : 1; 186 bool m_hasSingleOwnerDocument : 1;
188 187
189 CSSParserContext m_parserContext; 188 CSSParserContext m_parserContext;
190 189
191 HeapHashSet<WeakMember<CSSStyleSheet>> m_loadingClients; 190 HeapHashSet<WeakMember<CSSStyleSheet>> m_loadingClients;
192 HeapHashSet<WeakMember<CSSStyleSheet>> m_completedClients; 191 HeapHashSet<WeakMember<CSSStyleSheet>> m_completedClients;
193 192
194 Member<RuleSet> m_ruleSet; 193 Member<RuleSet> m_ruleSet;
195 String m_sourceMapURL; 194 String m_sourceMapURL;
196 }; 195 };
197 196
198 } // namespace blink 197 } // namespace blink
199 198
200 #endif 199 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698