Closed Bug 789706 Opened 12 years ago Closed 10 years ago

[TSF] Candidate window of ATOK isn't located at composition string

Categories

(Core :: Widget: Win32, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla29

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

(Keywords: inputmethod, Whiteboard: ATOK 2011 - 2013 on Vista or later)

Attachments

(2 files, 1 obsolete file)

ATOK 2012's composition window isn't located at composition string. Instead, it's located bottom of our window.

I'm not sure this is a bug of us, we need to investigate it.
I cannot reproduce this bug with ATOK 2013 preview:
http://www.justsystems.com/jp/services/atok/preview/

And also, I cannot reproduce this bug with ATOK 2011.

So that I believe this is a bug of ATOK 2012. However, if we will enable TSF mode in our default settings, we need to add this to the release note written in Japanese.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
I found a way to fix this.

If we create native caret over our caret, we can avoid this issue.
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
I think that we should not call CreateNativeCaret() when active TIP isn't ATOK.

I'll try to do so with next patch.
Status: REOPENED → ASSIGNED
Summary: [TSF] composition window of ATOK 2012 isn't located at composition string → [TSF] Candidate window of ATOK isn't located at composition string
ATOK refers native caret position of desktop application at deciding its candidate window position. Let's create native caret over our caret. This hack is similar to the hack for Chinese IME in nsIMM32Handler.
Attachment #8363543 - Attachment is obsolete: true
Attachment #8367068 - Flags: review?(VYV03354)
This patch makes nsTextStore store active keyboard TIP name. And the hack of the previous patch should run only when the active keyboard TIP is ATOK. Because the other TIP users shouldn't waste the running cost.

Additionally, this patch has a pref for disabling the hack for ATOK developers.
Attachment #8367072 - Flags: review?(VYV03354)
Is this hack needed for ATOK versions other than 2012? (Comment #1 indicates it isn't.)
(In reply to Masatoshi Kimura [:emk] from comment #6)
> Is this hack needed for ATOK versions other than 2012? (Comment #1 indicates
> it isn't.)

Yes, I confirmed with 2011, 2012 and 2013. And perhaps, 2014 too (AFAIK).
# 2011 is the first version of TIP-ATOK.
I can't reproduce this bug with Windows 8.1 desktop + ATOK 2011/2012/2013 + Nightly 29.0a1 + intl.enable_tsf_support=true. The composition window was located at the composition string.
The pref was changed to intl.tsf.enable. (If you enabled TSF, the pref should be migrated automatically)
FYI: I can reproduce this bug on normal window. E.g., web contents or search bar. However, I cannot reproduce this bug on modal dialog such as "Option". I don't know the reason. I asked JustSystems unofficially, but I've not received the reply from them :-(
Wow, my Nightly was pretty old (2013-12-23).
The pref was surely migrated when I updated the Nightly, but the bug is still not reproduced...

I tested this on the search bar. And I have tested it on the web content now. Still not reproduced.
Hmm, it's odd... On my all environments with ATOK (except WinXP), I can reproduce this bug... The candidate window is always displayed at left-bottom corner of the window. Can you test it on pure environment on VM? I can reproduce it on Win7 x64 ja-JP on VM.

According to the log, ATOK checks the composition string's rect with GetTextExt() and nsTextStore returns correct value. However, ATOK ignores it...
I installed a new Win7 x64 VM and tested. I was able to reproduce the bug on the VM.
But could not reproduce on Win8.1 x64 VM.
(In reply to Masatoshi Kimura [:emk] from comment #14)
> But could not reproduce on Win8.1 x64 VM.

Hmm, odd... If we can know the difference, we can advise JustSystems. However, anyway, we should fix this bug since we cannot ignore this bug now that we know the workaround. If you have no idea of the difference, please review the patches.
Whiteboard: ATOK 2011 - 2013 on Vista or later
Comment on attachment 8367068 [details] [diff] [review]
part.1 Create native caret over our caret when ITextStoreACP::GetTextExt() is called during composition

OK, at least this has no ill effect.
Attachment #8367068 - Flags: review?(VYV03354) → review+
Comment on attachment 8367072 [details] [diff] [review]
part.2 nsTextStore::CreateNativeCaret() should be called only when active TIP is ATOK

Review of attachment 8367072 [details] [diff] [review]:
-----------------------------------------------------------------

::: widget/windows/nsTextStore.cpp
@@ +154,5 @@
>  
>  #define TEXTSTORE_DEFAULT_VIEW (1)
>  
> +static nsCString
> +GetCLSIDNameStr(REFCLSID aCLSID)

Why did you move this function?

@@ +169,5 @@
> +  return result;
> +}
> +
> +static nsCString
> +GetGUIDNameStr(REFGUID aGUID)

ditto
Attachment #8367072 - Flags: review?(VYV03354) → review+
(In reply to Masatoshi Kimura [:emk] from comment #17)
> Comment on attachment 8367072 [details] [diff] [review]
> part.2 nsTextStore::CreateNativeCaret() should be called only when active
> TIP is ATOK
> 
> Review of attachment 8367072 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: widget/windows/nsTextStore.cpp
> @@ +154,5 @@
> >  
> >  #define TEXTSTORE_DEFAULT_VIEW (1)
> >  
> > +static nsCString
> > +GetCLSIDNameStr(REFCLSID aCLSID)
> 
> Why did you move this function?
> 
> @@ +169,5 @@
> > +  return result;
> > +}
> > +
> > +static nsCString
> > +GetGUIDNameStr(REFGUID aGUID)
> 
> ditto

Ah, it is for my first approach which reads registry. However, I found the API to get the description of TIP. So, I can remove the change now. Thanks!
https://hg.mozilla.org/mozilla-central/rev/ff3c388e5410
https://hg.mozilla.org/mozilla-central/rev/e6fe72a30359
Status: ASSIGNED → RESOLVED
Closed: 12 years ago10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: