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

Side by Side Diff: third_party/WebKit/Source/core/dom/StyleEngine.h

Issue 1658923004: PurgeMemory. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
9 * Copyright (C) 2011 Google Inc. All rights reserved. 9 * Copyright (C) 2011 Google Inc. All rights reserved.
10 * 10 *
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 void attributeChangedForElement(const QualifiedName& attributeName, Element& ); 177 void attributeChangedForElement(const QualifiedName& attributeName, Element& );
178 void idChangedForElement(const AtomicString& oldId, const AtomicString& newI d, Element&); 178 void idChangedForElement(const AtomicString& oldId, const AtomicString& newI d, Element&);
179 void pseudoStateChangedForElement(CSSSelector::PseudoType, Element&); 179 void pseudoStateChangedForElement(CSSSelector::PseudoType, Element&);
180 180
181 unsigned styleForElementCount() const { return m_styleForElementCount; } 181 unsigned styleForElementCount() const { return m_styleForElementCount; }
182 void incStyleForElementCount() { m_styleForElementCount++; } 182 void incStyleForElementCount() { m_styleForElementCount++; }
183 183
184 StyleResolverStats* stats() { return m_styleResolverStats.get(); } 184 StyleResolverStats* stats() { return m_styleResolverStats.get(); }
185 void setStatsEnabled(bool); 185 void setStatsEnabled(bool);
186 186
187 void purgeMemory(DeviceKind);
188
187 DECLARE_VIRTUAL_TRACE(); 189 DECLARE_VIRTUAL_TRACE();
188 190
189 private: 191 private:
190 // CSSFontSelectorClient implementation. 192 // CSSFontSelectorClient implementation.
191 void fontsNeedUpdate(CSSFontSelector*) override; 193 void fontsNeedUpdate(CSSFontSelector*) override;
192 194
193 private: 195 private:
194 StyleEngine(Document&); 196 StyleEngine(Document&);
195 197
196 TreeScopeStyleSheetCollection* ensureStyleSheetCollectionFor(TreeScope&); 198 TreeScopeStyleSheetCollection* ensureStyleSheetCollectionFor(TreeScope&);
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 WillBeHeapHashMap<AtomicString, RawPtrWillBeMember<StyleSheetContents>> m_te xtToSheetCache; 267 WillBeHeapHashMap<AtomicString, RawPtrWillBeMember<StyleSheetContents>> m_te xtToSheetCache;
266 WillBeHeapHashMap<RawPtrWillBeMember<StyleSheetContents>, AtomicString> m_sh eetToTextCache; 268 WillBeHeapHashMap<RawPtrWillBeMember<StyleSheetContents>, AtomicString> m_sh eetToTextCache;
267 269
268 OwnPtr<StyleResolverStats> m_styleResolverStats; 270 OwnPtr<StyleResolverStats> m_styleResolverStats;
269 unsigned m_styleForElementCount = 0; 271 unsigned m_styleForElementCount = 0;
270 }; 272 };
271 273
272 } // namespace blink 274 } // namespace blink
273 275
274 #endif 276 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | third_party/WebKit/Source/core/dom/StyleEngine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698