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

Side by Side Diff: Source/core/css/StyleSheetContents.cpp

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/StyleSheetContents.h ('k') | Source/core/css/WebKitCSSArrayFunctionValue.h » ('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 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2006, 2007, 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2006, 2007, 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 14 matching lines...) Expand all
25 #include "CSSParser.h" 25 #include "CSSParser.h"
26 #include "CSSStyleSheet.h" 26 #include "CSSStyleSheet.h"
27 #include "CachedCSSStyleSheet.h" 27 #include "CachedCSSStyleSheet.h"
28 #include "Document.h" 28 #include "Document.h"
29 #include "MediaList.h" 29 #include "MediaList.h"
30 #include "Node.h" 30 #include "Node.h"
31 #include "SecurityOrigin.h" 31 #include "SecurityOrigin.h"
32 #include "StylePropertySet.h" 32 #include "StylePropertySet.h"
33 #include "StyleRule.h" 33 #include "StyleRule.h"
34 #include "StyleRuleImport.h" 34 #include "StyleRuleImport.h"
35 #include "WebCoreMemoryInstrumentation.h"
36 #include <wtf/Deque.h> 35 #include <wtf/Deque.h>
37 #include <wtf/MemoryInstrumentationHashMap.h>
38 #include <wtf/MemoryInstrumentationVector.h>
39 36
40 namespace WebCore { 37 namespace WebCore {
41 38
42 // Rough size estimate for the memory cache. 39 // Rough size estimate for the memory cache.
43 unsigned StyleSheetContents::estimatedSizeInBytes() const 40 unsigned StyleSheetContents::estimatedSizeInBytes() const
44 { 41 {
45 // Note that this does not take into account size of the strings hanging fro m various objects. 42 // Note that this does not take into account size of the strings hanging fro m various objects.
46 // The assumption is that nearly all of of them are atomic and would exist a nyway. 43 // The assumption is that nearly all of of them are atomic and would exist a nyway.
47 unsigned size = sizeof(*this); 44 unsigned size = sizeof(*this);
48 45
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 ASSERT(isCacheable()); 497 ASSERT(isCacheable());
501 m_isInMemoryCache = false; 498 m_isInMemoryCache = false;
502 } 499 }
503 500
504 void StyleSheetContents::shrinkToFit() 501 void StyleSheetContents::shrinkToFit()
505 { 502 {
506 m_importRules.shrinkToFit(); 503 m_importRules.shrinkToFit();
507 m_childRules.shrinkToFit(); 504 m_childRules.shrinkToFit();
508 } 505 }
509 506
510 void StyleSheetContents::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) c onst
511 {
512 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
513 info.addMember(m_ownerRule, "ownerRule");
514 info.addMember(m_originalURL, "originalURL");
515 info.addMember(m_encodingFromCharsetRule, "encodingFromCharsetRule");
516 info.addMember(m_importRules, "importRules");
517 info.addMember(m_childRules, "childRules");
518 info.addMember(m_namespaces, "namespaces");
519 info.addMember(m_parserContext, "parserContext");
520 info.addMember(m_clients, "clients");
521 } 507 }
522
523 }
OLDNEW
« no previous file with comments | « Source/core/css/StyleSheetContents.h ('k') | Source/core/css/WebKitCSSArrayFunctionValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698