mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:18:48 +00:00
import changes from `dev' branch of rmottola/Arctic-Fox:
- Bug 1176954 part.5 IMENotification::TextChangeDataBase should have a state which indicates that it's not initialized r=smaug (5b79eff32) - Bug 1176954 part.6 IMEContentObserver should use IMENotification::TextChangeData r=smaug (f5ba0bc3e) - Bug 1176954 part.7 IMENotification::TextChangeData should have a method to merge with another instance and IMENotification::MergeWith() should use it r=smaug (6978581c7) - Bug 1151186 part.1 Don't reset IME enabled state after focus is changed by JS during setting focus r=enndeakin (37d70fa0b) - Bug 1151186 part.2 nsHTMLEditor should accept composition events even while there is no active editing host but it has composition r=ehsan (9edcefa44) - Bug 1053053 part.1 Active TabParent should be managed by IMEStateManager r=smaug (65e2222dd) - Bug 1053053 part.2 Notify child process's IMEStateManager of that it should stop manageing IME state r=smaug (acab307e3) - Bug 1053053 part.3 Notify child process's IMEStateManager of menu key event listener being installed r=smaug (8c3dd208f) - Bug 1053053 part.4 Make IMEStateManager::sContent StaticRefPtr r=smaug (481701599) - Bug 1053053 part.5 Make IMEStateManager::sActiveIMEContentObserver StaticRefPtr r=smaug (880a49eb4) - Bug 1153518, allow drops on editors when the source is a remote browser, r=ehsan (1cc64b832) - Bug 1179122 TextComposition should manage a composition which is even in a child process r=smaug (b2166e8f6) - Bug 1176955 part.1 TextComposition should guarantee that WidgetSelectionEvent should be handled by same content as the target of composition events when there is a composition r=smaug (d4c6847c8) - Bug 1176955 part.2 NOTIFY_IME_OF_SELECTION should have a flag which indicates if it's caused by a selection event r=smaug (902137ddd) - Bug 1176955 part.3 nsTextStore shouldn't notify TSF of selection change which is caused by selection set event r=m_kato (398229e93) - Bug 1184004 part.1 Give a name to each struct in IMENotification r=smaug (851e43638) - Bug 1184004 part.2 Make all structs in IMENotification IPC-aware r=smaug (158e073a3) - Bug 1176954 part.8 ContentCacheInParent::OnEventNeedingAckReceived() should log the event message r=smaug (94a53ba41) - Bug 1184004 part.3 IPC methods to notify IME should use IMENotification for its argument r=smaug (71c8907c3)
This commit is contained in:
+11
-16
@@ -136,8 +136,8 @@ PuppetWidget::InitIMEState()
|
||||
MOZ_ASSERT(mTabChild);
|
||||
if (mNeedIMEStateInit) {
|
||||
mContentCache.Clear();
|
||||
mTabChild->SendNotifyIMEFocus(false, mContentCache,
|
||||
&mIMEPreferenceOfParent);
|
||||
mTabChild->SendUpdateContentCache(mContentCache);
|
||||
mIMEPreferenceOfParent = nsIMEUpdatePreference();
|
||||
mNeedIMEStateInit = false;
|
||||
}
|
||||
}
|
||||
@@ -601,7 +601,7 @@ PuppetWidget::NotifyIMEInternal(const IMENotification& aIMENotification)
|
||||
case NOTIFY_IME_OF_TEXT_CHANGE:
|
||||
return NotifyIMEOfTextChange(aIMENotification);
|
||||
case NOTIFY_IME_OF_COMPOSITION_UPDATE:
|
||||
return NotifyIMEOfUpdateComposition(aIMENotification);
|
||||
return NotifyIMEOfCompositionUpdate(aIMENotification);
|
||||
case NOTIFY_IME_OF_MOUSE_BUTTON_EVENT:
|
||||
return NotifyIMEOfMouseButtonEvent(aIMENotification);
|
||||
case NOTIFY_IME_OF_POSITION_CHANGE:
|
||||
@@ -695,7 +695,7 @@ PuppetWidget::NotifyIMEOfFocusChange(const IMENotification& aIMENotification)
|
||||
}
|
||||
|
||||
mIMEPreferenceOfParent = nsIMEUpdatePreference();
|
||||
if (!mTabChild->SendNotifyIMEFocus(gotFocus, mContentCache,
|
||||
if (!mTabChild->SendNotifyIMEFocus(mContentCache, aIMENotification,
|
||||
&mIMEPreferenceOfParent)) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
@@ -703,7 +703,7 @@ PuppetWidget::NotifyIMEOfFocusChange(const IMENotification& aIMENotification)
|
||||
}
|
||||
|
||||
nsresult
|
||||
PuppetWidget::NotifyIMEOfUpdateComposition(
|
||||
PuppetWidget::NotifyIMEOfCompositionUpdate(
|
||||
const IMENotification& aIMENotification)
|
||||
{
|
||||
#ifndef MOZ_CROSS_PROCESS_IME
|
||||
@@ -715,7 +715,7 @@ PuppetWidget::NotifyIMEOfUpdateComposition(
|
||||
if (NS_WARN_IF(!mContentCache.CacheSelection(this, &aIMENotification))) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
mTabChild->SendNotifyIMESelectedCompositionRect(mContentCache);
|
||||
mTabChild->SendNotifyIMECompositionUpdate(mContentCache, aIMENotification);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@@ -760,12 +760,7 @@ PuppetWidget::NotifyIMEOfTextChange(const IMENotification& aIMENotification)
|
||||
if (mIMEPreferenceOfParent.WantTextChange() &&
|
||||
(mIMEPreferenceOfParent.WantChangesCausedByComposition() ||
|
||||
!aIMENotification.mTextChangeData.mCausedByComposition)) {
|
||||
mTabChild->SendNotifyIMETextChange(
|
||||
mContentCache,
|
||||
aIMENotification.mTextChangeData.mStartOffset,
|
||||
aIMENotification.mTextChangeData.mRemovedEndOffset,
|
||||
aIMENotification.mTextChangeData.mAddedEndOffset,
|
||||
aIMENotification.mTextChangeData.mCausedByComposition);
|
||||
mTabChild->SendNotifyIMETextChange(mContentCache, aIMENotification);
|
||||
} else {
|
||||
mTabChild->SendUpdateContentCache(mContentCache);
|
||||
}
|
||||
@@ -789,14 +784,13 @@ PuppetWidget::NotifyIMEOfSelectionChange(
|
||||
// Note that selection change must be notified after text change if it occurs.
|
||||
// Therefore, we don't need to query text content again here.
|
||||
mContentCache.SetSelection(
|
||||
this,
|
||||
this,
|
||||
aIMENotification.mSelectionChangeData.mOffset,
|
||||
aIMENotification.mSelectionChangeData.mLength,
|
||||
aIMENotification.mSelectionChangeData.mReversed,
|
||||
aIMENotification.mSelectionChangeData.GetWritingMode());
|
||||
|
||||
mTabChild->SendNotifyIMESelection(
|
||||
mContentCache, aIMENotification.mSelectionChangeData.mCausedByComposition);
|
||||
mTabChild->SendNotifyIMESelection(mContentCache, aIMENotification);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@@ -831,7 +825,8 @@ PuppetWidget::NotifyIMEOfPositionChange(const IMENotification& aIMENotification)
|
||||
NS_WARN_IF(!mContentCache.CacheSelection(this, &aIMENotification))) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
if (!mTabChild->SendNotifyIMEPositionChange(mContentCache)) {
|
||||
if (!mTabChild->SendNotifyIMEPositionChange(mContentCache,
|
||||
aIMENotification)) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
return NS_OK;
|
||||
|
||||
Reference in New Issue
Block a user