Bug 85500 - REGRESSION(r111387): CSSOM representation of 'background-image' values should be CSSPrimitiveValue.
Summary: REGRESSION(r111387): CSSOM representation of 'background-image' values should...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andreas Kling
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2012-05-03 08:04 PDT by Andreas Kling
Modified: 2012-05-03 11:14 PDT (History)
4 users (show)

See Also:


Attachments
Patçh (4.75 KB, patch)
2012-05-03 08:54 PDT, Andreas Kling
koivisto: review-
Details | Formatted Diff | Diff
Patch v2 (5.63 KB, patch)
2012-05-03 10:16 PDT, Andreas Kling
koivisto: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Kling 2012-05-03 08:04:53 PDT
This commit <http://trac.webkit.org/changeset/111387> broke an internal client of CSSImageValue.

<rdar://problem/11305710>
Comment 1 Andreas Kling 2012-05-03 08:54:06 PDT
Created attachment 140025 [details]
Patçh
Comment 2 Antti Koivisto 2012-05-03 09:03:06 PDT
Comment on attachment 140025 [details]
Patçh

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

> Source/WebCore/css/CSSImageValue.cpp:114
> +    if (!m_cssomWrapper)
> +        m_cssomWrapper = CSSPrimitiveValue::create(m_url, CSSPrimitiveValue::CSS_URI);
> +    return m_cssomWrapper;

This will need to have m_isCSSOMSafe bit set or you will hit assert.
Comment 3 Antti Koivisto 2012-05-03 09:23:59 PDT
Comment on attachment 140025 [details]
Patçh

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

> Source/WebCore/css/CSSImageValue.h:62
> +    mutable RefPtr<CSSValue> m_cssomWrapper;

We don't cache the value wrapper to the underlying value elsewhere. This shouldn't be necessary as we have CSSStyleDeclaration level cache for keeping the identity.
Comment 4 Andreas Kling 2012-05-03 10:16:27 PDT
Created attachment 140042 [details]
Patch v2
Comment 5 Antti Koivisto 2012-05-03 10:42:04 PDT
Comment on attachment 140042 [details]
Patch v2

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

r=me

> Source/WebCore/css/CSSImageValue.cpp:114
> +    RefPtr<CSSPrimitiveValue> uriValue = CSSPrimitiveValue::create(m_url, CSSPrimitiveValue::CSS_URI);
> +    uriValue->setCSSOMSafe();
> +    return uriValue.release();

This could use a comment about why CSSImageValue gets turned into CSSPrimitiveValue.
Comment 6 Andreas Kling 2012-05-03 11:14:34 PDT
Committed r115991: <http://trac.webkit.org/changeset/115991>