Bug 169548
Summary: | Spec change: <img ismap> coordinates should be from image edge, not border edge | ||
---|---|---|---|
Product: | WebKit | Reporter: | Simon Pieters (:zcorpan) <zcorpan> |
Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | cdumez, sabouhallawa, simon.fraser |
Priority: | P2 | Keywords: | FromImplementor, WebExposed |
Version: | Safari Technology Preview | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Simon Pieters (:zcorpan)
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...
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Chris Dumez
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();
Chris Dumez
(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
Simon Pieters (:zcorpan)
https://github.com/w3c/web-platform-tests/pull/5118 has now landed.