Closed Bug 394792 Opened 17 years ago Closed 17 years ago

[FIX]Only bother updating text input commands for focused text inputs

Categories

(Core :: Layout: Form Controls, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla1.9beta1

People

(Reporter: neil, Assigned: bzbarsky)

Details

(Keywords: perf)

Attachments

(2 files)

We currently trigger a select command update whenever the selection changes in any text field. However our select commandupdaters only ever care about the selection in the focused field. All other events are therefore pointless. This applies to undo command updates too.
Attached patch Like so (deleted) — Splinter Review
It's not an issue for undo, because we're not an editor listener unless we're focused.
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Attachment #280807 - Flags: superreview?(neil)
Attachment #280807 - Flags: review?(roc)
Priority: -- → P3
Summary: Only bother updating text input commands for focused text inputs → [FIX]Only bother updating text input commands for focused text inputs
Target Milestone: --- → mozilla1.9 M9
Attachment #280807 - Flags: superreview?(neil) → superreview+
Comment on attachment 280807 [details] [diff] [review] Like so I assume there's no other easy way to check whether we have focus?
Attachment #280807 - Flags: review?(roc) → review+
> I assume there's no other easy way to check whether we have focus? Well... we could GetContentState(mFrame->GetContent()) on the ESM and see whether it has the FOCUSED state. I think that should be equivalent, though slower. Memory usage will be the same, since I'm adding a 4th PRPackedBool here. I can do the content state thing if you'd prefer, though.
I think I'd prefer that ... extra state that has to be maintained adds a little more complexity.
Attached patch With that approach (deleted) — Splinter Review
Attachment #280949 - Flags: review?(roc)
Attachment #280949 - Flags: approval1.9?
Attachment #280949 - Flags: superreview+
Attachment #280949 - Flags: review?(roc)
Attachment #280949 - Flags: review+
Attachment #280949 - Flags: approval1.9?
Attachment #280949 - Flags: approval1.9+
Fixed.
Status: ASSIGNED → 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

Created:
Updated:
Size: