Open Bug 1880137 Opened 1 year ago Updated 1 year ago

Devtool does not remember zoom level when using Ctrl+scroll mouse wheel to zoom

Categories

(DevTools :: General, defect, P3)

Firefox 122
defect

Tracking

(firefox-esr115 wontfix, firefox123 wontfix, firefox124 wontfix, firefox125 wontfix)

Tracking Status
firefox-esr115 --- wontfix
firefox123 --- wontfix
firefox124 --- wontfix
firefox125 --- wontfix

People

(Reporter: josh, Unassigned)

References

(Regression)

Details

(Keywords: regression)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:122.0) Gecko/20100101 Firefox/122.0

Steps to reproduce:

  1. Open devtools
  2. Ctrl + zoom a few levels to the font size isnt miniscule
  3. Close dev tools
  4. Open devtools

Actual results:

Font size has reset back to tiny

Expected results:

devtools remembers the zoom level/font size

This is a recent regression (in 122?) as previously devtools rememberd the zoom level across opens and restarts. This is very important to my workflow because the default font size for the firefox devtools is tiny and exceptionally uncomfortable to use, even with my glasses - its annoying to have to re-zoom in every single time i open it, or in different tabs.

The Bugbug bot thinks this bug should belong to the 'Core::Layout: Text and Fonts' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Layout: Text and Fonts
Product: Firefox → Core
Component: Layout: Text and Fonts → General
Product: Core → DevTools

Hello Josh, we can't reproduce on 122 nor on Nightly.
Are you experiencing this with regular web pages too?
Could you try to reproduce this on a new profile?

Flags: needinfo?(josh)

Yes, in my main profile, and in 'safe mode' (holding shift on start up), this problem also happens with regular web pages. Opening mozilla.org and zooming in with scroll wheel, opening a new tab, closing the first, then reopening mozilla.org shows it as the default zoom level.

The dev tools issue also reproduces in a new profile (made a fresh one in about:profiles), but not regular web pages.

I'm not sure what to make about the difference in behaviour between my main profile and the fresh one for regular web pages.

Flags: needinfo?(josh)

If there's anything I can provide to help repro or provide insight into what's happening, please let me know! Would a screen recording help? Maybe to point out something obvious?

Thanks for the information Josh. This is outside of my domain, so let's move the bug to a component where people might know more about this

Component: General → Panning and Zooming
Product: DevTools → Core
Summary: Devtools doesn't remember zoom level → Web page doesn't remember zoom level

Perhaps you can use https://mozilla.github.io/mozregression/ to pinpoint the change that caused this to regress for you?

FWIW, I tried to reproduce and I could not.

Hmm, in the progress of doing the bisect, I discovered the behaviour between ctrl +/- is different than ctrl + scroll wheel. ctrl +/- will persist the zoom across devtool openings, whereas using the scroll wheel will not. Is this difference in behaviour expected?

I used mozregression to run a 121 build and and it functioned the same as the current 122 release - ctrl scroll zoom did not persist the zoom level across devtool openings.

(In reply to josh from comment #7)

I discovered the behaviour between ctrl +/- is different than ctrl + scroll wheel. ctrl +/- will persist the zoom across devtool openings, whereas using the scroll wheel will not. Is this difference in behaviour expected?

I don't think so.

Can you continue the bisect? Going further back if you need? Or report if you find out that the behaviour has not changed in the past few years either one is useful to know.

I can reproduce this issue on Nightly125.0a1 Windows10.
The issue is reproduced since Firefox74.

STR:

  1. Open the devtool (Ctrl+Shift+I)
  2. Holding Chtl key + scroll mouse wheel over the devtool
  3. Close the devtool
  4. Reopen the devtool (Ctrl+Shift+I)

Regression window:
This is not a regression, but just implementation bug.
GOOD build: Ctrl+scroll mouse wheel does not zoom in/out.
BAD build: Ctrl+scroll mouse wheel zooms in/out, but zoom level is not preserved.
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=b3fedfc4923c4be5724fcccb8acbe253792ec11d&tochange=fa76ecb197c0fb0c699e2173d352059970d65545

Status: UNCONFIRMED → NEW
Ever confirmed: true
Regressed by: 1516413
Summary: Web page doesn't remember zoom level → Devtool does not remember zoom level when using Ctrl+mouse wheel to zoom
Summary: Devtool does not remember zoom level when using Ctrl+mouse wheel to zoom → Devtool does not remember zoom level when using Ctrl+scroll mouse wheel to zoom

Set release status flags based on info from the regressing bug 1516413

:bradwerth, since you are the author of the regressor, bug 1516413, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

Thanks Alice. Though the result is different from what the reporter was guessing, it looks like devtools doesn't keep the zoom level in the first place we supported ctrl + mouse wheel there?

On the reporter's environment, there maybe two different issues, one is the devtools one, the other is normal contents one. I can also reproduce the devtools case on my Linux box.

Though I am going to circle back this into devtools for now, I guess this issue is lying down across Layout/DOM/Frontend (Devtools), not in APZ.

Component: Panning and Zooming → General
Product: Core → DevTools

Yah, Ctrl+wheel was not supported before bug 1516413.

Set release status flags based on info from the regressing bug 1516413

I don't think I can clarify this very much. Bug 1516413 enabled the zoomwheel behavior in Responsive Design Mode by routing mousewheel events through the front-end browser actor, eventually reaching setZoomForBrowser. The fix will be ensuring that setting the textZoom and fullZoom properties there does so in such a way that the document restore state remembers the setting.

Flags: needinfo?(bwerth)

Honza, can we please get Priority/Severity ratings applied for release management?

Flags: needinfo?(odvarko)

Adding flag to triage this at our weekly meeting.

Flags: needinfo?(odvarko)
Whiteboard: [devtools-triage]

DevTools has dedicated code to remember the zoom level when using keys at https://searchfox.org/mozilla-central/rev/9cd4ea81e27db6b767f1d9bbbcf47da238dd64fa/devtools/client/shared/zoom-keys.js

We might not catch the default zoom feature triggered with the mouse wheel (and we also could not reproduce on macos so far).
Needs investigation.

Severity: -- → S3
Priority: -- → P3
Whiteboard: [devtools-triage]

The tracers, from the browser toolbox helped me spot that the zoom changes from this code:
https://searchfox.org/mozilla-central/rev/9cd4ea81e27db6b767f1d9bbbcf47da238dd64fa/browser/base/content/browser-fullZoom.js#94-98
This special DOM event is emitted by the native code:
https://searchfox.org/mozilla-central/rev/9cd4ea81e27db6b767f1d9bbbcf47da238dd64fa/docshell/base/CanonicalBrowsingContext.cpp#1269-1278

So DevTools are resized by native code and DevTools isn't persisting this different way of zooming.

Note that this browser code tries to save zoom in a preference by document URI as a key:
https://searchfox.org/mozilla-central/rev/9cd4ea81e27db6b767f1d9bbbcf47da238dd64fa/browser/base/content/browser-fullZoom.js#580-590
But it most likely doesn't work for special devtools documents.

You need to log in before you can comment on or make changes to this bug.