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

8198 Коммитов

Автор SHA1 Сообщение Дата
Masayuki Nakano 456157300a Bug 1415509 - part 3: WSRunObject::InsertText() should take |const EditorRawDOMPoint&| as input argument and |EditorRawDOMPoint*| as out argument instead of a set of container, child and offset of the child in the container as in/out argument r=m_kato
Like EditorBase::InsertTextImpl(), WSRunObject::InsertText() is really messy.
So, it should take same arguments as EditorBase::InsertTextImpl().

MozReview-Commit-ID: 5uKGaxKheRv

--HG--
extra : rebase_source : 49ce0eb7ea25b397b6b1a19f1bc21d711740c043
2017-11-09 13:24:06 +09:00
Masayuki Nakano a3fa902a2d Bug 1415509 - part 2: EditorBase::InsertTextImpl() should take |const EditorRawDOMPoint&| argument as input and |EditorRawDOMPoint*| as out argument instead of a set of container, child and offset of the child in the container as in/out argument r=m_kato
EditorBase::InsertTextImpl() takes |nsCOMPtr<nsINode>*|, |nsCOMPtr<nsIContent>*|
and |int32_t| as in/out arguments for container, child and offset of the child
in the container.  But this makes the callers really hard to read and ugly.

So, we should make the method take |const EditorRawDOMPoint&| argument as input
and |EditorRawDOMPoint*| as out argument.

MozReview-Commit-ID: 2ijIfGl4Zo7

--HG--
extra : rebase_source : b309d9bdc04aac620f138769ba18ad7e4597fe6c
2017-11-09 01:00:36 +09:00
Masayuki Nakano 7adce402c2 Bug 1415509 - part 1: EditorBase::FindBetterInsertionPoint() should take an EditorRawDOMPoint argument for input and return EditorRawDOMPoint for the result r=m_kato
EditorBase::FindBetterInsertionPoint() now use 3 in/out arguments.  This is
really ugly and making the callers hard to read.  So, let's make it take an
argument whose type is |const EditorRawDOMPoint&| and return other
EditorRawDOMPoint instance.

Additionally, this fixes bugs of text node length checks in the method.
Basically, this shouldn't affect to any actual behavior, though.  That is
because text node shouldn't be able to have string longer than INT32_MAX.

MozReview-Commit-ID: FClUQSJzd8c

--HG--
extra : rebase_source : 3e2fbd345015f7068c7e35a94c31731e7936009f
2017-11-08 21:55:10 +09:00
Masatoshi Kimura dbd92543c6 Bug 1313150 - Remove |weak| parameter from nsIMutableArray methods. r=froydnj
MozReview-Commit-ID: 7JoD4VYzZp3

--HG--
extra : rebase_source : 5db437f1c34608aa223916874d62b48c59baeae8
2017-10-21 23:53:02 +09:00
Makoto Kato 4324707ac3 Bug 1394649 - Use nsGkAtoms on nsTextServiceDocument. r=masayuki
It is no reason to use custom atom instead of nsGkAtoms now, so we should
use nsGkAtoms instead.

MozReview-Commit-ID: 9slsZtLDNKH

--HG--
extra : histedit_source : 8ad70ff1adfa145bc0e8da3c6f43f3dba9b558f1
2017-10-23 13:09:49 +09:00
Nicholas Nethercote 21e7dce1a2 Bug 1410294 (part 3) - Overhaul static atom macros. r=froydnj.
There are four things that must be provided for every static atom, two of which
have a macro:
- the atom pointer declaration (no macro);
- the atom pointer definition (no macro);
- the atom char buffer (NS_STATIC_ATOM_BUFFER);
- the StaticAtomSetup struct (NS_STATIC_ATOM_SETUP).

This patch introduces new macros for the first two things: NS_STATIC_ATOM_DECL
and NS_STATIC_ATOM_DEFN, and changes the arguments of the existing two macros
to make them easier to use (e.g. all the '##' concatenation now happens within
the macros).

One consequence of the change is that all static atoms must be within a class,
so the patch adds a couple of classes where necessary (DefaultAtoms, TSAtoms).

The patch also adds a big comment explaining how the macros are used, and what
their expansion looks like. This makes it a lot easier to understand how static
atoms work. Correspondingly, the patch removes some small comments scattered
around the macro use points.

MozReview-Commit-ID: wpRyrEOTHE

--HG--
extra : rebase_source : 9f85d477b4d06c9a9e710c757de1f1476edb6efe
2017-10-22 08:50:25 +11:00
Nicholas Nethercote ed06034e3c Bug 1410294 (part 2) - Use a macro to declare the atoms in nsTextServicesDocument. r=froydnj.
MozReview-Commit-ID: LZjDrROmPC7

--HG--
extra : rebase_source : 8da8ecc8a0a24c212d1528bf8d23fbbf0942f757
2017-10-20 14:04:52 +11:00
Nicholas Nethercote 074a872086 Bug 1410294 (part 1) - Rename nsStaticAtom as nsStaticAtomSetup. r=froydnj.
Because it's the type we use to set up static atoms at startup, not the static
atom itself.

The patch accordingly renames some parameters, variables, and NS_STATIC_ATOM,
for consistency.

MozReview-Commit-ID: 1a0KvhYNNw2

--HG--
extra : rebase_source : 5c66e5b2dfe053a368bf3584d957198aec4cce91
2017-10-20 14:04:47 +11:00
Jason Kratzer 735da145f2 Bug 1344097 - Add crashtest. r=me
--HG--
extra : rebase_source : 9789bb530c86279907b5abbd8fd1c8e1929e5af1
2017-10-20 08:36:12 -04:00
Masayuki Nakano eb5a65e869 Bug 1407966 - part 2: EditorBase::InsertTextImpl() shouldn't assume that aInOutChildAtOffset is never nullptr r=m_kato
Since if the container is not a container node like a text node or the offset
is same as the length, child at the offset can be nullptr.

MozReview-Commit-ID: DCnFwUjNgk7

--HG--
extra : rebase_source : 48823390645d79db391dcaf64dab59e754b680a5
2017-10-17 01:59:28 +09:00
Masayuki Nakano 33a8e2ee5e Bug 1407966 - part 1: Update |selChild| when HTMLEditRules::WillInsertText() updates |curNode| and |curOffset| r=m_kato
|selChild| should be a node which is at |curOffset| in |curNode|, however,
it's not updated when |curOffset| is updated by a call of CreateBRImpl().  So,
it should be next sibling of the created br node.

MozReview-Commit-ID: IVfTjVMp3lB

--HG--
extra : rebase_source : fbc355e3c0425a495c78c3c028308dac26617283
2017-10-17 01:17:07 +09:00
Boris Zbarsky 661d20b507 Bug 1409162. Make nsTableCellFrame::GetColIndex/GetRowIndex faster. r=mats 2017-10-17 15:39:36 -04:00
Sebastian Hengst 32f7c8fec3 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 1h3kZyrtqSt
2017-10-17 11:45:16 +02:00
Kris Maglione 4a767c7e6e Bug 1404198: Part 2j - Switch to NS_NewTimer* everywhere else. r=njn
MozReview-Commit-ID: LmGIgfmNSmk

--HG--
extra : rebase_source : bf34e852beb0c8f6eafd09184c2e0cda95f95f83
2017-09-24 19:57:48 -07:00
Makoto Kato 52ae993a2a Bug 1407924 - Avoid conversion from nsAtom to string if possible. r=masayuki
Editor sometimes extracts atom to string to compare element name.
It is unnecessary to use atom directly.

MozReview-Commit-ID: FEvyiIeaozs

--HG--
extra : rebase_source : 4418d0c82fa4fedd814b914f2cf3a86d74ad9835
2017-10-12 16:28:28 +09:00
Sebastian Hengst caf5b99a30 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 8Qk2qoQvP0g
2017-10-14 11:49:31 +02:00
Kyle Machulis 1cc8b01353 Bug 1406224 - Remove nsIDOMHTMLImageElement; r=bz
MozReview-Commit-ID: GCATWRt6qMo

--HG--
extra : rebase_source : 29854f1374c6ad318da0b5b68be23507667c3be4
2017-10-06 13:27:23 -07:00
Sebastian Hengst 8975678533 Backed out changeset febed94fa592 (bug 1408227) for asserting at editor/libeditor/EditorBase.cpp:2513 during execution of web-platform-test /editing/run/inserttext.html. r=backout on a CLOSED TREE 2017-10-13 19:48:22 +02:00
Ryan VanderMeulen a74ce78a81 Bug 1407866 - Update test_bug1385905.html to work whether editor.use_div_for_default_newlines is set or not. r=masayuki 2017-10-13 12:48:06 -04:00
Ehsan Akhgari 5e34d765c7 Bug 1408227 - Correctly update the child at offset pointer across calls to WSRunObject::InsertBreak(); r=masayuki 2017-10-13 10:42:27 -04:00
Ehsan Akhgari b62ea76a52 Bug 1408290 - Avoid calling nsINode::IndexOf() in HTMLEditRules::CheckForInvisibleBR(); r=masayuki 2017-10-13 10:28:50 -04:00
Ehsan Akhgari 62a148cc7c Bug 1408286 - Avoid calling nsINode::IndexOf() for block parents whose grant parents are lists in HTMLEditRules::CheckForEmptyBlock(); r=masayuki 2017-10-13 10:25:21 -04:00
Ehsan Akhgari 8dc357ab3c Bug 1408285 - Avoid calling nsINode::IndexOf() for list items in HTMLEditRules::CheckForEmptyBlock(); r=masayuki 2017-10-13 10:23:20 -04:00
Ehsan Akhgari 1349bede70 Bug 1408170 - Set child correctly in HTMLEditRules::GetPromotedPoint(); r=masayuki 2017-10-13 02:23:12 -04:00
Jesse Schwartzentruber beb397098f Bug 1274050 - Add crashtest. r=me 2017-10-12 22:41:14 -04:00
Sebastian Hengst c2f23c4622 merge mozilla-central to mozilla-inbound. r=merge a=merge
--HG--
rename : browser/base/content/test/general/browser_bug585558.js => browser/base/content/test/tabs/browser_positional_attributes.js
rename : devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_jsterm_dollar.js => devtools/client/webconsole/new-console-output/test/mochitest/browser_jsterm_dollar.js
rename : devtools/client/webconsole/new-console-output/test/mochitest/test-bug-621644-jsterm-dollar.html => devtools/client/webconsole/new-console-output/test/mochitest/test-jsterm-dollar.html
rename : dom/media/doctor/DDLogClass.cpp => dom/media/doctor/DDLogCategory.cpp
rename : dom/media/doctor/DDLogClass.h => dom/media/doctor/DDLogCategory.h
rename : mobile/android/app/src/main/res/drawable-hdpi/find_prev.png => mobile/android/app/src/photon/res/drawable-hdpi/find_prev.png
rename : mobile/android/app/src/main/res/drawable-hdpi/url_bar_entry_default.9.png => mobile/android/app/src/photon/res/drawable-hdpi/url_bar_entry_default.9.png
rename : mobile/android/app/src/main/res/drawable-hdpi/url_bar_entry_default_pb.9.png => mobile/android/app/src/photon/res/drawable-hdpi/url_bar_entry_default_pb.9.png
rename : mobile/android/app/src/main/res/drawable-hdpi/url_bar_entry_pressed.9.png => mobile/android/app/src/photon/res/drawable-hdpi/url_bar_entry_pressed.9.png
rename : mobile/android/app/src/main/res/drawable-hdpi/url_bar_entry_pressed_pb.9.png => mobile/android/app/src/photon/res/drawable-hdpi/url_bar_entry_pressed_pb.9.png
rename : mobile/android/app/src/main/res/drawable-large-hdpi-v11/url_bar_entry_default.9.png => mobile/android/app/src/photon/res/drawable-large-hdpi-v11/url_bar_entry_default.9.png
rename : mobile/android/app/src/main/res/drawable-large-hdpi-v11/url_bar_entry_default_pb.9.png => mobile/android/app/src/photon/res/drawable-large-hdpi-v11/url_bar_entry_default_pb.9.png
rename : mobile/android/app/src/main/res/drawable-large-hdpi-v11/url_bar_entry_pressed.9.png => mobile/android/app/src/photon/res/drawable-large-hdpi-v11/url_bar_entry_pressed.9.png
rename : mobile/android/app/src/main/res/drawable-large-hdpi-v11/url_bar_entry_pressed_pb.9.png => mobile/android/app/src/photon/res/drawable-large-hdpi-v11/url_bar_entry_pressed_pb.9.png
rename : mobile/android/app/src/main/res/drawable-large-xhdpi-v11/url_bar_entry_default.9.png => mobile/android/app/src/photon/res/drawable-large-xhdpi-v11/url_bar_entry_default.9.png
rename : mobile/android/app/src/main/res/drawable-large-xhdpi-v11/url_bar_entry_default_pb.9.png => mobile/android/app/src/photon/res/drawable-large-xhdpi-v11/url_bar_entry_default_pb.9.png
rename : mobile/android/app/src/main/res/drawable-large-xhdpi-v11/url_bar_entry_pressed.9.png => mobile/android/app/src/photon/res/drawable-large-xhdpi-v11/url_bar_entry_pressed.9.png
rename : mobile/android/app/src/main/res/drawable-large-xhdpi-v11/url_bar_entry_pressed_pb.9.png => mobile/android/app/src/photon/res/drawable-large-xhdpi-v11/url_bar_entry_pressed_pb.9.png
rename : mobile/android/app/src/main/res/drawable-large-xxhdpi-v11/url_bar_entry_default.9.png => mobile/android/app/src/photon/res/drawable-large-xxhdpi-v11/url_bar_entry_default.9.png
rename : mobile/android/app/src/main/res/drawable-large-xxhdpi-v11/url_bar_entry_default_pb.9.png => mobile/android/app/src/photon/res/drawable-large-xxhdpi-v11/url_bar_entry_default_pb.9.png
rename : mobile/android/app/src/main/res/drawable-large-xxhdpi-v11/url_bar_entry_pressed.9.png => mobile/android/app/src/photon/res/drawable-large-xxhdpi-v11/url_bar_entry_pressed.9.png
rename : mobile/android/app/src/main/res/drawable-large-xxhdpi-v11/url_bar_entry_pressed_pb.9.png => mobile/android/app/src/photon/res/drawable-large-xxhdpi-v11/url_bar_entry_pressed_pb.9.png
rename : mobile/android/app/src/main/res/drawable-xhdpi/find_prev.png => mobile/android/app/src/photon/res/drawable-xhdpi/find_prev.png
rename : mobile/android/app/src/main/res/drawable-xhdpi/url_bar_entry_default.9.png => mobile/android/app/src/photon/res/drawable-xhdpi/url_bar_entry_default.9.png
rename : mobile/android/app/src/main/res/drawable-xhdpi/url_bar_entry_default_pb.9.png => mobile/android/app/src/photon/res/drawable-xhdpi/url_bar_entry_default_pb.9.png
rename : mobile/android/app/src/main/res/drawable-xhdpi/url_bar_entry_pressed.9.png => mobile/android/app/src/photon/res/drawable-xhdpi/url_bar_entry_pressed.9.png
rename : mobile/android/app/src/main/res/drawable-xhdpi/url_bar_entry_pressed_pb.9.png => mobile/android/app/src/photon/res/drawable-xhdpi/url_bar_entry_pressed_pb.9.png
rename : mobile/android/app/src/main/res/drawable-xxhdpi/url_bar_entry_default.9.png => mobile/android/app/src/photon/res/drawable-xxhdpi/url_bar_entry_default.9.png
rename : mobile/android/app/src/main/res/drawable-xxhdpi/url_bar_entry_default_pb.9.png => mobile/android/app/src/photon/res/drawable-xxhdpi/url_bar_entry_default_pb.9.png
rename : mobile/android/app/src/main/res/drawable-xxhdpi/url_bar_entry_pressed.9.png => mobile/android/app/src/photon/res/drawable-xxhdpi/url_bar_entry_pressed.9.png
rename : mobile/android/app/src/main/res/drawable-xxhdpi/url_bar_entry_pressed_pb.9.png => mobile/android/app/src/photon/res/drawable-xxhdpi/url_bar_entry_pressed_pb.9.png
extra : rebase_source : 0cff6fa99d9ea3c6ce0bfb1604d4e9533f63ce63
2017-10-13 00:55:27 +02:00
Sebastian Hengst 5c00b8540d merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: AlcL6XYDkf
2017-10-12 23:58:31 +02:00
Sebastian Hengst f7efb5fc2c Merge mozilla-central to mozilla-inbound. r=merge a=merge on a CLOSED TREE 2017-10-12 12:03:15 +02:00
Ehsan Akhgari 0e0b35e1aa Bug 1407854 - Part 3: Pass the child node at the offset as an extra argument where possible to CreateNode(); r=masayuki
This patch converts almost all of the call sites over to passing
the extra argument explicitly.
2017-10-12 17:13:56 -04:00
Ehsan Akhgari bf1f474a3d Bug 1407854 - Part 2: Add an optional argument to CreateNode() to allow callers to pass the child node when they know it; r=masayuki 2017-10-12 17:13:55 -04:00
Ehsan Akhgari e9a78d5b18 Bug 1407854 - Part 1: Remove nsIEditor.createNode(); r=masayuki 2017-10-12 17:13:55 -04:00
Makoto Kato 4afdbeeecb Bug 1364133 - Part 2. Add test. r=masayuki
MozReview-Commit-ID: 5v1LXlWIRPB

--HG--
extra : rebase_source : b201da76921c032cdf18093d385e7fa48c6bdb4c
2017-10-11 17:59:02 +09:00
Makoto Kato 1e88ad2842 Bug 1364133 - Part 1. Check whether SplitNode returns error. r=masayuki
When SplitNode returns nullptr, GetAsText causes crash.  So we should check
error before casting by GetAsText.

MozReview-Commit-ID: 8E1OPSRZ2x5

--HG--
extra : rebase_source : 48a067bd080e7a68e9d469c07d3b744508dae91f
2017-10-11 17:58:24 +09:00
Ryan VanderMeulen 6090989771 Bug 1393171 - Add crashtest. r=me
--HG--
extra : rebase_source : 76957b4f171ebf0de582eeffc73330b71425f363
2017-10-11 19:54:10 -04:00
Ryan VanderMeulen fee107246e Bug 1383763 - Add crashtest. r=me
--HG--
extra : rebase_source : 64f0ebc53170c3b8871f77365829bbdbc5c094eb
2017-10-11 19:54:09 -04:00
Ryan VanderMeulen 2517ed2733 Bug 1384161 - Add crashtest. r=me
--HG--
extra : rebase_source : 2916754a521a451766b1b154c8f80e91dca8ab88
2017-10-11 19:54:09 -04:00
Ryan VanderMeulen fa5fde2e25 Bug 1383747 - Add crashtest. r=me
--HG--
extra : rebase_source : 82d9e01850c972d5228accacd90cf38e407136c8
2017-10-11 19:54:08 -04:00
Emilio Cobos Álvarez 29b6fbc81f Bug 1405311: Remove uses of :-moz-system-metric. r=xidorn,dao
MozReview-Commit-ID: 1Yqy6KgMUB1
2017-10-12 14:47:06 +02:00
Sebastian Hengst 89ddab8643 Backed out changeset d59889304b3f (bug 1408125) for asserting in clipboard test editor/libeditor/tests/test_bug1306532.html. r=backout on a CLOSED TREE
--HG--
extra : amend_source : 2ec45a81dd0ad22bbaf9df23de6b323b235714b3
2017-10-14 00:05:15 +02:00
Sebastian Hengst 5e217241d6 Backed out changeset 19fee71d7e27 (bug 1408125) 2017-10-14 00:05:10 +02:00
Ehsan Akhgari 1d4fb2453d Bug 1408125 - Part 2: Pass the child node at the offset as an extra argument where possible to InsertNode(); r=masayuki
This patch converts almost all of the call sites over to passing
the extra argument explicitly.
2017-10-13 16:23:24 -04:00
Ehsan Akhgari ffd4e9aa37 Bug 1408125 - Part 1: Add an optional argument to InsertNode() to allow callers to pass the child node when they know it; r=masayuki 2017-10-13 16:23:19 -04:00
Ehsan Akhgari 6aadc3345b Bug 1407309 - Part 2: Remove some dead code; r=masayuki 2017-10-13 16:06:08 -04:00
Ehsan Akhgari efeb8d0cb6 Bug 1407309 - Part 1: Rewrite HTMLEditor::CopyLastEditableChildStyles() to use internal DOM APIs; r=masayuki 2017-10-13 16:06:08 -04:00
Ehsan Akhgari 1bba75e15f Bug 1406482 - Avoid using nsINode::GetChildAt() in EditorBase::InsertTextImpl(); r=masayuki 2017-10-11 13:12:00 -04:00
Ryan VanderMeulen 9344c09f7c Bug 1388075 - Add crashtest. r=me
--HG--
extra : rebase_source : 70738bf0b3995786e9a472b268d2a0e9745c4160
2017-10-11 11:52:40 -04:00
Ehsan Akhgari 6a2135a0bb Bug 1407305 - Part 4: Avoid using GetChildAt() in EditorBase::GetNextNode(); r=masayuki 2017-10-11 11:27:57 -04:00
Ehsan Akhgari 40afcd0316 Bug 1407305 - Part 3: Avoid using GetChildAt() in EditorBase::GetPriorNode(); r=masayuki 2017-10-11 11:27:55 -04:00
Ehsan Akhgari 85ece51460 Bug 1407305 - Part 2: Add a aChildAtOffset argument to HTMLEditor::GetNextHTMLNode(); r=masayuki 2017-10-11 11:27:53 -04:00
Ehsan Akhgari 58fedc900c Bug 1407305 - Part 1: Add a aChildAtOffset argument to HTMLEditor::GetPriorHTMLNode(); r=masayuki 2017-10-11 11:27:51 -04:00
Ehsan Akhgari 08f095eab1 Bug 1407353 - Remove one of the nsINode::GetChildAt() calls in EditorBase::JoinNodeDeep(); r=masayuki 2017-10-11 02:00:36 -04:00
Ehsan Akhgari 959b55b795 Bug 1407352 - Avoid calling GetChildAt() in DeleteRangeTransaction::CreateTxnsToDeleteBetween(); r=masayuki 2017-10-11 01:49:55 -04:00
Ehsan Akhgari e72bd8ae0d Bug 1406577 - Part 2: Remove some dead code; r=masayuki 2017-10-10 11:21:59 -04:00
Ehsan Akhgari f0705cd727 Bug 1406577 - Part 1: Rewrite HTMLEditRules::FindNearSelectableNode() to use internal DOM APIs; r=masayuki 2017-10-10 11:21:57 -04:00
Ehsan Akhgari 16c54559ca Bug 1408049 - Remove an unneeded call to nsINode::IndexOf() from EditorBase::BeginningOfDocument(); r=masayuki 2017-10-12 14:27:22 -04:00
Ehsan Akhgari 92a2acc32a Bug 1407447 - Part 2: Remove some dead code; r=masayuki 2017-10-12 10:49:14 -04:00
Ehsan Akhgari 91afad1234 Bug 1407447 - Part 1: Remove the call to nsINode::GetChildAt() from HTMLEditor::DoInsertHTMLWithContext(); r=masayuki 2017-10-12 10:49:14 -04:00
Makoto Kato 59c8e03ca6 Bug 1402904 - Part 2. Add crash tests. r=masayuki
1405747.html is kind of same issue.  But when editing 1405747.html, the crash doesn't occur.  So I keep original HTML by jsfuzzy.

MozReview-Commit-ID: 9BcUkWeBlr5

--HG--
extra : rebase_source : 1bac60293d3b4997a380cf625c6492db22f60160
extra : histedit_source : eae38e2d69e0705545acf1ef1f2d04e7977b8899
2017-10-05 14:23:12 +09:00
Makoto Kato 129db593cd Bug 1402904 - Part 1. Some operations should check whether parent node of each selected node is null. r=masayuki
GetNodesForOperation returns node array from current selection.  So some nodes in this array might have no parent node.  We should ignore such as orphans.

MozReview-Commit-ID: 3OK0CUv5QOe

--HG--
extra : rebase_source : 59636177113ad5d3f9789ca22a6a96938e4cf486
extra : histedit_source : fd4fd140a24a8dc5a63fceeb25faba827c317683%2C6ed479239be0a9043d05170231c6613b04cb0d26
2017-10-10 13:41:28 +09:00
Phil Ringnalda 63a7c915ff Backed out changeset 8cce0046e302 (bug 1406482) for mozilla::EditorBase::InsertTextImpl crashes
MozReview-Commit-ID: G9jW217fO0v
2017-10-09 21:33:53 -07:00
Phil Ringnalda 5fee8a40bb Backed out changeset 9843839bf1df (bug 1406482) for mozilla::EditorBase::InsertTextImpl crashes
MozReview-Commit-ID: J7rX4lX2lxM
2017-10-09 21:32:12 -07:00
Kyle Machulis 669ff05b49 Bug 1406525 - Remove nsIDOMHTMLLinkElement; r=bz
MozReview-Commit-ID: 4xUSQ8SiIqX
2017-10-09 16:09:38 -07:00
Ehsan Akhgari 20668d566c Bug 1406482 - Address review comment 2017-10-09 18:24:06 -04:00
Ehsan Akhgari 8fff7a3eb8 Bug 1406482 - Avoid using nsINode::GetChildAt() in EditorBase::InsertTextImpl(); r=masayuki 2017-10-09 18:21:22 -04:00
Nicholas Nethercote d225f7151b Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro.
(Path is actually r=froydnj.)

Bug 1400459 devirtualized nsIAtom so that it is no longer a subclass of
nsISupports. This means that nsAtom is now a better name for it than nsIAtom.

MozReview-Commit-ID: 91U22X2NydP

--HG--
rename : xpcom/ds/nsIAtom.h => xpcom/ds/nsAtom.h
extra : rebase_source : ac3e904a21b8b48e74534fff964f1623ee937c67
2017-10-03 09:05:19 +11:00
Sebastian Hengst b834f0d177 merge autoland to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 7Ez95T2ivfR
2017-10-07 10:37:39 +02:00
Ehsan Akhgari e3ed6f0810 Bug 1406215 - Part 2: Remove the usage of nsINode::GetChildAt() from nsTextServicesDocument::GetCollapsedSelection(); r=masayuki 2017-10-06 11:45:40 -04:00
Ehsan Akhgari 6f1701de55 Bug 1406215 - Part 1: Remove a useless bounds check for a selection range offset; r=masayuki
This offset is obtained from a Range, so it doesn't need to be
validated.
2017-10-06 11:45:40 -04:00
Ehsan Akhgari 3674cbeaa1 Bug 1405794 - Avoid using nsINode::GetChildAt() in TextEditor::SelectEntireDocument(); r=masayuki 2017-10-06 11:12:04 -04:00
Phil Ringnalda 6ea2792d77 Backed out 9 changesets (bug 1396066) for Windows reftest failures
CLOSED TREE

Backed out changeset e41f9295ee00 (bug 1396066)
Backed out changeset 7a22efa8df6b (bug 1396066)
Backed out changeset ed95eea7105c (bug 1396066)
Backed out changeset 635746c88630 (bug 1396066)
Backed out changeset 5b1997aeaead (bug 1396066)
Backed out changeset 19c9ea492f5e (bug 1396066)
Backed out changeset b9d8e4588584 (bug 1396066)
Backed out changeset 87b44ea10407 (bug 1396066)
Backed out changeset e5b9aed44133 (bug 1396066)

MozReview-Commit-ID: K9q3MfPBc5E
2017-10-06 20:48:23 -07:00
Emilio Cobos Álvarez 28bfd5dbba Bug 1396066 another followup. Load input.css from a chrome uri, so it can use :-moz-system-metric. This requires exposing the reftest chrome package to content, but that should be OK. r=bzbarsky
The CLOSED TREE odyssey must end.

MozReview-Commit-ID: EWkwqTHW3dg
2017-10-06 20:16:43 +02:00
Kyle Machulis 2090426dc0 Bug 1405792 - Remove nsIDOMHTMLIFrameElement r=bz
MozReview-Commit-ID: 1u9C66X8j59

--HG--
extra : rebase_source : 5d87fe933170e32fbb44e24ec843623e143164d2
2017-10-04 20:41:24 -07:00
Kyle Machulis e54a4653ba Bug 1404079 - Remove nsIDOMHTMLFrameElement; r=bz
MozReview-Commit-ID: GSvMwRpl7g4

--HG--
extra : rebase_source : a5e8ee45bae90eaa9ecdcc6f0bac0c9dac0ce2c8
2017-09-28 19:06:14 -07:00
Wes Kocher d8985b6e57 Merge inbound to central, a=merge
MozReview-Commit-ID: IUFdbLdYFhX
2017-10-04 16:37:59 -07:00
Ehsan Akhgari f149573106 Bug 1405419 - Part 2: Remove a dead overload of HTMLEditor::GetPriorHTMLSibling(); r=masayuki 2017-10-04 13:39:48 -04:00
Ehsan Akhgari 73a4c4fd54 Bug 1405419 - Part 1: Remove the HTMLEditor::GetPriorHTMLSibling() overload accepting a parent and an offset; r=masayuki 2017-10-04 13:39:48 -04:00
Ehsan Akhgari d7d7a890e5 Bug 1405414 - Avoid using nsINode::GetChildAt() in HTMLEditor::SetCSSBackgroundColor(); r=masayuki 2017-10-04 13:34:06 -04:00
Masayuki Nakano b1236d3f9d Bug 1390562 - part 1: HTML editor shouldn't split <div> container at inserting a line break for backward compatibility if defaultParagraphSeparator is "br" r=m_kato
Starting from bug 1297414, HTMLEditor treats <div> container as same as <p>
container at inserting a line break.  This new behavior is check in WPT.
So, it's better to use the new behavior for compatibility with other browsers.

However, we're still using <br> as default paragraph separator for backward
compatibility even though this is non-standard behavior.

So, although, the old behavior is odd, we should keep treating them differently
in the backward compatibility mode.  Actually, this behavior change causes
an incompatibility problem in Gmail, and may be in other web apps.

MozReview-Commit-ID: INCihKYmcPd

--HG--
extra : rebase_source : 874e41ddf7bbedbea2c7af79285ea79fbc48f0f2
2017-10-03 19:36:39 +09:00
Masayuki Nakano 62ca7eb7cd Bug 1390562 - part 0: Add automated tests r=m_kato
MozReview-Commit-ID: 7cgxdWClOBQ

--HG--
extra : rebase_source : a7a1028635c1ee27242a1eab97043139eb3f80c1
2017-10-03 18:33:40 +09:00
Ehsan Akhgari 24927971c8 Bug 1404581 - Fallback to the slow path if we're in Thunderbird's plaintext editor; r=masayuki 2017-10-03 11:07:59 -04:00
Catalin Badea f8162c4bfd Bug 651120 - Remove index argument from content removed/appended/inserted notifications. r=peterv 2017-10-03 11:09:08 +01:00
Ehsan Akhgari 850a7084d5 Bug 1405751 - Part 2: Remove a dead overload of HTMLEditor::GetNextHTMLSibling(); r=masayuki 2017-10-05 15:17:28 -04:00
Ehsan Akhgari 879f3317d1 Bug 1405751 - Part 1: Remove the HTMLEditor::GetNextHTMLSibling() overload accepting a parent and an offset; r=masayuki 2017-10-05 15:17:27 -04:00
Ehsan Akhgari a3b87e2b92 Bug 1405039 - Avoid using nsINode::GetChildAt() in HTMLEditor::GetSelectedElement(); r=masayuki 2017-10-02 14:22:57 -04:00
Ehsan Akhgari 4f6e533800 Bug 1405027 - Avoid using nsINode::GetChildAt() in HTMLEditor::GetElementOrParentByTagName(); r=masayuki 2017-10-02 14:01:25 -04:00
Sebastian Hengst 4d183e475c Backed out changeset 9b5b03b2114d (bug 1401379) 2017-10-02 19:57:33 +02:00
Nika Layzell 484b697044 Bug 1401379 - Part 2: Add more cycle collector edges for nsDocShell, r=smaug
MozReview-Commit-ID: 3j9jfLv7MO2
2017-10-02 11:58:01 -04:00
Nika Layzell cbc8fa8a3b Bug 1399626 - Part 4: Allow initializing nsIContentIterator with RangeBoundaries, r=masayuki
This patch adds an overload to nsIContentIterator::Init which accepts
RangeBoundary objects, and modifies the codepath to avoid using the offset of
the start or end nodes to construct the nsIContentIterator.

MozReview-Commit-ID: 5ZqKeiUunoN
2017-10-02 11:58:00 -04:00
Olli Pettay 657d54de19 Bug 1402941 - Add HTMLSlotElement (disabled for now), r=hsivonen
--HG--
extra : rebase_source : ced3d844425bee6fddd22641646a7366ffd5d69e
2017-10-02 13:22:12 +03:00
Ehsan Akhgari 46338d5db2 Bug 1404106 - Avoid using nsINode::GetChildAt() in HTMLEditor::GetSelectedElement(); r=masayuki 2017-09-29 12:50:52 -04:00
Ehsan Akhgari 4b26a85879 Bug 1404084 - Avoid using nsINode::GetChildAt() in HTMLEditor::GetCSSBackgroundColorState(); r=masayuki 2017-09-29 12:40:03 -04:00
Ehsan Akhgari 17d3fe6833 Bug 1393140 - Rewrite EditorBase::FindBetterInsertionPoint() to not use nsINode::GetChildAt() in the fast path used in Firefox; r=masayuki 2017-09-29 12:16:53 -04:00
Makoto Kato 6d4428a710 Bug 1403841 - IsSelectionEditable should check whether focus node and anchor node aren't null. r=masayuki
This might be regression by bug 1319340, but there is crash signature from old version.  We should check whether focus node and anchor node aren't null.

MozReview-Commit-ID: J7npxN5kC9G

--HG--
extra : rebase_source : e2f19690d529abc1a8e2852a5ed826b0caa39244
2017-09-29 13:12:35 +09:00
Kartikaya Gupta 6039f99c16 Bug 1403559 - Remove unnecessary asserts-if clause because we only run webrender reftests with e10s. r=jrmuizel
MozReview-Commit-ID: ChEtYwbsFq5

--HG--
extra : rebase_source : 86dbb6fdb7d61d2dd612e7b27e1b1b696dc7772f
2017-09-27 10:12:09 -04:00
Sebastian Hengst 92393ec0c5 Backed out changeset db9c439a8298 (bug 1403559) for failing reftest layout/reftests/reftest-sanity/reftest-no-paint.html. r=backout 2017-09-27 20:20:00 +02:00
Kartikaya Gupta 1bb174e043 Bug 1403559 - Remove unnecessary asserts-if clause because we only run webrender reftests with e10s. r=jrmuizel
MozReview-Commit-ID: ChEtYwbsFq5

--HG--
extra : rebase_source : e587f16f68b760633dea9541958d5409cf9eb3b6
2017-09-27 10:12:09 -04:00
Sebastian Hengst 72d1ea4a4b merge mozilla-central to autoland. r=merge a=merge 2017-09-27 11:49:57 +02:00
Wes Kocher acf8913934 Merge m-c to inbound, a=merge
MozReview-Commit-ID: IsbKCdZU2Ui
2017-09-26 17:14:31 -07:00
Makoto Kato 24d3058066 Bug 1402469 - Part 2. Add crash test. r=masayuki
MozReview-Commit-ID: HogVH2OTyd6

--HG--
extra : rebase_source : 61e23c7fcc466eccef8bf496436841fe153c4767
2017-09-25 14:11:29 +09:00
Makoto Kato 2fc292406d Bug 1402469 - Part 1. Return value of ConvertListType should use Element instead of nsresult. r=masayuki
This is a typo bug of Bug 1053779 Part 2.  ConvertListType might return NS_OK
even if ReplaceContainer doesn't return valid value.

So, to clean up code, we should return Element instead of nsresult since out
parameter of this function is Element only.

MozReview-Commit-ID: 44UHETzcdGy

--HG--
extra : rebase_source : ab76486505cb4e7caea3fb99e11fccd606878f02
2017-09-25 14:15:50 +09:00
Kyle Machulis a3876f104a Bug 1389650 - Remove nsIDOMHTMLAnchorElement; r=bz
Removes the XPCOM interface for nsIDOMHTMLAnchorElement, replacing it
with binding class usage.

MozReview-Commit-ID: 7v0bKlY7Fax
2017-09-26 11:41:28 -07:00
Sebastian Hengst 5ed0b93c50 Backed out changeset 26805294a547 (bug 1389650) 2017-09-26 10:47:41 +02:00
Nicholas Nethercote dfd3b7e7aa Bug 1400459 (part 2) - Devirtualize nsIAtom. r=heycam.
This patch merges nsAtom into nsIAtom. For the moment, both names can be used
interchangeably due to a typedef. The patch also devirtualizes nsIAtom, by
making it not inherit from nsISupports, removing NS_DECL_NSIATOM, and dropping
the use of NS_IMETHOD_. It also removes nsIAtom's IIDs.

These changes trigger knock-on changes throughout the codebase, changing the
types of lots of things as follows.

- nsCOMPtr<nsIAtom> --> RefPtr<nsIAtom>

- nsCOMArray<nsIAtom> --> nsTArray<RefPtr<nsIAtom>>
  - Count() --> Length()
  - ObjectAt() --> ElementAt()
  - AppendObject() --> AppendElement()
  - RemoveObjectAt() --> RemoveElementAt()

- ns*Hashtable<nsISupportsHashKey, ...> -->
  ns*Hashtable<nsRefPtrHashKey<nsIAtom>, ...>

- nsInterfaceHashtable<T, nsIAtom> --> nsRefPtrHashtable<T, nsIAtom>
  - This requires adding a Get() method to nsRefPtrHashtable that it lacks but
    nsInterfaceHashtable has.

- nsCOMPtr<nsIMutableArray> --> nsTArray<RefPtr<nsIAtom>>
  - nsArrayBase::Create() --> nsTArray()
  - GetLength() --> Length()
  - do_QueryElementAt() --> operator[]

The patch also has some changes to Rust code that manipulates nsIAtom.

MozReview-Commit-ID: DykOl8aEnUJ

--HG--
extra : rebase_source : 254404e318e94b4c93ec8d4081ff0f0fda8aa7d1
2017-09-26 08:33:21 +10:00
Kyle Machulis e2ace7d91f Bug 1389650 - Remove nsIDOMHTMLAnchorElement; r=bz
Removes the XPCOM interface for nsIDOMHTMLAnchorElement, replacing it
with binding class usage.

MozReview-Commit-ID: 7v0bKlY7Fax
2017-09-25 23:12:44 -07:00
Olli Pettay c80e124562 Bug 1396584 - Remove support for multiple ShadowRoots, r=mrbkap
--HG--
extra : rebase_source : 2bb600ed1ffd35c195617a7eb70d0ba847a46898
2017-09-25 18:09:26 +03:00
Kyle Machulis 9b4ac7e03f Bug 1402102 - Remove nsIDOMHTMLObjectElement; r=bz
Removes the nsIDOMHTMLObjectElement XPCOM interface, replacing it with
HTMLObjectElement and FromContent conversion usage.

MozReview-Commit-ID: dmsjSO97uh

--HG--
extra : rebase_source : 9b2c25b8681f754bc34233afccdb6fc5d38f0804
2017-09-22 17:05:12 -07:00
Nicholas Nethercote cea0a3af5d Bug 1400777 (part 1) - Remove eHTMLTags. r=mrbkap.
It's just a too-cute-by-half typedef for nsHTMLTag.

--HG--
extra : rebase_source : 142128de90c3bed06648db445ca0159c23ea6ff3
2017-09-19 11:07:49 +10:00
Ehsan Akhgari 78f4e42447 Bug 1399722 - Don't prevent changing the selection in the editor when setting the value attribute; r=masayuki 2017-09-20 09:10:03 -04:00
Ehsan Akhgari 445bf0b3fc Bug 1401225 - Pass the correct length when collapsing the selection in EditorBase::SetTextImpl(); r=masayuki 2017-09-20 09:09:58 -04:00
Nicholas Nethercote 2ef37710e7 Bug 1395828 (part 4) - Remove nsIParserService/nsParserService. r=mrbkap.
It a stateless wrapper around static methods in nsHTMLTags and nsHTMLElement,
and hence an unnecessary layer of indirection that just adds complexity and
slowness. This patch removes it, cutting almost 300 lines of code.

This requires making nsElementTable.h an exported header, to expose the
nsHTMLElement methods.

--HG--
extra : rebase_source : abbcb8e5001389affbf717092213b898673db07f
2017-09-05 20:19:06 +10:00
Xidorn Quan fd467033f9 Bug 1407847 - Enable stylo for XUL document without system principal and annotate failures accordingly. r=heycam
MozReview-Commit-ID: KcJxloT2rR8

--HG--
extra : rebase_source : 8943efaa7afbf1bc74ac85ca103a52e2f4d1b1a4
2017-10-12 10:43:38 +11:00
Sylvestre Ledru e8734313d2 Bug 1408767 - HTMLEditor::MouseMove: Remove two unused variables r=m_kato
MozReview-Commit-ID: 8aP9nevSXPz

--HG--
extra : rebase_source : 6fce6c36c77518c1c75092c36e3e3454ae03a019
2017-10-15 19:32:43 +02:00
Gerald Squelart 7dbe315e25 Bug 1398999 - nsDequeFunctor::operator() doesn't need to return anything - r=froydnj
Its return value is never used, and most implementations return nullptr anyway.

MozReview-Commit-ID: 8rxC053mmE8

--HG--
extra : rebase_source : 61a0b8b1373396182efd27d3c01b96e5e5541364
2017-02-09 14:06:36 +11:00
Sebastian Hengst dbddac850d merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: IgyDMUVYYBm
2017-09-11 23:58:31 +02:00
Michael Layzell c67b1f18a3 Bug 1340578 - Allow execCommand('paste') to be called from webextensions without a target, r=ehsan 2017-09-11 14:13:26 -04:00
Makoto Kato 6b536f8760 Bug 1394758 - Part 2. WSRunObject::InsertBreak should convert space to NBSP when current position is first text run object. r=masayuki
After applying part 1 fix, it doesn't pass test_bug430392.html like the following..

1. content is <span contenteditable=false>A</span>[caret] ;
2. [VK_RETURN]
3. content is <span contenteditable=false>A</span><br>; <- whitespace is removed

Since we started to treat readonly text nodes as WSType::special with previous patch, WSRunObject::InsertBreak doesn't convert space (after caret) to NBSP because WSRunObject::InsertBreak does it only when inserted position isn't first text run object.

So even if this is first text run object, space after caret should be converted to NBSP.

MozReview-Commit-ID: Hj0i3wm45c3

--HG--
extra : rebase_source : 2d0ae7c47c6187e56d6c29e8eb48974f7ab7ff72
2017-09-04 15:01:16 +09:00
Makoto Kato bf93a68c34 Bug 1394758 - Part 1. non-editable text node should be treated as WSType::special, not WSType::text. r=masayuki
This bug occurs that WSRunObject::PrepareToDeleteRangePriv() calls WSRunObject::ConvertToNBSP for non-editable text node.

Actually, even if text node isn't editable, WSFragment::mType becomes WSType::text now.  So, whitespace only node at the end of contenteditable=false is treated as WSType::normalWS, i.e., treated as editable.

So text node in contenteditable=false should treated as WSType::special which means a non-editable inline object.   Then, WSRunObject won't create object chunk of WSType::normalWS for text node in contenteditable=false.

MozReview-Commit-ID: GOjxax8KvDD

--HG--
extra : rebase_source : e5fff30a2710c2021d59ce88bf2698ce4ebe2dfc
2017-09-11 15:52:05 +09:00
Makoto Kato 012ef9e1c1 Bug 1380292 - Don't turn on object resizer, inline table editor and etc when element isn't into editor. r=masayuki 2017-09-09 10:49:02 -04:00
Wes Kocher 5ee13ebe8a Merge m-c to inbound, a=merge
MozReview-Commit-ID: 4CJDJBAcVPL
2017-09-08 13:41:21 -07:00
Christoph Kerschbaumer 2f720638ac Bug 1397656 - Update tests within editor/ to comply with new toplevel data: URI navigation policy. r=masayuki 2017-09-08 15:40:34 +02:00
Masayuki Nakano 4ce89d8f61 Bug 1369072 - part3: nsXBLPrototypeHandler::DispatchXBLCommand() should use controller of visible window r=smaug
With previous change, KeyboardEvent is dispatched even when invisible window
has focus.  However, nsRootWindow::GetControllerForCommand() returns controller
for focused window even when the window is invisible because it uses
nsFocusManager::GetFocusedDescendant() to retrieve focused window.

Perhaps, we can assume that users won't expect to do something with invisible
window when they type some keys.  Then, nsRootWindow::GetControllerForCommand()
should return controller for visible ancestor window if focused window is
invisible.

This patch makes nsFocusManager::GetFocusedDescendant() can return only visible
descendants.  However, it already has a bool argument.  Therefore, it should
have a flag instead of adding new flag.  Most changes of this patch is replacing
its callers.

Then, nsRootWindow::GetControllerForCommand() and nsRootWindow::GetControllers()
should have a bool flag if it should return controller(s) for visible window.
This patch adds a bool flag for it.  Fortunately, the interface isn't scriptable.

Finally, this patch makes nsXBLPrototypeHandler::DispatchXBLCommand() and
EventStateManager::DoContentCommandEvent() retrieve controller for visible
window since they are always handles user input.

MozReview-Commit-ID: GygttTHuKRm

--HG--
extra : rebase_source : 1341273c4606298cb9b890b9312d9f5c8a75d144
2017-09-07 22:54:49 +09:00
Sebastian Hengst 9a6b5140c4 merge mozilla-central to autoland. r=merge a=merge 2017-09-08 11:03:59 +02:00
Chris Peterson ce7edc4de1 Bug 1394603 - Replace fails-if(!styloVsGecko) to fails. r=jryans
Skip tests that are expected to fail in both Stylo and Gecko modes. They would unexpectedly "pass" in styloVsGecko mode when comparing the two failures, which is not a useful result.

MozReview-Commit-ID: 3mOpjU225Q1

--HG--
extra : rebase_source : 22bb5d4e3c5138ef832995eaf5716824f4707ffe
extra : source : d40fb20c9a49d0797c0eeae613a04912b12a28f7
2017-09-01 20:39:44 -07:00
Ehsan Akhgari 2231e4a948 Bug 1397577 - Avoid using GetChildAt() in HTMLEditor::GetSelectedOrParentTableElement(); r=smaug 2017-09-07 10:29:02 -04:00
Ehsan Akhgari 233352f9ba Bug 1397576 - Avoid using GetChildAt() in HTMLEditor::GetCellFromRange(); r=smaug 2017-09-07 09:36:07 -04:00
Sebastian Hengst 8eb249afcc merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: JSRVc5yW6Kx
2017-09-07 12:39:12 +02:00
Nicholas Nethercote f92bd5e9ab Bug 1393642 (follow-up) - Fix potential leak in HTMLEditor methods. r=masayuki.
As written, these functions will leak if they are passed strings that don't
match static atoms. In practice, all strings passed *do* match static atoms,
but let's fix it anyway in case that changes in the future.

--HG--
extra : rebase_source : 01685428e7dfc577e63bb6423382817359623151
2017-09-07 12:20:51 +10:00
Phil Ringnalda 75f9cdbd7e Backed out 3 changesets (bug 1394603) for reftest syntax error
CLOSED TREE

Backed out changeset 44117208f321 (bug 1394603)
Backed out changeset 31088c59d895 (bug 1394603)
Backed out changeset 20551d68f602 (bug 1394603)

MozReview-Commit-ID: 4F4jSQ8GyfG
2017-09-06 22:48:55 -07:00
Chris Peterson 2d629378b2 Bug 1394603 - Replace fails-if(!styloVsGecko) to fails. r=jryans
Skip tests that are expected to fail in both Stylo and Gecko modes. They would unexpectedly "pass" in styloVsGecko mode when comparing the two failures, which is not a useful result.

MozReview-Commit-ID: 3mOpjU225Q1

--HG--
extra : rebase_source : 0c307639c3626af3b6b43e05d3ee73d08b3f47ce
2017-09-01 20:39:44 -07:00
Wes Kocher a14d71906d Merge m-c to inbound, a=merge
MozReview-Commit-ID: BJ4WkYrJ9g6
2017-09-06 17:24:48 -07:00
Masayuki Nakano 7fb91d43b5 Bug 1397178 - Make EditorBase::GetRoot() not call nsIEditor::GetRootElement() r=smaug
In the old design, EditorBase::mRootElement is initialized when
nsIEditor::GetRootElement() is called.  Therefore, EditorBase::GetRoot()
calls if mRootElement is nullptr.

However, mRootElement is now initialized when EditorBase::UpdateRootElement()
is called and it's always initialized when EditorBase::Init() is called.

So, EditorBase::GetRoot() doesn't need to call nsIEditor::GetRootElement()
anymore.

MozReview-Commit-ID: 6dNEJaGNMZe

--HG--
extra : rebase_source : ed29488cfd1434fb200387706ca5a96cb2185090
2017-09-05 23:32:17 +09:00
Makoto Kato daeca3277c Bug 1395443 - DictionaryFetcher::Fetch should initializate nsIContentPrefService2 by idle thread. r=masayuki
When using contenteditable with spellchecker (it is by default), spellchecker will be initialized by mozilla::EditorEventListener::Focus.  This method will call nsEditorSpellCheck::UpdateCurrentDictionary, but this method seems to be slow.

DictionaryFetcher::Fetch gets nsIContentPrefService2 that is implemented by JavaScript, so we should create nsIContentPrefService2 out of Fetch method.

MozReview-Commit-ID: 1fxug0sqD72

--HG--
extra : rebase_source : c46a54f9fc811aace20c54c4a3e468a83c2530d2
2017-09-04 19:57:45 +09:00
Andrew McCreight 7f7f149167 Bug 1395636 - Convert code to use NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED. r=peterv
MozReview-Commit-ID: DivJPerL5SF

--HG--
extra : rebase_source : 890df75914906a5d34e8af67f9fc3a4be239d2d6
2017-08-31 16:29:22 -07:00
Sebastian Hengst 2f7f455fa1 Backed out changeset 9306866e8df0 (bug 1395636) for build bustage. r=backout on a CLOSED TREE
--HG--
extra : amend_source : 20d028d6b971cf6a221dc2f1553687d6c074bdcb
2017-09-06 19:18:06 +02:00
Andrew McCreight 4d6e76dfcf Bug 1395636 - Convert code to use NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED. r=peterv
MozReview-Commit-ID: DivJPerL5SF

--HG--
extra : rebase_source : cb952cfc5600a163a5580438e5b0177595689dab
2017-08-31 16:29:22 -07:00
Catalin Badea d952c00aad Bug 1395936 - Avoid child index usage in HTMLEditor::DoContentInserted. r=masayuki 2017-09-06 21:38:43 +01:00
Sebastian Hengst c2f7bd1de9 Backed out changeset dbb4fb7aa5bb (bug 1395936) for assertions and crashes in a11y test, mochitests, reftests, crashtest, ...; r=backout on a CLOSED TREE 2017-09-06 13:25:37 +02:00
Catalin Badea c90d69fac0 Bug 1395936 - Avoid child index usage in HTMLEditor::DoContentInserted. r=masayuki 2017-09-06 11:26:03 +01:00
Nicholas Nethercote 9b8908c88e Bug 1395828 (part 3) - Remove AssertParserServiceIsCorrect(). r=mrbkap.
It's a bit strange for the editor to distrust the parser service in this way.
The double-checking seems unnecessary, especially given that it is *buggy*: it
incorrectly includes `col`, `colgroup`, and `legend` as block elements, but
excludes `pre`. (It must only be called in situations where these
incorrectly-classified elements are not passed in, otherwise it would have
triggered by now.) So this patch removes it.

The patch also removes `li` and `pre` from the IsAnyOfHTMLElements() test in
HTMLEditor::NodeIsBlockStatic. Contrary to what the comment in
NodeIsBlockStatic() says, they *are* identified as block elements by the parser
service.

--HG--
extra : rebase_source : c9bb3c9e07320fafed17942229c316f41ac2a0a6
2017-09-04 15:45:07 +10:00
Makoto Kato 6e004e975d Bug 1363896 - Adjust fuzzy-if for Android's reftest. r=masayuki
editor/reftests/input-text-onfocus-reframe-ref.html is sometimes failed due to "image comparison, max difference: 1, number of differing pixels: 1".

As long as I check both images, I don't know why focus ring is different.  But this is 1 pixel only diff, so we should use fuzz-if.

MozReview-Commit-ID: 5SrjorXEBW

--HG--
extra : rebase_source : d6fbb2f3a5ea2bff5ee6c2b39909831830f5d47c
2017-09-04 13:44:59 +09:00
Sebastian Hengst 3528754b01 Backed out changeset d2305bd57a97 (bug 1393140) for changed behavior on request from jorgk. r=backout a=backout
MozReview-Commit-ID: HGulTnPx6TF
2017-09-02 23:48:23 +02:00
Wes Kocher 8b84853ed6 Merge m-c to autoland, a=merge
MozReview-Commit-ID: GcHZLNPPNnI
2017-09-01 16:34:14 -07:00
Wes Kocher 5f157c17dc Merge inbound to central, a=merge
MozReview-Commit-ID: 3JxUEFuinHY
2017-09-01 16:29:10 -07:00
Ehsan Akhgari b62766b04e Bug 1393140 - Rewrite EditorBase::FindBetterInsertionPoint() without using nsINode::GetChildAt(); r=masayuki 2017-09-01 12:12:39 -04:00
Masayuki Nakano 199c190cbe Bug 1395157 - Make EditorBase::EndPlaceholderTransaction() not retrieve nor hold nsIPresShell and nsCaret r=Ehsan
EditorBase::EndPlaceholderTransaction() has hidden caret.  However, it doesn't
do it anymore.  However, bug 805697 didn't remove unnecessary code that
retrieves and hold nsIPresShell and nsCaret.  This patch removes them.

MozReview-Commit-ID: Eh9pbf8p2bZ

--HG--
extra : rebase_source : e766906089af1cd3c6efa95b82e3b126ae097ab2
2017-08-30 23:24:26 +09:00
Henri Sivonen 3c8567b60d Bug 1354989 - Avoid pivoting via UTF-16 when loading CSS in the Stylo mode. r=jdm,SimonSapin
MozReview-Commit-ID: Llt29dvB4Io

--HG--
extra : rebase_source : 3ae51dc8beff3fb19e9318a6c7c30c9ab08a5b57
2017-08-29 16:01:42 +03:00
Makoto Kato 2f39643ca1 Bug 1395080 - Part 4. Remove unused nsIDOMRange parameter. r=masayuki
GetFirstSelectedCell and GetNextSelectedCell allow that 1st parameter is nullptr when current range is unnecessary.  So we should use nullptr when it is unused.

MozReview-Commit-ID: BuI7ds47h0U

--HG--
extra : rebase_source : 4cb67aa15c5b5a7692c7e5eb43976c8e7a7884e4
2017-09-01 13:36:35 +09:00
Makoto Kato cc0f4f0109 Bug 1395080 - Part 3. Replace nsIDOMRange::GetStartContainer and nsIDOMRange::GetEndContainer with nsRange::GetStartContainer and nsRange::GetEndContainer. r=masayuki
Except to nsTextServicesDocument.cpp, we replace nsIDOMRange::GetStartContainer and nsIDOMRange::GetEndContainer with nsRange::GetStartContainer and nsRange::GetEndContainer.

Since nsTextServicesDocument.cpp still uses a lot of nsIDOMNode, I will change it by new bug.

MozReview-Commit-ID: 9x1oajmabca

--HG--
extra : rebase_source : c22072a39c907df631025a423c6302df2047e824
2017-09-01 13:35:57 +09:00
Makoto Kato 09107665a4 Bug 1395080 - Part 2. Replace nsIDOMRange::GetStartOffset and nsIDOMRange::GetEndOffset with nsRange::StartOffset and nsRange::EndOffset. r=masayuki
MozReview-Commit-ID: 4wja9Lu53IR

--HG--
extra : rebase_source : 2fa7f89435645dbc90d39089b2856612bd71dfdf
2017-09-01 12:20:28 +09:00
Makoto Kato c171902197 Bug 1395080 - Part 1. Replace nsIDOMRange::GetCollapsed with nsRange::Collapsed. r=masayuki
MozReview-Commit-ID: LefqnYBJGec

--HG--
extra : rebase_source : f85c786ee218cf6e8528be8d2d91aa9ac0e3ce97
2017-09-01 12:19:11 +09:00