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

8177 Коммитов

Автор SHA1 Сообщение Дата
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
Andrew McCreight 78807d8776 Bug 1391005 - Eliminate NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED. r=peterv
Replace it with NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION, because it
has been the same for a while.

MozReview-Commit-ID: 5agRGFyUry1

--HG--
extra : rebase_source : 5388c56b2f6905c6ef969150f0c5b77bf247624d
2017-08-29 16:02:48 -07:00
Nicholas Nethercote 0eadf50d37 Bug 1394583 - Remove default properties from nsIHTMLEditor. r=masayuki.
nsIHTMLEditor's addDefaultProperty(), removeDefaultProperty(),
removeAllDefaultProperties() methods are never used -- not from C++ code or
script, in either mozilla-central or comm-central.

So this patch removes them. This means that HMLTEditor::mDefaultStyles is never
used, so the patch removes it and all the code that manipulates it as well.

--HG--
extra : rebase_source : 76634ce2bb2d94534b8d7f299c4ebd6a83b66637
2017-08-25 16:59:17 +10:00
Makoto Kato fedf4a0136 Bug 1391978 - Part 9. Replace nsISelection::GetAnchorNode with Selection::GetAnchorNode. r=masayuki
MozReview-Commit-ID: CiIClvsiNxX

--HG--
extra : rebase_source : a739151e75d8920dd76b9729fd0d698f574218ed
extra : histedit_source : d9004420476b49aa5e063a00b01928e509214843
2017-08-25 16:12:39 +09:00
Makoto Kato 349e2e739f Bug 1391978 - Part 8. Replace nsISelection::GetAnchorOffset with Selection::AnchorOffset. r=masayuki
MozReview-Commit-ID: GgxyRsVXHwl

--HG--
extra : rebase_source : 7d3d869f21669486e9dd3bb925451e5bd20fa3b0
extra : histedit_source : 0e2f13e733d143a782391c420da9bfa34f0c228a
2017-08-25 16:12:39 +09:00
Makoto Kato 7732ebc1b4 Bug 1391978 - Part 7. HTMLEditRules::NormalizeSelection should use nsINode instead of nsIDOMNode. r=masayuki
HTMLEditRules::NormalizeSelection uses nsIDOMNode for node handling, so we replace with nsINode, then use Selection::Extend and Selection::Collapse.

MozReview-Commit-ID: 6Ijo19vTwRi

--HG--
extra : rebase_source : 3171ed5808d9045b268cc76989c7d06ea220d393
extra : histedit_source : f3a1af1f84cceb80200a3965385dfb1d036c9e60
2017-08-25 16:12:39 +09:00
Makoto Kato 83778753b6 Bug 1391978 - Part 6. Replace nsISelection::Extend with Selection::Extend. r=masayuki
Except to HTMLEditRules::NormalizeSelection, I replace nsISelection::Extend with Selection::Extend.

MozReview-Commit-ID: H83zpvAo5Xa

--HG--
extra : rebase_source : b217dd1d506229d848126b9c2494d1b4f9dc3a35
extra : histedit_source : 8999bc5b1b1edfe7e48a432d52640b8181490624
2017-08-28 17:54:34 +09:00
Makoto Kato 6f6e4ef550 Bug 1391978 - Part 5. Replace nsISelection::GetFocusOffset/GetAnchroOffset with Selection::FocusOffset/AnchorOffset. r=masayuki
MozReview-Commit-ID: 6OpO1GQyhFO

--HG--
extra : rebase_source : 3e57ddbebc7985ec0e5ada4b1e83631d6f1c83b5
extra : histedit_source : 655c5c3e4c4a3f30d028f9b4b316573a187bd0f0
2017-08-25 16:12:38 +09:00
Makoto Kato 72387d25cd Bug 1391978 - Part 4. Replace nsISelection::GetFocusNode with Selection::GetFocusNode. r=masayuki
MozReview-Commit-ID: GFtkRvsFaYI

--HG--
extra : rebase_source : c11007a58ee312a7845ba4b8c0886dec49cd8c39
extra : histedit_source : e0a2d06a061a9cad3ff83e6be5e697a1c2748756
2017-08-25 16:12:38 +09:00
Makoto Kato 1480dbb45c Bug 1391978 - Part 3. Replace nsISelection::GetIsCollapsed with Selection::IsCollapsed. r=masayuki
MozReview-Commit-ID: AYCX9V8smzm

--HG--
extra : rebase_source : 2c45cffa7d526a9e07126c90f17232b02b1612ea
extra : histedit_source : bd451bdd633df2eb155102f9c3b29b49a25b9c69
2017-08-25 17:48:04 +09:00
Makoto Kato a7d3c9c2a0 Bug 1391978 - Part 2. Replace nsISelection::SelectAllChildren with Selection::SelectAllChildren. r=masayuki
MozReview-Commit-ID: m9bLHIIfy9

