Loading
Bug 1783542 - Disable SurfaceControl only when magnifier is active. r=geckoview-reviewers,owlish
Rather than when a selection is active. Originally we chose to disable SurfaceControl whenever a selection was active, as it is then likely the magnifiers may be shown soon, but it reduced the amount of times we switch between SurfaceControl being enabled and disabled when the selection is frequently modified. However, that has 2 issues: First, the magnifier can be shown when dragging a single caret in a form, rather than just when a selection is active. With the original fix, the magnifier did not work in this case. And second, we encountered a bug when the widget is resized at the same time as SurfaceControl is toggled, where we end up rendering the page at the wrong size. This patch therefore makes us only disable SurfaceControl when the magnifier is actually being shown. This may cause us to enable or disable it more frequently, but that doesn't appear to be a big deal. Differential Revision: https://phabricator.services.mozilla.com/D154086