(In reply to Morgan Reschenberg [:morgan] from comment #6) > (In reply to :Gijs (he/him) from comment #4) > > Fundamentally, to fix this I think we're going to want to avoid setting the zoom level on the browser when sitespecific zoom is turned on. However, we'll still need to set it when the browser is created to ensure that it gets the proper zoom level. > > So, we'd want to avoid setting the zoom level when site specific is true because if a user switches it to false, we'd still pick up the values stored in CPS from when site specific was on? I'm a little confused at the difference between CPS values and browser/docshell values. Sorry, I think I just got my terminology mixed up and said on when I meant off. I think we want to avoid setting the zoom level on the browser **when origin-specific zoom is off** (ie when every tab gets its own zoom and it stays the same across navigations) -- except when the browser is created (because it needs to get the default zoom then). > (also: why does the browser start at 1? I guess it doesn't matter if it gets adjusted from preferences, but... that's odd to me?) This is because this whole thing is implemented only in frontend code, and there was at some point some resistance to moving the entire implementation to docshell / gecko code. docshell has no concept of preferences for zoom levels, it's just dumb and always starts at 1, that's it. If consumers want something, they get to deal with it themselves. This is also an issue in terms of e.g. bug 1548313 - given that CPS calls are asynchronous, if we're navigating from one domain to another, and we're responding to this async in the frontend, there's no way to guarantee we don't accidentally zoom to the wrong level.
Bug 1617544 Comment 7 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
(In reply to Morgan Reschenberg [:morgan] from comment #6) > (In reply to :Gijs (he/him) from comment #4) > > Fundamentally, to fix this I think we're going to want to avoid setting the zoom level on the browser when sitespecific zoom is turned on. However, we'll still need to set it when the browser is created to ensure that it gets the proper zoom level. > > So, we'd want to avoid setting the zoom level when site specific is true because if a user switches it to false, we'd still pick up the values stored in CPS from when site specific was on? I'm a little confused at the difference between CPS values and browser/docshell values. Sorry, I think I just got my terminology mixed up and said on when I meant off. I think we want to avoid setting the zoom level on the browser **when origin-specific zoom is off** (ie when every tab gets its own zoom and it stays the same across navigations) -- except when the browser is created (because it needs to get the default zoom then). > (also: why does the browser start at 1? I guess it doesn't matter if it gets adjusted from preferences, but... that's odd to me?) This is because this whole thing is implemented only in frontend code, and there was at some point some resistance to moving the entire implementation to docshell / gecko code. docshell has no concept of preferences for zoom levels, it's just dumb and always starts at 1, that's it. If consumers want something, they get to deal with it themselves. This is also an issue in terms of e.g. bug 1548313 - given that CPS calls are asynchronous, if we're navigating from one domain to another, and we're responding to this async in the frontend, there's no way to guarantee we don't accidentally paint at the "old" level.