mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 10:00:54 +00:00
b=147017, Support rgba and hsla colors in CSS (cairo only), r+sr=dbaron
This commit is contained in:
parent
8e12c08504
commit
b54ed05cac
@ -531,7 +531,11 @@ CSSParserImpl::CSSParserImpl()
|
||||
mSVGMode(PR_FALSE),
|
||||
#endif
|
||||
mHTMLMediaMode(PR_FALSE),
|
||||
#ifdef MOZ_CAIRO_GFX
|
||||
mHandleAlphaColors(PR_TRUE),
|
||||
#else
|
||||
mHandleAlphaColors(PR_FALSE),
|
||||
#endif
|
||||
mCaseSensitive(PR_FALSE),
|
||||
mParsingCompoundProperty(PR_FALSE)
|
||||
#ifdef DEBUG
|
||||
@ -1030,6 +1034,7 @@ CSSParserImpl::ParseColorString(const nsSubstring& aBuffer,
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
PRBool origHandleAlphaColors = mHandleAlphaColors;
|
||||
mHandleAlphaColors = aHandleAlphaColors;
|
||||
|
||||
nsCSSValue value;
|
||||
@ -1038,7 +1043,7 @@ CSSParserImpl::ParseColorString(const nsSubstring& aBuffer,
|
||||
CLEAR_ERROR();
|
||||
ReleaseScanner();
|
||||
|
||||
mHandleAlphaColors = PR_FALSE;
|
||||
mHandleAlphaColors = origHandleAlphaColors;
|
||||
|
||||
if (!colorParsed) {
|
||||
return NS_ERROR_FAILURE;
|
||||
|
Loading…
Reference in New Issue
Block a user