diff --git a/layout/style/nsCSSParser.cpp b/layout/style/nsCSSParser.cpp index 6be769551d02..377f7cbd0f18 100644 --- a/layout/style/nsCSSParser.cpp +++ b/layout/style/nsCSSParser.cpp @@ -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;