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

265 Коммитов

Автор SHA1 Сообщение Дата
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
Makoto Kato a1548f0668 Bug 1348073 - Part 4. Unnecessary VK_RIGHT to move caret on non-visual frame that is whitespace only node. r=masayuki
Since we enable lazy frame construction for editable region, whitespace only node might not have frame even if editable.  This test has whitespace only node into contenteditable, we need adjust caret operation for this test.

MozReview-Commit-ID: GQfKiYdYOdi

--HG--
extra : rebase_source : 0685d724f6af050d79c1cf007c7ee48c05da14ac
2017-08-21 15:33:03 +09:00
Yoshi Huang b930b3d1ee Bug 1390770 - rewrite test_bug289384.html for new data: URI inheritance model. r=masayuki 2017-08-18 10:35:58 +08:00
Masayuki Nakano d2dd8c5d8f Bug 1390831 - Make test_bug635636.html e10s-aware r=Ehsan
test_bug655636.html refers gBrowser, however, it's available only in chrome
process and it's referred only for listening to "pageshow" event instead of
"load" event of the data URI.  So, we must be able to use "unload" event of the
previous URL instead.

Although, this testcase (even without this change) won't cause crash even if
backing out the patch for bug 635636 anymore.

MozReview-Commit-ID: B8qOwVZqZQm

--HG--
extra : rebase_source : d383181886152684a8bf9c2caf7248d5f7582c0a
2017-08-16 21:03:18 +09:00
Carsten "Tomcat" Book bcbc42d4e3 Merge mozilla-central to mozilla-inbound 2017-08-15 13:09:01 +02:00
Yoshi Huang 60b7d9f697 Bug 1390398: fix failures on windows for new data: URI inheritance model. r=smaug 2017-08-15 18:09:28 +08:00
Makoto Kato 357fdca523 Bug 1390053 - Enable editor/libeditor/tests/test_bug830600.html on mochitest-e10s. r=masayuki
This test is turned off by bug 1269209 on e10s.  But there is no exactly reason why this test on e10s is turned off.

Although I run this test on e10s now, it seems to pass this.  So we should turn on this test even if e10s.

MozReview-Commit-ID: JHQP2ZYvsHL

--HG--
extra : rebase_source : 2bc45f0d2b5cc99bad93267f40191866264af414
2017-08-14 18:29:40 +09:00
Sebastian Hengst d98ea1f774 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: FzIkMLHbOh2
2017-08-14 01:30:32 +02:00
Aryeh Gregor 99a150fe57 Bug 1359397 - Don't allow Selection in nodes not in the document; r=masayuki
This matches the spec and Chrome, and seems to bring us closer to Edge
and WebKit as well.  It also matches our own behavior for addRange(),
which was changed in bug 1341137.

For collapse and selectAllChildren, we match the tests and browsers, but
the spec is incorrect at the time of this writing:
https://github.com/w3c/selection-api/pull/86

The removeAllRanges test hadn't been updated for the spec change.

MozReview-Commit-ID: DTK8283k5IP

--HG--
extra : rebase_source : 54701e7136c33ebce651d5f74c3dc1d8b944f9a3
2017-08-10 15:02:08 +03:00
Stone Shih 55c5359fa6 Bug 1351148 Part4: Revise those test cases that have some tasks have to be processed before or after the synthesized key events. r=smaug.
Make sure input events are processed before or after the dependent tasks.

MozReview-Commit-ID: 8KfZnT2wjJR
2017-06-07 14:28:16 +08:00
Christoph Kerschbaumer 824e01cc12 Bug 1388142 - Convert editor/libeditor/tests/test_CF_HTML_clipboard.html to comply with new data: URI inheritance model. r=smaug 2017-08-07 21:21:59 +02:00
Geoff Brown d45ed676c8 Bug 1376382 - Skip test_bug586662.html for frequent intermittent failures; r=me,test-only 2017-08-03 09:20:56 -06:00
Masayuki Nakano 5051f16794 Bug 1385905 - part1: Add automated test to check if editor won't create mozBR element when typing Enter before invisible <br> element r=m_kato
MozReview-Commit-ID: AcHnK2LbTs1

