Implement D3E KeyboardEvent.isComposing

RESOLVED FIXED in mozilla31

Status

()

enhancement
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: masayuki, Assigned: masayuki)

Tracking

({dev-doc-complete})

Trunk
mozilla31
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 2 obsolete attachments)

https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#widl-KeyboardEvent-isComposing

> true if the key event occurs as part of a composition session, i.e., after a compositionstart event and before the corresponding compositionend event.
> 
> The un-initialized value of this attribute MUST be false.
We can implement this bug very simply.

widget shouldn't set the isComposing value at dispatching key events. Instead of that, EventStateManager::PreHandleEvent() can do it.
Attachment #8403248 - Flags: review?(bugs)
Currently, dispatching key events during composition causes some assertions. Therefore, this patch adds |SimpleTest.expectAssertions(0, 16)|. Note that on Linux, the assertion doesn't occur. Therefore, it specifies 0-16.
Attachment #8403251 - Flags: review?(bugs)
Comment on attachment 8403248 [details] [diff] [review]
part.1 Implement KeyboardEvent.isComposing

I wouldn't add isComposing to the .idl, nor 
KeyboardEvent::GetIsComposing.

New stuff can go to .webidl only, unless there is some good reason
to add to .idl too.

So, remove the .idl stuff, r=me
Attachment #8403248 - Flags: review?(bugs) → review+
Comment on attachment 8403251 [details] [diff] [review]
part.2 Add tests for KeyboardEvent.isComposing

I'd like to see at least some test for keypress too, at least to check that
it returns sane value, and not some random value for isComposing.
Attachment #8403251 - Flags: review?(bugs) → review-
Although, keypress event should never be fired during composition even if after bug 354358 is fixed. But it's okay to include the test for something wired case.
Attachment #8403251 - Attachment is obsolete: true
Attachment #8403773 - Flags: review?(bugs)
And I hope VK_INSERT will never be handled by our editor...
Attachment #8403773 - Flags: review?(bugs) → review+
https://hg.mozilla.org/mozilla-central/rev/839bf025c534
https://hg.mozilla.org/mozilla-central/rev/d40a8916b7e7
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla31

Updated

5 years ago
Depends on: 1027011
You need to log in before you can comment on or make changes to this bug.