Open Bug 1549086 Opened 6 years ago Updated 2 years ago

Page zoom for about: pages stores page zoom settings keyed on URL including hash/querystring (leading to unexpected page zoom changes when reloading or navigating to the same page with a hash appended)

Categories

(Toolkit :: Preferences, defect, P3)

defect

Tracking

()

Tracking Status
firefox-esr60 --- wontfix
firefox66 --- wontfix
firefox67 --- wontfix
firefox68 --- affected

People

(Reporter: alice0775, Unassigned)

Details

(Keywords: nightly-community)

No description provided.

Reproducible : always

Steps To Reproduce:

  1. Open about:preferences
  2. Zoom In
  3. Click on Home
    --- observe, the zoom level is as expected
  4. Reload (f5)
    --- observe, the zoom level is reset --- BUG

optionally
5. Open about:preferences in new tab
--- observe, the zoom level is as expected
6. Click on General, Home
--- observe, the zoom level is as expected
7. Reload (f5)
--- observe, the zoom level is reset --- BUG

Actual Results:
Reloading will reset zoom level on about:preferences#something

Expected Results:
The zoom level should persist

Severity: normal → minor
Component: Tabbed Browser → Preferences

We store site-specific prefs like zoom in the contentprefservice. It normalizes URLs in https://searchfox.org/mozilla-central/rev/b2015fdd464f598d645342614593d4ebda922d95/toolkit/components/contentprefs/ContentPrefService2.jsm#63-97 . For reasons I do not understand (but likely historical), the APIs all take strings instead of URIs, and as a result we have to reparse the URI.

This parsing uses the hostname for "normal" URLs, and something similar for file URLs and other nsIURLs. However, about: URLs are none of those, and we hit the fallback at:

https://searchfox.org/mozilla-central/rev/b2015fdd464f598d645342614593d4ebda922d95/toolkit/components/contentprefs/ContentPrefService2.jsm#92

The minimal fix here is probably to update that to specIgnoringRef. Ideally we should have a test, too.

Priority: -- → P3
Product: Firefox → Toolkit
Summary: Reloading will reset zoom level on about:preferences#home (if with hash) → Page zoom for about: pages stores page zoom settings keyed on URL including hash/querystring (leading to unexpected page zoom changes when reloading or navigating to the same page with a hash appended)
Severity: minor → S4
You need to log in before you can comment on or make changes to this bug.