13 Commits

Author SHA1 Message Date
Gaming4JC 1115c63bf7 Issue #1621 - Part 3: Use nsIAtom to change attirbute if possible.
We can replace old nsIEditor API with nsIAtom version.

Ref: Bug 1324996
2020-07-31 15:59:58 -04:00
Gaming4JC 1c0c7cf583 Issue #1621 - Part 2: Implement nsIAtom version of SetAttribute/RemoveAttribute/CloneAttirubte.
Add nsIAtom version of the following.
 - CloneAttribute
 - RemoveAttribute
 - RemoveAttributeOrEquivalent
 - SetAttribute
 - SetAttributeOrEquivalent

Ref: Bug 1324996
2020-07-31 15:59:58 -04:00
Gaming4JC baa4b609d9 Issue #1621 - Part 1: CSSEditUtils should use atom for CSS property if possible.
There is a lot of string compare when using CSS property name. We should use nsGkAtoms instead.

Ref: Bug 1323138
2020-07-31 15:59:53 -04:00
Matt A. Tobin 6d76ab9b6c Bug 1360154 - nsIPlaintextEditor might have to have hasText property for UpdateOverlayTextVisibility
* DocumentIsBody should return bool, not nsresult
* Add fast path to check whether valus is emtpy

Tag #1375
2020-04-17 07:43:03 -04:00
Matt A. Tobin 61e46a6d58 Issue #1375 - Stop largely using the parser service
This is based on Bug 1395828

* Add nsHTMLElement::IsBlock()
* Rename nsHTMLTags methods
* Remove AssertParserServiceIsCorrect()
* Remove most uses of nsIParserService/nsParserService
2020-04-17 06:24:43 -04:00
Matt A. Tobin 70c8ff8e5a Bug 1377978 - Make nsRange use uint32_t to offset
Tag #1375
2020-04-17 06:10:23 -04:00
Matt A. Tobin 32e8155127 Bug 1372829 - Part 2: mozilla::EditorBase should cache raw pointer of nsISelectionController and nsIDocument with nsWeakPtr
Tag #1375
2020-04-17 05:47:12 -04:00
Matt A. Tobin 2e2190a504 Bug 1332353 - Make it clearer when a stylesheet is really owned by its mDocument
Tag #1375
2020-04-17 05:46:23 -04:00
Matt A. Tobin 516fd67d50 Bug 1337698 - Use UniquePtr instead of nsAutoPtr in editor
* PlaceholderTransaction should use UniquePtr
* HTMLEditor should use UniquePtr
* TypeInState should use UniquePtr

Tag #1375
2020-04-17 05:43:18 -04:00
Matt A. Tobin 940d191ef8 Bug 1367683 - Optimize initializing nsRange
Tag #1375
2020-04-17 05:28:43 -04:00
wolfbeast a2bc0e0ec6 Issue #1512 - Improve handling of multiple selections.
IsSelectionEditable should check whether the focus node and anchor node
aren't null before trying to use them.
This also changes the initialization of selections' aOutIndex to the
last range in the selection as a fallback in case we don't add a range
later (in AddItem) which could also end up with a null selection
otherwise if the additional selection nodes are removed.
2020-04-12 12:52:18 +02:00
wolfbeast a7bc62dcfe Issue #12 Part 2: Stop using nsIDOMEvent in IsAcceptableInputEvent. 2018-06-26 13:53:12 +02:00
Matt A. Tobin 5f8de423f1 Add m-esr52 at 52.6.0 2018-02-02 04:16:08 -05:00