Bug 1796044 - part 3: Make `intl.tsf.hack.atok.create_native_caret` a static pref r=m_kato

Depends on D159805

Differential Revision: https://phabricator.services.mozilla.com/D159806
This commit is contained in:
Masayuki Nakano 2022-10-25 07:06:55 +00:00
Родитель 2796c1f140
Коммит 591e25675b
3 изменённых файлов: 9 добавлений и 6 удалений

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

@ -6868,6 +6868,13 @@
mirror: always
#ifdef XP_WIN
# Whether Gecko creates or does not create native caret for legacy ATOK
# (2011 - 2015).
- name: intl.tsf.hack.atok.create_native_caret
type: bool
value: true
mirror: always
# Whether Gecko sets input scope of the URL bar to IS_DEFAULT when black
# listed IMEs are active or does not. If you use tablet mode mainly and you
# want to use touch keyboard for URL when you set focus to the URL bar, you

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

@ -2552,8 +2552,6 @@ pref("font.size.monospace.x-math", 13);
// Enables/Disables hack for specific TIP.
// Whether creates native caret for ATOK or not.
pref("intl.tsf.hack.atok.create_native_caret", true);
// Whether use available composition string rect for result of
// ITextStoreACP::GetTextExt() even if the specified range is same as the
// range of composition string but some character rects of them are not

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

@ -1753,8 +1753,6 @@ class TSFPrefs final {
return s##aName##Value; \
}
DECL_AND_IMPL_BOOL_PREF("intl.tsf.hack.atok.create_native_caret",
NeedToCreateNativeCaretForLegacyATOK, true)
DECL_AND_IMPL_BOOL_PREF(
"intl.tsf.hack.atok.do_not_return_no_layout_error_of_composition_string",
DoNotReturnNoLayoutErrorToATOKOfCompositionString, true)
@ -4628,7 +4626,7 @@ TSFTextStore::GetTextExt(TsViewCookie vcView, LONG acpStart, LONG acpEnd,
// even if we'll create native caret later, we need to creat it here with
// current information.
if (!IMEHandler::IsA11yHandlingNativeCaret() &&
TSFPrefs::NeedToCreateNativeCaretForLegacyATOK() &&
StaticPrefs::intl_tsf_hack_atok_create_native_caret() &&
TSFStaticSink::IsATOKReferringNativeCaretActive() &&
mComposition.isSome() &&
mComposition->IsOffsetInRangeOrEndOffset(acpStart) &&
@ -4786,7 +4784,7 @@ bool TSFTextStore::MaybeHackNoErrorLayoutBugs(LONG& aACPStart, LONG& aACPEnd) {
// If we'll create native caret where we paint our caret. Then, ATOK
// will refer native caret. So, we don't need to hack anything in
// this case.
if (TSFPrefs::NeedToCreateNativeCaretForLegacyATOK()) {
if (StaticPrefs::intl_tsf_hack_atok_create_native_caret()) {
MOZ_ASSERT(TSFStaticSink::IsATOKReferringNativeCaretActive());
return false;
}