Граф коммитов

15 Коммитов

Автор SHA1 Сообщение Дата
Andrew McCreight f242e71c8a Bug 1545822 - Clean up some whitespace in XPIDL files. r=froydnj
The attributes for an interface should be on the line right before the
interface.

Interface attributes should be separated by spaces.

Clean up some trailing whitespace in widget/.

Differential Revision: https://phabricator.services.mozilla.com/D28234

--HG--
extra : moz-landing-system : lando
2019-04-21 01:47:00 +00:00
Masayuki Nakano 3e64f2c30d Bug 1539356 - Mark EditorBase::InsertNodeTransaction() as MOZ_CAN_RUN_SCRIPT r=m_kato
This patch marks `EditorBase::InsertNodeTransaction()` **and** its callers as `MOZ_CAN_RUN_SCRIPT`.

Unfortunately, this patch tells us that some `GetSomething()` methods may destroy the editor since `HTMLEditRules::GetNodesForOperation()`, `HTMLEditRules::GetNodesFromPoint()` and `HTMLEditRules::GetNodesFromSelection()` may change the DOM tree.  Additionally, initialization methods may destroy the editor since it may insert a bogus `<br>` node.

Note that this patch also removes some unused methods. I.e., they are not result of some cleaning up the code. This patch just avoids marking unused methods as `MOZ_CAN_RUN_SCRIPT`.

Differential Revision: https://phabricator.services.mozilla.com/D25027

--HG--
extra : moz-landing-system : lando
2019-03-30 11:55:29 +00:00
Oana Pop Rus 43fadb6745 Backed out changeset 447c87c2d139 (bug 1539356) on request of Jorg K. a=backout 2019-03-30 00:42:32 +02:00
Masayuki Nakano 81b30d7143 Bug 1539356 - Mark EditorBase::InsertNodeTransaction() as MOZ_CAN_RUN_SCRIPT r=m_kato
This patch marks `EditorBase::InsertNodeTransaction()` **and** its callers as `MOZ_CAN_RUN_SCRIPT`.

Unfortunately, this patch tells us that some `GetSomething()` methods may destroy the editor since `HTMLEditRules::GetNodesForOperation()`, `HTMLEditRules::GetNodesFromPoint()` and `HTMLEditRules::GetNodesFromSelection()` may change the DOM tree.  Additionally, initialization methods may destroy the editor since it may insert a bogus `<br>` node.

Note that this patch also removes some unused methods. I.e., they are not result of some cleaning up the code. This patch just avoids marking unused methods as `MOZ_CAN_RUN_SCRIPT`.

Differential Revision: https://phabricator.services.mozilla.com/D25027

--HG--
extra : moz-landing-system : lando
2019-03-29 10:55:31 +00:00
Masayuki Nakano 534fd23ca4 Bug 1533293 - part 2: Rewrite EditorBase::SelectEntireDocument() and its overrides r=m_kato
`EditorBase::SelectEntierDocument()` uses `Selection::Extend()` but it's too
slow.  It should use `Selection::SetStartAndEndInLimiter()` instead.

Additionally, `TextEditor::SelectEntierDocument()` shrink the result of
`EditorBase::SelectEntierDocument()` with `Selection::Extend()` if there is
a `moz-<br>` element.  So, `TextEditor::SelectEntinerDocument()` should set
its expected selection with a call for saving the runtime cost.

Then, we don't need to make `EditorBase::SelectEntierDocument()` as non-pure
virtual method.  So, this patch makes each its callers call
`Selection->SelectAllChildren()` directly.

Differential Revision: https://phabricator.services.mozilla.com/D23461

--HG--
extra : moz-landing-system : lando
2019-03-26 10:06:43 +00:00
Noemi Erli 165f0d8c1c Backed out 3 changesets (bug 1533293) for causing Bug 1536595 a=backout
Backed out changeset d011dfe83683 (bug 1533293)
Backed out changeset e536f6e123d8 (bug 1533293)
Backed out changeset 19cff61f4fed (bug 1533293)
2019-03-20 13:29:17 +02:00
Masayuki Nakano 448571fd81 Bug 1533293 - part 2: Rewrite EditorBase::SelectEntireDocument() and its overrides r=m_kato
`EditorBase::SelectEntierDocument()` uses `Selection::Extend()` but it's too
slow.  It should use `Selection::SetStartAndEndInLimiter()` instead.

Additionally, `TextEditor::SelectEntierDocument()` shrink the result of
`EditorBase::SelectEntierDocument()` with `Selection::Extend()` if there is
a `moz-<br>` element.  So, `TextEditor::SelectEntinerDocument()` should set
its expected selection with a call for saving the runtime cost.

Then, we don't need to make `EditorBase::SelectEntierDocument()` as non-pure
virtual method.  So, this patch makes each its callers call
`Selection->SelectAllChildren()` directly.

Differential Revision: https://phabricator.services.mozilla.com/D23461

--HG--
extra : moz-landing-system : lando
2019-03-18 01:51:53 +00:00
Makoto Kato f3b8a60bde Bug 1491191 - Remove unused methods in nsIEditorMailSupport. r=masayuki
Since I have landed bug 1489939, comm-central only uses rewrap method in
nsIEditorMailSupport.  And insertAsCitedQuotation is used by the test of
editor/libeditor/tests/test_bug616590.xul.

Other methods are unused now, so let's remove these from nsIEditorMailSupprt,
and move it to HTMLEditor.  Also, pasteAsQuotation is unused now even if
BlueGriffon.

Differential Revision: https://phabricator.services.mozilla.com/D5835

--HG--
extra : moz-landing-system : lando
2018-09-14 10:03:24 +00:00
Makoto Kato 7a9297b3ac Bug 1490192 - Get rid of nsIEditorMailSupport.getEmbeddedObjects. r=masayuki
Since I have landed bug 1478546, no one (inc. bluegriffon) uses this method.

Differential Revision: https://phabricator.services.mozilla.com/D5497

--HG--
extra : moz-landing-system : lando
2018-09-11 07:24:27 +00:00
Masayuki Nakano 8245258aa0 Bug 1264876 - Remove StripCites() from nsIEditorMailSupport r=m_kato
nsIEditorMailSupport::StripCites() is used only by QA addon of Seamonkey.
So, this is not necessary API now.  This patch removes it and removes its
helper classes in InternetCiter.

MozReview-Commit-ID: 4Esl3GXzo0U

--HG--
extra : rebase_source : 8f5fa85b18613726bfa7e21e5a6312cbd42af7c2
2018-07-19 16:55:31 +09:00
Masayuki Nakano 25f3d21b8d Bug 1337247 - Remove PasteAsCitedQuotation() from nsIEditorMailSupport r=m_kato
nsIEditorMailSupport::PasteAsCitedQuotation() is only used by
HTMLEditor::PasteAsQuotation().  So, we can get rid of the method from the
interface and merge current implementation with HTMLEditor::PasteAsQuotation().

MozReview-Commit-ID: II5ExMAIOhP

--HG--
extra : rebase_source : e40b9b676358a09642e16c73e702e04ac192cb18
2018-07-19 16:08:00 +09:00
Boris Zbarsky 0f8f7f6fba Bug 1463981 part 2. Remove use of nsIDOMNode in editor xpidl. r=masayuki 2018-05-24 13:18:34 -04:00
Masayuki Nakano a2333fc4bb Bug 1060051 - Make editor related interfaces builtin classes if it's possible r=Ehsan,smaug
If we make nsIEditor a builtin class, that means that its instance can be only TextEditor or HTMLEditor.  Then, users of nsIEditor can use concrete classes such as EditorBase, TextEditor or HTMLEditor instead.  Then, the users can reduce unnecessary QI and a lot of virtual calls if we'll create non-virtual methods.

So, let's make editor related interfaces builtin classes.

MozReview-Commit-ID: 93WfsSDuJiJ

--HG--
extra : rebase_source : 39151eb4ffaaf195fec57234ea84c9f4066c58d1
2017-08-04 13:57:56 +09:00
aceman 8577dea451 Bug 1272893 - Remove nsISupportsArray from GetEmbeddedObjects() in editor. r=masayuki
--HG--
extra : amend_source : 2e47d294e70be626e77f5b46614c907e17ac5ba5
2016-09-15 04:33:00 +02:00
Birunthan Mohanathas 4f1864539d Bug 1028565 - Part 5: Flatten editor/{idl,public}/ directories. r=ehsan
--HG--
rename : editor/public/nsEditorCID.h => editor/nsEditorCID.h
rename : editor/idl/nsIContentFilter.idl => editor/nsIContentFilter.idl
rename : editor/idl/nsIDocumentStateListener.idl => editor/nsIDocumentStateListener.idl
rename : editor/idl/nsIEditActionListener.idl => editor/nsIEditActionListener.idl
rename : editor/idl/nsIEditor.idl => editor/nsIEditor.idl
rename : editor/idl/nsIEditorIMESupport.idl => editor/nsIEditorIMESupport.idl
rename : editor/idl/nsIEditorMailSupport.idl => editor/nsIEditorMailSupport.idl
rename : editor/idl/nsIEditorObserver.idl => editor/nsIEditorObserver.idl
rename : editor/idl/nsIEditorSpellCheck.idl => editor/nsIEditorSpellCheck.idl
rename : editor/idl/nsIEditorStyleSheets.idl => editor/nsIEditorStyleSheets.idl
rename : editor/idl/nsIHTMLAbsPosEditor.idl => editor/nsIHTMLAbsPosEditor.idl
rename : editor/idl/nsIHTMLEditor.idl => editor/nsIHTMLEditor.idl
rename : editor/idl/nsIHTMLInlineTableEditor.idl => editor/nsIHTMLInlineTableEditor.idl
rename : editor/idl/nsIHTMLObjectResizeListener.idl => editor/nsIHTMLObjectResizeListener.idl
rename : editor/idl/nsIHTMLObjectResizer.idl => editor/nsIHTMLObjectResizer.idl
rename : editor/idl/nsIPlaintextEditor.idl => editor/nsIPlaintextEditor.idl
rename : editor/idl/nsITableEditor.idl => editor/nsITableEditor.idl
rename : editor/idl/nsIURIRefObject.idl => editor/nsIURIRefObject.idl
rename : editor/idl/nsPIEditorTransaction.idl => editor/nsPIEditorTransaction.idl
2014-07-16 12:02:34 -07:00