--HG--
extra : rebase_source : a7a5ad16da227db53ab3e7324fa920a6b0276369
2017-08-01 18:07:08 +09:00
Ehsan Akhgari 22aa56b6cd Bug 1386222 - Ensure that we always respect the undo/redo transaction history when modifying the <xul:textbox>.value dynamically through script; r=bzbarsky 2017-08-01 13:59:45 -04:00
Makoto Kato 2652b1c5d2 Bug 1385749 - Move test_bug795418-*.html to subsuite=clipboard. r=masayuki
test_bug795418-*.html depends on clipboard.  But these tests aren't subsuite=clipboard and are sometimes failure (bug 1334700, bug 1335221, bug 1339430, bug 1343883 and bug 1348093).  So we should move these to subsuite=clipboard to try fixing this.

MozReview-Commit-ID: 1m5dFGZ18a

--HG--
extra : rebase_source : 847b1b7842c32e93c61b8ee572cff16c70adc323
2017-07-31 11:58:41 +09:00
Christoph Kerschbaumer db40f0ec94 Bug 1385240 - Update editor/libeditor/tests/test_bug635636.html to comply with new data: URI inheritance model. r=masayuki 2017-07-28 13:34:24 +02:00
Carsten "Tomcat" Book 2ff6df9177 Backed out changeset 5198322f7a62 (bug 1351148) 2017-07-28 09:20:20 +02:00
Stone Shih 665fb7cd54 Backed out changeset de4929e39b7e (bug 1351148) 2017-08-11 15:19:30 +08:00
Stone Shih b27577d8d6 Bug 1351148 Part4: Revise those test cases that have some tasks have to be processed before or after the synthesized key events. r=smaug.
Make sure input events are processed before or after the dependent tasks.

MozReview-Commit-ID: 8KfZnT2wjJR
2017-06-07 14:28:16 +08:00
Stone Shih a5bccae405 Bug 1351148 Part4: Revise those test cases that have some tasks have to be processed before or after the synthesized key events. r=smaug.
Make sure input events are processed before or after the dependent tasks.

MozReview-Commit-ID: 8KfZnT2wjJR
2017-06-07 14:28:16 +08:00
Christoph Kerschbaumer 0d84b0bb91 Bug 1380717 - Updates more tests within editor/ to comply with new data: URI inheritance model. r=masayuki 2017-07-14 12:14:23 +02:00
Olli Pettay e0ed9babb5 Bug 1376382, key event handling is asynchronous, try to fix test to be more async too, r=masayuki 2017-07-08 17:23:08 +03:00
Christoph Kerschbaumer e82e0967b4 Bug 1377748 - Updates tests within editor/ to comply with new data: URI inheritance model. r=masayuki 2017-07-02 05:23:34 -07:00
Olli Pettay da0ec0a364 Bug 1375491, make child process to cache ime properties only at animation tick time, r=masayuki
--HG--
extra : rebase_source : 6f13f4d91fc4873d135824431adb4b0b2843b738
2017-06-29 14:46:11 +03:00
Olli Pettay 70cd98776b Bug 1375484 - ScrollSelectionIntoViewEvent should be called during refresh driver tick, r=ehsan 2017-06-25 00:38:42 +03:00
Florian Quèze 66f6d259bc Bug 1374282 - script generated patch to remove Task.jsm calls, r=Mossop. 2017-06-22 12:51:42 +02:00
Ehsan Akhgari 147a0e6607 Bug 1373762 - Make editor mochitests correctly wait for spell checking to finish; r=mystor 2017-06-16 14:41:02 -04:00
Makoto Kato 5400a2fb98 Bug 1361008 - Part 2. add test for invisible node. r=masayuki
Since this step requires keyboard operation, we cannot create web-platform-test.

MozReview-Commit-ID: ExuaNOj9JG4

--HG--
extra : rebase_source : 0115e48fe1c3bdd7495e3bfc610f03ac1ee15ecb
2017-06-12 15:30:16 +09:00
Makoto Kato 15a281942d Bug 1368544 - Part 2. Add setting empty value test whether creating trailing node. r=masayuki
MozReview-Commit-ID: 3eAFkmUntv0

