Closed Bug 1770133 Opened 2 years ago Closed 2 years ago

Make `IMEStateManager` store focused element instead of focused content node

Categories

(Core :: DOM: UI Events & Focus Handling, enhancement, P3)

enhancement

Tracking

()

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

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

(Keywords: inputmethod)

Attachments

(5 files)

Only element node can have focus (see nsFocusManager::mFocusedElement). So, IMEStateManager::sContent should be IMEStateManager::sElement or more meaningful name, e.g., sFocusedElement?

Assignee: nobody → masayuki
Status: NEW → ASSIGNED

nsFocusManager defines that focused content is at least dom::Element.
So IMEStateManager can handle focused content with dom::Element too.

Additionally, this patch makes IMEStateManager methods take references instead
of pointers as far as possible if they just return error for nullptr.

Depends on D147132

The root is always an element node. So, it should take and store the root node
as dom::Element rather than nsIContent.

Depends on D147134

Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/b92de4a984f1
part 1: Rename `sContent`, `sPresContext` and `sWidget` of `IMEStateManager` r=m_kato
https://hg.mozilla.org/integration/autoland/rev/df84cc3d5d23
part 2: Make `IMEStateManager::sFocusedContent` store it as `Element` r=m_kato
https://hg.mozilla.org/integration/autoland/rev/7322de6f865f
part 3: Make `EditorBase::GetFocusedContent()` return `Element*` instead of `nsIContent*` r=m_kato
https://hg.mozilla.org/integration/autoland/rev/6151c1cf0404
part 4: Make `IMEContentObserver` use `dom::Element` instead of `nsIContent` for root r=m_kato
https://hg.mozilla.org/integration/autoland/rev/8596922e3e2e
part 5: Make `ContentEventHandler` store root node as `Element*` rather than `nsIContent*` r=m_kato

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

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Status: REOPENED → RESOLVED
Closed: 2 years ago2 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: