Open Bug 960480 Opened 10 years ago Updated 2 years ago

Implement remote NS_QUERY_CHARACTER_AT_POINT for Microsoft IME

Categories

(Core :: DOM: Events, defect)

x86
Windows 8.1
defect

Tracking

()

People

(Reporter: m_kato, Assigned: m_kato)

Details

(Keywords: inputmethod)

Attachments

(1 file)

      No description provided.
Blocks: 1177943
Comment on attachment 8635163 [details] [diff] [review]
Implement NS_QUERY_CHARACTER_AT_POINT for IME using composition rect array

Implementing NS_QUERY_CHARACTER_AT_POINT for IME using composition rect array.

Nakano-san, do you know the operation / way when TSF call GetACPFromPoint?  Although I try several IMEs and operations, I cannot find it.

Of course, this fix doesn't help Apple's dictionary issue, but it can find error by log.
Attachment #8635163 - Flags: review?(masayuki)
> Nakano-san, do you know the operation / way when TSF call GetACPFromPoint?  Although I try several IMEs and
> operations, I cannot find it.

We haven't found that. We just implemented that before enabling in release builds for unknown TIPs which need it.
Comment on attachment 8635163 [details] [diff] [review]
Implement NS_QUERY_CHARACTER_AT_POINT for IME using composition rect array

>diff --git a/widget/ContentCache.cpp b/widget/ContentCache.cpp
>--- a/widget/ContentCache.cpp
>+++ b/widget/ContentCache.cpp
>@@ -671,16 +671,29 @@ ContentCacheInParent::HandleQueryContent
>          "aEvent={ message=NS_QUERY_EDITOR_RECT }, aWidget=0x%p)",
>          this, aWidget));
>       aEvent.mReply.mRect = mEditorRect;
>       MOZ_LOG(sContentCacheLog, LogLevel::Info,
>         ("ContentCacheInParent: 0x%p HandleQueryContentEvent(), "
>          "Succeeded, aEvent={ mReply={ mRect=%s } }",
>          this, GetRectText(aEvent.mReply.mRect).get()));
>       break;
>+    case NS_QUERY_CHARACTER_AT_POINT:
>+      aEvent.mReply.mOffset =
>+        mTextRectArray.QueryIndexByPoint(aEvent.refPoint, aEvent.mReply.mRect);

You should check mSelection.mAnchorCharRect and mSelection.mFocusCharRect too. Please add GetTextRectAtPoint() for capsuling them.

Otherwise, looks good.
Attachment #8635163 - Flags: review?(masayuki) → review-
No longer blocks: 1177943
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: