Commit Graph

8294 Commits

Author SHA1 Message Date
Masayuki Nakano
4b7e512db0 Bug 1433345 - part 4: Make EditorBase derived from nsISelectionListener and notify its owning classes of selection change r=m_kato
This patch makes EditorBase derived from nsISelectionListener.  Then, we can
make IMEContentObserver, TextInputListener, ComposerCommandsUpdater,
TypeInState not derived from nsISelectionListener since EditorBase or
HTMLEditor can notify them of selection change directly.  Additionally,
ResizerSelectionListener is not necessary anymore since it just implements
nsISelectionListener and calls only a method of HTMLEditor.  So, HTMLEditor
can call it directly.

Note that the order of selection listeners may be different.  However,
according to what each selection listener does, changing the order isn't
problem.

MozReview-Commit-ID: 1JXZxQcS0tP

--HG--
extra : rebase_source : c2ebe622a74001ad4e421da492dcdab8e6fe1649
2018-01-26 17:25:45 +09:00
Masayuki Nakano
1ef303c32e Bug 1433345 - part 3: Make HTMLEditor store ResizerSelectionListener directly r=m_kato
This patch makes HTMLEditor store ResizerSelectionListener directly and
make it cycle collectable.  However, in the following patch, this class will
be removed completely because it doesn't necessary if HTMLEditor becomes a
selection listener.

MozReview-Commit-ID: 2iXlTcZdzvj

--HG--
extra : rebase_source : 893a3bbf290eb1752a701d6d8ac284a1630a6fbe
2018-01-26 15:14:04 +09:00
Masayuki Nakano
905d027c8f Bug 1433345 - part 2: Make HTMLEditor store ComposerCommandsUpdater directly r=m_kato
For making ComposerCommandsUpdater not derived from nsISelectionListener,
HTMLEditor needs to store it directly.

This patch also makes ComposerCommandsUpdater cycle collectable because it
stores a strong pointer and HTMLEditor also needs to store it with RefPtr.
Therefore, ComposerCommandsUpdater becomes unnecessary to use nsWeakPtr.

MozReview-Commit-ID: 2WZnLdq15FK

--HG--
extra : rebase_source : 8ee4968e1a63fe88a8276b1f8ce8d145fb9b31ae
2018-01-26 14:38:05 +09:00
Masayuki Nakano
5436129851 Bug 1433345 - part 1: Expose nsComposerCommandsUpdater with renaming it to mozilla::ComposerCOmmandsUpdater r=m_kato
For making HTMLEditor stores it directly, we should expose
nsComposerCommandsUpdater first.  Then, it should be in mozilla namespace.

MozReview-Commit-ID: 8Vhum4Q3WY

--HG--
rename : editor/composer/nsComposerCommandsUpdater.cpp => editor/composer/ComposerCommandsUpdater.cpp
rename : editor/composer/nsComposerCommandsUpdater.h => editor/composer/ComposerCommandsUpdater.h
extra : rebase_source : 3056eeb4aa3dd3426246b74be1e1e18a93a7c33d
2018-01-26 14:06:29 +09:00
Masayuki Nakano
e43e597a9e Bug 1433101 - part 2: Treat Enter and Shift+Enter as printable key r=smaug
Chromium dispatches a keypress event when pressing Enter or Shift+Enter.
Actually, when user press them in <pre> element of HTML editor, ツ・n is inserted.
It makes sense to treat the key combinations as inputting text.

MozReview-Commit-ID: Hvx87MZtZkn

--HG--
extra : rebase_source : 196b63843ebcb6e4b398f6b21a4f5f1d020b8db3
2018-01-25 23:59:20 +09:00
Masayuki Nakano
082c64aa0c Bug 1433101 - part 1: Add new pref which disables keypress event for non-printable keys only for the default event group in web content r=smaug
UI Events declares that keypress event should be fired when the keypress event
causes some text input.  However, we're keeping our traditional behavior for
historical reasons because our internal event handlers (including event
handlers of Thunderbird) handles keypress events for any keys.  Therefore,
for minimizing the side effect, we should stop kicking keypress event handlers
in the default event group in web content.

This patch adds new pref for enabling the standard behavior in web content.

Additionally, creates WidgetKeyboardEvent::IsInputtingText() for sharing the
check logic between TextEventDispatcher and TextEditor/HTMLEditor.

MozReview-Commit-ID: 3rtXdLBPeVC

--HG--
extra : rebase_source : 2fc3c9a09840d0d03800c9a42bb83ca76a8db2d5
2018-01-25 23:27:07 +09:00
Masatoshi Kimura
f576a03e65 Bug 1433100 - Constify the parameter of HTMLEditor::DoInlineTableEditingAction. r=m_kato
--HG--
extra : source : 9042789502045102cf46b19d0382b0d4c0364377
2018-01-25 22:16:32 +09:00
Makoto Kato
ded973c413 Bug 1432715 - Don't use NS_IMETHOD when method doesn't override. r=masayuki
Some methods in HTMLEditor uses NS_IMETHOD that doesn't override.  So we should
replace with nsresult to avoid virtual method.

MozReview-Commit-ID: 7LillLQNhlg

--HG--
extra : rebase_source : 02655cdcf9350caae1fd12dfeb038f82f74aa0f0
2018-01-25 13:31:01 +09:00
Masayuki Nakano
298150d827 Bug 1432528 - part 4: Remove nsIEditorObserver::BeforeEditAction() and nsIEditorObserver::CancelEditAction() because nobody implements them r=m_kato
Now, nobody implements nsIEditorObserver::BeforeEditAction() and
nsIEditorObserver::CancelEditAction().  So, we can remove them.

MozReview-Commit-ID: DYppLayC5oT

--HG--
extra : rebase_source : 196e042234c65a43947a1aa90898901389a3a53b
2018-01-24 14:31:29 +09:00
Masayuki Nakano
7dab388aae Bug 1432528 - part 3: Make EditorBase store IMEContentObserver directly and make it not derived from nsIEditorObserver r=m_kato
Similar to TextInputListener, EditorBase should store IMEContentObserver
directly instead of via nsIEditorObserver.  Then,
EditorBase::NotifyEditorObservers() can call each method directly.
Additionally, we can make IMEContentObserver not derived from nsIEditorObserver.

MozReview-Commit-ID: cNKWJe5eUC

--HG--
extra : rebase_source : 4ed3b3b3180b8ee4a7c514ce1f89eba4dad64fbe
2018-01-24 14:10:18 +09:00
Masayuki Nakano
74aaf9525b Bug 1432528 - part 2: Make EditorBase treat TextInputListener directly and make TextInputListener not derived from nsIEditorObserver r=m_kato
Now, EditorBase can store TextInputListener directly instead of as
nsIEditorObserver.  And then, EditorBase can call its EditAction() method
directly.  Therefore, we can make TextInputListener not derived from
nsIEditorObserver.

MozReview-Commit-ID: 4qPnnvReLKy

--HG--
extra : rebase_source : cde47e245c9856abf696dbaf8e26d8e4d6d98d42
2018-01-24 12:50:01 +09:00
Masayuki Nakano
dc245c4fee Bug 1422234 - part 1: HTMLEditRules::ReturnInParagraph() should adjust split point if caret position is positioned at edge of anchor element r=m_kato
When Enter key is pressed at start or end of <a href="foo"> element, we
shouldn't split it (in other words, we shouldn't create empty <a href="foo">
element in new paragraph) because users must not want to keep editing *same*
link in new paragraph in most cases.

This patch adjusts HTMLEditRules::ReturnInParagraph() selection start point
locally when it gets selection.  If caret is at start of an <a href="foo">
element, moves caret to before the element.  If caret is at end of an
<a href="foo"> element, moves to after the element.

MozReview-Commit-ID: 3L3eDzc6Dk

--HG--
extra : rebase_source : dfb22486d2709e84ef7ec1eee3a9bfdef11cbe99
2018-01-23 11:14:37 +09:00
Makoto Kato
70a0912794 Bug 1425547 - Remove unused methods from nsIHTMLInlineTableEditor. r=masayuki
inlineTableEditingEnabled and refreshInlineTableEditingUI are used by
bluegriffon, but other methods aren't used by m-c, c-c and bluegriffon.
So I would like to remove these methods.  Then we can clean up
DoInlineTableEditingAction.

MozReview-Commit-ID: 3R0bJDU5vqv

--HG--
extra : rebase_source : 74c7615613bba65326069929cb53c3ea48f2e9a4
extra : amend_source : a1ac9af3de50daa0cbfd98e2790afa402d9932ef
2018-01-19 16:41:41 +09:00
Dorel Luca
30b5be6d16 Merge mozilla-inbound to mozilla-central r=merge a=merge 2018-01-23 19:46:03 +02:00
Andrea Marchesini
b8bb98af8c Bug 1430997 - Rename nsINode::IndexOf to nsINode::ComputeIndexOf, r=catalinb 2018-01-23 14:30:18 +01:00
Masayuki Nakano
92d5c4cdd8 Bug 1430785 - Make mozInlineSpellChecker not derived from nsIEditActionListener r=m_kato
mozInlineSpellChecker listens to only DidSplitNode() and DidJoinNodes().
So, EditorBase should call them directly rather than treating it as an
nsIEditActionListener since its runtime cost becomes really cheaper.

Different from EditorSpellCheck, nobody creates instance of
nsIInlineSpellChecker.  So, we can now stop supporting createInstance() for it
in chrome JS and should do this since EditorBase cannot support multiple
mozInlineSpellChecker instances without nsIEditActionListener interface.
Therefore, this patch removes the entry from factory.

MozReview-Commit-ID: W1CLdsJaaB

--HG--
extra : rebase_source : 2319999e4b1fc8978386c49236d5d24d78d86047
2018-01-17 14:05:06 +09:00
Masayuki Nakano
2020349542 Bug 1430982 - part 10: Make EditorBase store TextServicesDocument for its mInlineSpellChecker for avoiding to run for loops to call nsIEditActionListener methods r=m_kato
Currently, first edit action listener is always TextServicesDocument for
EditorBase::mInlineSpellChecker if spell check is enabled and it requires
only DidDeleteNode() and DidJoinNodes().  So, in most cases, EditorBase
should call only them to avoid running redundant for loops for
nsIEditActionListener methods.

This patch makes that EditorBase::AddEditActionListener() and
RemoveEditActionListener() check whether coming nsIEditActionListener is
TextServicesDocument for mInlineSpellChecker.  If so, EditorBase should
store it as reference to TextServicesDocument.  And when edit action occurs,
its DidDeleteNode() and DidJoinNodes() should be called directly.

Unfortunately, this patch makes TextServiceDocument's maintaining rules
complicated.  However, it must be really rare case to add new edit action
listener because it's really old component.

Note that EditorSpellCheck may be created multiple instances for an editor
from chrome JS.  Therefore, we need to keep TextServicesDocument being
derived from nsIEditActionListener because in such case, TextServicesDocument
for other EditorSpellCheck instances should be supported via
nsIEditActionListener even though such case makes EditorBase slower.

MozReview-Commit-ID: KtlXsBCOzKL

--HG--
extra : rebase_source : 6827ed09a028f2049fd7afba2f5116d092bd14e5
2018-01-18 23:46:03 +09:00
Masayuki Nakano
0c82cf40da Bug 1430982 - part 9: Create accessors for each member of mozSpellChecker, EditorSpellCheck, mozInlineSpellChecker r=m_kato
mozSpellChecker stores TextServicesDocument, EditorSpellCheck stores
mozSpellChecker and mozInlineSpellChecker stores EditorSpellCheck.
So, they should have accessors for their member.  Then, EditorBase can
access all of them.

MozReview-Commit-ID: Igphm8nRqve

--HG--
extra : rebase_source : 0c70bf3e23f16ea6a97b49901f4b1c87e7da6d37
2018-01-18 21:38:50 +09:00
Masayuki Nakano
04e3a3adfc Bug 1430982 - part 8: Make EditorBase store inline spell checker as mozInlineSpellChecker rather than nsIInlineSpellChecker r=m_kato
EditorBase::mInlineSpellChecker is always an instance of mozInlineSpellChecker.
Fortunately, it's easy to expose mozInlineSpellChecker.h.  So, making EditorBase
store it as mozInlineSpellChecker directly, EditorBase can access any of
mozInlineSpellChecker, EditorSpellCheck, mozSpellChecker and
TextServicesDocument with new accessors created by following patch.

MozReview-Commit-ID: 2oyS5tPeQcg

--HG--
extra : rebase_source : a9ce2e4dbceff7ca800d34d60d56eba184298677
2018-01-17 00:52:37 +09:00
Masayuki Nakano
5fe683df20 Bug 1430982 - part 6: Rename nsEditorSpellCheck to mozilla::EditorSpellCheck and expose its header r=m_kato
For making mozInlineSpellChecker stores nsEditorSpellCheck directly, we need
to expose its header file.  For doing that this patch renames the class to
mozilla::EditorSpellCheck and expose it as "mozilla/EditorSpellCheck.h".

MozReview-Commit-ID: 5H66Y2vVshu

--HG--
rename : editor/composer/nsEditorSpellCheck.cpp => editor/composer/EditorSpellCheck.cpp
rename : editor/composer/nsEditorSpellCheck.h => editor/composer/EditorSpellCheck.h
extra : rebase_source : 7940aa136df312cd43bf592df1e71d2ac6c5dec8
2018-01-18 21:01:13 +09:00
Masayuki Nakano
e0d185984f Bug 1430982 - part 5: Make nsEditorSpellCheck store mozSpellChecker directly rather than nsISpellChecker r=m_kato
nsEditorSpellCheck::mSpellChecker is always mozSpellChecker because it's
created only by nsEditorSpellCheck.  Additionally, mozSpellChecker.h is
already exposed.  So, nsEditorSpellCheck can store it as mozSpellChecker
directly.

MozReview-Commit-ID: 2vyDe4plncM

--HG--
extra : rebase_source : 847b2f384163450ab44b94bc12ee489633a849b6
2018-01-18 20:06:49 +09:00
Masayuki Nakano
60d2ed05ca Bug 1430982 - part 4: Get rid of nsITextServicesDocument because it used by nobody r=m_kato
nsITextServicesDocument isn't used by anybody now.  So, we can get rid of it.
Additionally, nsITextService and nsTextServicesFactory are not also used by
anybody.  Therefore, this patch removes all of them.

MozReview-Commit-ID: KSbMdm7QPKF

--HG--
extra : rebase_source : 724a5f48ad49b4231bacf7fba32c6a35d90121d0
2018-01-18 18:43:57 +09:00
Masayuki Nakano
21c3b9e2db Bug 1430982 - part 3: Make mozSpellChecker and nsEditorSpellChecker treat TextServicesDocument directly rather than nsITextServicesDocument r=m_kato
Now, TextServicesDocument can be treated by anybody.  So, let's make
mozSpellChecker and nsEditorSpellChecker treat it directly instead of
nsITextServicesDocument.

MozReview-Commit-ID: 2tMy6y3i17b

--HG--
extra : rebase_source : 2e6c79355a5e0a7044fbea989ba414a7bf1a7d8d
2018-01-18 17:32:23 +09:00
Masayuki Nakano
fa1d8d7c3f Bug 1430982 - part 2: Rename nsTextServicesDocument to mozilla::TextServicesDocument and expose its header r=m_kato
For making nsTextServicesDocument accessible from anywhere directly, we need to
expose its header.  Then, it should be in mozilla namespace.

This patch renames nsTextServicesDocument to mozilla::TextServicesDocument
and expose the header file as "mozilla/TextServicesDocument.h".

MozReview-Commit-ID: 9PmP73PXSJu

--HG--
rename : editor/txtsvc/nsTextServicesDocument.cpp => editor/txtsvc/TextServicesDocument.cpp
rename : editor/txtsvc/nsTextServicesDocument.h => editor/txtsvc/TextServicesDocument.h
extra : rebase_source : a12081434d0bc002e3675178486cc7f8eaaa3256
2018-01-18 16:57:01 +09:00
Masayuki Nakano
88c945974e Bug 1430982 - part 1: Make nsTextServicesDocument store editor with RefPtr<TextEditor> rather than nsWeakPtr r=m_kato
nsTextServicesDocument stores editor with nsWeakPtr for avoiding circular
reference.  However, both TextEditor and nsTextServicesDocument are cycle
collectable. So, we don't need to worry about the issue and we can simply
make it store with RefPtr<TextEditor>.  Then, we can make EditorBase and
nsTextServicesDocument access each other directly.

MozReview-Commit-ID: 9I4U8ivFlov

--HG--
extra : rebase_source : 4880c6f7d706acc70324f58aee70d4311db44059
2018-01-18 14:33:31 +09:00
Masayuki Nakano
397a47c1b9 Bug 1430319 - Get rid of nsIEditActionListener::Will*() which are not used by anybody r=m_kato
Most nsIEditActionListener::Will*() are not implemented, except
WillDeleteText() and WillDeleteSelection() which are implemented by
FinderHighlighter.  So, we can get rid of the other Will*() from it.

This patch removes a lot of unnecessary virtual calls and copy of strong
pointers to edit action listeners of EditorBase.

MozReview-Commit-ID: EsqI2tZoBG1

--HG--
extra : rebase_source : cf78eb8d33b12ca65177b0676f6e45d02e7c0688
2018-01-13 10:10:05 +09:00
Masayuki Nakano
31d493d9fa Bug 1430021 - part 2: Make HTMLEditRules not derived from nsIEditActionListener r=m_kato
HTMLEditRules implements only some of nsIEditActionListener and this is always
first edit action listener.  So, if we make EditorBase treat HTMLEditRules
directly before notifying edit action listeners, we can save a lot of runtime
cost (virtual calls especially unnecessary, copying array of edit action
listeners with strong pointer, redundant QIs), although the code becomes not
beautiful.

Perhaps, we should do same thing to nsTextServicesDocument and
mozInlineSpellChecker in other bugs.

MozReview-Commit-ID: Eveaxj398f2

--HG--
extra : rebase_source : 0b7b66ba1002e08591e8d95ef68b216e7ce1f93b
2018-01-13 00:21:17 +09:00
Masayuki Nakano
b2a3e52b16 Bug 1430021 - part 1: Move |RefPtr<TextEditRules> mRules| from TextEditor to EditorBase r=m_kato
For calling some methods of mRules from EditorBase, let's move mRules member
from TextEditor to EditorBase.

Unfortunately, TextEditRules.h depends on EditAction which is declared in
EditorBase.h and that caused unnecessary include hell of EditorBase.h.  So,
let's move it to an independent header file.

MozReview-Commit-ID: 5HiSZLP9WHH

--HG--
extra : rebase_source : 3e2c40385a6f3d6d1e03ef4e213434383bb37d5f
2018-01-12 19:01:04 +09:00
Boris Zbarsky
f1d64479e7 Bug 1431964 part 10. Remove nsIDOMAttr. r=mccr8
MozReview-Commit-ID: xj4QeXBF9V
2018-01-21 12:07:31 -05:00
Boris Zbarsky
e38dec29f4 Bug 1431964 part 8. Remove nsIDOMMozNamedAttrMap. r=mccr8
MozReview-Commit-ID: C7z0hcjC0Tg
2018-01-20 20:57:26 -05:00
Boris Zbarsky
ac46271e7c Bug 1431964 part 5. Remove nsIDOMMozNamedAttrMap::Item. r=mccr8
MozReview-Commit-ID: GnrOUhx9nTQ
2018-01-20 18:48:36 -05:00
Makoto Kato
5c5237a5a1 Bug 1402526 - Add crashtest. r=me a=test-only 2018-01-15 14:27:45 +09:00
Adrian Wielgosik
3c2cc07d2d Bug 1379891 - remove nsPIEditorTransaction interface, GetTxnDescription methods. r=m_kato,masayuki
MozReview-Commit-ID: 4NLeMrrqIv5
2018-01-14 16:01:41 +01:00
Chris Peterson
37efe4d0e6 Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj
MozReview-Commit-ID: DCPTnyBooIe

--HG--
extra : rebase_source : cfec2d96faeb11656d86d760a34e0a04cacddb13
extra : intermediate-source : 6176724d63788b0fe8caa3f91607c2d93dbaa7ec
extra : source : eebbb0600447f9b64aae3bcd47b4be66c02a51ea
2017-11-05 19:37:28 -08:00
Cameron McCormack
8731df3c34 Bug 1427512 - Part 29: Remove nsIDOMCSSDeclaration. r=xidorn,jryans,bz
This removes the .style attribute from nsIDOMSVGElement, but there
shouldn't be any users of that.

MozReview-Commit-ID: LOBSFo85Utn
2018-01-11 16:17:57 +08:00
Cameron McCormack
66141a0c03 Bug 1427512 - Part 27: Remove nsIDOMCSSPrimitiveValue. r=xidorn,bz
MozReview-Commit-ID: IcGKAjPWacZ
2018-01-11 16:17:57 +08:00
Cameron McCormack
e3549b2d1c Bug 1427512 - Part 22: Remove nsIDOMStyleSheet. r=xidorn,bz
MozReview-Commit-ID: KO2mWX4P8lI
2018-01-11 16:17:57 +08:00
Makoto Kato
3f840ba7f5 Bug 1425652 - mosueDown, mouseUp and mouseMove should be removed from nsIHTMLObjectResizer. r=masayuki
comm-central and bluegriffon don't use mosueDown, mouseUp and mouseMove in
nsIHTMLObjectResizer, so we should remove these methods from this interface.

MozReview-Commit-ID: BnSkkH7f0xc

--HG--
extra : rebase_source : 40811e1a0b714e3ef30fd9ac5e4f840241de3780
2018-01-10 12:47:16 +09:00
Olli Pettay
3a7a79b6b8 Bug 1428747 - Make EditorBase::GetDOMEventTarget() to return EventTarget* and GetFocusedContent() return nsIContent* in order to optimize out some AddRef/Release calls, r=masayuki
--HG--
extra : rebase_source : 86be9af360438fcb1fa63f07994e41cf12d9c2e2
2018-01-09 15:41:42 +02:00
Margareta Eliza Balazs
fe2caaa266 Merge inbound to mozilla-central r=merge a=merge 2018-01-09 11:52:55 +02:00
Dão Gottwald
d6173b3fbb Bug 449045 - Drop support for type=timed textboxes. r=enn
MozReview-Commit-ID: Ld6foAxCAhW

--HG--
extra : rebase_source : 94065ccfb55e8a93322cd5fbbeabcc78b222bf1a
2018-01-05 21:03:39 +01:00
Makoto Kato
1f169bb35d Bug 1425091 - Part 4. EditorBase::MoveNode should check valid node that has parent node. r=masayuki
AutoMoveNodeSelNotify doesn't allow container is null.  So we should reject
that parent of moving node is null.

MozReview-Commit-ID: DGNCicLJxuK

--HG--
extra : rebase_source : eea203f16d0296c74d0727f34b6ddc5c165f9092
2017-12-15 10:56:45 -06:00
Makoto Kato
d438423b79 Bug 1425091 - Part 3. SelAdjCreateNode and SelAdjInsertNode should check whether valid point. r=masayuki
This crashtest case hits assertion in SelAdjInsertNode due to invalid offset
point. So we check whether this is valid.

Also, SelAdjCreateNode and SelAdjInsertNode should use EditorRawDOMPoint to avoid offset calculation and check valid offset.

MozReview-Commit-ID: A1kaKEzc36e

--HG--
extra : rebase_source : c46843fdd6e9e18f49b9cedb008cda6cf3436811
2017-12-15 10:49:53 -06:00
Makoto Kato
2ca662631f Bug 1425091 - Part 2. Add crashtest. r=masayuki
MozReview-Commit-ID: APqtZUv1q6y

--HG--
extra : rebase_source : 80b64a193a322543c6a34041d77fb5445776e902
2017-12-15 10:51:53 -06:00
Makoto Kato
2dbcd1159a Bug 1425091 - Part 1. Should check whether CreateNode is failure. r=masayuki
This crash occurs when CreateNode returns nullptr that is error.  So we should
check whether this method is failure.

MozReview-Commit-ID: 9jDOnEYSurG

--HG--
extra : rebase_source : a7f2f9797267befe99f7f794c524efdf7bf331c0
2017-12-15 11:01:58 -06:00
Makoto Kato
e8bfc9ec8b Bug 1428237 - Remove unused nsIHTMLEditor.getHeadContentsAsHTML. r=masayuki
c-c and bluegriffon don't use this method, so let's remove it to clean up.

MozReview-Commit-ID: BC5Ooy2Jlb9

--HG--
extra : rebase_source : 86e49ef864d5c78049673924c385e6cdbd0cb215
2018-01-05 10:59:37 +09:00
Makoto Kato
e38403da76 Bug 1427964 - Remove unused methods from CSSEditUtils. r=masayuki
Some methods in CSSEditUtils are unused now, so let's remove it.

MozReview-Commit-ID: H4HiqL6hW9K

--HG--
extra : rebase_source : 80e10ba5e6de5fcc5032dc2e08fa84bf26e80795
2018-01-04 14:27:15 +09:00
Andrea Marchesini
00e79ef07b Bug 1425321 - Renaming nsINode::GetChildAt to GetChildAt_Deprecated, r=catalinb
We want to deprecate nsINode::GetChildAt as the first step of removing DOM node
child array storage. See bug 651120.
2018-01-03 13:59:54 +01:00
Makoto Kato
db9f405bd9 Bug 1427060 - PropItem should use nsAtom instead of nsString. r=masayuki
Actually, PopItem uses nsString to store attribute name.  And when using it,
it converts to nsAtom by NS_Atomize and compare by nsString.

To reduce calculation of atom and string compare, we should store atom directly.

MozReview-Commit-ID: 8OB02mgMg1r

--HG--
extra : rebase_source : 9861217804acac52106a89cad75e08bd547080ad
extra : histedit_source : 2b9f01cf29b1b09dd07fc771ff94a06be4d94f31
2017-12-26 12:25:45 +09:00
Masayuki Nakano
18f7821c7b Bug 1425997 - Don't try to remove whitespaces in WSRunObject::ConvertToNBSP() when the text node is changed by mutation observer r=m_kato
WSRunObject::ConvertToNBSP() inserts an NBSP, then, removes following ASCII
whitespaces.  When inserting an NBSP, mutation observer may change the
text node.  In this case, it shouldn't keep working on removing ASCII
whitespaces because it may causes unexpected result.

This patch also renames ConvertToNBSP() and GetAsciiWSBounds() to
InsertNBSPAndRemoveFollowingASCIIWhitespaces() and
GetASCIIWhitespacesBounds() for making their jobs clearer.

MozReview-Commit-ID: TVy9fEKL6p

--HG--
extra : rebase_source : f0bce124055a86caca57334f06c75a46098f69ac
2017-12-21 19:27:31 +09:00