Re: [csswg-drafts] [css-scroll-anchoring-1] Questions about anchor node selection

I was going to file this in a separate issue, but I think it makes sense to post it here.

Currently the specification says:
> Conceptually, a new anchor node is computed for every scrolling box whenever the scroll position of any scrolling box changes. (As a performance optimization, the implementation may wait until the anchor node is needed before computing it.)

When is a scrolling boxes anchor initially computed, and what are the cases the anchor needs to be recomputed?

>From skimming the Blink code for `ScrollAnchor`, it looks like:
* A scrolling box can only have an anchor when it's scrolled from its origin
  * So scrolling boxes only get an anchor after scrolling for the first time
  * Scrolling to the origin will remove the anchor, causing it to be 'anchored to the origin'
* Removal of the anchor node will cause the anchor node to be recomputed
* A scroll adjustment suppression happening with a non-zero adjustment will cause the anchor node to be recomputed

Is this assessment correct?

-- 
GitHub Notification of comment by eqrion
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3319#issuecomment-438838522 using your GitHub account

Received on Wednesday, 14 November 2018 22:13:42 UTC