gecko-dev/dom/interfaces
Masayuki Nakano dab48fb890 Bug 1797796 - Make eSetSelection event not handled if Selection is set to same offset and length r=m_kato
`ContentEventHandler` may not replace open/close tags of inline elements and
close tags of block elements with a line break etc.  Therefore, one offset may
mean multiple points in the DOM tree.  From the DOM tree point of view, every
DOM point may have different meaning and styles.  Therefore, if IME sets
`Selection` to current range, we should not update `Selection` with the log of
`ContentEventHandler`.  Otherwise, new content will appear at different position
in the DOM tree and it may cause different style text, etc.

`IMEContentObserver` has cache of `Selection` while an editor has focus.
Therefore, for avoiding the query cost of `Selection` for each `eSetSelection`
event, `ContentEventHandler` should be used in `IMEContentObserver` instead if
an instance is available.  Therefore, this patch makes `TextComposition`
delegate the handling to `IMEContentObserver` and check `Selection` range only
when `IMEContentObserver` is available.  Note that `eSetSelection` is probably
used only when editable element has focus.  Therefore, it must be fine to skip
selection range check in the other cases.

Differential Revision: https://phabricator.services.mozilla.com/D171179
2023-03-01 05:57:32 +00:00
..
base Bug 1797796 - Make eSetSelection event not handled if Selection is set to same offset and length r=m_kato 2023-03-01 05:57:32 +00:00
events
geolocation Bug 1735097 - Geolocation: use EpochTimeStamp instead of DOMTimeStamp r=saschanaz,peterv 2021-11-17 04:01:02 +00:00
html
notification Bug 1689565 - Part 1: Remove Notification.get() r=saschanaz 2023-01-30 12:50:51 +00:00
payments
push
security Bug 1797070 - CSP: Add a basic implementation of unsafe-hashes behind a flag. r=freddyb 2022-11-07 17:56:23 +00:00
sidebar
storage
xul Bug 1815430 - nsFocusManager::GetRedirectedFocus is dead code. r=smaug 2023-02-07 13:47:48 +00:00