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

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

Issue 16365009: Remove dead code in CSSValuePool. (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/CSSValuePool.h ('k') | no next file » | 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 const int maximumFontFaceCacheSize = 128; 124 const int maximumFontFaceCacheSize = 128;
125 if (m_fontFaceValueCache.size() > maximumFontFaceCacheSize) 125 if (m_fontFaceValueCache.size() > maximumFontFaceCacheSize)
126 m_fontFaceValueCache.clear(); 126 m_fontFaceValueCache.clear();
127 127
128 RefPtr<CSSValueList>& value = m_fontFaceValueCache.add(string, 0).iterator-> value; 128 RefPtr<CSSValueList>& value = m_fontFaceValueCache.add(string, 0).iterator-> value;
129 if (!value) 129 if (!value)
130 value = CSSParser::parseFontFaceValue(string); 130 value = CSSParser::parseFontFaceValue(string);
131 return value; 131 return value;
132 } 132 }
133 133
134 void CSSValuePool::drain()
135 {
136 m_colorValueCache.clear();
137 m_fontFaceValueCache.clear();
138 m_fontFamilyValueCache.clear();
139
140 for (int i = 0; i < numCSSValueKeywords; ++i)
141 m_identifierValueCache[i] = 0;
142
143 for (int i = 0; i < maximumCacheableIntegerValue; ++i) {
144 m_pixelValueCache[i] = 0;
145 m_percentValueCache[i] = 0;
146 m_numberValueCache[i] = 0;
147 }
148 } 134 }
149
150 }
OLDNEW
« no previous file with comments | « Source/core/css/CSSValuePool.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698