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

RESOLVED FIXED in mozilla1.9beta1

Status

()

Core
Layout: Form Controls
P3
normal
RESOLVED FIXED
10 years ago
10 years ago

People

(Reporter: neil@parkwaycc.co.uk, Assigned: bz)

Tracking

({perf})

Trunk
mozilla1.9beta1
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

10 years ago
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.
Created attachment 280807 [details] [diff] [review]
Like so

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
(Reporter)

Updated

10 years ago
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.
Created attachment 280949 [details] [diff] [review]
With that approach
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
Last Resolved: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.