Re: [whatwg] How do CSS "object-position" & "object-fit" affect the coordinates used by image <map>/<area>?

On 11/07/2014 09:42 AM, Anne van Kesteren wrote:
> On Fri, Nov 7, 2014 at 6:35 PM, L. David Baron <dbaron@dbaron.org> wrote:
>> I also think it should be (B), since the meaning of the coordinates
>> in the imagemap shouldn't change as a result of CSS styling of the
>> image.
> 
> Note that as Daniel pointed out it for legacy reasons already does.
> <img height/width> and CSS height/width are the same. Not perpetuating
> that further makes sense though.

I'm actually not so sure I agree (about not perpetuating that further).

The "width" & "height" legacy requirement basically ends up meaning that
imagemap coordinates use the <img>'s content-box as their coordinate
space.  In a More Perfect World, it'd arguably be more useful for
specific imagemap coordinates to reliably to map to specific places in
the image data (regardless of height/width), but it seems we've already
lost that possibility.

So, for now, we just have one useful assumption that we can make about
these coordinates: they use the <img>'s content-box as their coordinate
space.  I don't think we should let object-fit/object-position break
that assumption, or else we risk making these coordinates completely
incomprehensible / unusable.

So, I'm now favoring option (A) from my original email.

(See my reply to David for more thoughts on this.)

~Daniel

Received on Friday, 7 November 2014 18:41:39 UTC