Bug 1796044 - part 2: Make `intl.tsf.hack.allow_to_stop_hacking_on_build_17643_or_later` a static pref r=m_kato

Depends on D159804

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

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

@ -6895,6 +6895,21 @@
value: true
mirror: always
# On Windows 10 Build 17643 (an Insider Preview build of RS5), Microsoft
# have fixed the caller of ITextACPStore::GetTextExt() to return
# TS_E_NOLAYOUT to TIP as-is, rather than converting to E_FAIL.
# Therefore, if TIP supports asynchronous layout computation perfectly, we
# can return TS_E_NOLAYOUT and TIP waits next OnLayoutChange()
# notification. However, some TIPs still have some bugs of asynchronous
# layout support. We keep hacking the result of GetTextExt() like running
# on Windows 10, however, there could be unknown TIP bugs if we stop
# hacking the result. So, user can stop checking build ID to make Gecko
# hack the result forcibly.
- name: intl.tsf.hack.allow_to_stop_hacking_on_build_17643_or_later
type: bool
value: @IS_EARLY_BETA_OR_EARLIER@
mirror: always
# If true, automatically extend selection to cluster boundaries when
# TSF/TIP requests to select from/by middle of a cluster.
- name: intl.tsf.hack.extend_setting_selection_range_to_cluster_boundaries

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

@ -2552,22 +2552,6 @@ pref("font.size.monospace.x-math", 13);
// Enables/Disables hack for specific TIP.
// On Windows 10 Build 17643 (an Insider Preview build of RS5), Microsoft
// have fixed the caller of ITextACPStore::GetTextExt() to return
// TS_E_NOLAYOUT to TIP as-is, rather than converting to E_FAIL.
// Therefore, if TIP supports asynchronous layout computation perfectly, we
// can return TS_E_NOLAYOUT and TIP waits next OnLayoutChange()
// notification. However, some TIPs still have some bugs of asynchronous
// layout support. We keep hacking the result of GetTextExt() like running
// on Windows 10, however, there could be unknown TIP bugs if we stop
// hacking the result. So, user can stop checking build ID to make Gecko
// hack the result forcibly.
#ifdef EARLY_BETA_OR_EARLIER
pref("intl.tsf.hack.allow_to_stop_hacking_on_build_17643_or_later", true);
#else
pref("intl.tsf.hack.allow_to_stop_hacking_on_build_17643_or_later", false);
#endif
// 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

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

@ -1753,9 +1753,6 @@ class TSFPrefs final {
return s##aName##Value; \
}
DECL_AND_IMPL_BOOL_PREF(
"intl.tsf.hack.allow_to_stop_hacking_on_build_17643_or_later",
AllowToStopHackingOnBuild17643OrLater, false)
DECL_AND_IMPL_BOOL_PREF("intl.tsf.hack.atok.create_native_caret",
NeedToCreateNativeCaretForLegacyATOK, true)
DECL_AND_IMPL_BOOL_PREF(
@ -4680,7 +4677,8 @@ bool TSFTextStore::MaybeHackNoErrorLayoutBugs(LONG& aACPStart, LONG& aACPEnd) {
// If TSF does not have the bug, we need to hack only with a few TIPs.
static const bool sAlllowToStopHackingIfFine =
IsWindows10BuildOrLater(17643) &&
TSFPrefs::AllowToStopHackingOnBuild17643OrLater();
StaticPrefs::
intl_tsf_hack_allow_to_stop_hacking_on_build_17643_or_later();
// We need to compute active TIP now. This may take a couple of milliseconds,
// however, it'll be cached, so, must be faster than check active TIP every