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

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

Issue 775153002: Implement unset value handling (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add test Created 6 years 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
« no previous file with comments | « Source/core/css/CSSValuePool.h ('k') | Source/core/css/parser/CSSPropertyParser.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 * 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 24 matching lines...) Expand all
35 CSSValuePool& cssValuePool() 35 CSSValuePool& cssValuePool()
36 { 36 {
37 DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<CSSValuePool>, pool, (adoptPtrWil lBeNoop(new CSSValuePool()))); 37 DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<CSSValuePool>, pool, (adoptPtrWil lBeNoop(new CSSValuePool())));
38 return *pool; 38 return *pool;
39 } 39 }
40 40
41 CSSValuePool::CSSValuePool() 41 CSSValuePool::CSSValuePool()
42 : m_inheritedValue(CSSInheritedValue::create()) 42 : m_inheritedValue(CSSInheritedValue::create())
43 , m_implicitInitialValue(CSSInitialValue::createImplicit()) 43 , m_implicitInitialValue(CSSInitialValue::createImplicit())
44 , m_explicitInitialValue(CSSInitialValue::createExplicit()) 44 , m_explicitInitialValue(CSSInitialValue::createExplicit())
45 , m_unsetValue(CSSUnsetValue::create())
45 , m_colorTransparent(CSSPrimitiveValue::createColor(Color::transparent)) 46 , m_colorTransparent(CSSPrimitiveValue::createColor(Color::transparent))
46 , m_colorWhite(CSSPrimitiveValue::createColor(Color::white)) 47 , m_colorWhite(CSSPrimitiveValue::createColor(Color::white))
47 , m_colorBlack(CSSPrimitiveValue::createColor(Color::black)) 48 , m_colorBlack(CSSPrimitiveValue::createColor(Color::black))
48 { 49 {
49 m_identifierValueCache.resize(numCSSValueKeywords); 50 m_identifierValueCache.resize(numCSSValueKeywords);
50 m_pixelValueCache.resize(maximumCacheableIntegerValue + 1); 51 m_pixelValueCache.resize(maximumCacheableIntegerValue + 1);
51 m_percentValueCache.resize(maximumCacheableIntegerValue + 1); 52 m_percentValueCache.resize(maximumCacheableIntegerValue + 1);
52 m_numberValueCache.resize(maximumCacheableIntegerValue + 1); 53 m_numberValueCache.resize(maximumCacheableIntegerValue + 1);
53 } 54 }
54 55
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 visitor->trace(m_colorBlack); 163 visitor->trace(m_colorBlack);
163 visitor->trace(m_pixelValueCache); 164 visitor->trace(m_pixelValueCache);
164 visitor->trace(m_percentValueCache); 165 visitor->trace(m_percentValueCache);
165 visitor->trace(m_numberValueCache); 166 visitor->trace(m_numberValueCache);
166 visitor->trace(m_fontFaceValueCache); 167 visitor->trace(m_fontFaceValueCache);
167 visitor->trace(m_fontFamilyValueCache); 168 visitor->trace(m_fontFamilyValueCache);
168 #endif 169 #endif
169 } 170 }
170 171
171 } 172 }
OLDNEW
« no previous file with comments | « Source/core/css/CSSValuePool.h ('k') | Source/core/css/parser/CSSPropertyParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698