Commit Graph

192 Commits

Author SHA1 Message Date
Florian Quèze
0e0865f4fc Bug 1331599 - script-generated patch to replace removeEventListener calls with the once option when possible, r=jaws. 2017-01-25 07:01:52 +01:00
William Chen
29d62db328 Bug 1306532 - Post process node array in ReplaceOrphanedStructure to remove all descendants of replacement node. r=masayuki 2017-01-09 10:11:04 -08:00
Jorg K
555bd2c419 Bug 1330796 - Follow-up: Add key code to KEY_Enter. r=masayuki
--HG--
extra : rebase_source : 4346ed0f9d1340b416e4cb2c2098b94aabdae8d0
2017-01-17 10:40:00 -05:00
Wes Kocher
401e9acfca Backed out 2 changesets (bug 1317322) for frequent clipboard test failures a=backout
Backed out changeset 1bc18bb10cc6
Backed out changeset 79d6e9229fda (bug 1317322)

MozReview-Commit-ID: 9SUWpmTLJqG
2017-01-17 14:10:53 -08:00
Michael Layzell
9ec8074497 No bug - Skip test_pasteImgTextarea.html on android, a=bustage
MozReview-Commit-ID: F7GPuSo8JBl
2017-01-17 16:21:33 -05:00
Michael Layzell
79a95a8db1 Bug 1317322 - Activate paste in menus when within <textarea> controls, r=ehsan
MozReview-Commit-ID: 7YD8qtsC3u6
2017-01-17 15:05:32 -05:00
Florian Quèze
85611a7b6d Bug 1331081 - script generated patch to omit addEventListener/removeEventListener's third parameter when it's false, r=jaws.
--HG--
extra : rebase_source : a22344ee1569f58f1f0a01017bfe0d46a6a14602
2017-01-17 11:50:25 +01:00
Jorg K
b3de8e2b23 Bug 1330796 - Add invisible break to span of display:block in HTMLEditRules::SplitMailCites. r=masayuki 2017-01-16 01:40:00 -05:00
Jorg K
5520579a29 Bug 1331237 - Remove left-over dump() statements from test_bug772796.html. r=masayuki 2017-01-14 23:59:00 -05:00
Masayuki Nakano
b2778c3a90 Bug 1272623 part.3 HTMLEditRules::ReapplyCachedStyles() shouldn't set style to TypeInState if it's currently applied r=smaug
The target node of HTMLEditRules::ReapplyCachedStyles() may be styled with its parent.  When HTMLEditRules::ReapplyCachedStyles() is called, it shouldn't restore another style cache if it's already specified in current DOM tree.

MozReview-Commit-ID: DKCpQ8YyW7

--HG--
extra : rebase_source : 854b4cc6382f5357919bce1e106e71fe66b15444
2017-01-06 22:35:48 +09:00
Masayuki Nakano
b51e97e916 Bug 1272623 part.2 Add automated tests of testing cached inline style at editing r=smaug
MozReview-Commit-ID: 1kIfj3GgCcY

--HG--
extra : rebase_source : 4d808bbea9c5a23464e7e09baa1158ef0adf472c
2016-12-27 18:27:10 +09:00
Masayuki Nakano
c20fedebf4 Bug 1312991 Get rid of nsIHTMLEditor::SetDocumentTitle() and mozilla::SetDocumentTitleTransaction r=smaug
Now, nobody (including add-ons) uses nsIHTMLEditor::SetDocumentTitle(), so, we can remove it.

Additionally, mozilla::SetDocumentTitleTransaction is created only when nsIHMLEditor::SetDocumentTitle(), so, we can remove this class too.

MozReview-Commit-ID: HK7G9u7HUlh

--HG--
extra : rebase_source : da68cabbf929a684d26f6316fdc7f58b8e32ab02
2016-12-26 17:46:23 +09:00
Masayuki Nakano
7436f01057 Bug 564411 Move all methods/attributes of nsIEditorIMESupport to nsIEditor r=smaug
Doing QI from nsIEditor to nsIEditorIMESupport doesn't make sense because editor should always support all methods and attributes of nsIEditorIMESupport (it does NOT mean that all nsIEditor implementation need to support IME).

This patch moves all of them to nsIEditor for avoiding redundant QIs.

MozReview-Commit-ID: DzIKuGHG4iy

--HG--
extra : rebase_source : cc5e9a6ae4572ebe461d9770ffa5c23d33dc8526
2016-12-20 21:47:31 +09:00
Gijs Kruitbosch
cb6c0c81ac Bug 1322414 - part 2,3,4: use a separate 'primary' attribute for primary child browsers, r=bz,mconley
MozReview-Commit-ID: 2yb0WGFYBsH

--HG--
extra : rebase_source : 376171077c577e41e82cec5e994c425c6d9f2d80
extra : histedit_source : 39aad91381749a263042cd0452fe32019a1974b8
2016-12-09 09:23:24 -10:00
Karl Tomlinson
4c027cc4bc bug 1322422 use assertSnapshots() to log failures better r=Ehsan
MozReview-Commit-ID: 54WgoCdKjMX

--HG--
extra : rebase_source : 1ab5cccb586edad9f3a30c90f413124df006820f
2016-12-06 22:38:23 -10:00
Makoto Kato
18132c8907 Bug 1313986 - Part 1. Add test for inlineTableEditing and objectResizing. r=masayuki
We have no mochitest for objectResizing and inlineTableEditing.  So I add simple test for this.

MozReview-Commit-ID: Hnjpopr3h5F

--HG--
extra : rebase_source : 8cb81a89f11d4092f2adaa8822733f861a71ace1
2016-11-24 15:00:04 +09:00
Ryan VanderMeulen
012910643b Bug 1211213 - Re-enable test_bug597331.html on ASAN and Windows.
--HG--
extra : rebase_source : 62ab2f2f59067ff4ad5869420e7495e9c2963fa1
2016-11-21 14:13:54 -05:00
Masayuki Nakano
8b2ac2889e Bug 1316302 part.2 WillDeleteSelection() should retry to handle it when selection is collapsed and JoinBlocks() doesn't handle nor cancel the action r=smaug
When selection is collapsed and JoinBlocks() doesn't handle nor cancel the action, WillDeleteSelection() should move selection to the start/end of leftmost/rightmost editable leaf node and retry to handle the action again.

For avoiding infinite loop, it checks if selected node is changed actually before calling itself again.

MozReview-Commit-ID: GtEC4dim3r9

--HG--
extra : rebase_source : f84afd754e71f441c3fad15456d20a11c42dd6de
2016-11-16 20:20:41 +09:00
Masayuki Nakano
ab6651b316 Bug 1314852 Make background and border of the input element in test_bug636465.html since it's sometimes not painted correctly r=smaug
The test compaires 4 screenshots for checking spellchecker's behavior.  However, the input element is sometimes not painted correctly on Linux.

Even if I make it wait more delay before taking screenshot, the random failure isn't fixed. So, I guess that it's a bug of gfx of Theme API of GTK.

On the other hand, the most important thing here is, compairing the foreground contents of the input element.  Therefore, this patch makes the background and border of the input element transparent.  That prevents to use Theme API. This must be enough for fixing the random orange.

MozReview-Commit-ID: L2uXcPLvbNg

--HG--
extra : rebase_source : 451f1c45d70ceb8406ea9749f0dfa3264c615151
2016-11-16 15:51:21 +09:00
Makoto Kato
e012b6c81b Bug 1314790 - Part 2. Add test. r=masayuki
MozReview-Commit-ID: HcauemPpe4r

--HG--
extra : rebase_source : 6adb8338981c7654c3b9af2ab0f0ac46a9effb84
extra : amend_source : 1f1c5392b784d788d06924c69c95df569947d9e6
extra : histedit_source : e8b277c0cb2dbdf80344426036dd59fe56d2f477
2016-11-12 21:59:49 +09:00
Makoto Kato
74fe2d5fc8 Bug 1310912 - Part 6. Add redo test. r=masayuki
MozReview-Commit-ID: 5TgGAq3tM01

--HG--
extra : rebase_source : 031c1687887b67892ac4c9569fe843c17d5b1a49
extra : histedit_source : 3006cca58c3c5736ab603f3088296272db9763ed
2016-11-10 21:17:34 +09:00
Makoto Kato
c962bbc74c Bug 1310912 - Part 2. Add test. r=masayuki
We need skip this test on Android.  Although mochitest doesn't use native IME data, Android's GeckoEditable.java wants to access native IME composition.  See bug 1315898.

MozReview-Commit-ID: BNCKmDEmwKw

--HG--
extra : rebase_source : e7be1cb9e5c7c0fb4283f81541fc7441f52a1101
2016-11-04 19:04:43 +09:00
Masayuki Nakano
e940a313f8 Bug 1315065 When selection is collapsed in an empty text node, Backspace/Delete key press should modify the nearest text node r=smaug
Currently, when selection is collapsed at an empty text node, the behavior of each major browser is different.

When you remove the last character of non-empty text node followed by empty text nodes, Chromium removes all following empty text nodes.  However, Edge never removes empty text nodes even when selection is collapsed at an empty text node.

With this patch, our behavior becomes same as Edge.  I think that we should take this for keeping backward compatibility since Gecko never removes empty text nodes.  So, in other words, this patch makes Backspace key press at an empty text node modify the preceding non-empty text node.

When you remove the first character of non-empty text node preceded with empty text nodes, Edge removes all preceding empty text nodes.  However, Chromium and Gecko keeps previous empty text nodes than caret position.  So, we should keep current behavior for backward compatibility.  In other words, this patch makes Delete key press at an empty text node modify the following non-empty text node and keep current behavior.


The fixing approach of this is, making WSRunObject::PriorVisibleNode() and WSRunObject::NextVisibleNode() ignore empty text node.  This should make sense because empty text node is not a visible node. (On the other hand, when the DOMPoint has a null character, it should treat as visible character.  That is visible with Unicode codepoint.)

MozReview-Commit-ID: 11YtqBktEvK

--HG--
extra : rebase_source : 70fa858866cc768179c1ca6a869e1a5c7cfe6e1a
2016-11-11 12:24:21 +09:00
Carsten "Tomcat" Book
846adaea6c merge mozilla-inbound to mozilla-central a=merge 2016-11-09 16:38:04 +01:00
Masayuki Nakano
a912bd8141 Bug 1230473 If there is no TextComposition instance even when EditorBase receives eCompositionStart event, the editor should do nothing r=smaug
Even when editor receives eCompositionStart event, the active composition may have gone since web contents can listen to composition events before editor (so, web contents can commit the composition before "compositionstart" reaching focused editor).

Therefore, editor shouldn't crash as unexpected scenario.  Instead, it should do nothing in such case.

Note that when editor receives 2nd or later "compositionupdate" or "text" event, it should not modify composition.  However, currently, it does that.  This patch does NOT fix it since it's really rare case.  It should be fixed in another bug because this should be uplifted (crashing with some IMEs on Android is serious).

MozReview-Commit-ID: HIbMy4eFRMw

--HG--
extra : rebase_source : a98661ab2c1c8ee67ef551af3d1770b61cd25c84
2016-11-08 00:36:32 +09:00
Sebastian Hengst
eb26ee2f07 Bug 1310297 - Remove test annotations using b2g, mulet or gonk: editor. r=RyanVM
MozReview-Commit-ID: GDieTLdlpRH

--HG--
extra : rebase_source : 8332d4abdea9d0ad27ad7cceace96ad75aff6b2c
2016-11-05 11:29:19 +01:00
Geoff Brown
1585835379 Bug 1309431 - Disable test_bug772796.html on Android only; r=me 2016-11-08 15:11:42 -07:00
Aryeh Gregor
f0ca6ef4ca Bug 1271125 part 2 - Port editor mochitests that depend on ChromeUtils.js to mochitest-plain; r=masayuki
The change from ok() to is() in tests is so that the failure message is
more informative -- it now tells you the returned exception.

This commit omits test_contenteditable_text_input_handling.html because of test
failures that I haven't figured out.

MozReview-Commit-ID: 37cYlQlJZm7
2016-10-31 18:38:04 +02:00
Aryeh Gregor
a1960cc86a Bug 1271120 - Port test_bug636465.xul from chrome to plain; r=masayuki
MozReview-Commit-ID: B0oaEGGEEvd

--HG--
rename : editor/libeditor/tests/test_bug636465.xul => editor/libeditor/tests/test_bug636465.html
2016-09-01 17:30:57 +03:00
Aryeh Gregor
73038b219c Bug 1271120 - Port test_bug569988.html from chrome to plain; r=masayuki
MozReview-Commit-ID: EwpjCJf5MFX
2016-08-23 15:56:48 +03:00
Aryeh Gregor
757c20701e Bug 1271120 - Port test_composition_event_created_in_chrome.html from chrome to plain; r=masayuki
MozReview-Commit-ID: 5K2qv7JXAT4
2016-08-23 16:01:28 +03:00
Aryeh Gregor
7440afba28 Bug 1271119 - Port test_bug1248185.html from chrome to plain; r=masayuki
MozReview-Commit-ID: Jn8Ga8dw4WD
2016-10-31 18:27:10 +02:00
Aryeh Gregor
d63d3c394b Bug 1271119 - Port test_bug1248128.html from chrome to plain; r=masayuki
I added an extra check to ensure that the test wasn't passing because
doCommand() was throwing some unrelated exception, in case porting from
chrome to plain changed behavior of doCommand().

MozReview-Commit-ID: LOo8yN8jkZo
2016-10-31 18:26:31 +02:00
Aryeh Gregor
2459cda825 Bug 1271119 - Port test_bug1153237.html from chrome to plain; r=masayuki
MozReview-Commit-ID: DDfHuLwplBV
2016-08-30 21:13:49 +03:00
Aryeh Gregor
953f75ec49 Bug 1271119 - Port test_bug1140617.xul from chrome to plain; r=masayuki
Possible issue: the previous version saved document.popupNode and
restored it after copying the image, and the new version does not
(because I don't know how).  The test seems to pass anyway.

MozReview-Commit-ID: 7g0JCYxI7x8

--HG--
rename : editor/libeditor/tests/test_bug1140617.xul => editor/libeditor/tests/test_bug1140617.html
2016-08-30 21:32:20 +03:00
Aryeh Gregor
1b70f4e9fb Bug 1271119 - Port test_bug1101392.html from chrome to plain; r=masayuki
MozReview-Commit-ID: F5Q8AWVtdjC
2016-08-30 21:08:55 +03:00
Aryeh Gregor
7d842d8033 Bug 1271119 - Port test_bug646194.xul from chrome to mochitest; r=masayuki
MozReview-Commit-ID: Lx05BEKQiwO

--HG--
rename : editor/libeditor/tests/test_bug646194.xul => editor/libeditor/tests/test_bug646194.html
2016-08-30 18:40:55 +03:00
Aryeh Gregor
35558fd4e9 Bug 1271119 - Port test_bug490879.xul from chrome to plain; r=masayuki
Possible issue: the previous version saved document.popupNode and
restored it after copying the image, and the new version does not
(because I don't know how).  The test seems to pass anyway.

It seems I had to use doCommand instead of execCommand to carry out the
paste, presumably because of permissions differences between plain and
chrome mochitests.

MozReview-Commit-ID: CdPUCmEtgwO

--HG--
rename : editor/libeditor/tests/test_bug490879.xul => editor/libeditor/tests/test_bug490879.html
2016-08-30 18:25:18 +03:00
Aryeh Gregor
4e75722fc4 Bug 1271119 - Port test_selection_move_commands.xul from chrome to plain; r=masayuki
Filed bug 1299574 for the Android todo.  (Chrome tests in this directory
are disabled for Android, so all this porting enables them.)

MozReview-Commit-ID: 6FAioabxq0a

--HG--
rename : editor/libeditor/tests/test_selection_move_commands.xul => editor/libeditor/tests/test_selection_move_commands.html
2016-08-30 18:01:33 +03:00
Aryeh Gregor
0c6f9f6930 Bug 1269209 - .ini cleanup; r=masayuki
MozReview-Commit-ID: ISJBtyiuNfV
2016-10-31 18:13:46 +02:00
Aryeh Gregor
20f1dae6f1 Bug 1269209 - Port test_bug1257363.html from chrome to plain; r=masayuki
MozReview-Commit-ID: 1KcoAHEsDwB
2016-08-22 21:24:12 +03:00
Aryeh Gregor
740d4d0015 Bug 1269209 - Port test_bug1250010.html from chrome to plain; r=masayuki
MozReview-Commit-ID: AerXvBRSmqN
2016-10-31 18:12:05 +02:00
Aryeh Gregor
08bf09d55c Bug 1269209 - Port test_bug1154791.html from chrome to plain; r=masayuki
MozReview-Commit-ID: 8MmrfEJXFb9
2016-08-22 21:22:13 +03:00
Aryeh Gregor
411ba68b53 Bug 1269209 - Port test_bug1140105.html from chrome to plain; r=masayuki
MozReview-Commit-ID: BfdjmtEdwX4
2016-10-31 18:11:21 +02:00
Aryeh Gregor
2de8ee747d Bug 1269209 - Port test_bug1100966.html from chrome to plain; r=masayuki
MozReview-Commit-ID: BlAIUibApXY
2016-08-22 21:20:05 +03:00
Aryeh Gregor
569f2ac168 Bug 1269209 - Port test_bug1053048.html from chrome to plain; r=masayuki
MozReview-Commit-ID: ECNH5u4S4QR
2016-08-22 21:18:43 +03:00
Aryeh Gregor
4673c69f98 Bug 1269209 - Port test_bug830600.html from chrome to plain; r=masayuki
Fails in e10s.  mrbkap said he has no idea why without debugging it
(comment 8 in bug).

MozReview-Commit-ID: 6vG0czg6Vpv
2016-08-22 21:17:49 +03:00
Aryeh Gregor
2283c45d92 Bug 1269209 - Port test_bug635636.html from chrome to plain; r=masayuki
MozReview-Commit-ID: KoJbPZ85emj
2016-08-22 21:16:52 +03:00
Aryeh Gregor
9a19c4aba3 Bug 1269209 - Port test_bug483651.html from chrome to plain; r=masayuki
MozReview-Commit-ID: 1320m72F2lz
2016-08-22 21:13:37 +03:00
Aryeh Gregor
2d2b030acd Bug 1269209 - Port test_bug471319.html from chrome to plain; r=masayuki
MozReview-Commit-ID: E8CBXZLPBPC
2016-08-22 21:12:45 +03:00