Closed Bug 1770874 Opened 2 years ago Closed 2 years ago

Clean up focus/blur handling code of editor

Categories

(Core :: DOM: Editor, task, P3)

task

Tracking

()

RESOLVED FIXED
102 Branch
Tracking Status
firefox102 --- wontfix
firefox103 --- fixed

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

Attachments

(8 files)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
No description provided.

It's currently a public method, but it can be protected in a following patch.

Depends on D147137

This method also can be protected in a following patch.

Depends on D147138

Note that EditorBase::OnBlur will be simpler at the last patch.

Depends on D147141

I'd like to split it for TextEditor and HTMLEditor. HTMLEditor does not
require flushing the layout because it's required by TextEditor if and only if
a preceding focus event listener or the Element.focus caller reframes
<input> or <textarea> element (bug 1755104). So this would fix bug 1760045.

Depends on D147142

Similar to the previous patch, we should split the method into TextEditor
and HTMLEditor.

Depends on D147143

Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/6946652d4ed9
part 1: Make some clean ups around `EditorBase::OnFocus` r=m_kato
https://hg.mozilla.org/integration/autoland/rev/77b1aeae51f1
part 2: Move the lambda in `EditorEventListener::Focus` to `EditorBase` r=m_kato
https://hg.mozilla.org/integration/autoland/rev/b635369043bd
part 3: Move `EditorEventListener::SpellCheckIfNeeded` to `EditorBase` r=m_kato
Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/526ea470c4dd
part 4: Move most part of `EditorEventListener::Focus` into `EditorBase::OnFocus` r=m_kato
https://hg.mozilla.org/integration/autoland/rev/9bb0023ac750
part 5: Move `EditorBase::ReinitializeSelection` into `TextEditor` r=m_kato
https://hg.mozilla.org/integration/autoland/rev/049366a15c3c
part 6: Move most part of `EditorEventListener::Blur` into `EditorBase` r=m_kato
Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/75a25dbc4c88
part 7: Make `EditorBase::OnFocus` temporarily a virtual method r=m_kato
https://hg.mozilla.org/integration/autoland/rev/5d866154c49f
part 8: Make `EditorBase::OnBlur` temporarily a virtual method r=m_kato

Backed out 8 changesets (bug 1770874) on beta, large refactoring during soft code freeze, needs nightly bake time a=backout
https://hg.mozilla.org/releases/mozilla-beta/rev/f4160fb449e4

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Status: REOPENED → RESOLVED
Closed: 2 years ago2 years ago
Resolution: --- → FIXED
Regressions: 1771780
Regressions: 1840804
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: