Skip to content

[cssom-view] clarify what the ICB origin is on RTL with minimum-scale size for scrollX #12893

@hiikezoe

Description

@hiikezoe

https://bug1931482.bmoattachments.org/attachment.cgi?id=9517653 is an example to see this complication.

If you open the example on mobile browsers or in RDM, you will see scrollX value in the example;

On Chrome it's negative.
Both on Safari and Firefox, it's 0.

But once after you pinch zoomed in the content;
Both on Safari and Firefox it changes to a negative value (note that there's a bug in Firefox so that we will not able to see the value in the content, but the value is negative).

From the spec text of scrollX; https://drafts.csswg.org/cssom-view/#dom-window-scrollx

The scrollX attribute must return the x-coordinate, relative to the initial containing block origin, of the left of the viewport, or zero if there is no viewport

So to me in terms of this spec definition Chrome's behavior is correct, since the left edge of the (layout) viewport governed by the minimum-scale is positioned leftward of the left edge of the ICB.

That's being said, it's quite unintuive? On RTL, the origin of ICB should be the right? And the left of the viewport should also be the right of the viewport?

CC @bokand

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions