Bug 1454945 - Get rid of nsIEditor.suppressDispatchingInputEvent since nobody uses it from JS r=m_kato

So, this patch replaces the setter with non-virtual method and removing the
getter since where is already non-virtual getter method.

MozReview-Commit-ID: Is19Yriz8t8

--HG--
extra : rebase_source : bb2f49f380ddb2e2f96e8690effd8d47d24ae0ae
This commit is contained in:
Masayuki Nakano 2018-04-18 22:57:41 +09:00
Родитель de4f346535
Коммит 9000054fed
4 изменённых файлов: 11 добавлений и 24 удалений

Просмотреть файл

@ -65,11 +65,11 @@ public:
}
~ValueSetter()
{
mTextEditor->SetSuppressDispatchingInputEvent(mOuterTransaction);
mTextEditor->SuppressDispatchingInputEvent(mOuterTransaction);
}
void Init()
{
mTextEditor->SetSuppressDispatchingInputEvent(true);
mTextEditor->SuppressDispatchingInputEvent(true);
}
private:

Просмотреть файл

@ -5342,25 +5342,6 @@ EditorBase::OnFocus(nsIDOMEventTarget* aFocusEventTarget)
}
}
NS_IMETHODIMP
EditorBase::GetSuppressDispatchingInputEvent(bool* aSuppressed)
{
// NOTE: If you need to override this method, you need to make
// IsSuppressingDispatchingInputEvent() virtual.
if (NS_WARN_IF(aSuppressed)) {
return NS_ERROR_INVALID_ARG;
}
*aSuppressed = IsSuppressingDispatchingInputEvent();
return NS_OK;
}
NS_IMETHODIMP
EditorBase::SetSuppressDispatchingInputEvent(bool aSuppress)
{
mDispatchInputEvent = !aSuppress;
return NS_OK;
}
int32_t
EditorBase::GetIMESelectionStartOffsetIn(nsINode* aTextNode)
{

Просмотреть файл

@ -1446,6 +1446,15 @@ public:
*/
bool IsInEditAction() const { return mIsInEditAction; }
/**
* SuppressDispatchingInputEvent() suppresses or unsuppresses dispatching
* "input" event.
*/
void SuppressDispatchingInputEvent(bool aSuppress)
{
mDispatchInputEvent = !aSuppress;
}
/**
* IsSuppressingDispatchingInputEvent() returns true if the editor stops
* dispatching input event. Otherwise, false.

Просмотреть файл

@ -518,9 +518,6 @@ interface nsIEditor : nsISupports
/* Run unit tests. Noop in optimized builds */
void debugUnitTests(out long outNumTests, out long outNumTestsFailed);
/* Set true if you want to suppress dispatching input event. */
attribute boolean suppressDispatchingInputEvent;
/**
* forceCompositionEnd() force the composition end
*/