// To save memory, we reuse CSSStyle objects if
// they have the same list of style property names and values.
// StyleKey is the key into the StyleKey, CSSStyle map.
StyleKey key = new StyleKey(styleProperties);
Style cachedStyle = styleNodeToStyleMap.get(key);
if (cachedStyle == null)
{
// no match is cached yet, so create a new CSSStyle and cache in the map.
Style style = new CSSStyle(styleProperties);
styleNodeToStyleMap.put(key, style);
return style;
}
else
{