Commit Graph

8950 Commits

Author SHA1 Message Date
Gurzau Raul
ca3641419f Merge inbound to mozilla-central. a=merge
--HG--
rename : docshell/test/bug123696-subframe.html => docshell/test/mochitest/bug123696-subframe.html
rename : docshell/test/bug404548-subframe.html => docshell/test/mochitest/bug404548-subframe.html
rename : docshell/test/bug404548-subframe_window.html => docshell/test/mochitest/bug404548-subframe_window.html
rename : docshell/test/bug413310-post.sjs => docshell/test/mochitest/bug413310-post.sjs
rename : docshell/test/bug413310-subframe.html => docshell/test/mochitest/bug413310-subframe.html
rename : docshell/test/bug529119-window.html => docshell/test/mochitest/bug529119-window.html
rename : docshell/test/bug530396-noref.sjs => docshell/test/mochitest/bug530396-noref.sjs
rename : docshell/test/bug530396-subframe.html => docshell/test/mochitest/bug530396-subframe.html
rename : docshell/test/bug570341_recordevents.html => docshell/test/mochitest/bug570341_recordevents.html
rename : docshell/test/bug668513_redirect.html => docshell/test/mochitest/bug668513_redirect.html
rename : docshell/test/bug668513_redirect.html^headers^ => docshell/test/mochitest/bug668513_redirect.html^headers^
rename : docshell/test/bug691547_frame.html => docshell/test/mochitest/bug691547_frame.html
rename : docshell/test/dummy_page.html => docshell/test/mochitest/dummy_page.html
rename : docshell/test/file_anchor_scroll_after_document_open.html => docshell/test/mochitest/file_anchor_scroll_after_document_open.html
rename : docshell/test/file_bfcache_plus_hash_1.html => docshell/test/mochitest/file_bfcache_plus_hash_1.html
rename : docshell/test/file_bfcache_plus_hash_2.html => docshell/test/mochitest/file_bfcache_plus_hash_2.html
rename : docshell/test/file_bug1121701_1.html => docshell/test/mochitest/file_bug1121701_1.html
rename : docshell/test/file_bug1121701_2.html => docshell/test/mochitest/file_bug1121701_2.html
rename : docshell/test/file_bug1151421.html => docshell/test/mochitest/file_bug1151421.html
rename : docshell/test/file_bug1186774.html => docshell/test/mochitest/file_bug1186774.html
rename : docshell/test/file_bug1450164.html => docshell/test/mochitest/file_bug1450164.html
rename : docshell/test/file_bug385434_1.html => docshell/test/mochitest/file_bug385434_1.html
rename : docshell/test/file_bug385434_2.html => docshell/test/mochitest/file_bug385434_2.html
rename : docshell/test/file_bug385434_3.html => docshell/test/mochitest/file_bug385434_3.html
rename : docshell/test/file_bug475636.sjs => docshell/test/mochitest/file_bug475636.sjs
rename : docshell/test/file_bug509055.html => docshell/test/mochitest/file_bug509055.html
rename : docshell/test/file_bug511449.html => docshell/test/mochitest/file_bug511449.html
rename : docshell/test/file_bug540462.html => docshell/test/mochitest/file_bug540462.html
rename : docshell/test/file_bug580069_1.html => docshell/test/mochitest/file_bug580069_1.html
rename : docshell/test/file_bug580069_2.sjs => docshell/test/mochitest/file_bug580069_2.sjs
rename : docshell/test/file_bug590573_1.html => docshell/test/mochitest/file_bug590573_1.html
rename : docshell/test/file_bug590573_2.html => docshell/test/mochitest/file_bug590573_2.html
rename : docshell/test/file_bug598895_1.html => docshell/test/mochitest/file_bug598895_1.html
rename : docshell/test/file_bug598895_2.html => docshell/test/mochitest/file_bug598895_2.html
rename : docshell/test/file_bug634834.html => docshell/test/mochitest/file_bug634834.html
rename : docshell/test/file_bug598895_1.html => docshell/test/mochitest/file_bug637644_1.html
rename : docshell/test/file_bug598895_2.html => docshell/test/mochitest/file_bug637644_2.html
rename : docshell/test/file_bug640387.html => docshell/test/mochitest/file_bug640387.html
rename : docshell/test/file_bug653741.html => docshell/test/mochitest/file_bug653741.html
rename : docshell/test/file_bug660404 => docshell/test/mochitest/file_bug660404
rename : docshell/test/file_bug660404-1.html => docshell/test/mochitest/file_bug660404-1.html
rename : docshell/test/file_bug660404^headers^ => docshell/test/mochitest/file_bug660404^headers^
rename : docshell/test/file_bug653741.html => docshell/test/mochitest/file_bug662170.html
rename : docshell/test/file_bug668513.html => docshell/test/mochitest/file_bug668513.html
rename : docshell/test/file_bug669671.sjs => docshell/test/mochitest/file_bug669671.sjs
rename : docshell/test/file_bug675587.html => docshell/test/mochitest/file_bug675587.html
rename : docshell/test/file_bug680257.html => docshell/test/mochitest/file_bug680257.html
rename : docshell/test/file_bug703855.html => docshell/test/mochitest/file_bug703855.html
rename : docshell/test/file_bug728939.html => docshell/test/mochitest/file_bug728939.html
rename : docshell/test/file_close_onpagehide1.html => docshell/test/mochitest/file_close_onpagehide1.html
rename : docshell/test/file_close_onpagehide2.html => docshell/test/mochitest/file_close_onpagehide2.html
rename : docshell/test/file_framedhistoryframes.html => docshell/test/mochitest/file_framedhistoryframes.html
rename : docshell/test/file_pushState_after_document_open.html => docshell/test/mochitest/file_pushState_after_document_open.html
rename : docshell/test/historyframes.html => docshell/test/mochitest/historyframes.html
rename : docshell/test/mochitest.ini => docshell/test/mochitest/mochitest.ini
rename : docshell/test/start_historyframe.html => docshell/test/mochitest/start_historyframe.html
rename : docshell/test/test_anchor_scroll_after_document_open.html => docshell/test/mochitest/test_anchor_scroll_after_document_open.html
rename : docshell/test/test_bfcache_plus_hash.html => docshell/test/mochitest/test_bfcache_plus_hash.html
rename : docshell/test/test_bug1045096.html => docshell/test/mochitest/test_bug1045096.html
rename : docshell/test/test_bug1121701.html => docshell/test/mochitest/test_bug1121701.html
rename : docshell/test/test_bug1151421.html => docshell/test/mochitest/test_bug1151421.html
rename : docshell/test/test_bug1186774.html => docshell/test/mochitest/test_bug1186774.html
rename : docshell/test/test_bug123696.html => docshell/test/mochitest/test_bug123696.html
rename : docshell/test/test_bug1450164.html => docshell/test/mochitest/test_bug1450164.html
rename : docshell/test/test_bug384014.html => docshell/test/mochitest/test_bug384014.html
rename : docshell/test/test_bug385434.html => docshell/test/mochitest/test_bug385434.html
rename : docshell/test/test_bug387979.html => docshell/test/mochitest/test_bug387979.html
rename : docshell/test/test_bug402210.html => docshell/test/mochitest/test_bug402210.html
rename : docshell/test/test_bug404548.html => docshell/test/mochitest/test_bug404548.html
rename : docshell/test/test_bug413310.html => docshell/test/mochitest/test_bug413310.html
rename : docshell/test/test_bug475636.html => docshell/test/mochitest/test_bug475636.html
rename : docshell/test/test_bug509055.html => docshell/test/mochitest/test_bug509055.html
rename : docshell/test/test_bug511449.html => docshell/test/mochitest/test_bug511449.html
rename : docshell/test/test_bug529119-1.html => docshell/test/mochitest/test_bug529119-1.html
rename : docshell/test/test_bug529119-2.html => docshell/test/mochitest/test_bug529119-2.html
rename : docshell/test/test_bug530396.html => docshell/test/mochitest/test_bug530396.html
rename : docshell/test/test_bug540462.html => docshell/test/mochitest/test_bug540462.html
rename : docshell/test/test_bug551225.html => docshell/test/mochitest/test_bug551225.html
rename : docshell/test/test_bug570341.html => docshell/test/mochitest/test_bug570341.html
rename : docshell/test/test_bug580069.html => docshell/test/mochitest/test_bug580069.html
rename : docshell/test/test_bug590573.html => docshell/test/mochitest/test_bug590573.html
rename : docshell/test/test_bug598895.html => docshell/test/mochitest/test_bug598895.html
rename : docshell/test/test_bug634834.html => docshell/test/mochitest/test_bug634834.html
rename : docshell/test/test_bug637644.html => docshell/test/mochitest/test_bug637644.html
rename : docshell/test/test_bug640387_1.html => docshell/test/mochitest/test_bug640387_1.html
rename : docshell/test/test_bug640387_2.html => docshell/test/mochitest/test_bug640387_2.html
rename : docshell/test/test_bug653741.html => docshell/test/mochitest/test_bug653741.html
rename : docshell/test/test_bug660404.html => docshell/test/mochitest/test_bug660404.html
rename : docshell/test/test_bug662170.html => docshell/test/mochitest/test_bug662170.html
rename : docshell/test/test_bug668513.html => docshell/test/mochitest/test_bug668513.html
rename : docshell/test/test_bug669671.html => docshell/test/mochitest/test_bug669671.html
rename : docshell/test/test_bug675587.html => docshell/test/mochitest/test_bug675587.html
rename : docshell/test/test_bug680257.html => docshell/test/mochitest/test_bug680257.html
rename : docshell/test/test_bug691547.html => docshell/test/mochitest/test_bug691547.html
rename : docshell/test/test_bug694612.html => docshell/test/mochitest/test_bug694612.html
rename : docshell/test/test_bug703855.html => docshell/test/mochitest/test_bug703855.html
rename : docshell/test/test_bug728939.html => docshell/test/mochitest/test_bug728939.html
rename : docshell/test/test_bug797909.html => docshell/test/mochitest/test_bug797909.html
rename : docshell/test/test_close_onpagehide_by_history_back.html => docshell/test/mochitest/test_close_onpagehide_by_history_back.html
rename : docshell/test/test_close_onpagehide_by_window_close.html => docshell/test/mochitest/test_close_onpagehide_by_window_close.html
rename : docshell/test/test_forceinheritprincipal_overrule_owner.html => docshell/test/mochitest/test_forceinheritprincipal_overrule_owner.html
rename : docshell/test/test_framedhistoryframes.html => docshell/test/mochitest/test_framedhistoryframes.html
rename : docshell/test/test_pushState_after_document_open.html => docshell/test/mochitest/test_pushState_after_document_open.html
rename : docshell/test/test_triggeringprincipal_location_seturi.html => docshell/test/mochitest/test_triggeringprincipal_location_seturi.html
rename : docshell/test/test_windowedhistoryframes.html => docshell/test/mochitest/test_windowedhistoryframes.html
rename : docshell/test/url1_historyframe.html => docshell/test/mochitest/url1_historyframe.html
rename : docshell/test/url2_historyframe.html => docshell/test/mochitest/url2_historyframe.html
rename : third_party/rust/syn/src/parsers.rs => third_party/rust/syn-0.14.6/src/parsers.rs
rename : third_party/rust/syn/src/verbatim.rs => third_party/rust/syn-0.14.6/src/verbatim.rs
rename : third_party/rust/uuid/.travis.yml => third_party/rust/uuid-0.5.1/.travis.yml
rename : third_party/rust/uuid/src/rustc_serialize.rs => third_party/rust/uuid-0.5.1/src/rustc_serialize.rs
rename : third_party/rust/uuid/src/serde.rs => third_party/rust/uuid-0.5.1/src/serde.rs
2018-10-02 19:03:40 +03:00
Andrew McCreight
837f0af066 Bug 1493737 - Fix many trivial calls to do_QueryInterface r=smaug
If class A is derived from class B, then an instance of class A can be
converted to B via a static cast, so a slower QI is not needed.

