зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1419285 - Part 2. IME message should post to correct widget. r=masayuki
After landing bug 1353060, TabParent::GetWidget()'s behaviour is changed. We should use GetDocWidget for IME. MozReview-Commit-ID: 5DpYjzQDHlD --HG-- extra : rebase_source : f1b827a0d6fe88549ead6a7a68b8bd2fbcaf5487
This commit is contained in:
Родитель
74fb3d9e5f
Коммит
f208c7a958
|
@ -1901,7 +1901,7 @@ TabParent::RecvNotifyIMEFocus(const ContentCache& aContentCache,
|
|||
return IPC_OK();
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIWidget> widget = GetWidget();
|
||||
nsCOMPtr<nsIWidget> widget = GetDocWidget();
|
||||
if (!widget) {
|
||||
aResolve(IMENotificationRequests());
|
||||
return IPC_OK();
|
||||
|
@ -1923,7 +1923,7 @@ mozilla::ipc::IPCResult
|
|||
TabParent::RecvNotifyIMETextChange(const ContentCache& aContentCache,
|
||||
const IMENotification& aIMENotification)
|
||||
{
|
||||
nsCOMPtr<nsIWidget> widget = GetWidget();
|
||||
nsCOMPtr<nsIWidget> widget = GetDocWidget();
|
||||
if (!widget || !IMEStateManager::DoesTabParentHaveIMEFocus(this)) {
|
||||
return IPC_OK();
|
||||
}
|
||||
|
@ -1937,7 +1937,7 @@ TabParent::RecvNotifyIMECompositionUpdate(
|
|||
const ContentCache& aContentCache,
|
||||
const IMENotification& aIMENotification)
|
||||
{
|
||||
nsCOMPtr<nsIWidget> widget = GetWidget();
|
||||
nsCOMPtr<nsIWidget> widget = GetDocWidget();
|
||||
if (!widget || !IMEStateManager::DoesTabParentHaveIMEFocus(this)) {
|
||||
return IPC_OK();
|
||||
}
|
||||
|
@ -1950,7 +1950,7 @@ mozilla::ipc::IPCResult
|
|||
TabParent::RecvNotifyIMESelection(const ContentCache& aContentCache,
|
||||
const IMENotification& aIMENotification)
|
||||
{
|
||||
nsCOMPtr<nsIWidget> widget = GetWidget();
|
||||
nsCOMPtr<nsIWidget> widget = GetDocWidget();
|
||||
if (!widget || !IMEStateManager::DoesTabParentHaveIMEFocus(this)) {
|
||||
return IPC_OK();
|
||||
}
|
||||
|
@ -1962,7 +1962,7 @@ TabParent::RecvNotifyIMESelection(const ContentCache& aContentCache,
|
|||
mozilla::ipc::IPCResult
|
||||
TabParent::RecvUpdateContentCache(const ContentCache& aContentCache)
|
||||
{
|
||||
nsCOMPtr<nsIWidget> widget = GetWidget();
|
||||
nsCOMPtr<nsIWidget> widget = GetDocWidget();
|
||||
if (!widget || !IMEStateManager::DoesTabParentHaveIMEFocus(this)) {
|
||||
return IPC_OK();
|
||||
}
|
||||
|
@ -1977,7 +1977,7 @@ TabParent::RecvNotifyIMEMouseButtonEvent(
|
|||
bool* aConsumedByIME)
|
||||
{
|
||||
|
||||
nsCOMPtr<nsIWidget> widget = GetWidget();
|
||||
nsCOMPtr<nsIWidget> widget = GetDocWidget();
|
||||
if (!widget || !IMEStateManager::DoesTabParentHaveIMEFocus(this)) {
|
||||
*aConsumedByIME = false;
|
||||
return IPC_OK();
|
||||
|
@ -1991,7 +1991,7 @@ mozilla::ipc::IPCResult
|
|||
TabParent::RecvNotifyIMEPositionChange(const ContentCache& aContentCache,
|
||||
const IMENotification& aIMENotification)
|
||||
{
|
||||
nsCOMPtr<nsIWidget> widget = GetWidget();
|
||||
nsCOMPtr<nsIWidget> widget = GetDocWidget();
|
||||
if (!widget || !IMEStateManager::DoesTabParentHaveIMEFocus(this)) {
|
||||
return IPC_OK();
|
||||
}
|
||||
|
@ -2007,7 +2007,7 @@ TabParent::RecvOnEventNeedingAckHandled(const EventMessage& aMessage)
|
|||
// WidgetSelectionEvent.
|
||||
// FYI: Don't check if widget is nullptr here because it's more important to
|
||||
// notify mContentCahce of this than handling something in it.
|
||||
nsCOMPtr<nsIWidget> widget = GetWidget();
|
||||
nsCOMPtr<nsIWidget> widget = GetDocWidget();
|
||||
|
||||
// While calling OnEventNeedingAckHandled(), TabParent *might* be destroyed
|
||||
// since it may send notifications to IME.
|
||||
|
|
Загрузка…
Ссылка в новой задаче