b=147017, Support rgba and hsla colors in CSS (cairo only), r+sr=dbaron

This commit is contained in:
vladimir%pobox.com 2006-02-10 07:08:43 +00:00
parent 8e12c08504
commit b54ed05cac

View File

@ -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;