Bug 1172219 part.2 Notify TSF of layout creation and destruction r=emk

This commit is contained in:
Masayuki Nakano 2015-06-17 14:00:34 +09:00
parent 74ba6ffc03
commit b941f795b8

View File

@ -1328,6 +1328,14 @@ nsTextStore::Destroy()
CommitCompositionInternal(false);
}
if (mSink) {
MOZ_LOG(sTextStoreLog, LogLevel::Debug,
("TSF: 0x%p nsTextStore::Destroy(), calling "
"ITextStoreACPSink::OnLayoutChange(TS_LC_DESTROY)...",
this));
mSink->OnLayoutChange(TS_LC_DESTROY, TEXTSTORE_DEFAULT_VIEW);
}
mLockedContent.Clear();
mSelection.MarkDirty();
@ -4265,6 +4273,15 @@ nsTextStore::CreateAndSetFocus(nsWindowBase* aFocusedWidget,
return false;
}
sEnabledTextStore->SetInputScope(aContext.mHTMLInputType);
if (sEnabledTextStore->mSink) {
MOZ_LOG(sTextStoreLog, LogLevel::Info,
("TSF: nsTextStore::CreateAndSetFocus(), calling "
"ITextStoreACPSink::OnLayoutChange(TS_LC_CREATE) for 0x%p...",
sEnabledTextStore.get()));
sEnabledTextStore->mSink->OnLayoutChange(TS_LC_CREATE,
TEXTSTORE_DEFAULT_VIEW);
}
return true;
}