Bug 558976 part.6 Rename nsIWidget::OnIMETextChange() to nsIWidget::NotifyIMEOfTextChange() r=roc, sr=roc

This commit is contained in:
Masayuki Nakano 2013-03-06 15:14:34 +09:00
parent 06bd46658d
commit e71fc2d290
12 changed files with 37 additions and 27 deletions

View File

@ -874,7 +874,7 @@ public:
NS_IMETHOD Run() {
if (mDispatcher->mWidget) {
mDispatcher->mWidget->OnIMETextChange(mStart, mOldEnd, mNewEnd);
mDispatcher->mWidget->NotifyIMEOfTextChange(mStart, mOldEnd, mNewEnd);
}
return NS_OK;
}

View File

@ -741,7 +741,7 @@ TabParent::RecvNotifyIMETextChange(const uint32_t& aStart,
if (!widget)
return true;
widget->OnIMETextChange(aStart, aEnd, aNewEnd);
widget->NotifyIMEOfTextChange(aStart, aEnd, aNewEnd);
return true;
}

View File

@ -1718,11 +1718,11 @@ nsWindow::OnIMEEvent(AndroidGeckoEvent *ae)
// on Gecko. Now we can notify Java of the newly focused content
mIMETextChanges.Clear();
mIMESelectionChanged = false;
// OnIMETextChange also notifies selection
// NotifyIMEOfTextChange also notifies selection
// Use 'INT32_MAX / 2' here because subsequent text changes might
// combine with this text change, and overflow might occur if
// we just use INT32_MAX
OnIMETextChange(0, INT32_MAX / 2, INT32_MAX / 2);
NotifyIMEOfTextChange(0, INT32_MAX / 2, INT32_MAX / 2);
FlushIMEChanges();
}
AndroidBridge::NotifyIME(AndroidBridge::NOTIFY_IME_REPLY_EVENT, 0);
@ -2126,12 +2126,14 @@ nsWindow::FlushIMEChanges()
}
NS_IMETHODIMP
nsWindow::OnIMETextChange(uint32_t aStart, uint32_t aOldEnd, uint32_t aNewEnd)
nsWindow::NotifyIMEOfTextChange(uint32_t aStart,
uint32_t aOldEnd,
uint32_t aNewEnd)
{
if (mIMEMaskTextUpdate)
return NS_OK;
ALOGIME("IME: OnIMETextChange: s=%d, oe=%d, ne=%d",
ALOGIME("IME: NotifyIMEOfTextChange: s=%d, oe=%d, ne=%d",
aStart, aOldEnd, aNewEnd);
/* Make sure Java's selection is up-to-date */

View File

@ -129,7 +129,9 @@ public:
const InputContextAction& aAction);
NS_IMETHOD_(InputContext) GetInputContext();
NS_IMETHOD OnIMETextChange(uint32_t aStart, uint32_t aOldEnd, uint32_t aNewEnd);
NS_IMETHOD NotifyIMEOfTextChange(uint32_t aStart,
uint32_t aOldEnd,
uint32_t aNewEnd) MOZ_OVERRIDE;
virtual nsIMEUpdatePreference GetIMEUpdatePreference();
LayerManager* GetLayerManager (PLayersChild* aShadowManager = nullptr,

View File

@ -92,8 +92,8 @@ typedef nsEventStatus (* EVENT_CALLBACK)(nsGUIEvent *event);
#endif
#define NS_IWIDGET_IID \
{ 0xAD5FEF46, 0x7200, 0x417C, \
{ 0xA9, 0x1C, 0xAB, 0x30, 0x1C, 0x86, 0xE4, 0x6F } }
{ 0x48568C1E, 0xAF56, 0x4F73, \
{ 0x94, 0x6D, 0xAA, 0x43, 0xD8, 0x96, 0x78, 0x6B } }
/*
* Window shadow styles
@ -188,12 +188,12 @@ enum nsTopLevelWidgetZPlacement { // for PlaceBehind()
* Preference for receiving IME updates
*
* If mWantUpdates is true, nsTextStateManager will observe text change and
* selection change and call nsIWidget::OnIMETextChange() and
* selection change and call nsIWidget::NotifyIMEOfTextChange() and
* nsIWidget::NotifyIME(NOTIFY_IME_OF_SELECTION_CHANGE). The observing cost is
* very expensive.
* If the IME implementation on a particular platform doesn't care about
* OnIMETextChange and NotifyIME(NOTIFY_IME_OF_SELECTION_CHANGE), they should
* set mWantUpdates to false to avoid the cost.
* NotifyIMEOfTextChange and NotifyIME(NOTIFY_IME_OF_SELECTION_CHANGE), they
* should set mWantUpdates to false to avoid the cost.
*
* If mWantHints is true, PuppetWidget will forward the content of text fields
* to the chrome process to be cached. This way we return the cached content
@ -1526,7 +1526,7 @@ class nsIWidget : public nsISupports {
* aOldEnd is the ending offset of the change
* aNewEnd is the caret offset after the change
*/
NS_IMETHOD OnIMETextChange(uint32_t aStart,
NS_IMETHOD NotifyIMEOfTextChange(uint32_t aStart,
uint32_t aOldEnd,
uint32_t aNewEnd) = 0;

View File

@ -7399,7 +7399,7 @@ nsWindow::GetToggledKeyState(uint32_t aKeyCode, bool* aLEDState)
}
NS_IMETHODIMP
nsWindow::OnIMETextChange(uint32_t aStart,
nsWindow::NotifyIMEOfTextChange(uint32_t aStart,
uint32_t aOldEnd,
uint32_t aNewEnd)
{

View File

@ -175,7 +175,9 @@ public:
virtual nsTransparencyMode GetTransparencyMode();
virtual void UpdateOpaqueRegion(const nsIntRegion& aOpaqueRegion);
#endif // MOZ_XUL
NS_IMETHOD OnIMETextChange(uint32_t aStart, uint32_t aOldEnd, uint32_t aNewEnd);
NS_IMETHOD NotifyIMEOfTextChange(uint32_t aStart,
uint32_t aOldEnd,
uint32_t aNewEnd) MOZ_OVERRIDE;
virtual nsIMEUpdatePreference GetIMEUpdatePreference();
NS_IMETHOD GetNonClientMargins(nsIntMargin &margins);
NS_IMETHOD SetNonClientMargins(nsIntMargin &margins);

View File

@ -1183,7 +1183,7 @@ MetroWidget::GetToggledKeyState(uint32_t aKeyCode, bool* aLEDState)
}
NS_IMETHODIMP
MetroWidget::OnIMETextChange(uint32_t aStart,
MetroWidget::NotifyIMEOfTextChange(uint32_t aStart,
uint32_t aOldEnd,
uint32_t aNewEnd)
{

View File

@ -128,7 +128,9 @@ public:
NS_IMETHOD_(nsIWidget::InputContext) GetInputContext();
NS_IMETHOD NotifyIME(NotificationToIME aNotification) MOZ_OVERRIDE;
NS_IMETHOD GetToggledKeyState(uint32_t aKeyCode, bool* aLEDState);
NS_IMETHOD OnIMETextChange(uint32_t aStart, uint32_t aOldEnd, uint32_t aNewEnd);
NS_IMETHOD NotifyIMEOfTextChange(uint32_t aStart,
uint32_t aOldEnd,
uint32_t aNewEnd) MOZ_OVERRIDE;
// FrameworkView helpers
void SizeModeChanged();

View File

@ -475,7 +475,9 @@ PuppetWidget::GetIMEUpdatePreference()
}
NS_IMETHODIMP
PuppetWidget::OnIMETextChange(uint32_t aStart, uint32_t aEnd, uint32_t aNewEnd)
PuppetWidget::NotifyIMEOfTextChange(uint32_t aStart,
uint32_t aEnd,
uint32_t aNewEnd)
{
#ifndef MOZ_CROSS_PROCESS_IME
return NS_OK;

View File

@ -153,8 +153,8 @@ public:
NS_IMETHOD_(void) SetInputContext(const InputContext& aContext,
const InputContextAction& aAction);
NS_IMETHOD_(InputContext) GetInputContext();
NS_IMETHOD OnIMETextChange(uint32_t aOffset, uint32_t aEnd,
uint32_t aNewEnd);
NS_IMETHOD NotifyIMEOfTextChange(uint32_t aOffset, uint32_t aEnd,
uint32_t aNewEnd) MOZ_OVERRIDE;
virtual nsIMEUpdatePreference GetIMEUpdatePreference();
NS_IMETHOD SetCursor(nsCursor aCursor);

View File

@ -145,7 +145,7 @@ public:
virtual bool GetLayersAcceleration() { return mUseLayersAcceleration; }
virtual bool ComputeShouldAccelerate(bool aDefault);
NS_IMETHOD GetToggledKeyState(uint32_t aKeyCode, bool* aLEDState) { return NS_ERROR_NOT_IMPLEMENTED; }
NS_IMETHOD OnIMETextChange(uint32_t aStart, uint32_t aOldEnd, uint32_t aNewEnd) { return NS_ERROR_NOT_IMPLEMENTED; }
NS_IMETHOD NotifyIMEOfTextChange(uint32_t aStart, uint32_t aOldEnd, uint32_t aNewEnd) MOZ_OVERRIDE { return NS_ERROR_NOT_IMPLEMENTED; }
virtual nsIMEUpdatePreference GetIMEUpdatePreference() { return nsIMEUpdatePreference(false, false); }
NS_IMETHOD OnDefaultButtonLoaded(const nsIntRect &aButtonRect) { return NS_ERROR_NOT_IMPLEMENTED; }
NS_IMETHOD OverrideSystemMouseScrollSpeed(int32_t aOriginalDelta, bool aIsHorizontal, int32_t &aOverriddenDelta);