Created attachment 717549 [details] [diff] [review]
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:19.0) Gecko/20100101 Firefox/19.0
Build ID: 20130218103317
Steps to reproduce:
nsSVGUtils::UnPremultiplyImageDataAlpha and nsSVGUtils::ConvertImageDataToLinearRGB are called before checking what StyleSVGReset()->mMaskType == NS_STYLE_MASK_TYPE_LUMINANCE returns.
They should only be called when it returns true.
Comment on attachment 717549 [details] [diff] [review]
Moved the calls to nsSVGUtils::UnPremultiplyImageDataAlpha and nsSVGUtils::ConvertImageDataToLinearRGB to the block corresponding to StyleSVG()->mColorInterpolation == NS_STYLE_COLOR_INTERPOLATION_LINEARRGB being true
It would be very nice if someone could point me to some any existing test cases for the masking related code in SVG.
layout/reftests/svg/mask-type-01.svg layout/reftests/svg/mask-type-02.svg layout/reftests/svg/mask-type-03.svg all test alpha masks. The other files in layout/reftests/svg with mask in their titles test luminance masks.
I can probably land this for you tomorrow.
Forgive me, but I don't understand what you mean by "land this". Are you offering to commit this patch into trunk?
Thank you! So, is it now safe to assume this means I need not add the "checkin-needed" keyword mentioned on this page: https://developer.mozilla.org/en-US/docs/Developer_Guide/How_to_Submit_a_Patch ?
(In reply to O S K Chaitanya from comment #7)
> Thank you! So, is it now safe to assume this means I need not add the
> "checkin-needed" keyword mentioned on this page:
> How_to_Submit_a_Patch ?
If you want to add checkin-needed your patch ought to follow these rules: https://developer.mozilla.org/en-US/docs/Creating_a_patch_that_can_be_checked_in
As it's your first time I let you off jumping through those hoops ;-)
Your patch is on the mozilla-inbound trunk tree now and should make it to mozilla-central within the next 24 hours.
Oh and thanks for the patch.