зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1561227 Part 2: Define and fire an internal event when BrowserChild has finished resizing. r=botond,emilio
This event is useful for tests that resize the RDM pane and need to know when all resolution adjusting effects are complete. Differential Revision: https://phabricator.services.mozilla.com/D47364 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
bd10652c59
Коммит
5007e7e93c
|
@ -16,6 +16,7 @@
|
|||
#include "BrowserParent.h"
|
||||
#include "js/JSON.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/AsyncEventDispatcher.h"
|
||||
#include "mozilla/BrowserElementParent.h"
|
||||
#include "mozilla/ClearOnShutdown.h"
|
||||
#include "mozilla/EventListenerManager.h"
|
||||
|
@ -1262,6 +1263,18 @@ mozilla::ipc::IPCResult BrowserChild::RecvUpdateDimensions(
|
|||
screenRect.y + mClientOffset.y + mChromeOffset.y,
|
||||
screenSize.width, screenSize.height, true);
|
||||
|
||||
// For our devtools Responsive Design Mode, we need to send a special
|
||||
// event to indicate that we've finished processing a frame size change.
|
||||
// This is used by RDM to respond correctly to changes to full zoom,
|
||||
// which also change the window size.
|
||||
RefPtr<Document> doc = GetTopLevelDocument();
|
||||
if (doc && doc->InRDMPane()) {
|
||||
RefPtr<AsyncEventDispatcher> dispatcher = new AsyncEventDispatcher(
|
||||
doc, NS_LITERAL_STRING("mozupdatedremoteframedimensions"),
|
||||
CanBubble::eYes, ChromeOnlyDispatch::eYes);
|
||||
dispatcher->PostDOMEvent();
|
||||
}
|
||||
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче