Bug 123728

Summary: CSSPrimitiveValue color constructors should return PassRef.
Product: WebKit Reporter: Andreas Kling <kling>
Component: CSSAssignee: Andreas Kling <kling>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, esprehn+autocc, glenn, gyuyoung.kim, kling, koivisto, macpherson, menard
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Andreas Kling 2013-11-04 02:11:26 PST
CSSPrimitiveValue color constructors should return PassRef.
Comment 1 Andreas Kling 2013-11-04 02:11:53 PST
Created attachment 215900 [details]
Patch
Comment 2 Antti Koivisto 2013-11-04 03:53:24 PST
Comment on attachment 215900 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=215900&action=review

> Source/WebCore/css/CSSValuePool.cpp:82
> -    // Just wipe out the cache and start rebuilding if it gets too big.
> +    // Remove one entry at random if the cache grows too large.
>      const int maximumColorCacheSize = 512;
> -    if (m_colorValueCache.size() > maximumColorCacheSize)
> -        m_colorValueCache.clear();
> +    if (m_colorValueCache.size() >= maximumColorCacheSize)
> +        m_colorValueCache.remove(m_colorValueCache.begin());

Maybe the bug title should really be about this.
Comment 3 WebKit Commit Bot 2013-11-04 04:59:46 PST
Comment on attachment 215900 [details]
Patch

Clearing flags on attachment: 215900

Committed r158573: <http://trac.webkit.org/changeset/158573>
Comment 4 WebKit Commit Bot 2013-11-04 04:59:48 PST
All reviewed patches have been landed.  Closing bug.