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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSValuePool.cpp

Issue 1373433002: Split out CSSPrimitiveValue's PropertyID into CSSCustomIdentValue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@split_string
Patch Set: Rebase Created 5 years, 2 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) 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSValuePool::createIdentifierValue(CS SValueID ident) 56 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSValuePool::createIdentifierValue(CS SValueID ident)
57 { 57 {
58 if (ident <= 0) 58 if (ident <= 0)
59 return CSSPrimitiveValue::createIdentifier(ident); 59 return CSSPrimitiveValue::createIdentifier(ident);
60 60
61 if (!m_identifierValueCache[ident]) 61 if (!m_identifierValueCache[ident])
62 m_identifierValueCache[ident] = CSSPrimitiveValue::createIdentifier(iden t); 62 m_identifierValueCache[ident] = CSSPrimitiveValue::createIdentifier(iden t);
63 return m_identifierValueCache[ident]; 63 return m_identifierValueCache[ident];
64 } 64 }
65 65
66 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSValuePool::createIdentifierValue(CS SPropertyID ident) 66 PassRefPtrWillBeRawPtr<CSSCustomIdentValue> CSSValuePool::createIdentifierValue( CSSPropertyID ident)
67 { 67 {
68 return CSSPrimitiveValue::createIdentifier(ident); 68 return CSSCustomIdentValue::create(ident);
69 } 69 }
70 70
71 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSValuePool::createColorValue(unsigne d rgbValue) 71 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSValuePool::createColorValue(unsigne d rgbValue)
72 { 72 {
73 // These are the empty and deleted values of the hash table. 73 // These are the empty and deleted values of the hash table.
74 if (rgbValue == Color::transparent) 74 if (rgbValue == Color::transparent)
75 return m_colorTransparent; 75 return m_colorTransparent;
76 if (rgbValue == Color::white) 76 if (rgbValue == Color::white)
77 return m_colorWhite; 77 return m_colorWhite;
78 // Just because it is common. 78 // Just because it is common.
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 visitor->trace(m_colorBlack); 164 visitor->trace(m_colorBlack);
165 visitor->trace(m_pixelValueCache); 165 visitor->trace(m_pixelValueCache);
166 visitor->trace(m_percentValueCache); 166 visitor->trace(m_percentValueCache);
167 visitor->trace(m_numberValueCache); 167 visitor->trace(m_numberValueCache);
168 visitor->trace(m_fontFaceValueCache); 168 visitor->trace(m_fontFaceValueCache);
169 visitor->trace(m_fontFamilyValueCache); 169 visitor->trace(m_fontFamilyValueCache);
170 #endif 170 #endif
171 } 171 }
172 172
173 } 173 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698