Commit Graph

905 Commits

Author SHA1 Message Date
Ekanan Ketunuti
35acc70c65 Bug 1481231 - Add words to en-US dictionary. r=Ehsan
--HG--
extra : amend_source : 9f3778a6d2913671f147a31f917257e62f6fbf49
2018-08-07 08:13:32 +07:00
Makoto Kato
5074358d1a Bug 1480699 - Use IPDL's promise instead in PRemoteSpellcheckEngine. r=masayuki
Summary:
When implementing async call for PRemoteSpellcheckEngine, IPDL doesn't support
Promise.  But now, IPDL supports it, so I should convert to it to avoid
unexpected leak.

And SetDictionary supports empty string as parameter to clear dictionary.  So
SetDictionaryFromList should support empty string to clear it to remove
SetDictionary sync call.

Reviewers: masayuki

Tags: #secure-revision

Bug #: 1480699

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

--HG--
extra : rebase_source : 17fe76e6484f2af4021fe0d963e4fc47f53bebd8
2018-07-31 16:36:43 +09:00
Boris Zbarsky
d4993da381 Bug 1476142 part 4. Remove some unnecessary QIs on window in various parts of the tree. r=kmag
The crashtest was not testing anything useful, because getInterface is no longer exposed to web content.
2018-08-02 15:26:48 -04:00
Brian Hackett
3c13dd9f31 Bug 1479641 - Don't record counting allocator amount, r=froydnj.
--HG--
extra : rebase_source : 23de9644662c1f9ed36429074837e54bb7cac868
2018-07-31 19:22:54 +00:00
Masayuki Nakano
0fadf6b9da Bug 1467796 - part 3: Make mozInlineSpellChecker::ReplaceWord() use TextEditor::ReplaceTextAsAction() r=m_kato,smaug
mozInlineSpellChecker::ReplaceWord() is used for replacing misspelled word
with a word.  So, this is necessary to be distinguished from insertText
command when we implement InputEvent.inputType.  So, we should make it
use TextEditor::ReplaceTextAsAction() instead (same as autocomplete).

This patch makes TextEditor::ReplaceTextAsAction() take optional argument
to make callers can specify replace range.  Then, the range is a spellchecker
selection range if the caller is mozInlineSpellChecker::ReplaceWord().
Prior to this patch, it clones the range for normal selection, but it's
expensive and we may be able to reuse cached range of Selection in this case.
So, this patch makes Selection::AddRangeInternal() checks if given range is
in another Selection and use mCachedRange as far as possible.

MozReview-Commit-ID: JIOTTsxlj4Q

--HG--
extra : rebase_source : 7c26b0255f08608ebe8c7045c9bcdca1dc70cadf
2018-07-04 22:51:55 +09:00
Masayuki Nakano
efd8891532 Bug 1467796 - part 1: Split TextEditor::InsertTextAsAction() to itself and TextEditor::InsertTextAsSubAction() for internal use r=m_kato
For bug 1465702, we need to split TextEditor::InsertTextAsAction() to 2 methods.
One is for root of handling an edit operation.  The other is for internal use,
e.g., handling as a part of an edit operation.  Therefore, this patch creates
InsertTextAsSubAction() for the internal use.

MozReview-Commit-ID: CIU5zdp0owP

--HG--
extra : rebase_source : 79b58fb01e48d1831bbdea01ed7b1a26dcd1821b
2018-07-02 20:12:22 +09:00
Ekanan Ketunuti
0357874225 Bug 1477961 - Add words to en-US dictionary. r=ehsan 2018-07-27 06:59:07 +07:00
Makoto Kato
efbf30c79f Bug 1477917 - Part 2. Use AString instead of wstring in spellchecker. r=masayuki
The language parameter of mozIPersonalDictionary is unused, so we should remove
this from parameter.  Then, no one uses mLanguage member of mozHunspell now.

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

--HG--
extra : moz-landing-system : lando
2018-07-26 03:13:51 +00:00
Makoto Kato
229108931f Bug 1477917 - Part 1. Remove unused methods for spellchecker. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D2348

--HG--
extra : moz-landing-system : lando
2018-07-26 03:09:14 +00:00
Ekanan Ketunuti
3f1345e2c2 Bug 1476849 - Add words to en-US dictionary. r=ehsan
--HG--
extra : rebase_source : 59221034a1891c973e79a5ba1d900be4fb61fac9
2018-07-23 13:31:26 +07:00
Sylvestre Ledru
c86ee15013 Bug 1477540 - Use RemoveLastElement instead of PopLastElement r=bhackett
The later is only interesting when the returned value is used

MozReview-Commit-ID: 8CF5HSkcttf

