75 Commits
Author SHA1 Message Date
Daniel Holbert 79989da63d Bug 2043110: Use MakeRefPtr to do allocation for various RefPtr variables in editor/. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D302963
2026-05-29 04:28:03 +00:00
Sylvestre Ledru 9f5cc05eee Bug 2023419 - Remove Emacs/Vim modelines from editor/ r=masayuki
replaced by .editorconfig
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D287844
2026-03-16 12:52:41 +00:00
Masayuki Nakano 71f6752f79 Bug 1982458 - part 1: Clean up the trackers r=m_kato
The `AutoTrackDOMPoint` constructor which takes `nsCOMPtr<nsINode>&` and
`uint32_t` is not used anymore. Thus, we can get rid of the mode.

And `FlushAndStopTracking()` should be replaced with
`Flush(StopTracking::Yes)` and align the relatives to use the same
API style.

Differential Revision: https://phabricator.services.mozilla.com/D283634
2026-02-19 13:43:33 +00:00
Masayuki Nakano 68c35294f1 Bug 1979228 - Optimize MoveSiblingsTransaction for IMEContentObserver r=m_kato
`IMEContentObserver` has a cache to avoid to compute start offset of
inserted or removing text every time.  However, that works only when
the same mutation occurs of consecutive nodes.

`MoveSiblingsTransaction` uses `nsINode::InsertBefore()` directly to
connected nodes.  Therefore, from `IMEContentObserver` point of view,
multiple pairs of removing text and inserting text occur.  So,
`IMEContentObserver` cannot use its cache.

Therefore, `MoveSiblingsTransaction` should remove all nodes first.
Then, `IMEContentObserver` can use the cache for deleting text.
Finally, `MoveSiblingsTransaction` should insert all removed nodes to
the DOM.  Then, `IMEContentObserver` can use the cache for inserting
text.

Differential Revision: https://phabricator.services.mozilla.com/D259720
2025-08-12 08:25:39 +00:00
Masayuki Nakano 9fd27e7690 Bug 1937289 - Make AutoRangeArray::ExtendAnchorFocusRangeFor stop using nsFrameSelection r=m_kato,jjaschke,dom-core
`AutoRangeArray` is created for making some handlers of the editor classes free
from `Selection` and `nsFrameSelection` while handling the edit actions.
However, the method still depends on `nsFrameSelection` instance since its
callees are instance methods of `nsFrameSelection`.

However, `EditContext` requires completely free methods to compute target
ranges of `beforeinput`.  Therefore, we need to make it not depend on
`Selection` nor `nsFrameSelection`.

The common method, `nsFrameSelection::CreateRangeExtendedToSomewhere`, requires
`PresShell`, selection limiter which is set only when the selection is an
independent selection like in a selection for a text control, selection
ancestor limiter which is set only when an editing host has focus, caret
association hint to put caret to end of preceding line or start of following
line if selection range is collapsed at a line break and caret bidi level for
considering caret position around line break in bidi text.  They are now stored
by `nsFrameSelection` and modified when selection range is changed in some
cases.  Basically, the method is called without updating its ranges and if and
only if it's initialized with `Selection`.  So, simply caching the
`nsFrameSelection`'s values solves the issues in the most cases, but this
patch makes `AutoRangeArray` adjust the value only when its `Collapse` is
called because `Selection` automatically updates it and we can compute the
value without `Selection` nor `nsFrameSelection`.

After applying this patch, `AutoRangeArray` has two meanings, one is the
instance is a proxy for `Selection`.  The other is a container for a range to
call methods which take pointer or reference to it.  To make this differences
checked at build time, this patch creates a new subclass of it, and renamed to
`AutoClonedRangeArray` to make it clearer that what are stored in the array.

Oddly, `AutoRangeArray(nsRange&)` constructor has not been cloned.  Therefore,
I make it and its subclass version clone before storing into the array.  Then,
one caller needs to change which range should be tracked.

Differential Revision: https://phabricator.services.mozilla.com/D232174
2025-01-07 01:56:52 +00:00
Masayuki Nakano a0474a51e8 Bug 1935924 - part 1: Implement EditorLineBreak class to treat both <br> and a preformatted linefeed with one data structure r=m_kato
`HTMLEditor` and its helper classes need to handle both a `<br>` and a
preformatted linefeed in the same way.  However, the former is an independent
node but the latter is a char in a `Text` node.  Therefore, it makes the
implementation simpler for making each `<br>` element handler treat a
preformatted linefeed in same path if there is a class to store the both
types of a line break.

Differential Revision: https://phabricator.services.mozilla.com/D231654
2024-12-20 11:42:13 +00:00
Masayuki Nakano bb6004a973 Bug 1930565 - part 2: Implement DeleteRangeResult and make AutoInclusiveAncestorBlockElementsJoiner::Run return it r=m_kato
`AutoBlockElementsJoiner::HandleDeleteNonCollapsedRange` may delete multiple
lines if selection ranges partially select table(s) because in such case, we
keep the table structure but delete the selected content.  Therefore, it
requires clean up padding line breaks in multiple places.  However, when it
wants to clean them up, there is no enough information about the deleted ranges.
Therefore, this patch makes the one of the callee return it.

Depends on D229857

Differential Revision: https://phabricator.services.mozilla.com/D229858
2024-11-30 22:22:43 +00:00
Masayuki Nakano d5b69e3665 Bug 1930565 - part 1: Make the line move methods of WhiWhiteSpaceVisibilityKeeper return MoveNodeResult r=m_kato
`MoveNodeResult` is usually merged with an ignored result which store the first
insertion point and multiple handled results which store next insertion points.
Therefore, the final result can store the moved content nodes range.  The range
is useful to clean up unnecessary line breaks and to insert padding line breaks.

Therefore, this patch makes `MoveNodeResult` compute the range in `|=` operator
and make the methods return the range of moved content.

Differential Revision: https://phabricator.services.mozilla.com/D229857
2024-11-30 22:22:43 +00:00
Masayuki Nakano 484742d76d Bug 1859245 - part 4: Make HTMLEditor handle only the new direction mode r=m_kato
Depends on D191607

Differential Revision: https://phabricator.services.mozilla.com/D191608
2023-10-27 01:57:29 +00:00
Masayuki Nakano 27bdbb5436 Bug 1859245 - part 2: Make HTMLEditor::DoJoinNodes and HTMLEditor::DoSplitNode handle only the new direction mode r=m_kato
Depends on D191605

Differential Revision: https://phabricator.services.mozilla.com/D191606
2023-10-27 01:57:29 +00:00
Masayuki Nakano 3338a19d84 Bug 1820448 - Make RangeUpdater::SelAdjSplitNode handle insertion better r=m_kato
The root cause of this bug is, we tried to compute new offset with offset at
the new node.  However, as explained in the inline comments, it should compute
the offset with the right node offset in the new mode.  Therefore, it needs
to handle it by itself instead of just calling `SelAdjInsertNode`.

Differential Revision: https://phabricator.services.mozilla.com/D171965
2023-03-13 18:30:04 +00:00
Andrew McCreight 188ac80e29 Bug 1805931, part 2 - Automated removal of uses of ROOT and UNROOT CC macros. r=smaug
As of the prior patch, these are no longer needed. I removed
these with a script, then ran clang-format on the files, then
manually reverted a few unrelated changed from the formatter.

Differential Revision: https://phabricator.services.mozilla.com/D164829
2022-12-15 19:45:01 +00:00
Masayuki Nakano 709858480c Bug 1793873 - Make HTMLEditor::DoSplitNode stop assuming that joining nodes are in same parent r=m_kato
Between splitting a node and undoing it, web apps can move split nodes anywhere.
Therefore, it shouldn't assume they are always in same parent node, and
`RangeUpdater::SelAdjJoinNodes` needs to handle it correctly.

Unfortunately, `RangeUpdater::SelAdjJoinNodes` cannot handle nested cases
correctly, e.g., right node was in `aRemovedContent` or right node was in
the container of `aStartOfRightContent.GetContainer()`.  However, it's not
a new regression, and such complicated situation breaks undoing anyway.
Therefore, I think that we don't need to care about it for now.

Differential Revision: https://phabricator.services.mozilla.com/D159230
2022-10-14 02:49:13 +00:00
Masayuki Nakano 0b074382f7 Bug 1793694 - part 3: Move definitions of JoinNodesDirection and SplitNodeDirection into a new exposed header file r=m_kato
They are used in public inline methods of `HTMLEditor`.  Therefore, they should
be defined in an exposed header file without other internal use things for the
editor module.  Then, we can stop exposing `HTMLEditHelpers.h`.

Depends on D158632

Differential Revision: https://phabricator.services.mozilla.com/D158633
2022-10-12 02:44:18 +00:00
Masayuki Nakano 23debc5658 Bug 1792387 - part 3-1: Make HTMLEditor::DoSplitNode() adjust selection for both split node directions r=m_kato
This patch adds new path to adjust selection for the new split node direction.
So this does not change any behavior of the existing path.

Differential Revision: https://phabricator.services.mozilla.com/D158100
2022-09-30 22:20:20 +00:00
Masayuki Nakano de4b21faab Bug 1792387 - part 2-2: Make HTMLEditor::DoJoinNodes() handle both join nodes directions r=m_kato
This changes the existing path's behavior a bit.  However, it should not affect
to web apps in the wild because it must be really rare case that web apps
inserting new nodes into the removing node while moving its children.

Differential Revision: https://phabricator.services.mozilla.com/D158099
2022-09-30 22:20:20 +00:00
Masayuki Nakano 39de4b58db Bug 1789344 - Make SelectionState::DidMoveNode track DOM points having pointed the moved content correctly r=m_kato
When selection is `abc<b>[def</b>]ghi`, `insertParagraph` command will delete
the `<b>` element first, then, `Selection` becomes `abc{}ghi`.  Then,
`HTMLEditor::InsertParagraphSeparatorAsSubAction` wraps all of the line in
the default paragraph, `<div>`, with
`HTMLEditor::FormatBlockContainerWithTransaction` (although this is incompatible
behavior with the other browsers).  At this time, new `<div>` is inserted before
the first text node and then, move the text nodes into the new `<div>`.

However, `RangeUpdater::DidMoveNode` just slides the offsets if containers of
registered DOM points are the ex-parent of the moving nodes.  Therefore, the
tracked selection range in `HTMLEditor::FormatBlockContainerWithTransaction`
become `<div></div>abc{}def`, then, `<div>abcdef</div>{}`, but the expected
behavior is of course, `<div>abc{}def</div>`, then, split the new `<div>`.

So the problem is, `DidMoveNode` assumes that DOM points won't point the moving
content node.  If the node is pointed, it should keep pointing in the new
parent.

Note that the expectations of new tests are based on Chrome, therefore, the
new known failures are incompatible with Chrome.

Differential Revision: https://phabricator.services.mozilla.com/D156798
2022-09-12 23:53:37 +00:00
Masayuki Nakano bc61a1665a Bug 1785801 - Make RangeUpdater::SelAdjJoinNodes take the ex-offset of right node r=m_kato
In bug 1739524, I misunderstood the meaning of `aOffset` of `SelAdjJoinNodes`.

After joining 2 nodes, and a point points right node which will have ex-left
node content, the point needs to point ex-start of the right node to keep
next insertion point as-is.  Therefore, it's not useful with new join nodes
direction, it needs to know the ex-offset of the right node.

Differential Revision: https://phabricator.services.mozilla.com/D155438
2022-08-26 01:50:07 +00:00
Masayuki Nakano 276855fa75 Bug 1775381 - Move AutoRangeArray from EditorUtils.h to its own header and cpp file r=m_kato
Depends on D152982

Differential Revision: https://phabricator.services.mozilla.com/D153063
2022-08-04 05:39:16 +00:00
Masayuki Nakano 71dde570e5 Bug 1770877 - part 25: Make HTMLEditor::FormatBlockContainerWithTransaction stop touching Selection directly r=m_kato
This patch makes it take `AutoRangeArray` and it can save a snapshot of the
ranges and restore it like `AutoSelectionRestorer`.

For accessing `HTMLEditor::RangeUpdaterRef` for clearing the saved ranges,
`AutoRangeArray` needs to store `HTMLEditor`.  Therefore, its constructors
and the destructor cannot be inlined in the header due to the include-hell.

Differential Revision: https://phabricator.services.mozilla.com/D149089
2022-06-21 05:58:45 +00:00
Masayuki Nakano 4779f9e6d1 Bug 1766355 - part 1: Add MoveNodeTransaction to handle delete node and insert node in a transaction class instance r=m_kato
Creating both `DeleteNodeTransaction` and `InsertNodeTransaction` wastes
memory.  They should be done in an instance instead.

