Closed Bug 1059643 Opened 8 years ago Closed 8 years ago

[IMM32] Reimplement mouse button event handling with NOTIFY_IME_OF_MOUSE_BUTTON_EVENT

Categories

(Core :: Widget: Win32, defect)

x86_64
Windows 8.1
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla35

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

(Keywords: inputmethod)

Attachments

(1 file)

No description provided.
Attachment #8480418 - Flags: review?(VYV03354)
Comment on attachment 8480418 [details] [diff] [review]
Patch

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

::: widget/windows/nsIMM32Handler.cpp
@@ +2060,5 @@
> +  uint32_t compositionStart = gIMM32Handler->mCompositionStart;
> +  uint32_t compositionEnd =
> +    compositionStart + gIMM32Handler->mCompositionString.Length();
> +  if (aIMENotification.mMouseButtonEventData.mOffset < compositionStart ||
> +      aIMENotification.mMouseButtonEventData.mOffset >= compositionEnd) {

Why was this condition changed?
Attachment #8480418 - Flags: review?(VYV03354) → review+
(In reply to Masatoshi Kimura [:emk] from comment #2)
> Comment on attachment 8480418 [details] [diff] [review]
> Patch
> 
> Review of attachment 8480418 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: widget/windows/nsIMM32Handler.cpp
> @@ +2060,5 @@
> > +  uint32_t compositionStart = gIMM32Handler->mCompositionStart;
> > +  uint32_t compositionEnd =
> > +    compositionStart + gIMM32Handler->mCompositionString.Length();
> > +  if (aIMENotification.mMouseButtonEventData.mOffset < compositionStart ||
> > +      aIMENotification.mMouseButtonEventData.mOffset >= compositionEnd) {
> 
> Why was this condition changed?

Because the old code is wrong. If offset is same as start + length, it means that the character is next character of the composition string.

01|234|5

* 2 + 3 = 5
https://hg.mozilla.org/mozilla-central/rev/779ebed1922a
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
You need to log in before you can comment on or make changes to this bug.