Implement remote NS_QUERY_CHARACTER_AT_POINT for Microsoft IME

NEW
Assigned to

Status

()

5 years ago
2 years ago

People

(Reporter: m_kato, Assigned: m_kato)

Tracking

({inputmethod})

Trunk
x86
Windows 8.1
inputmethod
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Comment hidden (empty)
(Assignee)

Updated

3 years ago
Blocks: 1177943
(Assignee)

Comment 1

3 years ago
Created attachment 8635163 [details] [diff] [review]
Implement NS_QUERY_CHARACTER_AT_POINT for IME using composition rect array
(Assignee)

Comment 2

3 years ago
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-
(Assignee)

Updated

2 years ago
No longer blocks: 1177943
You need to log in before you can comment on or make changes to this bug.