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

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

Issue 16161005: Reduce CSSProperty's StylePropertyMetadata memory footprint by half when used inside a ImmutableSty… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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/CSSProperty.cpp ('k') | Source/core/css/StylePropertySet.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 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2008, 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2008, 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 class PropertyReference { 51 class PropertyReference {
52 public: 52 public:
53 PropertyReference(const StylePropertySet& propertySet, unsigned index) 53 PropertyReference(const StylePropertySet& propertySet, unsigned index)
54 : m_propertySet(propertySet) 54 : m_propertySet(propertySet)
55 , m_index(index) 55 , m_index(index)
56 { 56 {
57 } 57 }
58 58
59 CSSPropertyID id() const { return static_cast<CSSPropertyID>(propertyMet adata().m_propertyID); } 59 CSSPropertyID id() const { return static_cast<CSSPropertyID>(propertyMet adata().m_propertyID); }
60 CSSPropertyID shorthandID() const { return static_cast<CSSPropertyID>(pr opertyMetadata().m_shorthandID); } 60 CSSPropertyID shorthandID() const { return propertyMetadata().shorthandI D(); }
61 61
62 bool isImportant() const { return propertyMetadata().m_important; } 62 bool isImportant() const { return propertyMetadata().m_important; }
63 bool isInherited() const { return propertyMetadata().m_inherited; } 63 bool isInherited() const { return propertyMetadata().m_inherited; }
64 bool isImplicit() const { return propertyMetadata().m_implicit; } 64 bool isImplicit() const { return propertyMetadata().m_implicit; }
65 65
66 String cssName() const; 66 String cssName() const;
67 String cssText() const; 67 String cssText() const;
68 68
69 const CSSValue* value() const { return propertyValue(); } 69 const CSSValue* value() const { return propertyValue(); }
70 // FIXME: We should try to remove this mutable overload. 70 // FIXME: We should try to remove this mutable overload.
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 259
260 if (m_isMutable) 260 if (m_isMutable)
261 delete static_cast<MutableStylePropertySet*>(this); 261 delete static_cast<MutableStylePropertySet*>(this);
262 else 262 else
263 delete static_cast<ImmutableStylePropertySet*>(this); 263 delete static_cast<ImmutableStylePropertySet*>(this);
264 } 264 }
265 265
266 } // namespace WebCore 266 } // namespace WebCore
267 267
268 #endif // StylePropertySet_h 268 #endif // StylePropertySet_h
OLDNEW
« no previous file with comments | « Source/core/css/CSSProperty.cpp ('k') | Source/core/css/StylePropertySet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698