On Mon, Oct 7, 2013 at 3:11 PM, Chris Peterson <[email protected]>wrote:
> I stumbled upon some layout code that for transparent colors using != or > == NS_RGBA(0,0,0,0): > > http://dxr.mozilla.org/**mozilla-central/search?q=** > regexp%3A%23[!%3D]%3D%20%3FNS_**RGBA%23<http://dxr.mozilla.org/mozilla-central/search?q=regexp%3A%23[!%3D]%3D%20%3FNS_RGBA%23> > > Are those checks unnecessarily restrictive? > > One of the checks has a comment saying "Use the strictest match for > 'transparent' so we do correct round-tripping of all other rgba() values", > but the strictness of the other checks is unclear. ;) > All those checks look correct to me. Most of the colors we deal with are using premultiplied alpha (e.g. the checks in nsDisplayList certainly do), in which case the only valid alpha value is RGBA(0,0,0,0). Rob -- Jtehsauts tshaei dS,o n" Wohfy Mdaon yhoaus eanuttehrotraiitny eovni le atrhtohu gthot sf oirng iyvoeu rs ihnesa.r"t sS?o Whhei csha iids teoa stiheer :p atroa lsyazye,d 'mYaonu,r "sGients uapr,e tfaokreg iyvoeunr, 'm aotr atnod sgaoy ,h o'mGee.t" uTph eann dt hwea lmka'n? gBoutt uIp waanndt wyeonut thoo mken.o w * * _______________________________________________ dev-platform mailing list [email protected] https://lists.mozilla.org/listinfo/dev-platform

