Open mattwoodrow opened 5 years ago
Just wanted to add that this has implications on what I'm guessing is the underlying logic of not only transforms/perspective, but also sticky positioning, which currently has the same interop issue of scrollHeight depending on scroll position in at least gecko. Gecko issue and test case -> https://bugzilla.mozilla.org/show_bug.cgi?id=1314422 Also this test case between webkit/blink/gecko -> http://jsfiddle.net/78oamb6u/57/
The CSS Working Group just discussed Should the overflow area take scroll position into account.
.
I think #8193 and #8851 are closely related and possibly duplicates of this issue, though they also have a bit of discussion.
When we have a scrolled transformed element, where the perspective property is set on the overflow:scroll element, then the accumulated transform matrix depends on scroll position (since the offset between transformed element, and perspective origin moves).
This means that the computed overflow area for the transformed element can change, and thus, the scrollable length of the overflow:scroll element (and the size of the scrollbar thumb).
The following testcase demonstrates a case where Gecko is recomputing the overflow/scrollable length as you scroll, but WebKit/blink don't, and you can't scroll the whole orange rectangle into view: https://bug1198135.bmoattachments.org/attachment.cgi?id=8684006
You can also have the reverse case, where the transformed content scrolls fully into view early than expected, and there is remaining scroll range with no content.