Open Bug 756518 Opened 13 years ago Updated 2 years ago

Modify conditional detection of mobile sites for font inflation

Categories

(Core :: Layout, defect, P3)

defect

Tracking

()

People

(Reporter: jwir3, Unassigned)

References

(Blocks 1 open bug)

Details

From bug 707195 comment 24: 

> (The reason we don't inflate reddit at all, by the way, is that we detect it as a 
> mobile site because of its <meta name="viewport" content="width=1024" />, which 
> leads to nsContentUtils::GetViewportInfo returning a value that has defaultZoom set 
> to 1.0, which in turn means that nsLayoutUtils::FontSizeInflationEnabled returns 
> false.)

We need to be more robust in our detection of mobile sites using meta viewport WRT font inflation. Specifically, we should detect width=300 as a mobile site (and thus font inflation should be disabled), but width=1024 as not a mobile site.
Blocks: 707195
Depends on: 706198
OS: Linux → All
Hardware: x86_64 → All
Group: mozilla-confidential
Apparently (from brad via scott) sites may be using this sort of thing to disable inflation, since it does so on iOS.  However, I think the text-size-adjust property is a better way to disable inflation, and I'd rather not overload the viewport stuff too much.

Perhaps a threshold for whether a meta-viewport should disable font inflation is whether it's giving a width that's equal to or smaller than the device width?
Marking this a P2 because it blocks 707195, and will probably need to be fixed prior to it. (It might be fairly straightforward, though, so that *might* not be a big deal).
Priority: -- → P2
(In reply to David Baron [:dbaron] from comment #1)
> Perhaps a threshold for whether a meta-viewport should disable font
> inflation is whether it's giving a width that's equal to or smaller than the
> device width?

Hm, so one thing I didn't realize immediately is that on desktop, this will always be the case. It means that font inflation will always be disabled on desktop, which is less than ideal for reftest- and mochitest-based testing. 

One thing I could do is if the width and height strings within GetViewportInfo are both uninitialized, then I could force it to return a nonsense value (e.g. -1). But this is kind of a hack...
Depends on: 821801
Moving to p3 because no activity for at least 1 year(s).
See https://github.com/mozilla/bug-handling/blob/master/policy/triage-bugzilla.md#how-do-you-triage for more information
Priority: P2 → P3
Moving to p3 because no activity for at least 1 year(s).
See https://github.com/mozilla/bug-handling/blob/master/policy/triage-bugzilla.md#how-do-you-triage for more information

The bug assignee didn't login in Bugzilla in the last 7 months, so the assignee is being reset.

Assignee: jaywir3 → nobody
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.