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

Issue 613028 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: May 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

Mobile-friendliness and wrongly specified viewport for Reader Mode

Project Member Reported by wychen@chromium.org, May 19 2016

Issue description

Version: M51
OS: Goobuntu

What steps will reproduce the problem?
(1) Visit http://tw.beanfun.com/ in device emulation mode, or on mobile device.
(2) Dump the output of VisualViewport::shouldDisableDesktopWorkarounds().

What is the expected output?
It should be false.

What do you see instead?
It returns true.

The website is archived and attached.

That page is not mobile-friendly, but wrongly specified this:
<meta name="viewport" content="width=device-width">

As a result, document.body.offsetWidth === document.documentElement.clientWidth (in JS), i.e.
mainFrame()->view()->layoutSize().width() == m_size.width() (in shouldDisableDesktopWorkarounds).

However, it is possible to zoom out to see the full page, and after zooming out, window.innerWidth is much larger than document.documentElement.clientWidth.

This is user error, but could we classify this as non-mobile-friendly?
 
beanfun.zip
4.9 MB Download

Comment 1 by wychen@chromium.org, May 19 2016

Cc: mdjones@chromium.org
Clank reader mode uses this signal for mobile-friendliness detection.

Comment 2 by japhet@chromium.org, May 23 2016

Components: -Blink Blink>Input
This probably doesn't need to be Restrict-View-Google?

Comment 3 by wychen@chromium.org, May 23 2016

Labels: -Restrict-View-Google
Cc: bokan@chromium.org
Labels: Hotlist-Input-Dev OS-Android
Owner: ymalik@chromium.org
Status: Assigned (was: Untriaged)
ymalik@ is this something you can comment on?

Comment 5 by ymalik@chromium.org, May 24 2016

Cc: -bokan@chromium.org aelias@chromium.org ymalik@chromium.org rbyers@chromium.org
Owner: bokan@chromium.org
I am not sure how to differentiate non-mobile friendly sites from sites that are mobile-friendly and want to be zoomed. Maybe a true mobile-friendly site is one that has the viewport tag and disables zoom? I don't have enough background in this area.

bokan@ specializes in this.

Comment 6 by aelias@chromium.org, May 24 2016

Owner: wychen@chromium.org
Summary: DOM distiller infobar doesn't appear on tw.beanfun.com (was: Mobile-friendliness and wrongly specified viewport)
This is largely working as intended.  We already have a workaround for this type of mistake where we zoom out if the page width is forced to expand past the specified size during page load, and also the double-tap zoom enabling policy is based on width, so users don't really experience much visible difference from the webauthor having made this mistake.

The main symptom is the likely reason you filed this, "optimize page to mobile-friendly" infobar doesn't show up, so renaming this bug appropriately.  (The return value of shouldDisableDesktopWorkarounds is an implementation detail, not a bug per se.)

If you want to alter your triggering logic to make the infobar appear even on desktop pages that accidentally have a viewport tag, you can consider switching to the same or similar policy that double-tap support uses: see IsMobileOptimizedFrame() in https://code.google.com/p/chromium/codesearch#chromium/src/content/browser/renderer_host/frame_metadata_util.cc .  There is a risk of overtriggering however: it's common to have mobile sites that have one large image expanding the width of the page, so tread carefully.

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

Cc: bokan@chromium.org

Comment 8 by aelias@chromium.org, May 24 2016

Status: WontFix (was: Assigned)
Although, on second thought, DOM distiller would not even benefit this page since it's not paragraphs of content, so I'm not sure why we should go out of our way to change this, so tentatively WontFixing.  My personal opinion is that this infobar shows up too often and you should be focusing on reducing triggering to only news-style pages, rather than trying to increase triggering further.

Comment 9 by wychen@chromium.org, May 24 2016

Summary: Mobile-friendliness and wrongly specified viewport for Reader Mode (was: DOM distiller infobar doesn't appear on tw.beanfun.com)
Thanks for the feedback, and the pointer of IsMobileOptimizedFrame(). As far as I can remember, over-triggering also exists on shouldDisableDesktopWorkarounds() if a large image expands the width.

The site http://tw.beanfun.com/ was discovered when I did a scan on a scrawled corpus to compare the mobile-friendliness signal with the width of document. This page doesn't contain an article, and we correctly classified this as non-article, so the symptom that I care is not exactly "DOM distiller infobar doesn't appear on tw.beanfun.com".

The bug is more on what heuristics we should use to determine whether a page is considered mobile-friendly. There might be other non-mobile-friendly articles wrongly classified as mobile-friendly, if they specify the viewport this way. The percentage of pages getting this wrong is small, so we could argue that getting around user error isn't worth the effort.

About infobar showing too often, it's tracked in  issue 587974 . Do you feel it's still over-triggering on non-article pages ?
OK, thanks.  My impression that the infobar overtriggers is probably out of date; I'll complain on the bug if I still run into such a case on a current version of Clank.

> As far as I can remember, over-triggering also exists on shouldDisableDesktopWorkarounds() if a large image expands the width.

That's not overtriggering; it's correct triggering.  The logic intended to still identify such pages as mobile means that we overtrigger in the "mistaken viewport tag" case.

> The percentage of pages getting this wrong is small, so we could argue that getting around user error isn't worth the effort.

Yeah, that's my inclination right now, so I WontFixed it.  We can reopen if you find more relevant cases.

Sign in to add a comment