Bug 891316 part.5 Use widget::MSGResult in widget::IMEHandler r=jimm

This commit is contained in:
Masayuki Nakano 2013-07-18 17:12:31 +09:00
Родитель 8eb3277b0d
Коммит d5144e0a9b
3 изменённых файлов: 8 добавлений и 8 удалений

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

@ -5,6 +5,7 @@
#include "WinIMEHandler.h"
#include "nsIMM32Handler.h"
#include "nsWindowDefs.h"
#ifdef NS_ENABLE_TSF
#include "nsTextStore.h"
@ -99,13 +100,13 @@ IMEHandler::ProcessRawKeyMessage(const MSG& aMsg)
bool
IMEHandler::ProcessMessage(nsWindow* aWindow, UINT aMessage,
WPARAM& aWParam, LPARAM& aLParam,
LRESULT* aRetValue, bool& aEatMessage)
MSGResult& aResult)
{
#ifdef NS_ENABLE_TSF
if (IsTSFAvailable()) {
if (aMessage == WM_USER_TSF_TEXTCHANGE) {
nsTextStore::OnTextChangeMsg();
aEatMessage = true;
aResult.mConsumed = true;
return true;
}
return false;
@ -113,7 +114,7 @@ IMEHandler::ProcessMessage(nsWindow* aWindow, UINT aMessage,
#endif // #ifdef NS_ENABLE_TSF
return nsIMM32Handler::ProcessMessage(aWindow, aMessage, aWParam, aLParam,
aRetValue, aEatMessage);
&aResult.mResult, aResult.mConsumed);
}
// static

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

@ -20,6 +20,8 @@ class nsWindow;
namespace mozilla {
namespace widget {
struct MSGResult;
/**
* IMEHandler class is a mediator class. On Windows, there are two IME API
* sets: One is IMM which is legacy API set. The other is TSF which is modern
@ -47,12 +49,10 @@ public:
/**
* When the message is not needed to handle anymore by the caller, this
* returns true. Otherwise, false.
* Additionally, if aEatMessage is true, the caller shouldn't call next
* wndproc anymore.
*/
static bool ProcessMessage(nsWindow* aWindow, UINT aMessage,
WPARAM& aWParam, LPARAM& aLParam,
LRESULT* aRetValue, bool& aEatMessage);
MSGResult& aResult);
/**
* When there is a composition, returns true. Otherwise, false.

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

@ -4433,8 +4433,7 @@ nsWindow::ExternalHandlerProcessMessage(UINT aMessage,
return true;
}
if (IMEHandler::ProcessMessage(this, aMessage, aWParam, aLParam,
&aResult.mResult, aResult.mConsumed)) {
if (IMEHandler::ProcessMessage(this, aMessage, aWParam, aLParam, aResult)) {
return true;
}