Browse Source

rebase after pushes

Frank-Rainer Grahl 1 year ago
parent
commit
cb89d5d770

+ 0 - 259
comm-central/patches/1792764-109a1.patch

@@ -1,259 +0,0 @@
-# HG changeset patch
-# User Masayuki Nakano <masayuki@d-toybox.com>
-# Date 1666394157 -32400
-#      Sat Oct 22 08:15:57 2022 +0900
-# Node ID 45657f44c0ee1499193db749f2959ef8227578a6
-# Parent  d266139e07df9cc8cac0426dae8ba157f7261d5f
-Bug 1792764 - Make comm-central stop using `nsIEditor.transactionManager` since it'll be removed
-
-`nsIEditor.transactionManager` will be removed soon and its user is now only
-SeaMonkey which want it to clear undo/redo transactions of editors.  For doing
-that, we can use `nsIEditor.clearUndoRedo()` now.
-
-Note that the purpose of `ExecuteJSTransactionViaTxmgr()` will be invalid
-after `nsIEditor.transactionManager` is removed.  Therefore, this patch removes
-it and the UI to run it too.
-
-diff --git a/suite/components/bindings/textbox.xml b/suite/components/bindings/textbox.xml
---- a/suite/components/bindings/textbox.xml
-+++ b/suite/components/bindings/textbox.xml
-@@ -91,21 +91,21 @@
-           }
-           return this.mEditor;
-         ]]></getter>
-       </property>
- 
-       <method name="reset">
-         <body><![CDATA[
-           this.value = this.defaultValue;
--          try {
--            this.editor.transactionManager.clear();
--            return true;
--          } catch (e) {}
--          return false;
-+          if (!this.editor) {
-+            return false;
-+          }
-+          this.editor.clearUndoRedo();
-+          return true;
-         ]]></body>
-       </method>
- 
-       <method name="select">
-         <body>
-           this.inputField.select();
-         </body>
-       </method>
-diff --git a/suite/components/places/content/editBookmarkOverlay.js b/suite/components/places/content/editBookmarkOverlay.js
---- a/suite/components/places/content/editBookmarkOverlay.js
-+++ b/suite/components/places/content/editBookmarkOverlay.js
-@@ -353,33 +353,18 @@ var gEditItemOverlay = {
-     }
-     return this._paneInfo._cachedCommonTags = [...commonTags];
-   },
- 
-   _initTextField(aElement, aValue) {
-     if (aElement.value != aValue) {
-       aElement.value = aValue;
- 
--      // Clear the editor's undo stack
--      let transactionManager;
--      try {
--        transactionManager = aElement.editor.transactionManager;
--      } catch (e) {
--        // When retrieving the transaction manager, editor may be null resulting
--        // in a TypeError. Additionally, the transaction manager may not
--        // exist yet, which causes access to it to throw NS_ERROR_FAILURE.
--        // In either event, the transaction manager doesn't exist it, so we
--        // don't need to worry about clearing it.
--        if (!(e instanceof TypeError) && e.result != Cr.NS_ERROR_FAILURE) {
--          throw e;
--        }
--      }
--      if (transactionManager) {
--        transactionManager.clear();
--      }
-+      // Clear the editor's undo stack, but note that editor may be null here.
-+      aElement.editor?.clearUndoRedo();
-     }
-   },
- 
-   /**
-    * Appends a menu-item representing a bookmarks folder to a menu-popup.
-    * @param aMenupopup
-    *        The popup to which the menu-item should be added.
-    * @param aFolderId
-diff --git a/suite/editor/base/content/ComposerCommands.js b/suite/editor/base/content/ComposerCommands.js
---- a/suite/editor/base/content/ComposerCommands.js
-+++ b/suite/editor/base/content/ComposerCommands.js
-@@ -1229,17 +1229,17 @@ var gEditorOutputProgressListener = {
- 
-         // Restore original document to undo image src url adjustments
-         if (gRestoreDocumentSource) {
-           try {
-             editor.rebuildDocumentFromSource(gRestoreDocumentSource);
- 
-             // Clear transaction cache since we just did a potentially
-             //  very large insert and this will eat up memory
--            editor.transactionManager.clear();
-+            editor.clearUndoRedo();
-           } catch (e) {}
-         }
- 
-         // Notify progress dialog that we're finished
-         //  and keep open to show error
-         gProgressDialog.SetProgressFinished(null, 0);
- 
-         // We don't want to change location or reset mod count, etc.
-diff --git a/suite/editor/base/content/editor.js b/suite/editor/base/content/editor.js
---- a/suite/editor/base/content/editor.js
-+++ b/suite/editor/base/content/editor.js
-@@ -1846,56 +1846,54 @@ function SetEditMode(mode) {
-     if (IsHTMLSourceChanged()) {
-       // Disable spell checking when rebuilding source
-       InlineSpellCheckerUI.enabled = false;
-       inlineSpellCheckItem.removeAttribute("checked");
- 
-       // Reduce the undo count so we don't use too much memory
-       //   during multiple uses of source window
-       //   (reinserting entire doc caches all nodes)
--      try {
--        editor.transactionManager.maxTransactionCount = 1;
--      } catch (e) {}
-+      editor.clearUndoRedo();
- 
-       editor.beginTransaction();
-       try {
-         // We are coming from edit source mode,
-         //   so transfer that back into the document
-         source = gSourceTextEditor
-           .outputToString(kTextMimeType, kOutputLFLineBreak)
-           .trim();
-         if (editor.contentsMIMEType != kXHTMLMimeType) {
--          editor.rebuildDocumentFromSource(source);
-+          editor.rebuildDocumentFromSource(source);  // This is undoable
-         } else {
-           /* eslint-disable-next-line no-unsanitized/method */
-           var fragment = editor.document
-             .createRange()
-             .createContextualFragment(source);
--          editor.enableUndo(false);
-           GetBodyElement().remove();
-           editor.document.replaceChild(
-             fragment.firstChild,
-             editor.document.documentElement
-           );
--          editor.enableUndo(true);
-+          // We touched the DOM tree without transaction here so that we broke
-+          // undoable transactions.  However, we cleared all undoable things
-+          // above.  Therefore nothing must be in the undo stack.
-         }
- 
-         // Get the text for the <title> from the newly-parsed document
-         // (must do this for proper conversion of "escaped" characters)
-         let titleNode = editor.document.querySelector("title");
-         SetDocumentTitle(titleNode ? titleNode.textContent : "");
-       } catch (ex) {
-         dump(ex);
-       }
-+      // If the MIME type is kXHTMLMimeType, we don't put any undoable
-+      // transaction.  Then, this endTransaction() call does not allow to
-+      // live empty transaction.  Therefore, the unnecessary empty transaction
-+      // will be cleared here automatically.
-       editor.endTransaction();
--
--      // Restore unlimited undo count
--      try {
--        editor.transactionManager.maxTransactionCount = -1;
--      } catch (e) {}
-     }
- 
-     // Clear out the string buffers
-     gSourceContentWindow.commandManager.removeCommandObserver(
-       gSourceTextObserver,
-       "cmd_undo"
-     );
-     gSourceTextEditor.removeDocumentStateListener(gSourceTextListener);
-diff --git a/suite/extensions/debugQA/content/debugQAEditorOverlay.js b/suite/extensions/debugQA/content/debugQAEditorOverlay.js
---- a/suite/extensions/debugQA/content/debugQAEditorOverlay.js
-+++ b/suite/extensions/debugQA/content/debugQAEditorOverlay.js
-@@ -173,37 +173,16 @@ sampleJSTransaction.prototype = {
- 
-     if (childList.length == 0 || offset >= childList.length)
-       container.appendChild(node);
-     else
-       container.insertBefore(node, childList.item(offset));
-   }
- }
- 
--function ExecuteJSTransactionViaTxmgr()
--{
--  try {
--    var editor = GetCurrentEditor();
--    var txmgr = editor.transactionManager;
--    txmgr = txmgr.QueryInterface(Ci.nsITransactionManager);
--
--    var selection = editor.selection;
--    var range =  selection.getRangeAt(0);
--
--    var txn = new sampleJSTransaction();
--
--    txn.mContainer = range.startContainer;
--    txn.mOffset = range.startOffset;
--
--    txmgr.doTransaction(txn);
--  } catch (e) {
--    dump("ExecuteJSTransactionViaTxmgr() failed!");
--  }
--}
--
- function ExecuteJSTransactionViaEditor()
- {
-   try {
-     var editor = GetCurrentEditor();
- 
-     var selection = editor.selection;
-     var range =  selection.getRangeAt(0);
- 
-diff --git a/suite/extensions/debugQA/content/debugQAEditorOverlay.xul b/suite/extensions/debugQA/content/debugQAEditorOverlay.xul
---- a/suite/extensions/debugQA/content/debugQAEditorOverlay.xul
-+++ b/suite/extensions/debugQA/content/debugQAEditorOverlay.xul
-@@ -29,18 +29,16 @@
-         <menuitem label="&insertTextCmd.label;"
-                   oncommand="EditorInsertText('All good things come to those who wait. ')"/>
-         <menuseparator/>
-         <menuitem label="&testSelectionCmd.label;"
-                   oncommand="EditorTestSelection()"/>
-         <menuitem label="&testDocumentCmd.label;"
-                   oncommand="EditorTestDocument()"/>
-         <menuseparator/>
--        <menuitem label="&executeJSTransactionViaTxmgr.label;"
--                  oncommand="ExecuteJSTransactionViaTxmgr()"/>
-         <menuitem label="&executeJSTransactionViaEditor.label;"
-                   oncommand="ExecuteJSTransactionViaEditor()"/>
-         <menuseparator/>
-         <menuitem label="&setFocusCmd.label;"
-                   oncommand="window.focus()"/>
-       </menupopup>
-     </menu>
-   </menubar>
-diff --git a/suite/extensions/debugQA/locales/en-US/debugQAEditorOverlay.dtd b/suite/extensions/debugQA/locales/en-US/debugQAEditorOverlay.dtd
---- a/suite/extensions/debugQA/locales/en-US/debugQAEditorOverlay.dtd
-+++ b/suite/extensions/debugQA/locales/en-US/debugQAEditorOverlay.dtd
-@@ -11,16 +11,15 @@
- <!ENTITY debugMenu.label "Debug">
- <!ENTITY newEditorTestPage.label "Composer with Test Page">
- <!ENTITY textEditorCmd.label "Plaintext Editor">
- <!ENTITY outputTextCmd.label "Output Text">
- <!ENTITY outputHTMLCmd.label "Output HTML">
- <!ENTITY insertTextCmd.label "Insert Text">
- <!ENTITY testSelectionCmd.label "Test Selection">
- <!ENTITY testDocumentCmd.label "Test Document">
--<!ENTITY executeJSTransactionViaTxmgr.label "Execute JS Transaction Via Transaction Manager">
- <!ENTITY executeJSTransactionViaEditor.label "Execute JS Transaction Via Editor">
- <!ENTITY setFocusCmd.label "Set Focus">
- 
- <!-- Text editor values -->
- <!ENTITY textEditorWindow.titlemodifier "Text Editor">
- 
- <!ENTITY statusText.label "Done loading page">

+ 0 - 28
comm-central/patches/9999999-port1802233-suite-109a1.patch

@@ -1,28 +0,0 @@
-# HG changeset patch
-# User Bill Gianopoulos <wgianopoulos@gmail.com>
-# Date 1669374244 0
-Bug 9999999 - Port bug 1802233 to suite.
-Bug 1802379 - Update target_is_linux with target_has_linux_kernel in config files.
-
-diff --git a/suite/moz.configure b/suite/moz.configure
---- a/suite/moz.configure
-+++ b/suite/moz.configure
-@@ -6,17 +6,17 @@
- 
- set_config("MOZ_SUITE", True)
- set_define("MOZ_SUITE", True)
- 
- imply_option("MOZ_APP_BASENAME", "SeaMonkey")
- 
- imply_option('--enable-default-browser-agent', False)
- 
--@depends(target_is_windows, target_is_linux)
-+@depends(target_is_windows, target_has_linux_kernel)
- def bundled_fonts(is_windows, is_linux):
-     if is_windows or is_linux:
-         return True
- 
- 
- set_config("MOZ_BUNDLED_FONTS", bundled_fonts)
- add_old_configure_assignment("MOZ_BUNDLED_FONTS", bundled_fonts)
- 

+ 0 - 2
comm-central/patches/series

@@ -1,5 +1,3 @@
-1792764-109a1.patch
-9999999-port1802233-suite-109a1.patch
 TOP-1642188-remove-nsDOMIEvent-cc.patch
 TOP-1611010-DOMEventListener-cc.patch
 TOP-1614671-port1456035-4-and-5-61a1-cc.patch