mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 16:25:38 +00:00
a269bbe497
`InputEvent.getTargetRange()` should have actual delete range. It means that the range should contain the invisible leading/trailing white-spaces which need to be removed for keep them invisible, but should not contain the range of normalizing white-space sequence because they are not target of edit action indicated by `InputEvent.inputType`. So, we can use new path which uses the new white-space normalizer for computing the value of `InputEvent.getTargetRanges()` because difference of white-space normalizer shouldn't affect the deleting ranges (although, some existing path calls `DeleteNodeIfInvisibleAndEditableTextNode()` later so that the new method, `ComputeRangeInTextNodesContainingInvisibleWhiteSpaces()`, does not exactly same thing, but the result shouldn't become different in usual cases). This new path can test with some WPTs under `editing/other`. This patch creates new backspace/delete key handler when caret is at next to a white-space as `HTMLEditor::HandleDeleteTextAroundCollapsedSelection()` and creates helper methods of `WSRunScanner` to treat invisible leading and trailing white-spaces. Note that new failures are caused by the difference whether adjacent white-space sequence at deletion is normalized or not in edge cases. They will be fixed by the part.5. Depends on D84943 Differential Revision: https://phabricator.services.mozilla.com/D84944 |
||
---|---|---|
.. | ||
composer | ||
libeditor | ||
reftests | ||
spellchecker | ||
txmgr | ||
AsyncSpellCheckTestHelper.jsm | ||
moz.build | ||
nsIDocumentStateListener.idl | ||
nsIEditActionListener.idl | ||
nsIEditor.idl | ||
nsIEditorMailSupport.idl | ||
nsIEditorObserver.idl | ||
nsIEditorSpellCheck.idl | ||
nsIHTMLAbsPosEditor.idl | ||
nsIHTMLEditor.idl | ||
nsIHTMLInlineTableEditor.idl | ||
nsIHTMLObjectResizer.idl | ||
nsITableEditor.idl |