Differential Revision: https://phabricator.services.mozilla.com/D6861

--HG--
extra : moz-landing-system : lando
2018-10-01 21:38:01 +00:00
Ehsan Akhgari
5f0be07390 Bug 1493563 - Part 5: Present the old state and the content blocking log to the web progress listeners; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D6595
2018-09-28 14:46:02 -04:00
Noemi Erli
4419e20e14 Backed out 12 changesets (bug 1493563) for failures in test_css-logic-getCssPath.html CLOSED TREE
Backed out changeset d2e83655082f (bug 1493563)
Backed out changeset 1ce58f004593 (bug 1493563)
Backed out changeset 344298c73ee7 (bug 1493563)
Backed out changeset 02b8b073f7d7 (bug 1493563)
Backed out changeset 3ef707008502 (bug 1493563)
Backed out changeset bb2720a401fe (bug 1493563)
Backed out changeset ce0211be57a1 (bug 1493563)
Backed out changeset 83d6c2bf8dc6 (bug 1493563)
Backed out changeset 1844af4cc25b (bug 1493563)
Backed out changeset c8ab17addb7a (bug 1493563)
Backed out changeset a1ff0cd62563 (bug 1493563)
Backed out changeset 932b41e211e0 (bug 1493563)
2018-09-28 21:31:18 +03:00
Ehsan Akhgari
f0108e78c2 Bug 1493563 - Part 5: Present the old state and the content blocking log to the web progress listeners; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D6595
2018-09-28 13:24:41 -04:00
Emilio Cobos Álvarez
864a303a8c Bug 1494622 - Remove nsDOMCSSRGBColor. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D7068
2018-09-27 16:11:42 +02:00
Masayuki Nakano
20d1804f6b Bug 1484111 - part 1: Create HTMLEditor::InsertTableCellsWithTransaction() for internal use of nsITableEditor::InsertTableCell() r=m_kato
nsITableEditor::InsertTableCell() is an XPCOM method but used internally.  So,
HTMLEditor should implement it with a non-virtual method and all internal users
should use it instead.

Differential Revision: https://phabricator.services.mozilla.com/D6259

--HG--
extra : moz-landing-system : lando
2018-09-20 11:44:35 +00:00
Masayuki Nakano
3a48cf1623 Bug 1484111 - part 0: Add automated tests for nsITableEditor.insertTableCell.html r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D6258

--HG--
extra : moz-landing-system : lando
2018-09-20 11:44:33 +00:00
Masayuki Nakano
9c1afc4bee Bug 1484116 - part 1: Create HTMLEditor::InsertTableColumnsWithTransaction() for internal use of nsITableEditor::InsertTableColumn() r=m_kato
nsITableEditor::InsertTableColumn() is an XPCOM method but it's used internally.
So, HTMLEditor should implement it with a non-virtual method and internal
users should use it instead.

Differential Revision: https://phabricator.services.mozilla.com/D6257

--HG--
extra : moz-landing-system : lando
2018-09-20 09:15:08 +00:00
Masayuki Nakano
3582509a37 Bug 1484116 - part 0: Add automated tests for nsITableEditor.insertTableColumn() r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D6256

--HG--
extra : moz-landing-system : lando
2018-09-20 09:15:06 +00:00
Masayuki Nakano
aa8e14f9d7 Bug 1484117 - part 0: Add automated tests for nsITableEditor.insertTableRow() r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D6178

--HG--
extra : moz-landing-system : lando
2018-09-20 04:45:18 +00:00
Masayuki Nakano
3e96aa79b3 Bug 1484117 - part 1: Create HTMLEditor::InsertTableRowsWithTransaction() for internal use of nsITableEditor::InsertTableRow() r=m_kato
nsITableEditor::InsertTableRow() is an XPCOM method but there are some internal
users.  So, HTMLEditor should implement it with a non-virtual method and
it should be used by all internal users.

Differential Revision: https://phabricator.services.mozilla.com/D6179

--HG--
extra : moz-landing-system : lando
2018-09-20 06:55:17 +00:00
Masayuki Nakano
3113cbebc3 Bug 1484119 - part 2: Make HTMLEditor::DeleteTableCellWithTransaction() remove <table> element if it becomes empty r=m_kato
HTMLEditor::DeleteTableCellWithTransaction() does not remove <table> element
even if it becomes empty only when 2 or more cell elements are selected.
Therefore, we should check table size before removing a row and if it's the
last row, the method should remove <table>.

Differential Revision: https://phabricator.services.mozilla.com/D6177

--HG--
extra : moz-landing-system : lando
2018-09-19 09:00:06 +00:00
Masayuki Nakano
80a2f99daf Bug 1484119 - part 1: Create HTMLEditor::DeleteTableCellWithTransaction() for internal use of nsITableEditor::DeleteTableCell() r=m_kato
nsITableEditor::DeleteTableCell() is an XPCOM method but used internally.
So, HTMLEditor should implement it with non-virtual method and use it
internally.

Differential Revision: https://phabricator.services.mozilla.com/D6176

--HG--
extra : moz-landing-system : lando
2018-09-19 08:50:11 +00:00
Masayuki Nakano
45c321017b Bug 1484119 - part 0: Add automated tests for nsITableEditor.deleteTableCell.html r=m_kato
Although this has a lot of todo_is() since this API is really broken.

Differential Revision: https://phabricator.services.mozilla.com/D6175

--HG--
extra : moz-landing-system : lando
2018-09-19 02:03:29 +00:00
Masayuki Nakano
2e78564a84 Bug 1484120 - part 1: Create HTMLEditor::DeleteTableCellContentsWithTransaction() for internal use of nsITableEditor::DeleteTableCellContents() r=m_kato
nsITableEditor::DeleteTableCellContents() is an XPCOM method but it's used
internally.  So, HTMLEditor should implement it with a non-virtual method
and all internal users should use the non-virtual method instead.

This patch adds HTMLEditor::DeleteTableCellContentsWithTransaction() for that.
Additionally, this patch renames its helper method DeleteCellContents() to
DeleteAllChidlrenWithTransaction() and moves it to HTMLEditor.cpp since it can
handle any element nodes.

Differential Revision: https://phabricator.services.mozilla.com/D6174

--HG--
extra : moz-landing-system : lando
2018-09-19 01:58:48 +00:00
Masayuki Nakano
1ad41381cc Bug 1484120 - part 0: Add automated tests for nsITableEditor.deleteTableCellContents.html r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D6173

--HG--
extra : moz-landing-system : lando
2018-09-19 01:58:51 +00:00
Masayuki Nakano
1a3e84fbef Bug 1484121 - part 2: Clean up HTMLEditor::DeleteColumn() r=m_kato
This patch renames HTMLEditor::DeleteColumn() to
HTMLEditor::DeleteTableColumnWithTransaction() and cleans up its implementation.

Differential Revision: https://phabricator.services.mozilla.com/D5934

--HG--
extra : moz-landing-system : lando
2018-09-19 06:39:31 +00:00
Masayuki Nakano
7f96a82ad5 Bug 1484121 - part 1: Create HTMLEditor::DeleteSelectedTableColumnsWithTransaction() for internal use of nsITableEditor::DeleteTableColumn() r=m_kato
nsITableEditor::DeleteTableColumn() is an XPCOM method but used internally.
So, it should be implemented with non-virtual method and internal users
should use it.

Note that this changes only one thing.  This moves
|AutoTopLevelEditSubActionNotifier maybeTopLevelEditSubAction(...| from
below DeleteTableElementAndChildrenWithTransaction() to above it.
I.e., DeleteTableElementAndChildrenWithTransaction() works under
EditSubAction::eDeleteNode as the top level sub-action now.  This is same
as DeleteSelectedTableRowsWithTransaction().  Therefore, the difference
with it when it removes <table> is now fixed.

Differential Revision: https://phabricator.services.mozilla.com/D5933

--HG--
extra : moz-landing-system : lando
2018-09-19 06:34:33 +00:00
Masayuki Nakano
cf2eb50a7b Bug 1484121 - part 0: Add automated tests for nsITableEditor.deleteTableColumn() r=m_kato
This add automated tests for nsITableEditor.deleteTableColumn().

However, this contains some fixes of existing code since with those bugs,
the test isn't passed even in the simplest case.

Differential Revision: https://phabricator.services.mozilla.com/D5932

--HG--
extra : moz-landing-system : lando
2018-09-19 04:32:10 +00:00
Makoto Kato
a5335ab3ea Bug 1491199 - Get rid of nsIEditorBlobListener. r=masayuki
Since bug 1489812 is landed, we can get rid of nsIEditorBlobListener.

Differential Revision: https://phabricator.services.mozilla.com/D5844

--HG--
extra : moz-landing-system : lando
2018-09-18 04:34:21 +00:00
Masayuki Nakano
ee53372956 Bug 1484122 - part 2: Clean up HTMLEditor::DeleteRow() r=m_kato
This patch renames HTMLEditor::DeleteRow() to
HTMLEditor::DeleteTableRowWithTransaction() and cleans up its implementation.

Differential Revision: https://phabricator.services.mozilla.com/D5931

--HG--
extra : moz-landing-system : lando
2018-09-18 08:31:00 +00:00
Masayuki Nakano
47fa32ffd8 Bug 1484122 - part 1: Create HTMLEditor::DeleteSelectedTableRowsWithTransaction() for internal use of nsITableEditor::DeleteTableRow() r=m_kato
nsITableEditor::DeleteTableRow() is an XPCOM method but there are some internal
users.  So, it should be implemented as non-virtual protected method and
internal users should use it instead.

This also renames (and reimplement) HTMLEditor::DeleteTable2() since it's
really bad name and the code dispatches unnecessary "selectionchange" events.

Differential Revision: https://phabricator.services.mozilla.com/D5930

--HG--
extra : moz-landing-system : lando
2018-09-18 07:56:45 +00:00
Masayuki Nakano
3d69a1f95e Bug 1484122 - part 0: Add automated tests for nsITableEditor.deleteTableRow.html r=m_kato
This patch changes a bit in HTMLEditor::DeleteTableRow() because calling
DeleteTable2() without those helper classes hits MOZ_ASSERT().

Differential Revision: https://phabricator.services.mozilla.com/D5929

--HG--
extra : moz-landing-system : lando
2018-09-18 07:25:58 +00:00
Makoto Kato
f3b8a60bde Bug 1491191 - Remove unused methods in nsIEditorMailSupport. r=masayuki
Since I have landed bug 1489939, comm-central only uses rewrap method in
nsIEditorMailSupport.  And insertAsCitedQuotation is used by the test of
editor/libeditor/tests/test_bug616590.xul.

Other methods are unused now, so let's remove these from nsIEditorMailSupprt,
and move it to HTMLEditor.  Also, pasteAsQuotation is unused now even if
BlueGriffon.

Differential Revision: https://phabricator.services.mozilla.com/D5835

--HG--
extra : moz-landing-system : lando
2018-09-14 10:03:24 +00:00
Ehsan Akhgari
9fe0e0670a Bug 1491605 - Remove nsIControllerCommandGroup because it is dead code; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D5965
2018-09-17 09:54:04 -04:00
Ehsan Akhgari
ad7b8c9b02 Bug 1491569 - Remove the XPCOM registration for mozSpellChecker; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D5946
2018-09-15 20:13:51 -04:00
Masayuki Nakano
6dae86b837 Bug 1484133 - part 1: Create non-virtual HTMLEditor::GetSelectedOrParentTableElement() r=m_kato
nsITableEditor::GetSelectedOrParentTableElement() is of course an XPCOM method,
but it's used internally.  So, there should be non-virtual method.

On the other hand, this API is too ugly.  Returns various information but each
meaning is not clear.  So, result of the new non-virtual method should be
simpler.

This patch creates the new method as:
- returns found element
- takes ErrorResult to return error code.
- takes optional out-param for returning if a cell is selected.

Then, nsITableEditor::GetSelectedOrParentTableElement() can compute its
result from them with Selection.

Differential Revision: https://phabricator.services.mozilla.com/D5728

--HG--
extra : moz-landing-system : lando
2018-09-14 12:56:22 +00:00
Masayuki Nakano
9162d2e014 Bug 1484133 - part 0: Add automated tests for nsITableEditor.getSelectedOrParentTableElement() r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D5727

--HG--
extra : moz-landing-system : lando
2018-09-14 12:54:43 +00:00
Masayuki Nakano
34e624bd86 Bug 1484131 - part 1: Create HTMLEditor::CellAndIndexes struct to store cell element and its indexes in the <table> r=m_kato
If a cell element and its indexes in the <table> are stored in a struct,
it makes the user methods easier to read.  Therefore, this patch implement
such struct as HTMLEditor::CellAndIndexes and make it finds first selected
cell and indexes with its method.  Finally, this reimplement
HTMLEditor::GetFirstSelectedCellInTable() with it.

Differential Revision: https://phabricator.services.mozilla.com/D5664

--HG--
extra : moz-landing-system : lando
2018-09-14 12:51:05 +00:00
Masayuki Nakano
c6464efa59 Bug 1484131 - part 0: Add automated tests for nsITableEditor.getFirstSelectedCellInTable() and fixes a crash bug of it r=m_kato
This adds automated tests for nsITableEditor.getFirstSelectedCellInTable().
However, this test crashes due to regression of bug 1484128.  So, we need
to uplift only this fix into the Beta.

Differential Revision: https://phabricator.services.mozilla.com/D5663

--HG--
extra : moz-landing-system : lando
2018-09-14 12:49:46 +00:00
Masayuki Nakano
a5d4bac990 Bug 1484123 - Create non-virtual HTMLEditor::NormalizeTable() for internal use of nsITableEditor::NormalizeTable() r=m_kato
I tried to create automated tests for nsITableEditor::NormalizeTable().
However, this method cannot normalize any broken table element.  The method
always returns error after calling HTMLEditor::FixBadRowSpan().  The reason
is that HTMLEditor::FixBadRowSpan() scans all cells in each row with a for
loop, and then, when it fails to find a cell element, it returns error even
though this method needs to fix the odd situation.  According to the history
of editor changes, each important point hasn't been changed since first
implementation.  So, perhaps, table layout API behavior was changed but
no automated tests couldn't detect the regression since we really don't have
enough tests for editor.

Anyway, this patch makes most part of nsITableEditor::NormalizeTable() with
non-virtual method, HTMLEditor::NormalizeTable().

Differential Revision: https://phabricator.services.mozilla.com/D5633

--HG--
extra : moz-landing-system : lando
2018-09-13 08:03:56 +00:00
Masayuki Nakano
d9b9a8b93b Bug 1490882 - Fix a bug of test_middle_click_paste.html r=m_kato
When I added some tests into test_middle_click_paste.html, I realized that
SimpleTest.waitForClipboard() in copyHTMLContent() fails to copy the
HTML fragment to clipboard and just quit the test.  Therefore, only the
last tests are ignored always.

The reason is, iframe.contentDocument.getSelection() returns nullptr
since the frame becomes visible immediately before accessing the Selection.

This patch makes flushing the pending layout with scrollTop.  This makes
getSelection() return non-null.

However, unfortunately, only on Linux, it fails to copy the content.  I'm
still not sure the reason. This patch just avoids running the last part
only on Linux.

Differential Revision: https://phabricator.services.mozilla.com/D5742

--HG--
extra : moz-landing-system : lando
2018-09-14 07:20:04 +00:00
Makoto Kato
678de76911 Bug 1459108 - Skip spellcheck-textarea-ref2.html on Andorid. r=masayuki
Although this reftest is sometimes failure on Android, it is no meaning to run
this test on Android due to no spellchekcer on Firefox Android.

Differential Revision: https://phabricator.services.mozilla.com/D5745

--HG--
extra : moz-landing-system : lando
2018-09-13 08:31:59 +00:00
Andreea Pavel
dbdfde9c61 Bug 1489980 - Enable ESLint for editor/ - Follow-up: Remove unused Ci. r=eslint-fix on a CLOSED TREE
--HG--
extra : amend_source : b2b05ef32c8d217120e280d364db0c70f09300f9
2018-09-13 13:29:24 +03:00
Margareta Eliza Balazs
850a93cf13 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-09-13 13:02:36 +03:00
Mark Banner
e824d800fb Bug 1489980 - Enable ESLint for editor/ - Manual fixes. r=masayuki
This enables the editor directory to be linted, and fixes the remaining issues raised by ESLint. Various rules were fixed here including, no-shadow, no-undef, no-unused-vars and others.

I've generally gone conservative, disabling rules where it doesn't make sense to fix them (e.g. sometimes suggests use-services for tests, but it is only used once, or within a Chrome script).

Depends on D5585

Differential Revision: https://phabricator.services.mozilla.com/D5587

--HG--
extra : moz-landing-system : lando
2018-09-13 07:59:47 +00:00
Mark Banner
d5e3a6a9e5 Bug 1489980 - Enable ESLint for editor/ - automatic fixes r=masayuki
These are all automatically generated by ESLint with the --fix option.

Depends on D5584

Differential Revision: https://phabricator.services.mozilla.com/D5585

--HG--
extra : moz-landing-system : lando
2018-09-13 07:58:19 +00:00
Mark Banner
3720c020c0 Bug 1489980 - Editor ESLint for editor/ - Initial setup adding configs for tests. r=masayuki
Also block-disables no-multi-spaces for test_resizers_resizing_elements.html

Differential Revision: https://phabricator.services.mozilla.com/D5584

--HG--
extra : moz-landing-system : lando
2018-09-13 07:57:57 +00:00
Ehsan Akhgari
5aedfad186 Bug 1489793 - Part 2: Remove nsComposerRegistration.cpp; r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D5372
2018-09-12 18:58:53 -04:00
Ehsan Akhgari
6d56a36888 Bug 1489793 - Part 1: Remove the XPCOM component registration for EditorSpellCheck; r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D5371
2018-09-12 18:58:53 -04:00
Bogdan Tara
11a51e4c3d Merge inbound to mozilla-central. a=merge 2018-09-12 01:12:32 +03:00
Ehsan Akhgari
1675c25fae Bug 1489790 - Part 11: Remove the overload of nsEditingSession::SetupEditorCommandController which takes a string and uses the XPCOM service manager to create the controller; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D5366
2018-09-11 09:58:33 -04:00
Ehsan Akhgari
751c62d2ae Bug 1489790 - Part 10: Remove the XPCOM component registration for @mozilla.org/editor/editordocstatecontroller;1; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D5365
2018-09-11 09:58:33 -04:00
Ehsan Akhgari
f3142db64e Bug 1489790 - Part 9: Remove the XPCOM component registration for @mozilla.org/editor/htmleditorcontroller;1; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D5364
2018-09-11 09:58:33 -04:00
Ehsan Akhgari
65f44ebf27 Bug 1489790 - Part 8: Remove the XPCOM component registration for @mozilla.org/editor/editorcontroller;1; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D5363
2018-09-11 09:58:33 -04:00
Ehsan Akhgari
c9bfa076d5 Bug 1489790 - Part 7: Remove the XPCOM component registration for @mozilla.org/editor/editingcontroller;1; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D5362
2018-09-11 09:58:33 -04:00
Ehsan Akhgari
935e51caab Bug 1489790 - Part 6: Add an overload of nsEditingSession::SetupEditorCommandController which takes a creator function argument instead of a contract ID; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D5361
2018-09-11 09:58:33 -04:00
Ehsan Akhgari
554d3d7b44 Bug 1489790 - Part 1: Remove the XPCOM component registration for nsControllerCommandTable as well as kHTMLEditorCommandTableCID and kHTMLEditorDocStateCommandTableCID; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D5356
2018-09-11 09:58:33 -04:00
Cosmin Sabou
de7676288a Merge mozilla-inbound to mozilla-central. a=merge 2018-09-11 13:06:37 +03:00