Closed Bug 1616090 Opened 5 years ago Closed 5 years ago

If the default zoom level is not 100%, about:blank tabs always show zoom indicator [100%] in the address bar

Categories

(Firefox :: Address Bar, defect, P5)

Desktop
Windows 10
defect

Tracking

()

RESOLVED FIXED
Firefox 75
Tracking Status
firefox-esr68 --- unaffected
firefox73 --- wontfix
firefox74 --- wontfix
firefox75 --- fixed

People

(Reporter: alice0775, Assigned: morgan)

References

(Blocks 1 open bug)

Details

(Keywords: access, nightly-community)

Attachments

(1 file)

Reproducible: always:

Steps to reproduce:

  1. Set Home or New tabs to blank
  2. Set default zoom level other than 100%
  3. Open Home or New tab page or about:blank

Actual Results:
Blank tabs always show zoom indicator [100%] in the address bar

Expected Results:
the zoom indicator should not display

Priority: -- → P5
Keywords: access
Priority: P5 → --
Priority: -- → P5

So looks like this is because we manually set zoom of about:blank tabs here: https://searchfox.org/mozilla-central/rev/5a10be606f2d76ef22f1f44565749490de991d35/browser/base/content/browser-fullZoom.js#245

:gijs, do you think it makes sense to do a getGlobalValue here and send the "real" default zoom, or should I modify this [below] code to hide the URL bar badge for about:blank pages? The latter seems better performance-wise, since the only reason we'd be getting the value is to appease the conditional for the .hidden attribute, not to do any real zooming.

https://searchfox.org/mozilla-central/rev/5a10be606f2d76ef22f1f44565749490de991d35/browser/modules/ZoomUI.jsm#148

Flags: needinfo?(gijskruitbosch+bugs)

(In reply to Morgan Reschenberg [:morgan] from comment #1)

So looks like this is because we manually set zoom of about:blank tabs here: https://searchfox.org/mozilla-central/rev/5a10be606f2d76ef22f1f44565749490de991d35/browser/base/content/browser-fullZoom.js#245

:gijs, do you think it makes sense to do a getGlobalValue here and send the "real" default zoom, or should I modify this [below] code to hide the URL bar badge for about:blank pages? The latter seems better performance-wise, since the only reason we'd be getting the value is to appease the conditional for the .hidden attribute, not to do any real zooming.

https://searchfox.org/mozilla-central/rev/5a10be606f2d76ef22f1f44565749490de991d35/browser/modules/ZoomUI.jsm#148

Right, I think for perf reasons it'd be better to hide the badge in the same case where we avoid calling getGlobalValue when setting the zoom (but only if the zoom is 1; if it's something else we should probably still compare to the global zoom, so that individual zoom for these pages does show the indicator?), assuming that's possible...

Flags: needinfo?(gijskruitbosch+bugs) → needinfo?(mreschenberg)

(In reply to :Gijs (he/him) from comment #2)

Right, I think for perf reasons it'd be better to hide the badge in the same case where we avoid calling getGlobalValue when setting the zoom (but only if the zoom is 1; if it's something else we should probably still compare to the global zoom, so that individual zoom for these pages does show the indicator?), assuming that's possible...

when you say "in the same case where we avoid calling getGlobalValue when setting the zoom", do you mean in _applyPrefToZoom or in ZoomUI? It looks like the only way we avoid calling it in ZoomUI is if we early return before setting the .hidden attribute, so I'm not sure what ya mean.

The patch attached involves checking if the browser's current URI is about:blank, which is the same check the zoom code does. lemme know if you meant something different!

Flags: needinfo?(mreschenberg) → needinfo?(gijskruitbosch+bugs)
Assignee: nobody → mreschenberg

I responded on phab. :-)

Flags: needinfo?(gijskruitbosch+bugs)
Pushed by mreschenberg@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1d55103f9020 Compare current URI to about:blank when setting zoom badge visibility. r=Gijs

Bugbug thinks this bug is a regression, but please revert this change in case of error.

Keywords: regression

Fixed :)

Flags: needinfo?(mreschenberg)
Pushed by mreschenberg@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/53405c4200e1 Compare current URI to about:blank when setting zoom badge visibility. r=Gijs
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 75
Keywords: regression
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: