Closed Bug 1386472 Opened 7 years ago Closed 7 years ago

Only register the AccessibleCaretEventHub when the accessible caret is enabled

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

No description provided.
The selection listener from this class shows up in profiles.
Assignee: nobody → ehsan
Blocks: 1346723
Comment on attachment 8892700 [details] [diff] [review] Only register the AccessibleCaretEventHub when the accessible caret is enabled >+++ b/dom/html/nsTextEditorState.cpp >+ bool accessibleCaretEnabled = >+ PresShell::AccessibleCaretEnabled(aLimiter->OwnerDoc()->GetDocShell()) So... this pref is live. Can we end up with "true" here while PresShell::Init got false and hence didn't set up mAccessibleCaretEventHub? Seems like we can. I guess we null-check the return value of mShell->GetAccessibleCaretEventHub() so it's ok? >+++ b/layout/generic/nsFrameSelection.cpp >+ mDesiredPosSet = false; This is a drive-by fix? >+ mAccessibleCaretEnabled = false; We should really switch this stuff to initializers or per-member default values... Followup.
Attachment #8892700 - Flags: review?(bzbarsky) → review+
(In reply to Boris Zbarsky [:bz] from comment #3) > Comment on attachment 8892700 [details] [diff] [review] > Only register the AccessibleCaretEventHub when the accessible caret is > enabled > > >+++ b/dom/html/nsTextEditorState.cpp > > >+ bool accessibleCaretEnabled = > >+ PresShell::AccessibleCaretEnabled(aLimiter->OwnerDoc()->GetDocShell()) > > So... this pref is live. Can we end up with "true" here while > PresShell::Init got false and hence didn't set up mAccessibleCaretEventHub? > Seems like we can. I guess we null-check the return value of > mShell->GetAccessibleCaretEventHub() so it's ok? Yes. > >+++ b/layout/generic/nsFrameSelection.cpp > >+ mDesiredPosSet = false; > > This is a drive-by fix? Yes. > >+ mAccessibleCaretEnabled = false; > > We should really switch this stuff to initializers or per-member default > values... Followup. Filed bug 1387176.
Pushed by eakhgari@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/d66d2f96f702 Only register the AccessibleCaretEventHub when the accessible caret is enabled; r=bzbarsky
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: