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

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

Issue 17448021: Make sure ImmutableStylePropertySet uses the new 16 bits size of StylePropertyMetadata. (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 | « no previous file | Source/core/css/StylePropertySet.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 Apple Computer, Inc. 3 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
4 * Copyright (C) 2013 Intel Corporation. All rights reserved.
4 * 5 *
5 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
8 * 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.
9 * 10 *
10 * This library is distributed in the hope that it will be useful, 11 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details. 14 * Library General Public License for more details.
(...skipping 22 matching lines...) Expand all
36 , m_isSetFromShorthand(isSetFromShorthand) 37 , m_isSetFromShorthand(isSetFromShorthand)
37 , m_indexInShorthandsVector(indexInShorthandsVector) 38 , m_indexInShorthandsVector(indexInShorthandsVector)
38 , m_important(important) 39 , m_important(important)
39 , m_implicit(implicit) 40 , m_implicit(implicit)
40 , m_inherited(inherited) 41 , m_inherited(inherited)
41 { 42 {
42 } 43 }
43 44
44 CSSPropertyID shorthandID() const; 45 CSSPropertyID shorthandID() const;
45 46
46 unsigned m_propertyID : 10; 47 uint16_t m_propertyID : 10;
47 unsigned m_isSetFromShorthand : 1; 48 uint16_t m_isSetFromShorthand : 1;
48 unsigned m_indexInShorthandsVector : 2; // If this property was set as part of an ambiguous shorthand, gives the index in the shorthands vector. 49 uint16_t m_indexInShorthandsVector : 2; // If this property was set as part of an ambiguous shorthand, gives the index in the shorthands vector.
49 unsigned m_important : 1; 50 uint16_t m_important : 1;
50 unsigned m_implicit : 1; // Whether or not the property was set implicitly a s the result of a shorthand. 51 uint16_t m_implicit : 1; // Whether or not the property was set implicitly a s the result of a shorthand.
51 unsigned m_inherited : 1; 52 uint16_t m_inherited : 1;
52 }; 53 };
53 54
54 class CSSProperty { 55 class CSSProperty {
55 public: 56 public:
56 CSSProperty(CSSPropertyID propertyID, PassRefPtr<CSSValue> value, bool impor tant = false, bool isSetFromShorthand = false, int indexInShorthandsVector = 0, bool implicit = false) 57 CSSProperty(CSSPropertyID propertyID, PassRefPtr<CSSValue> value, bool impor tant = false, bool isSetFromShorthand = false, int indexInShorthandsVector = 0, bool implicit = false)
57 : m_metadata(propertyID, isSetFromShorthand, indexInShorthandsVector, im portant, implicit, isInheritedProperty(propertyID)) 58 : m_metadata(propertyID, isSetFromShorthand, indexInShorthandsVector, im portant, implicit, isInheritedProperty(propertyID))
58 , m_value(value) 59 , m_value(value)
59 { 60 {
60 ASSERT((propertyID == CSSPropertyVariable) == (m_value && m_value->isVariabl eValue())); 61 ASSERT((propertyID == CSSPropertyVariable) == (m_value && m_value->isVariabl eValue()));
61 } 62 }
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 } // namespace WebCore 135 } // namespace WebCore
135 136
136 namespace WTF { 137 namespace WTF {
137 template <> struct VectorTraits<WebCore::CSSProperty> : VectorTraitsBase<false, WebCore::CSSProperty> { 138 template <> struct VectorTraits<WebCore::CSSProperty> : VectorTraitsBase<false, WebCore::CSSProperty> {
138 static const bool canInitializeWithMemset = true; 139 static const bool canInitializeWithMemset = true;
139 static const bool canMoveWithMemcpy = true; 140 static const bool canMoveWithMemcpy = true;
140 }; 141 };
141 } 142 }
142 143
143 #endif // CSSProperty_h 144 #endif // CSSProperty_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/css/StylePropertySet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698