зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1561227 Part 4: Make RDM force the UI ZoomChild Actor to cache its zoom level. r=mconley,gl
The ZoomChild actor normally caches its full zoom level only when it is changed, then emits a FullZoomChange event. That event causes problems with Responsive Design Mode, which receives the event after other similar events that carry the full zoom level of the RDM pane content. The RDM UI pane itself always stays at 1.0 zoom. This change makes the ZoomChild cache its initial fullZoom level as soon as possible, which prevents the first RDM zoom change from sending the unwanted event. Differential Revision: https://phabricator.services.mozilla.com/D49793 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
ee1bf29b7a
Коммит
0bfdbb753a
|
@ -208,6 +208,13 @@ class ResponsiveUI {
|
|||
await this.restoreState();
|
||||
|
||||
if (!this.isBrowserUIEnabled) {
|
||||
// Force the newly created Zoom actor to cache its 1.0 zoom level. This
|
||||
// prevents it from sending out FullZoomChange events when the content
|
||||
// full zoom level is changed the first time.
|
||||
const bc = this.toolWindow.docShell.browsingContext;
|
||||
const zoomActor = bc.currentWindowGlobal.getActor("Zoom");
|
||||
zoomActor.sendAsyncMessage("FullZoom", { value: 1.0 });
|
||||
|
||||
// Re-apply our cached zoom levels. Other Zoom UI update events have finished
|
||||
// by now.
|
||||
rdmContent.fullZoom = fullZoom;
|
||||
|
|
Загрузка…
Ссылка в новой задаче