зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1561227 Part 1: Make nsDocumentViewer send a new event before setting full zoom levels on the pres contexts. r=emilio
The PreFullZoomChange event gives listeners an opportunity to capture state before the viewport full zoom changes. Responsive Design Mode uses this to save and later restore the resolution of the RDM pane. Differential Revision: https://phabricator.services.mozilla.com/D48621 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
11341ad999
Коммит
5338c8acbb
|
@ -2826,6 +2826,14 @@ nsDocumentViewer::SetFullZoom(float aFullZoom) {
|
|||
}
|
||||
|
||||
bool fullZoomChange = (mPageZoom != aFullZoom);
|
||||
|
||||
// Dispatch PreFullZoomChange event only if fullzoom value really has changed.
|
||||
if (fullZoomChange) {
|
||||
nsContentUtils::DispatchChromeEvent(mDocument, ToSupports(mDocument),
|
||||
NS_LITERAL_STRING("PreFullZoomChange"),
|
||||
CanBubble::eYes, Cancelable::eYes);
|
||||
}
|
||||
|
||||
mPageZoom = aFullZoom;
|
||||
|
||||
PropagateToPresContextsHelper(
|
||||
|
|
Загрузка…
Ссылка в новой задаче