Skip to content

Commit 9b4c9e0

Browse files
committed
Use CAN_USE_CANDIDATE_FORM_FOR_SUGGEST for Firefox.
Strictly speaking, IMM32 spec never requires the application to update |CANDIDATEFORM| until IMN_OPENCANDIDATE is sent from the IME. In the case of Mozc, we intentionally do not send IMN_OPENCANDIDATE when the suggestion window is shown, because doing that can confuse some applications such as command prompt. That said, |CANDIDATEFORM::rcArea| is still a useful information that we want to rely on if it is guaranteed to be kept updated. For that purpose, we have maintained a list of applications which are known to keep |CANDIDATEFORM::rcArea| updated regardless of IMN_OPENCANDIDATE, and this CL adds "MozillaWindowClass" window class into the whitelist so that Firefox can be marked with CAN_USE_CANDIDATE_FORM_FOR_SUGGEST compatibility flag. BUG=#361 TEST=manually done REF_BUG=27394949 REF_CL=115815738
1 parent 61452d4 commit 9b4c9e0

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/mozc_version_template.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MAJOR=2
22
MINOR=17
3-
BUILD=2321
3+
BUILD=2322
44
REVISION=102
55
# NACL_DICTIONARY_VERSION is the target version of the system dictionary to be
66
# downloaded by NaCl Mozc.

src/renderer/win32/win32_renderer_util.cc

+1
Original file line numberDiff line numberDiff line change
@@ -2558,6 +2558,7 @@ int LayoutManager::GetCompatibilityMode(
25582558
const wchar_t *kUseCandidateFormForSuggest[] = {
25592559
L"Chrome_RenderWidgetHostHWND",
25602560
L"JsTaroCtrl",
2561+
L"MozillaWindowClass",
25612562
L"OperaWindowClass",
25622563
L"QWidget",
25632564
};

src/renderer/win32/win32_renderer_util_test.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -4916,7 +4916,7 @@ TEST_F(Win32RendererUtilTest, Firefox_textarea_Suggest) {
49164916
CandidateWindowLayout layout;
49174917
EXPECT_TRUE(layout_mgr.LayoutCandidateWindowForSuggestion(app_info, &layout));
49184918
EXPECT_EXCLUDE_CANDIDATE_WINDOW_LAYOUT(
4919-
242, 727, 242, 707, 243, 727, layout);
4919+
242, 727, 242, 707, 242, 727, layout);
49204920
}
49214921

49224922
// Firefox 3.6.10 on Vista SP1 / textarea
@@ -5396,7 +5396,7 @@ TEST_F(Win32RendererUtilTest, Firefox_ExcludeRect_Suggest) {
53965396
EXPECT_TRUE(layout_mgr.LayoutCandidateWindowForSuggestion(
53975397
app_info, &layout));
53985398
EXPECT_EXCLUDE_CANDIDATE_WINDOW_LAYOUT(
5399-
86, 142, 86, 122, 87, 142, layout);
5399+
86, 142, 86, 122, 101, 182, layout);
54005400
}
54015401

54025402
// Firefox 47.0a1 (2016-02-28)

0 commit comments

Comments
 (0)