Bug 169548 - Spec change: <img ismap> coordinates should be from image edge, not border edge
Summary: Spec change: <img ismap> coordinates should be from image edge, not border edge
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: FromImplementor, WebExposed
Depends on:
Blocks:
 
Reported: 2017-03-13 03:52 PDT by Simon Pieters
Modified: 2017-05-22 02:27 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Pieters 2017-03-13 03:52:48 PDT
Demo: http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=3800

Expect click on border in the top-left corner to get coordinates 0,0. WebKit measures from the border edge instead.

whatwg/html issue: https://github.com/whatwg/html/issues/438
whatwg/html change: https://github.com/whatwg/html/pull/529

web-platform-test: https://github.com/w3c/web-platform-tests/pull/5118

The test passes in Chromium and Gecko; fail in WebKit and Edge.

Comment from Travis (Edge) https://github.com/w3c/html/issues/492#issuecomment-285819148

> Definitely makes sense just to align with Chrome/Firefox on this...
Comment 1 Chris Dumez 2017-03-20 19:45:53 PDT
Likely the code in appendServerMapMousePosition(). Looks like link has some extra logic there:
  // The origin (0,0) is at the upper left of the content area, inside the
  // padding and border.
  mapPoint -= toLayoutBox(layoutObject)->contentBoxOffset();
Comment 2 Chris Dumez 2017-03-20 19:46:15 PDT
(In reply to comment #1)
> Likely the code in appendServerMapMousePosition(). Looks like link has some
> extra logic there:
>   // The origin (0,0) is at the upper left of the content area, inside the
>   // padding and border.
>   mapPoint -= toLayoutBox(layoutObject)->contentBoxOffset();

s/link/Blink
Comment 3 Simon Pieters 2017-05-22 02:27:33 PDT
https://github.com/w3c/web-platform-tests/pull/5118 has now landed.