gecko-dev/editor
Makoto Kato 48c416047f Bug 1375910 - Don't remove text node when setting value is empty string. r=masayuki
When setting empty value by input.value, we remove text node and insert bogus node.  But creating and removing node are expensive.  So we should keep text node for performance if possible.

Now, DocumentIsEmpty only checks bogus node to detect empty.  So, keeping text node change causes that document cannot detect as empty.  If root has only text node and all is empty, we should detect empty document.

This change should be only plain text editor.  HTML editor already allows multiple text nodes, so we should keep old behaviour on HTML editor.


MozReview-Commit-ID: Gt8GmdWAA3E

--HG--
extra : rebase_source : 4c5deba024cab3d7e2e1e2a8ec53a29f2fdf8cd9
2017-06-28 07:42:09 +09:00
..
composer Bug 1372405 - Provide names for all runnables in the tree (r=froydnj) 2017-06-26 14:19:58 -07:00
libeditor Bug 1375910 - Don't remove text node when setting value is empty string. r=masayuki 2017-06-28 07:42:09 +09:00
reftests Bug 1290276 Part 8 - Update test expectations after implementing XBL <stylesheet> for stylo. r=heycam 2017-05-31 16:44:38 -07:00
txmgr Bug 1331081 - script generated patch to omit addEventListener/removeEventListener's third parameter when it's false, r=jaws. 2017-01-17 11:50:25 +01:00
txtsvc Bug 1367683 Optimize initializing nsRange r=smaug 2017-05-30 13:18:25 +09:00
AsyncSpellCheckTestHelper.jsm Backed out changeset 322fde2d53bf (bug 1356569) so bug 1355161 can be backed out. r=backout 2017-04-14 23:39:22 +02:00
moz.build Bug 1325281 Get rid of nsIEditorIMESupport r=m_kato 2017-05-09 15:21:22 +09:00
nsEditorCID.h
nsIContentFilter.idl
nsIDocumentStateListener.idl
nsIEditActionListener.idl
nsIEditor.idl Bug 1349178 Make nsIEditor.transactionManager readonly r=m_kato 2017-03-21 20:57:15 +09:00
nsIEditorMailSupport.idl Bug 1272893 - Remove nsISupportsArray from GetEmbeddedObjects() in editor. r=masayuki 2016-09-15 04:33:00 +02:00
nsIEditorObserver.idl
nsIEditorSpellCheck.idl
nsIEditorStyleSheets.idl Bug 1244074 - Part 4: Use StyleSheetHandle instead of concrete style sheet class in most places. r=dholbert 2016-02-24 18:01:12 +11:00
nsIEditorUtils.idl Bug 1259517 - Make dropping images in editors work in e10s. r=baku 2016-06-21 15:17:37 -07:00
nsIHTMLAbsPosEditor.idl
nsIHTMLEditor.idl Bug 1312991 Get rid of nsIHTMLEditor::SetDocumentTitle() and mozilla::SetDocumentTitleTransaction r=smaug 2016-12-26 17:46:23 +09:00
nsIHTMLInlineTableEditor.idl
nsIHTMLObjectResizer.idl Bug 1349426 - Remove nsIHTMLObjectResizeListener. r=masayuki 2017-03-27 15:16:40 +09:00
nsIPlaintextEditor.idl Bug 1358025 - Part 2. Add SetText Transaction API. r=masayuki 2017-05-25 14:30:50 +09:00
nsITableEditor.idl
nsIURIRefObject.idl
nsPIEditorTransaction.idl