Fortunately, no edit action listener checks whether the deleted node is still
in the composed document or not, etc.  Therefore, we can simply notify them of
both deletion and insertion which were done in
`EditorBase::InsertNodeWithTransaction` and
`EditorBase::DeleteNodeWithTransaction`.  Note that previously, the range
updater needs to ignore the notifications from them while the node is being
moved.  However, it does not require anymore.  Therefore, this patch makes it
stop locking, and that would fix minor problem in the case of legacy mutation
event listeners run another edit action.

On the other hand, this changes some edge cases handling of
`MoveNodeWithTransaction` which are detected by the WPT.  According to the
previous result of applying this patch, `nsINode::InsertBefore` fails and that
leads some errors at updating the changed range.  I guess that the cause is
that there is some bugs at updating insertion point after deleting the node from
the DOM tree around here:
https://searchfox.org/mozilla-central/rev/0ffae75b690219858e5a45a39f8759a8aee7b9a2/editor/libeditor/HTMLEditor.cpp#5058-5071

However, it's safely fixed by the new code which does not remove the node from
the DOM tree explicitly.  So, I think that it's safe to accept this behavior
change for web apps in the wild.

Differential Revision: https://phabricator.services.mozilla.com/D146397
2022-05-20 08:28:08 +00:00
Kagami Sascha Rosylight 2b3baf8dfe Bug 1767998 - Apply readability-make-member-function-const on editor/libeditor r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D145626
2022-05-13 05:35:25 +00:00
Masayuki Nakano 9db4baa95c Bug 1766956 - part 3: Make SelectionState stop using nsRange to compare DOM points r=m_kato
The creation and initialization cost of `nsRange` is expensive.  And just
comparing DOM points does not require the checks of ancestors which are
required by `nsRange` to observe DOM mutations.  Therefore, although the
logic is not exactly same, we can skip the additional unnecessary cost.
Note that the Editor module checks without `nsRange`'s strict initialization
in most places so that it must not be required to do the strict check only in
`SelectionState`.

Additionally, this moves some definitions of `SelectionState` methods to
its header for making them inlined since the dependency is now reduced.

Finally, some methods are renamed to align to `Selection` API.

Depends on D145226

Differential Revision: https://phabricator.services.mozilla.com/D145227
2022-05-09 05:01:58 +00:00
Masayuki Nakano 31b6f543c6 Bug 1766956 - part 2: Make PlaceholderTransaction::Merge return false if the caret points of merging transactions are in different root nodes r=m_kato
This is the most cases of the warnings.  If previous transactions occurred in
now disconnected subtree, e.g., they are replaced by setting `innerHTML` to
check different scenarios, `nsRange::CompareBoundaryPoints` return error.
Therefore, this case should be handled before comparing the range boundaries
and logged for making easier to debug.

Depends on D145225

Differential Revision: https://phabricator.services.mozilla.com/D145226
2022-05-09 04:55:42 +00:00
Masayuki Nakano b0f4eb918f Bug 1766956 - part 1: Make PlaceholderTransaction::StartSelectionEquals call SelectionState::Equals only when both selection caches store caret positions r=m_kato
The warnings are caused by comparing a range with non-positioned range, or
comparing non-positioned ranges.  And `SelectionState::IsCollapsed()` may
return `true` when it has and only has a non-positioned range.

Therefore, this patch adds new method which checks whether the selection cache
points a caret position or not instead of the "collapsed" state, and make
`PlaceholderTransaction::StartSelectionEquals` check is result before calling
`SelectionState::Equals`.

Differential Revision: https://phabricator.services.mozilla.com/D145225
2022-05-09 04:55:42 +00:00
Masayuki Nakano daf79ccd1e Bug 1735446 - part 4: Make Selection::GetRangeAt() take uint32_t instead of int32_t r=smaug
It's an internal API corresponding to `Selection.getRangeAt` DOM API.
I think that it should use `uint32_t` rather than `size_t` because of the
consistency with the DOM API and `Selection::RangeCount()`.

This patch fixes all callers of `GetRangeAt()`, and rewrites it with ranged-
loops unless original ones do not refer `RangeCount()` every time and may run
script in the loop.

Differential Revision: https://phabricator.services.mozilla.com/D128848
2021-12-09 07:35:09 +00:00
Masayuki Nakano 52d48428b0 Bug 1739524 - part 2: Make RangeUpdater::SelAdjSplitNode() handle both cases that right/left node is a new node r=m_kato
Currently, it assumes that `aLeftNode` is new node and the other is the original
one.  However, we need the opposite case when we fix bug 1735608.

Unfortunately, we cannot test the new path until we fix bug 1735608.  Therefore,
the new path may contain some bugs.

Differential Revision: https://phabricator.services.mozilla.com/D130427
2021-11-08 09:49:33 +00:00
Masayuki Nakano 446d91831f Bug 1739524 - part 1: Make RangeUpdater::SelAdjJoinNodes() handle both cases that right/left node is joined into the other r=m_kato
Currently, it assumes that all children or text data of `aRightContent` is
moved into `aLeftContent`.  However, we need the opposite case when we fix
bug 1735608.

Unfortunately, we cannot test the new path until we fix bug 1735608.  Therefore,
the new path may contain some bugs.

Differential Revision: https://phabricator.services.mozilla.com/D130426
2021-11-08 09:49:33 +00:00
Masayuki Nakano 4032130c80 Bug 1719669 - Fix the reverse loop in SelectionState::SaveSelection() r=m_kato
The crash is caused by the infinite loop to delete unnecessary ranges.
The `i` is always equals or larger than `0` due to unsigned.  So, if
`Selection::RangeCount()` is `0`, `i` can be `UINT32_MAX`.

Instead, we can use `nsTArray<RefPtr<RangeItem>>::TruncateLength()`.

Differential Revision: https://phabricator.services.mozilla.com/D119564
2021-07-12 07:52:32 +00:00
Masayuki Nakano 780fbf11f8 Bug 1714914 - Make editor classes treat offset in parent node as uint32_t r=m_kato
It should be treated as `uint32_t` since DOM API does so.  However, there are
some exceptions:

* Result of `nsINode::ComputeIndexOf()`
* Result of `nsAString` methods

They return `-1` as not found, and anyway, they cannot treat large integer
than `INT32_MAX`.  Therefore, this patch does not touch around them.

Differential Revision: https://phabricator.services.mozilla.com/D118933
2021-06-30 07:07:28 +00:00
Masayuki Nakano 46ab2cf315 Bug 1639161 - part 1: Create ReplaceTextTransaction class r=m_kato
Currently, when `HTMLEditor` replaces text in a text node, `HTMLEditor`
creates a set of `DeleteTextTransaction` and `InsertTextTransaction`.
However, this has bad impact for footprint and causes the callers messy.

This patch creates `ReplaceTextTransaction` instead and
`HTMLEditor::ReplaceTextWithTransaction()` as its wrapper.  Unfortunately,
this becomes not calling `nsIEditActionListener::DidDeleteText()`, however,
this is not used by mozilla-central, comm-central nor BlueGriffon.  IIRC,
it was not removed for some legacy addons of Thunderbird.  Therefore, it
must be okay to remove it.

Differential Revision: https://phabricator.services.mozilla.com/D76078
2020-05-21 02:30:09 +00:00
Simon Giesecke dc6fd125a2 Bug 1626570 - Improve handling of copying arrays in editor/. r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D73631
2020-05-06 11:15:49 +00:00
Mirko Brodesser aace44041e Bug 1634663: part 2) Declare callers of GetRangeAt around EditorBase const. r=masayuki
Depends on D73444

Differential Revision: https://phabricator.services.mozilla.com/D73445
2020-05-02 23:44:46 +00:00
Masayuki Nakano 1adc071946 Bug 1620504 - part 20: Clean up warnings in SelectionState and related classes r=m_kato
This changes a lot of arguments from pointer to reference.

Differential Revision: https://phabricator.services.mozilla.com/D66851
2020-03-16 09:57:58 +00:00
Masayuki Nakano 6a2018d7e9 Bug 1620135 - Clean up trivial constructor and destructor under libeditor r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D65448
2020-03-06 04:38:25 +00:00
Masayuki Nakano 4f417fdeec Bug 1612085 - part 1: Hide constructor of nsRange r=smaug
`nsRange` instances are allocated a lot in the heap especially by editor and
spellchecker.  The allocation cost is too bad for benchmarks.  Therefore,
we should reuse released instances as far as possible.  For managing it in
static factory methods of `nsRange`, we need to hide `nsRange` constructor.

