Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Gecko Bug 1552089] Don't tweak snapport position even in the case of RTL scroll containers. #16909

Merged
merged 1 commit into from May 20, 2019

Conversation

moz-wptsync-bot
Copy link
Collaborator

In RTL scroll containers, the right most x-axis scroll position is 0 and
leftward scroll positions are negative values. And also
nsLayoutUtils::TransformFrameRectToAncestor, which is used to tell whether the
snap target element is inside the destination snapport or not [1], returns
negative x-axis positions for elements in RTL scroll containers if the element
is positioned at places where the elements are outside of the initial scroll
position (0, 0). So we don't need to tweak snapport postion even in the case
of RTL scroll containers.

Instead, what we needed in the first place is that we choose a proper x-axis
scroll position that the targe element appears inside the snapport.

[1] https://searchfox.org/mozilla-central/rev/11cfa0462a6b5d8c5e2111b8cfddcf78098f0141/layout/generic/nsGfxScrollFrame.cpp#6604-6605,6616-6617

Depends on D31409

Differential Revision: https://phabricator.services.mozilla.com/D31410

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1552089
gecko-commit: 14743da36853e6b1d745418e128030b89bbb6fe2
gecko-integration-branch: autoland
gecko-reviewers: botond

In RTL scroll containers, the right most x-axis scroll position is 0 and
leftward scroll positions are negative values.  And also
nsLayoutUtils::TransformFrameRectToAncestor, which is used to tell whether the
snap target element is inside the destination snapport or not [1], returns
negative x-axis positions for elements in RTL scroll containers if the element
is positioned at places where the elements are outside of the initial scroll
position (0, 0).  So we don't need to tweak snapport postion even in the case
of RTL scroll containers.

Instead, what we needed in the first place is that we choose a proper x-axis
scroll position that the targe element appears inside the snapport.

[1] https://searchfox.org/mozilla-central/rev/11cfa0462a6b5d8c5e2111b8cfddcf78098f0141/layout/generic/nsGfxScrollFrame.cpp#6604-6605,6616-6617

Depends on D31409

Differential Revision: https://phabricator.services.mozilla.com/D31410

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1552089
gecko-commit: 14743da36853e6b1d745418e128030b89bbb6fe2
gecko-integration-branch: autoland
gecko-reviewers: botond
Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already reviewed downstream.

@moz-wptsync-bot moz-wptsync-bot merged commit c2f97a9 into master May 20, 2019
@moz-wptsync-bot moz-wptsync-bot deleted the gecko/1552089 branch May 20, 2019 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants