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

Issue 693877 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
I leave the team
Closed: Sep 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

Page is zoomed in while toggling "Request desktop site"

Reported by sanjoy....@gmail.com, Feb 18 2017

Issue description

Example URL:
news.naver.com

Steps to reproduce the problem:
1. Enable "force enable zoom" in Accessibility settings
2. Go to news.naver.com, click on any news article
3. If we zoom the mobile page a little, and change to "Request desktop site", the desktop version is zoomed very high.

What is the expected behavior?
Zoom should not be persistent between mobile and desktop version change. 

What went wrong?
If we zoom the mobile page a little, and change to "Request desktop site", the desktop version is zoomed very high.

Does it occur on multiple sites: N/A

Is it a problem with a plugin? N/A 

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 55.0.2883.87  Channel: n/a
OS Version: 
Flash Version: Shockwave Flash 24.0 r0


 
Cc: prashanthpola@chromium.org
Labels: triage-te
Cc: -prashanthpola@chromium.org aelias@chromium.org
Labels: -triage-te M-56
Status: Available (was: Unconfirmed)
We are able to repro this issue on Chrome Stable:55.0.2883.91 Device:Sony Xperia Z1 (SOL23 KDDI)/4.4.2 and Motorola Moto E (XT1022) / LPC23

Comment 3 by aelias@chromium.org, Feb 23 2017

Cc: -aelias@chromium.org
Labels: -Type-Compat -M-56 Type-Bug
Owner: aelias@chromium.org
Status: Assigned (was: Available)
Cc: aelias@chromium.org jinsuk...@chromium.org
Owner: jaebaek@chromium.org
Hi jaebaek@, I thought this might be a good starter bug to investigate when you are set up.  For some initial pointers, the initial zoom level is set in WebViewImpl interacting with PageScaleConstraintsSet, and "Request Desktop Site" performs a special type of reload which is initiated in NavigationControllerAndroid::SetUseDesktopUserAgent and propagates down to the renderer process from there.
And the expected result is that the page should always be fully zoomed out after a reload, even of "Request Desktop Site" kind.  It seems that zooming in a bit on the initial page alters state in a way that defeats this mechanism.
What exactly do you mean by "the expected result is that the page should always be fully zoomed out after a reload, even of "Request Desktop Site" kind."?

Must it always fully zoomed out for all the cases of reloads?
It seems FrameLoader::RestoreScrollPositionAndViewStateForLoadType() function causes this problem. Do you think it must check the type and not restore scroll and scale if the load type is reload?

Comment 7 by aelias@chromium.org, May 24 2017

> Must it always fully zoomed out for all the cases of reloads?

Hmm, on second thought, I don't think it should, since it's established behavior that scroll and scale is restored to previous on normal reloads.

I do think in general the invariant we ought to preserve the scroll offset is restored or cleared, then the scale ought to also be restored or cleared at the same time, as they are two facets of the same state.  What's especially weird about "request desktop site" is that scroll is always reset to (0,0), but scale is not necessarily restored to minimum.

> Do you think it must check the type and not restore scroll and scale if the load type is reload?

It think it might be cleaner for the scroll and scale state to be wiped at an earlier stage in the reload.  It seems scroll is already wiped for "Request Desktop Site" at some point -- you might add a more reliable wipe call for the scale as well at the same spot.
Project Member

Comment 8 by bugdroid1@chromium.org, Jun 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4c2b2cf9b350fd155fd0c1b9159b5f5c9477ff94

commit 4c2b2cf9b350fd155fd0c1b9159b5f5c9477ff94
Author: jaebaek <jaebaek@chromium.org>
Date: Wed Jun 14 03:41:57 2017

This CL resets scroll and scale when a reload occurs
because of toggling "Request desktop site".

BUG= 693877 

Review-Url: https://codereview.chromium.org/2898423002
Cr-Commit-Position: refs/heads/master@{#479276}

[modify] https://crrev.com/4c2b2cf9b350fd155fd0c1b9159b5f5c9477ff94/third_party/WebKit/Source/web/WebViewImpl.cpp
[modify] https://crrev.com/4c2b2cf9b350fd155fd0c1b9159b5f5c9477ff94/third_party/WebKit/Source/web/tests/WebFrameTest.cpp

Status: Fixed (was: Assigned)

Sign in to add a comment