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

Side by Side Diff: Source/core/css/StylePropertySet.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/StylePropertySet.h ('k') | Source/core/css/StyleResolver.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, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved.
4 * Copyright (C) 2011 Research In Motion Limited. All rights reserved. 4 * Copyright (C) 2011 Research In Motion Limited. 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 14 matching lines...) Expand all
25 #include "CSSParser.h" 25 #include "CSSParser.h"
26 #include "CSSValueKeywords.h" 26 #include "CSSValueKeywords.h"
27 #include "CSSValueList.h" 27 #include "CSSValueList.h"
28 #include "CSSValuePool.h" 28 #include "CSSValuePool.h"
29 #include "CSSVariableValue.h" 29 #include "CSSVariableValue.h"
30 #include "Document.h" 30 #include "Document.h"
31 #include "PropertySetCSSStyleDeclaration.h" 31 #include "PropertySetCSSStyleDeclaration.h"
32 #include "StylePropertyShorthand.h" 32 #include "StylePropertyShorthand.h"
33 #include "StyleSheetContents.h" 33 #include "StyleSheetContents.h"
34 #include <wtf/BitArray.h> 34 #include <wtf/BitArray.h>
35 #include <wtf/MemoryInstrumentationVector.h>
36 #include <wtf/text/StringBuilder.h> 35 #include <wtf/text/StringBuilder.h>
37 36
38 #ifndef NDEBUG 37 #ifndef NDEBUG
39 #include <stdio.h> 38 #include <stdio.h>
40 #include <wtf/ASCIICType.h> 39 #include <wtf/ASCIICType.h>
41 #include <wtf/text/CString.h> 40 #include <wtf/text/CString.h>
42 #endif 41 #endif
43 42
44 using namespace std; 43 using namespace std;
45 44
(...skipping 1207 matching lines...) Expand 10 before | Expand all | Expand 10 after
1253 propertySetCSSOMWrapperMap().add(this, adoptPtr(cssomWrapper)); 1252 propertySetCSSOMWrapperMap().add(this, adoptPtr(cssomWrapper));
1254 return cssomWrapper; 1253 return cssomWrapper;
1255 } 1254 }
1256 1255
1257 unsigned StylePropertySet::averageSizeInBytes() 1256 unsigned StylePropertySet::averageSizeInBytes()
1258 { 1257 {
1259 // Please update this if the storage scheme changes so that this longer refl ects the actual size. 1258 // Please update this if the storage scheme changes so that this longer refl ects the actual size.
1260 return sizeForImmutableStylePropertySetWithPropertyCount(4); 1259 return sizeForImmutableStylePropertySetWithPropertyCount(4);
1261 } 1260 }
1262 1261
1263 void StylePropertySet::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) con st
1264 {
1265 size_t actualSize = m_isMutable ? sizeof(StylePropertySet) : sizeForImmutabl eStylePropertySetWithPropertyCount(m_arraySize);
1266 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS, actual Size);
1267 if (m_isMutable)
1268 info.addMember(mutablePropertyVector(), "mutablePropertyVector()");
1269 else {
1270 for (unsigned i = 0; i < propertyCount(); ++i)
1271 info.addMember(propertyAt(i).value(), "value");
1272 }
1273 }
1274
1275 // See the function above if you need to update this. 1262 // See the function above if you need to update this.
1276 struct SameSizeAsStylePropertySet : public RefCounted<SameSizeAsStylePropertySet > { 1263 struct SameSizeAsStylePropertySet : public RefCounted<SameSizeAsStylePropertySet > {
1277 unsigned bitfield; 1264 unsigned bitfield;
1278 }; 1265 };
1279 COMPILE_ASSERT(sizeof(StylePropertySet) == sizeof(SameSizeAsStylePropertySet), s tyle_property_set_should_stay_small); 1266 COMPILE_ASSERT(sizeof(StylePropertySet) == sizeof(SameSizeAsStylePropertySet), s tyle_property_set_should_stay_small);
1280 1267
1281 #ifndef NDEBUG 1268 #ifndef NDEBUG
1282 void StylePropertySet::showStyle() 1269 void StylePropertySet::showStyle()
1283 { 1270 {
1284 fprintf(stderr, "%s\n", asText().ascii().data()); 1271 fprintf(stderr, "%s\n", asText().ascii().data());
(...skipping 28 matching lines...) Expand all
1313 result.appendLiteral(": "); 1300 result.appendLiteral(": ");
1314 result.append(propertyValue()->cssText()); 1301 result.append(propertyValue()->cssText());
1315 if (isImportant()) 1302 if (isImportant())
1316 result.appendLiteral(" !important"); 1303 result.appendLiteral(" !important");
1317 result.append(';'); 1304 result.append(';');
1318 return result.toString(); 1305 return result.toString();
1319 } 1306 }
1320 1307
1321 1308
1322 } // namespace WebCore 1309 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/css/StylePropertySet.h ('k') | Source/core/css/StyleResolver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698