Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Thoughts on auto-fitting pages in fennec

3 views
Skip to first unread message

Chris Jones

unread,
Oct 13, 2010, 4:04:18 PM10/13/10
to
I've been running for a while with autofit disabled
(browser.ui.zoom.pageFitGranularity=1), and I've come to prefer it to
the default (9). Please keep in mind that I mostly just read blogs and
news aggregators. The hand-wavy reasons why I prefer autofit off are

(1) Text on almost all pages is initially readable in landscape orientation

With autofit on, basically none of the pages I frequently browse are
readable after being autofit. (Except, mobile versions of sites, which
are likely using <meta viewport>.) I suspect this is because most sites
try to fit their main content into an 800-pixel width. This means that
during page load I can start reading content immediately, and it
commonly fills the device width, sometimes after first panning a left
sidebar out of view (and during the pan, I can keep reading text).
Double-tap zoom to main content on autofit pages is pretty fast, but I
don't want to use it on every site I visit when content is already
readable at natural zoom, and I can't start reading until the zoom finishes.

An exception to this is wikipedia, which tries to fill all 980 pixels of
"window width" with text. With autofit off, the text is readable, but
the experience is unpleasant because a horizontal pan is required to
read each line. I think that if wikipedia were to serve their desktop
site to fennec, this problem would disappear (with autofit off, in
landscape orientation).

I don't often read sites with mobile versions so I only infrequently use
portrait orientation.

(2) Images are not interpolated when not autofit

By default on almost all pages I read, images just look bad by default.
Nearest-neighbor interpolation exacerbates this, and GL will help, but
with autofit we'll still always resample authors' original images so
quality will always suffer somewhat.

I don't have any specific suggestions for solving these problems (well
except bad image scaling, on which work is underway ;)). But, my two
cents' is that turning autofit off gives me a better browsing experience.

Cheers,
Chris

Matt Brubeck

unread,
Oct 13, 2010, 4:32:52 PM10/13/10
to Chris Jones, dev-platfo...@lists.mozilla.org
On 10/13/2010 01:04 PM, Chris Jones wrote:
> I've been running for a while with autofit disabled
> (browser.ui.zoom.pageFitGranularity=1), and I've come to prefer it to
> the default (9).

For those not familiar with this pref, Chris's change will cause most
sites to load with an initial zoom level of 100%. By default, we zoom
out most pages to fit the entire page width on screen.

When we first added this preference, our default viewport width was 800,
which gave us the same benefits (at least on 800-pixel-wide devices like
the N900 and Nexus One). Last month we increased the default width to
980 to improve compatibility with existing sites (bug 588881), so it's
probably a good idea to revisit this now.

> An exception to this is wikipedia, which tries to fill all 980 pixels of
> "window width" with text. With autofit off, the text is readable, but
> the experience is unpleasant because a horizontal pan is required to
> read each line. I think that if wikipedia were to serve their desktop
> site to fennec, this problem would disappear (with autofit off, in
> landscape orientation).

Mobile Wikipedia is serving rather bad markup to Fennec on Android,
apparently because of bad UA sniffing (bug 603194).

> I don't often read sites with mobile versions so I only infrequently use
> portrait orientation.

If we set pageFitGranularity to 5, then pages with the default 980px
width will zoom to fit in portrait mode, but not in landscape mode
(because 800/980 == 81.6%, which is within 1/5 == 20% of 100%).

I've filed a bug (and patch) to make this change:
https://bugzilla.mozilla.org/show_bug.cgi?id=604149

> (2) Images are not interpolated when not autofit
>
> By default on almost all pages I read, images just look bad by default.
> Nearest-neighbor interpolation exacerbates this, and GL will help, but
> with autofit we'll still always resample authors' original images so
> quality will always suffer somewhat.

Images will still be scaled very often during normal use (on pages that
set their own width or scale, or whenever a user double-taps or pinches)
so I think it's most important to optimize for that case (bug 598736).
But it's certainly nice if we can avoid resampling in some common cases.

0 new messages