gecko-dev/editor
Masayuki Nakano 1665d4bfb2 Bug 1653534 - part 4: Make TextFragmentData set its mIsPreformatted more carefully r=m_kato
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
2020-07-27 23:58:04 +00:00
..
composer Bug 1649554: Part 1 - Move deprecated component registration helpers out of XPCOMUtils. r=mccr8,remote-protocol-reviewers,marionette-reviewers,perftest-reviewers,webcompat-reviewers,whimboo,twisniewski 2020-07-10 23:58:30 +00:00
libeditor Bug 1653534 - part 4: Make TextFragmentData set its mIsPreformatted more carefully r=m_kato 2020-07-27 23:58:04 +00:00
reftests Bug 312971 - Unprefix -moz-read-write / -moz-read-only. r=edgar 2020-05-14 16:46:08 +00:00
spellchecker Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj 2020-07-01 08:29:29 +00:00
txmgr Bug 1337953 - Make nsDeque templated on pointer type r=froydnj 2020-06-25 02:39:23 +00:00
AsyncSpellCheckTestHelper.jsm
moz.build Bug 1449522 - Remove nsIEditorStyleSheets. r=masayuki,m_kato 2020-04-17 22:54:48 +00:00
nsIDocumentStateListener.idl Bug 1612477 - part 2: Remove nsIDocumentStateListener.NotifyDocumentCreated() r=m_kato 2020-02-04 06:19:55 +00:00
nsIEditActionListener.idl Bug 1639161 - part 3: Get rid of nsIEditActionListener::DidDeleteText() r=m_kato 2020-05-21 08:23:04 +00:00
nsIEditor.idl Bug 1619914 - part 2: Mark transaction class methods and their caller methods as `MOZ_CAN_RUN_SCRIPT r=m_kato 2020-04-03 08:32:01 +00:00
nsIEditorMailSupport.idl
nsIEditorObserver.idl
nsIEditorSpellCheck.idl
nsIHTMLAbsPosEditor.idl
nsIHTMLEditor.idl Bug 1624007 - Don't check IsSelectionRangeContainerNotContent() for/in GetElementOrParentElement*() r=m_kato 2020-04-09 10:10:36 +00:00
nsIHTMLInlineTableEditor.idl
nsIHTMLObjectResizer.idl
nsITableEditor.idl Bug 1635709: part 17) Annotate CellIndexes's methods with MOZ_CAN_RUN_SCRIPT. r=masayuki 2020-05-14 10:08:44 +00:00