--HG--
extra : rebase_source : c8a23e2c9c75413bed7d57439f312716c82230bd
2017-05-30 18:59:31 +09:00
Makoto Kato 153cf127c6 Bug 1358025 - Part 5. Add undo transaction test on input element. r=masayuki
When setting same value (including empty to empty), some browsers might not turn off undo.  If settings non-empty value, all browsers doesn't turn off undo.  Also, if empty value, Edge and Chrome doesn't turn off undo.

MozReview-Commit-ID: 1nVYEzBr5KJ

--HG--
extra : rebase_source : e49f38e7c5a8f69902d6320eb6740e34e3f161ed
2017-05-25 14:19:39 +09:00
Mats Palmgren 297b9d70e1 Bug 1365614 part 3 - Backout bug 1333482 part 1-9. Removes support for [-webkit-]appearance for now b/c web compat issues. r=bz
MozReview-Commit-ID: IbwWM0FL6HF

--HG--
extra : source : bbb688fe1ba3f5201a190c6e25b693ef7272ea2d
2017-05-21 17:15:00 +08:00
Carsten "Tomcat" Book 00d4ea331d Backed out changeset bbb688fe1ba3 (bug 1365614) 2017-05-22 15:45:31 +02:00
Mats Palmgren e706869580 Bug 1365614 part 3 - Backout bug 1333482 part 1-9. Removes support for [-webkit-]appearance for now b/c web compat issues. r=bz 2017-05-21 17:15:00 +08:00
Bas Schouten af6703eb9d Bug 1331718 - Part 4: Mark some tests on android as passing. r=bustage
MozReview-Commit-ID: D8hy9zm8Dte
2017-05-10 22:34:35 +02:00
Carsten "Tomcat" Book 76ca853e3e Merge mozilla-central to mozilla-inbound 2017-05-09 14:40:11 +02:00
Yoshi Huang df0da41d1c Bug 1361641 - Part 2: convert mochitest plain tests in editor/ to use srcdoc. r=smaug 2017-05-09 10:25:23 +08:00
Makoto Kato 6a08daf67d Bug 1352799 - Part 2. Add test for changing maxlength dynamically. r=masayuki
MozReview-Commit-ID: 4DiE33eyBar

--HG--
extra : rebase_source : 38f57dbf55c8ed769ba5aab1e36ce91fb35cbad4
2017-04-20 10:23:38 +09:00
Makoto Kato 1b58ce0000 Bug 1335880 - Adjust mouse position for dragstart. r=masayuki
On Ubuntu 16.04 TLS, test_dragdrop.html due to control margin.  So we should adjust the point of dragstart.

MozReview-Commit-ID: EPW2UnaIWRt

--HG--
extra : rebase_source : a97c66dc36328563497130aa7a3829bc8a9eb204
2017-05-08 14:06:29 +09:00
Aryeh Gregor 3a32e91a42 Bug 1355792 - Consider invisible nodes to be editable; r=masayuki
We can't depend on information from layout to be correct unless we've
flushed pending notifications, which we can't do at every editability
check.  So let's forget about layout.  Nobody knows why editability ever
depended on visibility in the first place.

This allows us to revert the additions from bug 795418 as well.

The original test-case submitted on the bug report was very big and
complicated, so I have a minimal test-case instead.  This might not
exactly correspond to the originally reported bug, but this fix works for
both the original and minimal test case.

MozReview-Commit-ID: LOKjlgiAEOT

--HG--
extra : rebase_source : 5aaeae87fdc0dd78cb6f1060399c09d2945f8e08
2017-04-19 16:53:24 +03:00
Aryeh Gregor fdf415af45 Bug 1357998 - Make editing tests independent of default defaultParagraphSeparator; r=masayuki
Now that this is a pref that is different in different versions, tests
have to work no matter what the pref's value is.  For tests that
actually tested line-breaking-related behavior, I made them test all
three separator values.  For tests that tested something else and only
incidentally depend on the default paragraph separator, I set
defaultParagraphSeparator to "div".

MozReview-Commit-ID: 8m7eoFRXpEy

--HG--
extra : rebase_source : dc664e87f7ce4f621aa48639cef6e754793e8ab4
2017-04-20 21:10:23 +03:00
Aryeh Gregor 47530382e3 Bug 1353695 - Sometimes Enter is ignored in editor; r=masayuki
When defaultParagraphSeparator is not "br", and we hit Enter on a line
that is not contained in any block element, we first create a new <div>
(or <p>) wrapper to hold the line's contents.  If creating this wrapper
fails for some reason, we go ahead and insert a <br> instead.

In some cases, we would get confused and think we didn't create the
block element when really we did.  We would insert a <br>, and
afterwards something would get rid of the empty block element.  In a
corner case where the line only consisted of a <br> to start with, this
would result in nothing happening, because the original <br> was removed
when creating the block element, and only one <br> was inserted to
replace it.

The correct fix is to just not get confused!

MozReview-Commit-ID: 1U8KHC71bfw

--HG--
extra : rebase_source : 50640615a3a652c3a74c1aef5412eb82daf8c5fb
2017-04-05 20:40:13 +03:00
Florian Queze 37ff4fc7cc Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Sebastian Hengst a07223d699 Backed out changeset 322fde2d53bf (bug 1356569) so bug 1355161 can be backed out. r=backout 2017-04-14 23:39:22 +02:00
Florian Queze 95d4d20c17 Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Dan Banner cdf987089d Bug 1107904 - Remove packed.js and references to it as it is unused. r=standard8
MozReview-Commit-ID: K5TLF92pHq4

--HG--
extra : rebase_source : 295bf325a07fa8ec4c55a8babf5418588308dca6
2017-04-12 11:10:00 +01:00
Makoto Kato 6ed44d9df6 Bug 1330912 - Part 4. Update some tests to wait updating dictionary. r=masayuki
Since Part 2 improves foucs performance, these tests will be failed because spellchecker works later.  So using UpdateCurrentDictionary, dictionary is updated before test.


MozReview-Commit-ID: 69aC1rQd4LY

--HG--
extra : rebase_source : 50e0449b727352ff2f8e2a08605cc3f9d933d6d9
2017-04-10 14:44:49 +09:00
Aryeh Gregor a334ab0dad Bug 1297414 - Change default paragraph separator to <div>; r=masayuki
This matches Blink/WebKit, and is more similar to Edge than before, but
may cause compat problems for Gecko-only code or code paths.  Sites can
revert to old behavior with:
document.execCommand("defaultparagraphseparator", false, "br").

This regresses test_bug430392.html on one test ("adding returns") and I
don't know why.  The test involves embedded non-editable content and we
already have a lot of todos in that file, so I think it's tolerable.

MozReview-Commit-ID: Dml0bXxgu87
2017-04-04 13:49:38 +03:00
Aryeh Gregor a7ed0e7cf4 Bug 1297414 - formatBlock should move non-editable nodes; r=masayuki
Before this change, if you did formatBlock on "a<span
contenteditable=false>b</span>c", it would become "acb", because the "a"
and "c" would be moved to the front of the node, and the "b" would be
left alone at the end because the editing code doesn't want to move it.
Now we will move the "b" as well, even though it's not editable, so that
the node remains "abc".  The rule is that a non-editable element cannot
have its attributes or children changed, but it can have its parent
changed, so there's nothing wrong with moving it here.

On the way, I fixed an exception in insert*List if there was an
uneditable inline node around.  I don't intend to fix all the todo's in
the test, but now it should have better coverage, at least.

MozReview-Commit-ID: 3okcGq4an3f
2017-04-04 13:47:28 +03:00
Makoto Kato cd753d1158 Bug 1351074 - Part 2. Use testing-common for AsyncSpellCheckTestHelper.jsm. r=masayuki
TESTING_JS_MODULES uses testing-common, not gre.  So we should replace gre with testing-common for mochitest.

MozReview-Commit-ID: BqsS2D3IGR6

--HG--
extra : rebase_source : a8553684f8f106c1dfb6e2d9b51df7ebeb15275d
2017-03-29 15:34:49 +09:00
Aryeh Gregor c9cfbcf638 Bug 1130651 - Don't throw IndexSizeError from insertText command r=masayuki
MozReview-Commit-ID: 7AXGvenAfWv

--HG--
extra : rebase_source : ff4f263468ea424a2e818d768727b1672da8b5f2
2017-03-30 18:36:17 +03:00