mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 16:25:38 +00:00
1665d4bfb2
Traditionally, `WSRunScanner` (and formerly `WSRunObject`) treats all text nodes in its range when scan start container node has preformatted style. This means that when starting start from start or end of preformatted text node or inline element, it treats adjacent white-spaces which is not preformatted as preformatted. This patch fixes this issue. Because of the fix of preceding patches, `BoundaryData` stops scanning if it meets preformatted text node. So, `BoundaryData` can store whether the scanners found a preformatted character. Therefore, if one of `BoundaryData`s is marked as "preformatted", it means the range contains a preformatted character. And keep referring the style of scan start point if there is no visible text nodes around it. Note that the above change causes new failures with `<listing>` element which should be treated as `<pre>` element, but `HTMLEditUtils` treats it as non-container inline element. https://html.spec.whatwg.org/multipage/dom.html#elements-in-the-dom:listing Therefore, this patch changes the definition of `<listing>` element and `<xmp>` element which is also mentioned in the above link to container element etc. `<listing>` element is treated exactly same as `<pre>`, therefore, the new definition is same as `<pre>`, but `<xmp>` does not allow any tags after opens it (i.e., even if its close tag). Therefore, `<xmp>` definition is different from `<listing>` and `<pre>` elements' definition. Differential Revision: https://phabricator.services.mozilla.com/D84323 |
||
---|---|---|
.. | ||
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 |