--HG--
extra : rebase_source : 47aa2e674a8f6615989b25ddb2b11b6614587b7b
extra : histedit_source : 847922b8ff86389a4a264efda7c4f933743c8f63
2017-08-25 16:12:38 +09:00
Makoto Kato 26ce168fcc Bug 1391978 - Part 1. Replace nsISelection::GetRangeCount with Selection::RangeCount. r=masayuki
I would like to remove more dependency of old nsISelection interface from editor if possible.  So we can replace nsISelection::GetRangeCount with Selection::RangeCount.

MozReview-Commit-ID: 2Mh5ceQI2om

--HG--
extra : rebase_source : 03c8a5b49e2929b0ce6c6af8b78c9677a55a14c4
extra : histedit_source : ca7741379c7cc5b7b938aad22a57f419a2442fd3
2017-08-28 14:52:25 +09:00
Olli Pettay 4ef3c3fdf6 Bug 1371657 - Ensure we use the right root element in editor. r=masayuki 2017-08-28 14:57:46 -04:00
Sebastian Hengst 9769c22d10 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: AeoHOxZLi6m
2017-08-28 16:53:53 +02:00
Ehsan Akhgari 6f420e6a00 Bug 1394180 - Reduce the number of calls to nsINode::GetChildAt() in EditorBase::InsertTextImpl(); r=masayuki 2017-08-28 01:42:30 -04:00
Masayuki Nakano 3bd4299525 Bug 1393348 - part2: nsISelectionController::SELECTION_* should be sequential integer values r=smaug
nsISelectionController::SELECTION_* are declared as bit-mask.  However, no
methods of nsISelectionController treat them as bit-mask and these
values need a switch statement in nsFrameSelection to convert SelectionType to
array index of nsFrameSelection::mDOMSelections because it's too big to create
an array to do it.  Additionally, this conversion appears profile of
attachment 8848015.

So, now, we should declare these values as sequential integer values.

However, only nsTextFrame uses these values as bit-mask.  Therefore, this patch
adds new type, SelectionTypeMask and creates new inline method,
ToSelectionTypeMask(SelectionType), to retrieve mask value for a SelectionType.

MozReview-Commit-ID: 5Za8mA6iu4

--HG--
extra : rebase_source : 86617c1f5fa23166458f4353cb834f9e7c5b131b
2017-08-24 19:14:04 +09:00
Nicholas Nethercote c7df832636 Bug 1393642 - Remove nsIAtom/nsIAtomService usage from script in editor/. r=masayuki.
nsIHTMLEditor has several scriptable methods (addDefaultProperty(),
removeDefaultProperty(), etc.) that have nsIAtom parameters. We're in the
process of deCOMtaminating nsIAtom (bug 1392883) so these methods need to be
changed.

This patch does the following.

- It changes those methods to take an AString instead of an nsIAtom.

- For each existing method, it adds to HTMLEditor a new C++ method of the same
  name that takes an nsIAtom parameter.

- It updates TextEditorTest.cpp to use strings instead of atoms, in order to
  keep using the XPIDL methods.

- It updates test_bug1140105.html to pass strings instead of atoms to
  getInlineProperty(). This removes the use of nsIAtomService.

--HG--
extra : rebase_source : e005c3b5a08207b3d5d5fb55c47c8bc475b33453
2017-08-25 15:40:45 +10:00
Sebastian Hengst 6fd5b9e1ca merge mozilla-central to autoland. r=merge a=merge 2017-08-25 13:19:59 +02:00
Sebastian Hengst 31302b9cec merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 5armhVE9Jui
2017-08-25 13:12:04 +02:00
Ehsan Akhgari b174b2306a Bug 1392867 follow-up: Document that the aChild argument won't get AddRef'ed
DONTBUILD
2017-08-24 18:39:24 -04:00
Makoto Kato 5bd44e5cfd Bug 1393355 - Move SetTextRangeStyle from nsISelectionPrivate to Selection. r=masayuki
There is no reason that SetTextRangeStyle is defined at nsISelectionPrivate.  Also, SetTextRangeStyle isn't scriptable, and is called from CompositionTransaction::SetIMESelection only.  So we should move this to Selection.

MozReview-Commit-ID: FCOA6wVhvYZ

--HG--
extra : rebase_source : 64eb9e5fb973195b2c87ab4eb296685c8a4d0319
2017-08-24 16:56:12 +09:00
Masayuki Nakano e3529fd155 Bug 1375502 - part2: Add nsIContentIterator::Init(nsINode*, uint32_t, nsINode*, uint32_t) r=mats
nsIContentIterator::Init() takes nsRange but it's too expensive for some users.
So, there should be another Init() which can be specified a range in DOM tree
with 2 pairs of nsINode* and uint32_t.

MozReview-Commit-ID: 6JXic0KOM2d

--HG--
extra : rebase_source : 28ff355a2aa0dcb5d65495806ef8c67f1da642ea
2017-06-26 17:26:27 +09:00