Bug 1276948 - Remove IMEInputHandler::ConversationIdentifier. r=masayuki

This method is for old NSTextInput API and unused now.

MozReview-Commit-ID: thcbEExH58

--HG--
extra : rebase_source : 7d9f665d867366990c5aac5a54555cc2c3483828
This commit is contained in:
Makoto Kato 2016-05-31 23:18:04 +09:00
parent d06abbe862
commit 100757988a
2 changed files with 0 additions and 36 deletions

View File

@ -777,15 +777,6 @@ public:
NSRange& aSelectedRange,
NSRange* aReplacementRange = nullptr);
/**
* ConversationIdentifier() returns an ID for the current editor. The ID is
* guaranteed to be unique among currently existing editors. But it might be
* the same as the ID of an editor that has already been destroyed.
*
* @return An identifier of current focused editor.
*/
NSInteger ConversationIdentifier();
/**
* GetAttributedSubstringFromRange() returns an NSAttributedString instance
* which is allocated as autorelease for aRange.

View File

@ -3217,33 +3217,6 @@ IMEInputHandler::SetMarkedText(NSAttributedString* aAttrString,
NS_OBJC_END_TRY_ABORT_BLOCK;
}
NSInteger
IMEInputHandler::ConversationIdentifier()
{
MOZ_LOG(gLog, LogLevel::Info,
("%p IMEInputHandler::ConversationIdentifier, Destroyed()=%s",
this, TrueOrFalse(Destroyed())));
if (Destroyed()) {
return reinterpret_cast<NSInteger>(mView);
}
RefPtr<IMEInputHandler> kungFuDeathGrip(this);
// NOTE: The size of NSInteger is same as pointer size.
WidgetQueryContentEvent textContent(true, eQueryTextContent, mWidget);
textContent.InitForQueryTextContent(0, 0);
DispatchEvent(textContent);
if (!textContent.mSucceeded) {
MOZ_LOG(gLog, LogLevel::Info,
("%p IMEInputHandler::ConversationIdentifier, Failed", this));
return reinterpret_cast<NSInteger>(mView);
}
// XXX This might return same ID as a previously existing editor if the
// deleted editor was created at the same address. Is there a better way?
return reinterpret_cast<NSInteger>(textContent.mReply.mContentsRoot);
}
NSAttributedString*
IMEInputHandler::GetAttributedSubstringFromRange(NSRange& aRange,
NSRange* aActualRange)