On 09/25/2014 08:24 AM, James Graham wrote: > So, are we sure that this is what the spec *should* say? can we imagine > a scenario in which authors either use hacks to specify different > properties for different browsers
Bad news: we are already in that world. Right now, if authors want pixelated upscaling instead of smeared upscaling, we make them do the following horrible horrible thing: image-rendering: -moz-crisp-edges; /* Firefox */ image-rendering: -webkit-optimize-contrast; /* Safari */ image-rendering: pixelated; /* Chrome (soon) */ -ms-interpolation-mode: nearest-neighbor; /* IE */ Yikes. Let's make that better. > or sites look considerably worse in > Gecko than some other browser, so we end up reverse engineering their > behaviour, due to differences in the scaling behaviour? We've had bugs filed like this in the past, and these bugs give us an opportunity to think about whether we should switch to a different scaling algorithm for that content/image/platform/etc. If we can, perhaps we should. This is a good thing. Note that if the spec *required* a specific algorithm for interop, then we wouldn't be allowed to improve on a gross rendering in cases like this (unless we want to violate the spec). I don't think we want to ask that the spec tie our hands like that. > If either of > these seems likely then the spec likely shouldn't claim to be a "hint" > but should actually specify what's needed for interop. The CSS and HTML specs *already* don't require any particular algorithm be used for image-scaling (AFAIK). And that's a good thing, because it lets us make an educated decision given the capabilities of a device, the type of image, etc., and make improvements when we realize that we're making the wrong tradeoff. I think the "image-rendering" spec strikes a reasonable balance between allowing authors to specify specific intents, without tying browsers' hands to lock them into a specific implementation. (And in any case, this thread is about just adding a single value to our already-existing "image-rendering" property.) ~Daniel _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform