Bug 1064071: Remove obsolete Text Selection caret positioning logic; r=margaret

This commit is contained in:
Christian Vielma 2014-10-18 12:01:36 -07:00
parent 3d69340251
commit 6d0c0e95a0
2 changed files with 0 additions and 23 deletions

View File

@ -102,12 +102,6 @@ var SelectionHandler = {
break;
}
// Update caret position on keyboard activity
case "TextSelection:UpdateCaretPos":
// Generated by IME close, autoCorrection / styling
this._positionHandles();
break;
case "Gesture:SingleTap": {
if (this._activeType == this.TYPE_CURSOR) {
// attachCaret() is called in the "Gesture:SingleTap" handler in BrowserEventHandler
@ -712,7 +706,6 @@ var SelectionHandler = {
this._initTargetInfo(aElement, this.TYPE_CURSOR);
// Caret-specific observer/listeners
Services.obs.addObserver(this, "TextSelection:UpdateCaretPos", false);
BrowserApp.deck.addEventListener("keyup", this, false);
BrowserApp.deck.addEventListener("compositionupdate", this, false);
BrowserApp.deck.addEventListener("compositionend", this, false);
@ -1014,7 +1007,6 @@ var SelectionHandler = {
// Only observed for caret positioning
if (this._activeType == this.TYPE_CURSOR) {
Services.obs.removeObserver(this, "TextSelection:UpdateCaretPos");
BrowserApp.deck.removeEventListener("keyup", this);
BrowserApp.deck.removeEventListener("compositionupdate", this);
BrowserApp.deck.removeEventListener("compositionend", this);

View File

@ -1911,13 +1911,6 @@ nsWindow::OnIMEEvent(AndroidGeckoEvent *ae)
selEvent.mExpandToClusterBoundary = false;
DispatchEvent(&selEvent);
// Notify SelectionHandler of final caret position
// Required after IME hide via 'Back' button
AndroidGeckoEvent* broadcastEvent = AndroidGeckoEvent::MakeBroadcastEvent(
NS_LITERAL_CSTRING("TextSelection:UpdateCaretPos"),
NS_LITERAL_CSTRING(""));
nsAppShell::gAppShell->PostEvent(broadcastEvent);
}
break;
case AndroidGeckoEvent::IME_ADD_COMPOSITION_RANGE:
@ -2011,14 +2004,6 @@ nsWindow::OnIMEEvent(AndroidGeckoEvent *ae)
#endif // DEBUG_ANDROID_IME
DispatchEvent(&event);
// Notify SelectionHandler of final caret position
// Required in cases of keyboards providing autoCorrections
AndroidGeckoEvent* broadcastEvent =
AndroidGeckoEvent::MakeBroadcastEvent(
NS_LITERAL_CSTRING("TextSelection:UpdateCaretPos"),
NS_LITERAL_CSTRING(""));
nsAppShell::gAppShell->PostEvent(broadcastEvent);
}
break;