--HG--
extra : rebase_source : deb1761dd017108c9dba1d831a996baf54c7f425
2018-07-22 16:23:57 +02:00
Brian Hackett
9624bb7849 Bug 1464890 - Use integers instead of raw pointer values as PRemoteSpellCheck IDs, r=ehsan.
--HG--
extra : rebase_source : 3eac7443b7e0c382e432ff2b7c50f21efb23e668
2018-07-20 23:57:26 +00:00
Makoto Kato
a9c64c8f84 Bug 1469759 - Part 4. Get rid of mozISpellI18NUtil. r=masayuki
mozEnglishWordUtils should be deXPCOM since it isn't used from script, then get
rid of mozISpellI18NUtil that is unused.

MozReview-Commit-ID: JpRuWfu3uYx

--HG--
extra : rebase_source : 4094e5566db84110599567df49e7f3925a08a7e9
2018-07-02 11:22:08 +09:00
Makoto Kato
428be3d211 Bug 1469759 - Part 3. Remove unused methods of mozISpellI18NUtil. r=masayuki
Some methods in mozISpellI18NUtil are unused now.

MozReview-Commit-ID: Ku9FojuJW3T

--HG--
extra : rebase_source : a6c3afc7c7b116c1ba2c71bd93744f2ee8c724c2
2018-07-02 11:21:28 +09:00
Makoto Kato
445dde1b84 Bug 1469759 - Part 2. Get rid of mozISpellI18NManager. r=masayuki
No one uses mozISpellI18NManager, so we should get rid of this interface.

MozReview-Commit-ID: 7f0Cy3tHnt1

--HG--
extra : rebase_source : 414c81cd4bec07124a271138e60ca3fb62ccc439
2018-07-02 11:21:04 +09:00
Makoto Kato
70a5aaf70e Bug 1469759 - Part 1. Use mozEnglishWordUtils directly. r=masayuki
mozISpellI18NManager is only used to get mozISpellI18NUtil. And
mozISpellI18NUtil is only implemented on mozEnglishWordUtils.  So we should
create an instance of mozEnglishWordUtils instead of using mozISpellI18NManager.

MozReview-Commit-ID: FmCuMAMmH9C

--HG--
extra : rebase_source : fe4bf18f5a3ed6b595185dcaa4a51b83f2f0d8b6
2018-07-02 11:20:39 +09:00
Ekanan Ketunuti
eb919d07de Bug 1474550 - Add words to en-US dictionary. r=ehsan 2018-07-10 17:49:06 +07:00
Jeff Gilbert
5b753da289 Bug 1470325 - s/FooBinding/Foo_Binding/g - r=qdot
MozReview-Commit-ID: JtTcLL5OPF0
2018-06-26 17:05:01 -07:00
Chris Peterson
2afd829d0f Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj
This patch is an automatic replacement of s/NS_NOTREACHED/MOZ_ASSERT_UNREACHABLE/. Reindenting long lines and whitespace fixups follow in patch 6b.

MozReview-Commit-ID: 5UQVHElSpCr

--HG--
extra : rebase_source : 4c1b2fc32b269342f07639266b64941e2270e9c4
extra : source : 907543f6eae716f23a6de52b1ffb1c82908d158a
2018-06-17 22:43:11 -07:00
Ekanan Ketunuti
f2e8d63639 Bug 1468887 - Add words to en-US dictionary. r=ehsan 2018-06-15 08:27:56 +07:00
Ekanan Ketunuti
5f6848dd35 Bug 1465937 - Add aptical haptically and haptics to the en-US dictionary. r=Ehsan 2018-06-01 08:21:06 +07:00
Joel Maher
50b91c0a14 Bug 1405428 - skip-if = verify on mochitests which do not pass test-verify. r=gbrown 2018-06-10 05:01:47 -04:00
Miko Mynttinen
4c85ef17cc Bug 1465060 - Part 1: Fix warnings for std::move() use r=froydnj
MozReview-Commit-ID: HpdFXqQdIOO

--HG--
extra : rebase_source : 1e7eea4f2d4ec16ec0c559a8afb26976ddbf4d07
2018-06-01 17:59:07 +02:00
arthur.iakab
7e765f798b Backed out 2 changesets (bug 1465060) for build bustages on security/sandbox/linux/reporter/SandboxReporter.cpp
Backed out changeset 7c8905b6b226 (bug 1465060)
Backed out changeset 10446073eca8 (bug 1465060)
2018-06-03 19:25:41 +03:00
Miko Mynttinen
8d9dc85cd4 Bug 1465060 - Part 1: Fix warnings for std::move() use r=froydnj
MozReview-Commit-ID: HpdFXqQdIOO

--HG--
extra : rebase_source : 619d0e0ff63a2453c80f0c4d9beb906d43fa9b01
2018-06-01 17:59:07 +02:00
Emilio Cobos Álvarez
fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Masayuki Nakano
cbdd1207ab Bug 1463985 - part 10: Rename EditSubAction::deleteSelection to EditSubAction::eDeleteSelectedContent r=m_kato
MozReview-Commit-ID: 8LNY42KnyDf

--HG--
extra : rebase_source : 7778c0ff7c3da1c5070d0e5acf607665ff8efd4f
2018-05-28 21:49:56 +09:00
Masayuki Nakano
99a921d037 Bug 1463985 - part 9: Rename EditSubAction::insertIMEText to EditSubAction::eInsertTextComingFromIME r=m_kato
MozReview-Commit-ID: 1TmryMStB7H

--HG--
extra : rebase_source : 33dea12fe1ce0d5b9ea9ee13681949f288056d2a
2018-05-28 21:44:39 +09:00
Masayuki Nakano
63f1437458 Bug 1463985 - part 8: Rename EditSubAction::insertText to EditSubAction::eInsertText r=m_kato
MozReview-Commit-ID: Bd7GMng3T1T

--HG--
extra : rebase_source : a7e1774282c69b38add45faa993682d98e976d6b
2018-05-28 21:36:47 +09:00
Masayuki Nakano
99341a9445 Bug 1463985 - part 1: Rename EditAction to EditSubAction and related stuff r=m_kato
When we implement InputEvent.inputType, we need to set a stack class to record
which edit action is currently handled.  However, currently, we call smaller
jobs as edit action.  For example, when user types a character at selecting
some characters, then, EditAction::deleteSelection is performed first, then,
EditAction::insertText is performed.  However, for the InputEvent.inputType,
we need inserText information.  So, for making new enum EditAction, we need
to rename current EditAction to EditSubAction.

And also this renames related stuff:

EditorBase::mIsInEditAction -> EditorBase::mIsInEditSubAction
EditorBase::IsInEditAction() -> EditorBase::IsInEditSubAction()
EditorBase::mAction -> EditorBase::mTopLevelEditSubAction
TextEditRules::mTheAction -> TextEditRules::mTopLevelEditSubAction
EditorBase::StartOperation() ->
  EditorBase::OnStartToHandleTopLevelEditSubAction()
EditorBase::EndOperation() ->
  EditorBase::OnEndHandlingTopLevelEditSubAction()
AutoRules -> AutoTopLevelEditSubActionNotifier
RulesInfo -> EditSubActionInfo

MozReview-Commit-ID: cvSkPUjFm1

--HG--
extra : rebase_source : baf527a3e353b7a8ebe9a46be2243b059c500234
2018-05-28 20:12:34 +09:00
Boris Zbarsky
8b9400c98b Bug 1455676 part 19. Remove some remaining nsIDOMNode uses. r=qdot 2018-05-29 22:58:50 -04:00
Ehsan Akhgari
a9658948cc Bug 1465213 - Update the en-US dictionary to SCOWL 2018.04.16 2018-05-29 16:28:06 -04:00
Ekanan Ketunuti
9428b7aa7e Bug 1461240 - Add words to en-US dictionary. r=ehsan 2018-05-29 16:22:12 -04:00
Kris Maglione
c4035f104c Bug 1463637: Remove mozilla-config.h hacks for Hunspell extra includes. r=ted
MozReview-Commit-ID: 2yBlykhQsyV

--HG--
extra : rebase_source : d51a663c5f7d4c9cce09c649003c5577fe5952d0
2018-05-22 20:36:39 -07:00
Kris Maglione
2fe5dce32f Bug 1457321: Part 3 - Load built-in dictionaries from omnijar rather than scanning directories. r=aswan,ehsan
MozReview-Commit-ID: CgYHrcJsYfE

--HG--
extra : rebase_source : 5abbdcb64b30e8f7f3b568b4adf7a047b2a1bf79
2018-04-27 13:43:50 -07:00
Boris Zbarsky
8f50a01cba Bug 1463981 part 1. Remove use of nsIDOMNode in spellchecker xpidl. r=masayuki 2018-05-24 13:18:34 -04:00
Kris Maglione
f8506d46d0 Bug 1460600: Remove unsupported --enable-system-hunspell flag. r=glandium
Our bundled Hunspell now significantly differs from upstream Hunspell. Most
importantly, it supports loading dictionaries from jar: URIs, which is now a
requirement for loading bundled and extension dictionaries. This means that
system Hunspell libraries are no longer compatible with our spell checker
code. We should remove the option to use them so that users don't fall into
the trap of trying to use them.

MozReview-Commit-ID: 2ihJe6YOnGf

--HG--
extra : rebase_source : ceb091b9475a2b101156405a02a60015fc36da17
2018-05-10 10:36:53 -07:00
Kris Maglione
6b12d08f7d Bug 1462937: Update callers to use nsIFile::GetDirectoryEntries as a nsIDirectoryEnumerator. r=froydnj
MozReview-Commit-ID: Iv4T1MVAF5

--HG--
extra : rebase_source : 1c518883d082884db7f9323a5acc20361228c26b
extra : histedit_source : 70a73c23d1199d3bfbb5379c78930401166c094b
2018-05-19 20:17:45 -07:00
Boris Zbarsky
40d2bf9d7f Bug 1377980 part 1. Remove use of nsIDOMRange in xpidl. r=mcc8 2018-05-17 12:01:37 -04:00
Kris Maglione
aa484dadb6 Bug 1460748: Load the correct affix file for WebExtension dictionaries. r=aswan
MozReview-Commit-ID: 1arZbiexgma

--HG--
extra : rebase_source : c2553ef5899a8880f3862c4bcbb32e1c23421a37
2018-05-10 15:42:29 -07:00
Kris Maglione
d9040aac36 Bug 1457072: Get rid of unpacked dictionaries and the remaining unpacked install code. r=aswan
MozReview-Commit-ID: K36cUkKtuOB

--HG--
extra : rebase_source : 860e0ebe7bc0589eadb3ddf8976d19bab01b6ce4
2018-04-26 01:27:48 -07:00
Boris Zbarsky
1fb03996f4 Bug 1387143 part 29. Remove nsISelection. r=mats 2018-05-08 13:52:42 -04:00
Chris Peterson
71422dcaa9 Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj
s/NS_PRECONDITION/MOZ_ASSERT/ and reindent

MozReview-Commit-ID: KuUsnVe2h8L

--HG--
extra : source : c14655ab3df2c9b1465dd8102b9d25683359a37b
2018-04-28 12:50:58 -07:00
Ekanan Ketunuti
50aa52b2d5 Bug 1459097 - Add words to en-US dictionary. r=ehsan 2018-05-04 08:32:09 +07:00
Makoto Kato
db7992dc59 Bug 1457431 - Devirtualize mozInlineSpellChecker::SpellCheckAfterEditorChange. r=masayuki
It is unnecessary to keep virtual method for
mozInlineSpellChecker::SpellCheckAfterEditorChange, so we should remove virtual
keyword.

MozReview-Commit-ID: 2ry5uhMTFVC

--HG--
extra : rebase_source : ba86bb7c4e47598f83e3869733a238a740cef6b2
2018-04-27 21:11:31 +09:00
Cosmin Sabou
68fdb6cf4f Merge inbound to mozilla-central. a=merge 2018-04-27 13:04:36 +03:00
Kris Maglione
f55bef228c Bug 1410214: Part 3 - Support packed WebExtension dictionaries. r=aswan,masayuki
MozReview-Commit-ID: 6nrw0IIe4UG

--HG--
extra : rebase_source : 3e2c2b24bd7a9136d326da9bea3d1dc197cb908b
extra : absorb_source : 9f7ab2b81c220463b82a74cb64e93528a54ff2c4
2018-04-26 13:26:05 -07:00
Kris Maglione
e2d0c50adb Bug 1410214: Part 2 - Add a stub Hunspell FileMgr that allows it to read URLs. r=masayuki
This will allow us to store dictionaries in packed extension XPIs and/or
omni.ja, which should give us a significant startup performance win.

MozReview-Commit-ID: K7fzJJAywjC

--HG--
extra : rebase_source : 4022d27bc4896d8ef27d4141b6c9bc0dd9e1c0a0
extra : absorb_source : 04bdcab8ff8005a0537d1747ba52e84946e7806a
2018-04-26 13:29:04 -07:00
Kris Maglione
d3904fd92f Bug 1410214: Part 1 - Implement support for WebExtension-style dictionary add-ons. r=aswan,gandalf
MozReview-Commit-ID: 3oylyEBgrzB

--HG--
extra : rebase_source : 640a71111fb84506906a2b150ea3d18339ebbdab
2018-04-26 13:32:38 -07:00
Doug Thayer
ce5461c0d3 Bug 887889 - Fix leak in RemoteSpellCheckingEngineChild r=Ehsan
The work to migrate to Sqlite.jsm seems to have caused a timing problem
in our tests where shutdown the content process while this IPC message
is still unresolved. This causes us to destroy RemoteSpellCheckingEngineChild
without it having processed its RecvNotiy..., leading to the promise being
leaked. As far as I can tell this resolves all of our leak issues on try.

MozReview-Commit-ID: GdwVIp5dj1m

--HG--
extra : rebase_source : b7bf5838c53e40b49bea17df123028a2dbd26e5e
2018-04-19 14:33:18 -07:00