New issue
Advanced search Search tips

Issue 846193 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Task



Sign in to add a comment

[LayoutNG] HTMLElement.offsetTop/Left returns 0 for inline elements with box

Project Member Reported by xiaoche...@chromium.org, May 24 2018

Issue description

Chrome Version: (copy from chrome://version)
OS: (e.g. Win10, MacOS 10.12, etc...)

What steps will reproduce the problem?
(1) Start Chrome with LayoutNG enabled
(2) Navigate to data:text/html, <div id="first">one <span id="start"></span>two three</div>
(3) Inspect the offsetLeft/Top property of the span

What is the expected result?

Should get non-zero result.

What happens instead?

Got 0.

Note that the spec isn't clear about what to return when the element doesn't have any box:

https://drafts.csswg.org/cssom-view/#dom-htmlelement-offsetleft:

  "... Return the result of subtracting ... from the x-coordinate of
   the left border edge of the first CSS layout box associated with
   the element ..."
 
Cc: kojii@chromium.org
Cc: yosin@chromium.org
Legacy works correctly, so their culled inline logic seems to be better?

Sign in to add a comment