Differential Revision: https://phabricator.services.mozilla.com/D61237
2020-01-30 13:23:35 +00:00
Mirko Brodesser e8543e1b1b Bug 1562876: rename Selection::AddRange to Selection::AddRangeAndSelectFramesAndNotifyListeners. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D36602
2019-07-03 13:26:13 +02:00
Sylvestre Ledru e5a134f73a Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset
2018-11-30 11:46:48 +01:00
Makoto Kato 9fc36af133 Bug 358033 - Part 1. Restore direction of Selection. r=masayuki
SelectionState doesn't save and restore current selection's direction.  So the
direction of selection is always default after undoing.

So we should restore direction of selection.

Differential Revision: https://phabricator.services.mozilla.com/D2259
2018-07-23 02:44:42 +00:00
Jeff Gilbert 70a22b2878 Bug 1470325 - s/FooBinding/Foo_Binding/g - r=qdot
MozReview-Commit-ID: JtTcLL5OPF0
2018-06-26 17:05:01 -07:00
Andi-Bogdan Postelnicu 873ac55b03 Bug 1453795 - Editor - Initialize member fields in classes/ structures. r=masayuki 2018-06-13 23:14:16 +03:00
Sebastian Hengst d91e9954eb Backed out 4 changesets (bug 525063) on request from Andi. a=backout
Backed out changeset 516c4fb1e4b8 (bug 525063)
Backed out changeset 6ff8aaef2866 (bug 525063)
Backed out changeset bf13e4103150 (bug 525063)
Backed out changeset d7d2f08e051c (bug 525063)
2018-04-13 16:01:28 +03:00
Tristan Bourvon 6095241db8 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02:00
Makoto Kato 510ff2ee78 Bug 1449147 - Clean up more nsIDOMNode usages in editor. r=masayuki
To reduce QI, I would like to replace nsIDOMNode with nsINode.  And some
parameters in *DataTransder.cpp's methods is unused (it uses as nullptr),
so we should remove these parameters.

Also nsIDOMNodeList is unused now, so we should remove this including.

MozReview-Commit-ID: 1QTIkxDazjJ
2018-03-27 20:19:35 +09:00
Boris Zbarsky 2f03e52f54 Bug 1447890 part 5. Remove nsISelection::RemoveAllRanges. r=mystor
MozReview-Commit-ID: EeMje9KW6An
2018-03-27 00:35:23 -04:00
Boris Zbarsky 189e99bd19 Bug 1447890 part 1. Remove nsISelection::AddRange. r=mystor
MozReview-Commit-ID: 1JNLZp7tbII
2018-03-27 00:35:22 -04:00
Boris Zbarsky c173c1d653 Bug 1447889 part 9. Remove nsIDOMRange::CompareBoundaryPoints. r=mystor
MozReview-Commit-ID: 29swD9AoqoF
2018-03-27 00:35:21 -04:00
Masayuki Nakano 1987f066fb Bug 1447213 - Change editor methods which take |const EditorRawDOMPoint&| but called with EditorDOMPoint.AsRaw() to template methods r=m_kato
A lot of methods take |const EditorRawDOMPoint&| as their argument.  However,
some of them are called with EditorDOMPoint::AsRaw(). This is not good for
performance because:
1. Needs to create temporary instance of EditorRawDOMPoint.
2. EditorRawDOMPoint::AsRaw() may be used by simple mistake.
3. Such methods may call EditorRawDOMPoint::Offset(), however, it's not copied
   to the original EditorDOMPoint instance.  So, callers may need to compute
   offset again.

So, such methods should be changed to template methods if they are not virtual
method and AsRaw() should be gotten rid of for prevent it looking not expensive.

MozReview-Commit-ID: DAqqW4a2EMS
2018-03-20 14:05:47 +09:00
Boris Zbarsky ef00a7627a Bug 1446533 part 10. Remove remaining nsIDOMCharacterData uses in editor. r=mystor
MozReview-Commit-ID: CfZNQRiDs43
2018-03-19 15:45:55 -04:00
Andrea Marchesini 8d41475807 Bug 1430997 - Rename nsINode::IndexOf to nsINode::ComputeIndexOf, r=catalinb 2018-01-23 14:30:18 +01:00