Bug 1176954 part.8 ContentCacheInParent::OnEventNeedingAckReceived() should log the event message r=smaug

This commit is contained in:
Masayuki Nakano 2015-07-11 10:53:56 +09:00
parent f63fe84824
commit 21b84a5198
6 changed files with 14 additions and 11 deletions

View File

@ -269,8 +269,10 @@ parent:
* OnEventNeedingAckReceived() is called when a child process dispatches a
* composition event or a selection event which is sent from the parent
* process.
*
* message The message value of the received event.
*/
prio(urgent) async OnEventNeedingAckReceived();
prio(urgent) async OnEventNeedingAckReceived(uint32_t message);
/**
* Tells chrome to start plugin IME. If this results in a string getting

View File

@ -2659,7 +2659,7 @@ TabChild::RecvKeyEvent(const nsString& aType,
bool
TabChild::RecvCompositionEvent(const WidgetCompositionEvent& event)
{
unused << SendOnEventNeedingAckReceived();
unused << SendOnEventNeedingAckReceived(event.message);
WidgetCompositionEvent localEvent(event);
localEvent.widget = mPuppetWidget;
APZCCallbackHelper::DispatchWidgetEvent(localEvent);
@ -2669,7 +2669,7 @@ TabChild::RecvCompositionEvent(const WidgetCompositionEvent& event)
bool
TabChild::RecvSelectionEvent(const WidgetSelectionEvent& event)
{
unused << SendOnEventNeedingAckReceived();
unused << SendOnEventNeedingAckReceived(event.message);
WidgetSelectionEvent localEvent(event);
localEvent.widget = mPuppetWidget;
APZCCallbackHelper::DispatchWidgetEvent(localEvent);

View File

@ -2086,7 +2086,7 @@ TabParent::RecvNotifyIMEPositionChange(const ContentCache& aContentCache)
}
bool
TabParent::RecvOnEventNeedingAckReceived()
TabParent::RecvOnEventNeedingAckReceived(const uint32_t& aMessage)
{
// This is called when the child process receives WidgetCompositionEvent or
// WidgetSelectionEvent.
@ -2098,7 +2098,7 @@ TabParent::RecvOnEventNeedingAckReceived()
// While calling OnEventNeedingAckReceived(), TabParent *might* be destroyed
// since it may send notifications to IME.
nsRefPtr<TabParent> kungFuDeathGrip(this);
mContentCache.OnEventNeedingAckReceived(widget);
mContentCache.OnEventNeedingAckReceived(widget, aMessage);
return true;
}

View File

@ -177,7 +177,7 @@ public:
virtual bool RecvNotifyIMEMouseButtonEvent(const widget::IMENotification& aEventMessage,
bool* aConsumedByIME) override;
virtual bool RecvNotifyIMEPositionChange(const ContentCache& aContentCache) override;
virtual bool RecvOnEventNeedingAckReceived() override;
virtual bool RecvOnEventNeedingAckReceived(const uint32_t& aMessage) override;
virtual bool RecvEndIMEComposition(const bool& aCancel,
bool* aNoCompositionEvent,
nsString* aComposition) override;

View File

@ -914,15 +914,16 @@ ContentCacheInParent::OnSelectionEvent(
}
void
ContentCacheInParent::OnEventNeedingAckReceived(nsIWidget* aWidget)
ContentCacheInParent::OnEventNeedingAckReceived(nsIWidget* aWidget,
uint32_t aMessage)
{
// This is called when the child process receives WidgetCompositionEvent or
// WidgetSelectionEvent.
MOZ_LOG(sContentCacheLog, LogLevel::Info,
("ContentCacheInParent: 0x%p OnEventNeedingAckReceived(aWidget=0x%p), "
"mPendingEventsNeedingAck=%u",
this, aWidget, mPendingEventsNeedingAck));
("ContentCacheInParent: 0x%p OnEventNeedingAckReceived(aWidget=0x%p, "
"aMessage=%s), mPendingEventsNeedingAck=%u",
this, aWidget, GetEventMessageName(aMessage), mPendingEventsNeedingAck));
MOZ_RELEASE_ASSERT(mPendingEventsNeedingAck > 0);
if (--mPendingEventsNeedingAck) {

View File

@ -322,7 +322,7 @@ public:
* TabParent or aWidget. Therefore, the caller must not destroy
* this instance during a call of this method.
*/
void OnEventNeedingAckReceived(nsIWidget* aWidget);
void OnEventNeedingAckReceived(nsIWidget* aWidget, uint32_t aMessage);
/**
* RequestToCommitComposition() requests to commit or cancel composition to