New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 630469 link

Starred by 26 users

Issue metadata

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



Sign in to add a comment

use scroll anchoring during browser zoom changes

Project Member Reported by ymalik@chromium.org, Jul 21 2016

Issue description

Browser zoom (ctrl + '+'/'-') triggers layout and causes scroll anchoring to make adjustments. 

These adjustments are minor but its worth thinking about since there is a visual difference with and without scroll anchoring. It's possible that there's nothing to do here.

Repro: https://jsbin.com/cokemav/quiet
 

Comment 1 by bokan@chromium.org, Sep 1 2016

Cc: bokan@chromium.org
Not sure it's that minor. Depending on the page, changing browser zoom can lead to wild scroll position changes.

Comment 2 by bokan@chromium.org, Sep 1 2016

 Issue 641249  has been merged into this issue.

Comment 3 by ymalik@chromium.org, Sep 14 2016

After SANACLAP we're not making any adjustment in response to browser zoom. Changing the browser zoom does a full layout and causes the sanaclap bit to be set on the anchor element's parent.

More specifically, the "effective_zoom" property changes that causes us to set "scrollAnchoringDisablingPropertyChanged" https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/style/ComputedStyle.cpp?rcl=1473852388&l=644

Browser zoom can change other things that can also cause the sanaclap to be set. For example, in the test page, StyleMultiColData changes on <body> https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/style/ComputedStyle.cpp?rcl=1473852388&l=617

So there are two options here, if we decide that changes in some of these style properties should not suppress scroll anchoring, then we need to ensure that scroll anchoring interacts well browser zoom. Otherwise, scroll anchoring will be suppressed by layout caused by ctrl + '+' / '-'.

Note that there is already code (see LocalFrame::setPageAndTextZoomFactors) that ensures that we roughly end up in the same spot after zoom changes.

Comment 4 by skobes@chromium.org, Sep 14 2016

It would be nice to use scroll anchoring in place of what LocalFrame::setPageAndTextZoomFactors is doing with the scroll position.

Comment 5 by ymalik@chromium.org, Sep 14 2016

That would require us to first determine the set of properties that would set the SANACLAP bit and intersect that with all the properties that browser zoom can change, and if the intersection is a null set, we can get rid of the code in LocalFrame::setPageeAndTextZoomFactor.

Though, its not clear to me that using scroll anchoring here is the right thing to do. For example, say that we have anchored to a LayoutText that wraps differently after browser zoom, now either we will adjust incorrectly (if we keep anchoring on) or not adjust at all (if we turn off anchoring and remove the code in LocalFrame::setPageZoomFactors).

Comment 6 by skobes@chromium.org, Oct 26 2016

Blocking: -558575
Summary: [scroll anchoring] interaction with browser zoom (was: Scroll anchoring's interaction with browser zoom)

Comment 7 by skobes@chromium.org, Feb 21 2017

Cc: dtapu...@chromium.org anan...@chromium.org wjmaclean@chromium.org
 Issue 2484  has been merged into this issue.

Comment 8 by skobes@chromium.org, Feb 22 2017

 Issue 525932  has been merged into this issue.

Comment 9 by skobes@chromium.org, Feb 22 2017

Summary: use scroll anchoring during browser zoom changes (was: [scroll anchoring] interaction with browser zoom)
Project Member

Comment 10 by sheriffbot@chromium.org, Mar 9 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Available (was: Untriaged)
Still an issue in 2018 Q1 check-in.

Sign in to add a comment