Bug 1937785 - Remove nsPresContext::mKeyboardHeight and introduce MobileViewportManager::mPendingKeyboardHeight. r=botond
There's a race condition where the keyboard height change notification has arrived but nsDocumentViewer size change hasn't yet arrived. MobileViewportManager::mPendingKeyboardHeight is introduced to fix the race. Differential Revision: https://phabricator.services.mozilla.com/D234262
This commit is contained in:
@@ -11418,7 +11418,11 @@ void PresShell::MaybeRecreateMobileViewportManager(bool aAfterInitialization) {
|
||||
("Created MVM %p (type %d) for URI %s", mMobileViewportManager.get(),
|
||||
(int)*mvmType, uri ? uri->GetSpecOrDefault().get() : "(null)"));
|
||||
}
|
||||
if (BrowserChild* browserChild = BrowserChild::GetFrom(this)) {
|
||||
mMobileViewportManager->UpdateKeyboardHeight(browserChild->GetKeyboardHeight());
|
||||
}
|
||||
}
|
||||
|
||||
if (aAfterInitialization) {
|
||||
// Setting the initial viewport will trigger a reflow.
|
||||
if (mMobileViewportManager) {
|
||||
|
||||
Reference in New Issue
Block a user