Bug 1325234 (part 1) - Streamline nsIWidget::NotifyIME. r=jimm.

This patch changes it from |NS_IMETHOD| to |virtual nsresult|. The callsites
were a mix of checked and unchecked so using |MOZ_MUST_USE| didn't feel
appropriate.

--HG--
extra : rebase_source : 471ca43dcd565ddd1761d01df344c30e4e04a9ec
This commit is contained in:
Nicholas Nethercote 2016-12-20 09:55:30 +11:00
parent f46d514349
commit a8699ee61d
5 changed files with 7 additions and 5 deletions

View File

@ -2517,7 +2517,7 @@ IMEInputHandler::GetCurrentTSMDocumentID()
*
******************************************************************************/
NS_IMETHODIMP
nsresult
IMEInputHandler::NotifyIME(TextEventDispatcher* aTextEventDispatcher,
const IMENotification& aNotification)
{

View File

@ -1758,7 +1758,7 @@ nsBaseWidget::NotifyUIStateChanged(UIStateChangeType aShowAccelerators,
}
}
NS_IMETHODIMP
nsresult
nsBaseWidget::NotifyIME(const IMENotification& aIMENotification)
{
switch (aIMENotification.mMessage) {

View File

@ -263,7 +263,8 @@ public:
{ return NS_ERROR_NOT_IMPLEMENTED; }
virtual nsresult ActivateNativeMenuItemAt(const nsAString& indexString) override { return NS_ERROR_NOT_IMPLEMENTED; }
virtual nsresult ForceUpdateNativeMenuAt(const nsAString& indexString) override { return NS_ERROR_NOT_IMPLEMENTED; }
NS_IMETHOD NotifyIME(const IMENotification& aIMENotification) override final;
virtual nsresult NotifyIME(const IMENotification& aIMENotification)
override final;
virtual MOZ_MUST_USE nsresult
StartPluginIME(const mozilla::WidgetKeyboardEvent& aKeyboardEvent,
int32_t aPanelX, int32_t aPanelY,

View File

@ -1738,7 +1738,7 @@ public:
* @return If the notification is mouse button event and it's consumed by
* IME, this returns NS_SUCCESS_EVENT_CONSUMED.
*/
NS_IMETHOD NotifyIME(const IMENotification& aIMENotification) = 0;
virtual nsresult NotifyIME(const IMENotification& aIMENotification) = 0;
/**
* Start plugin IME. If this results in a string getting committed, the

View File

@ -84,7 +84,8 @@ public:
bool HasModalDescendents() { return false; }
//NS_IMETHOD NotifyIME(const IMENotification& aIMENotification) override;
//virtual nsresult
//NotifyIME(const IMENotification& aIMENotification) override;
NS_IMETHOD_(void) SetInputContext(
const InputContext& aContext,
const InputContextAction& aAction);