Bug 1385666, ensure layout is flushed when editor gets focus, r=masayuki

--HG--
extra : rebase_source : 2dd86e64001fa48469a93849516e26c41c9163e4
This commit is contained in:
Olli Pettay 2017-08-03 19:36:58 +03:00
Родитель ae1bd3ebef
Коммит f785d80029
4 изменённых файлов: 7 добавлений и 7 удалений

Просмотреть файл

@ -490,7 +490,7 @@ void
EventStateManager::TryToFlushPendingNotificationsToIME()
{
if (mIMEContentObserver) {
mIMEContentObserver->TryToFlushPendingNotifications();
mIMEContentObserver->TryToFlushPendingNotifications(true);
}
}

Просмотреть файл

@ -1739,10 +1739,10 @@ IMEContentObserver::FlushMergeableNotifications()
}
void
IMEContentObserver::TryToFlushPendingNotifications()
IMEContentObserver::TryToFlushPendingNotifications(bool aAllowAsync)
{
if (!mQueuedSender || mSendingNotification != NOTIFY_IME_OF_NOTHING ||
XRE_IsContentProcess()) {
(XRE_IsContentProcess() && aAllowAsync)) {
return;
}

Просмотреть файл

@ -155,9 +155,9 @@ public:
* TryToFlushPendingNotifications() should be called when pending events
* should be flushed. This tries to run the queued IMENotificationSender.
* Doesn't do anything in child processes where flushing happens
* asynchronously.
* asynchronously unless aAllowAsync is false.
*/
void TryToFlushPendingNotifications();
void TryToFlushPendingNotifications(bool aAllowAsync);
/**
* MaybeNotifyCompositionEventHandled() posts composition event handled

Просмотреть файл

@ -652,7 +652,7 @@ IMEStateManager::OnChangeFocusInternal(nsPresContext* aPresContext,
(" OnChangeFocusInternal(), an "
"IMEContentObserver instance is created for plugin and trying to "
"flush its pending notifications..."));
sActiveIMEContentObserver->TryToFlushPendingNotifications();
sActiveIMEContentObserver->TryToFlushPendingNotifications(false);
}
}
@ -827,7 +827,7 @@ IMEStateManager::OnFocusInEditor(nsPresContext* aPresContext,
MOZ_LOG(sISMLog, LogLevel::Debug,
(" OnFocusInEditor(), new IMEContentObserver is "
"created, trying to flush pending notifications..."));
sActiveIMEContentObserver->TryToFlushPendingNotifications();
sActiveIMEContentObserver->TryToFlushPendingNotifications(false);
}
}