Closed Bug 404632 Opened 17 years ago Closed 17 years ago

Fix various bugs in key down handling, make it more clean and efficient

Categories

(Core :: Widget: Cocoa, defect, P4)

x86
macOS
defect

Tracking

()

RESOLVED FIXED
mozilla1.9beta2

People

(Reporter: jaas, Assigned: jaas)

References

Details

(Keywords: regression)

Attachments

(1 file)

Attached patch fix v1.0Splinter Review
While working on Cocoa key handling blockers I ended up with some general fixes we should take.

A pile of fixes to our key down handling code has left it in a somewhat messy state. This patch fixes the following problems:

1. mIgnoreDoCommand is incorrectly set in the fake key down event code we have in keyUp:
2. Focus changes aren't calculated correctly. We shouldn't be making assumptions about the first responder, test for focus changes explicitly.
3. If we bail because of a focus change, make sure to reset *all* of the member state variables that we modified. This doesn't matter if we bail because we were destroyed, so not changing that case.
4. Better variable names and test structure. We can do things more efficiently (via better scoping) when the logic is coded more clearly.
Attachment #289549 - Flags: review?(masayuki)
Comment on attachment 289549 [details] [diff] [review]
fix v1.0

looks good for me.
Attachment #289549 - Flags: review?(masayuki) → review+
Attachment #289549 - Flags: superreview?(roc)
Comment on attachment 289549 [details] [diff] [review]
fix v1.0

Looks like you could save some space in nsChildView by packing bools (PRPackedBool, not bitfields), but we don't have to do that here.
Attachment #289549 - Flags: superreview?(roc) → superreview+
Blocks: 358379
Flags: blocking1.9+
Keywords: regression
Priority: -- → P4
landed on trunk
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: