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

102 Коммитов

Автор SHA1 Сообщение Дата
Masayuki Nakano 5546ae8990 Bug 1805799 - Make `TSFTextStore::Selection::Length` use `MOZ_ASSERT_IF` instead of `MOZ_ASSERT` to access `Maybe<TS_SELECTION_ACP>` r=m_kato
`ToString(mSelectionForTSF).c_str()` runs `TSFTextStore::Selection::operator<<`
if it's some.  Then, it calls `TSFTextStore::Selection::Length` always.
https://searchfox.org/mozilla-central/rev/17aeb39742eba71e0936ae44a51a54197100166d/widget/windows/TSFTextStore.h#725

However, `TSFTextStore::Selection::mACP` can be nothing if there is no
`Selection` ranges.  Therefore, the `MOZ_ASSERT(mACP->acpEnd >= mACP->acpStart)`
hits `Maybe<T>.isSome()` check in `->` operator.
https://searchfox.org/mozilla-central/rev/17aeb39742eba71e0936ae44a51a54197100166d/widget/windows/TSFTextStore.h#681

Differential Revision: https://phabricator.services.mozilla.com/D164759
2022-12-20 00:24:43 +00:00
Masayuki Nakano e7b7bb65d1 Bug 1793911 - part 2: Make `TSFTextStore` defer notifying TSF of content updates while initializing content cache r=m_kato
I don't know understand how to recursively run initializing `mContentForTSF`
with dispatching a query content event because it may flush pending layout,
but the notifications will be sent in next tick by `IMEContentObserver`.
However, anyway, it rarely occurs in some environments.

Therefore, this patch makes `TSFTextStore` defer notifying TSF until finishing
initializing the content/selection cache to avoid to emplace `Maybe` twice.
Additionally, with adding a call of `.reset()` and `MOZ_DIAGNOSTIC_ASSERT`,
this patch prevents the crash in the release channel.

Depends on D159660

Differential Revision: https://phabricator.services.mozilla.com/D159661
2022-10-20 12:59:23 +00:00
Masayuki Nakano 51cbf8347f Bug 1793911 - part.1: Rename `TSFTextStore::mDeferNotifyingTSF` r=m_kato
It means that `TSFTextStore` should defer notifying TSF of content/layout
changes until receiving a reply from `ContentCacheInParent` or
`IMEContentObserver`.  For making it explain by itself, this patch rename it.

Differential Revision: https://phabricator.services.mozilla.com/D159660
2022-10-20 12:59:23 +00:00
Masayuki Nakano ea14dc51d0 Bug 1774317 - part 3: Fix forgotten member initializing of `TSFTextStore` r=m_kato
The crash tracked in bug 1792767 is caused by uninitialized member of
`TSFTextStore`.  Therefore, it runs the cleaning up the TSF objects at
setting focus to new `TSFTextStore`, but MS-IME didn't grab the necessary
objects and thus, the crash occurs.

Differential Revision: https://phabricator.services.mozilla.com/D158311
2022-09-29 14:06:03 +00:00
Masayuki Nakano 725ca35ef4 Bug 1792515 - Rename `InputContext::mHTMLInputInputmode` to `mHTMLInputMode` r=m_kato,geckoview-reviewers
Now, `inputmode` attribute (`inputMode` in the DOM interface) is a global
attribute for `contenteditable`.  Therefore, `Input` is not necessary and
`Inputmode` should be `InputMode`.

Differential Revision: https://phabricator.services.mozilla.com/D158244
2022-09-29 14:06:03 +00:00
Masayuki Nakano 723de0691e Bug 1774317 - part 2: Make `TSFTextStore` support `GUID_PROP_URL` r=m_kato
`GUID_PROP_URL` is defined here:
https://learn.microsoft.com/en-us/windows/win32/tsf/predefined-properties

> Contains a BSTR value representing the URL of the text control source, where
> applicable.

The URL may contain sensitive information, e.g., user name, password, query
string.  However, they are already leaked via MSAA/UIA.
https://searchfox.org/mozilla-central/rev/b1e5f2c7c96be36974262551978d54f457db2cae/accessible/generic/DocAccessible.cpp#350

Therefore, this patch just has prefs to completely prevent to expose the URL
for users who don't like this feature.

Differential Revision: https://phabricator.services.mozilla.com/D157894
2022-09-29 14:06:02 +00:00
Sandor Molnar c6f1e9ee28 Backed out 2 changesets (bug 1774317) for causing top-crash (bug 1792767) CLOSED TREE
Backed out changeset 418dec4ac3f9 (bug 1774317)
Backed out changeset 329666086b40 (bug 1774317)
2022-09-29 04:48:26 +03:00
Masayuki Nakano 58fa8fca99 Bug 1774317 - part 2: Make `TSFTextStore` support `GUID_PROP_URL` r=m_kato
`GUID_PROP_URL` is defined here:
https://learn.microsoft.com/en-us/windows/win32/tsf/predefined-properties

> Contains a BSTR value representing the URL of the text control source, where
> applicable.

The URL may contain sensitive information, e.g., user name, password, query
string.  However, they are already leaked via MSAA/UIA.
https://searchfox.org/mozilla-central/rev/b1e5f2c7c96be36974262551978d54f457db2cae/accessible/generic/DocAccessible.cpp#350

Therefore, this patch just has prefs to completely prevent to expose the URL
for users who don't like this feature.

Differential Revision: https://phabricator.services.mozilla.com/D157894
2022-09-28 11:46:59 +00:00
Chris Martin 63ca6a38f3 Bug 1756621 - Remove nsWindowBase r=handyman
It looks like it was added to abstract commonalities between Win32 and
WinRT. But we dropped support for WinRT a long time ago, and there hasn't been
any work on this area of code in 8 years. In the meantime, it just adds an
extra layer of indirection that doesn't need to exist.

Differential Revision: https://phabricator.services.mozilla.com/D139771
2022-02-28 15:08:03 +00:00
Masayuki Nakano 0c356a2793 Bug 1746104 - part 5-4: Make widget code handle no selection case at getting selection change notifications r=m_kato,geckoview-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D137425
2022-02-07 22:33:38 +00:00
Masayuki Nakano d4e2b32763 Bug 1746104 - part 1-5: Make `TSFTextStore::Selection` return const reference of `WritingMode` rather than a copy r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D137408
2022-02-07 22:33:32 +00:00
Masayuki Nakano b249f25ad9 Bug 1746104 - part 1-4: Make `TSFTextStore` handle the no selection case r=m_kato
Most change has already been done in part 1-2.  This patch does the remaining
work.

Differential Revision: https://phabricator.services.mozilla.com/D137407
2022-02-07 22:33:32 +00:00
Masayuki Nakano ebccee915f Bug 1746104 - part 1-3: Wrap `TSFTextStore::mPendingSelectionChangeData` with `Maybe` r=m_kato
It needs to have a state whether it's set or unset, and whether there is at
least one selection range or no selection range.  Currently, its valid state
represents both of them, but it'll has no selection state in the following
patches.  Therefore, the former state should be manged with `Maybe`.

Differential Revision: https://phabricator.services.mozilla.com/D137406
2022-02-07 22:33:31 +00:00
Masayuki Nakano d1426f0b77 Bug 1746104 - part 1-2: Make `TSFTextStore::Selection` have "no selection" state r=m_kato
`Selection.removeAllRanges` can make there is no selection ranges.  Therefore,
`TSFTextStore::Selection` needs to represent the state.  This patch changes its
`mACP` to `Maybe<TS_SELECTION_ACP>` for making `Nothing` of it mean no
selection ranges.  Then, `GetSelection` will return `TS_E_NOSELECTION` and
`InsertTextAtSelection` will return "no change" if it's called for emulation.

According to Chromium:
https://source.chromium.org/chromium/chromium/src/+/main:ui/base/ime/win/tsf_text_store_unittest.cc
They don't check this case's behavior, and it seems that they ignore selection
change at `removeAllRanges`:
https://source.chromium.org/chromium/chromium/src/+/main:ui/base/ime/win/tsf_text_store.cc;l=1153;drc=d50b5b8a78d3d4878c98b07af006a00ed65fddd0
or fill cached selection with collapsed at invalid position (`UINT32_MAX`).
https://source.chromium.org/chromium/chromium/src/+/main:ui/base/ime/win/tsf_text_store.cc;l=1238;drc=d50b5b8a78d3d4878c98b07af006a00ed65fddd0

So anyway, we don't have better handling in the case.

Differential Revision: https://phabricator.services.mozilla.com/D137405
2022-02-07 22:33:31 +00:00
Masayuki Nakano 4ddbfc0832 Bug 1746104 - part 1-1: Make `TSFTextStore::Selection` work with `IMENotification::SelectionChangeDataBase` directly r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D137404
2022-02-07 22:33:30 +00:00
Daisuke Akatsuka 236b747761 Bug 1748128: Avoid sending 'search' input scope when ATOK is active. r=masayuki
When "search" is set to the input scope, there is a case ATOK stop their
suggestions depending on thire setting. To resolve the issue, we need to avoid
sending "search" input scope when ATOK is active. If using the touch keyboard
for touch screens, this change makes user cannot access some specific features
for a "search" input field. Therefore, we introduce a new pref
`intl.tsf.hack.atok.search_input_scope_disabled`, make user can control this
feature.

Differential Revision: https://phabricator.services.mozilla.com/D136448
2022-01-20 07:54:55 +00:00
Masayuki Nakano e956918374 Bug 1678553 - part 8: Make `TSFTextStore` store its `Selection` with `Maybe` r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D97954
2020-11-27 14:47:22 +00:00
Narcis Beleuzu dae9de02cd Backed out 2 changesets (bug 1678553) for MinGW bustages on ToString.h
Backed out changeset a21c164db6ff (bug 1678553)
Backed out changeset 2f95b040da6c (bug 1678553)
2020-11-27 16:35:26 +02:00
Masayuki Nakano 9b788a53a2 Bug 1678553 - part 8: Make `TSFTextStore` store its `Selection` with `Maybe` r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D97954
2020-11-27 06:41:20 +00:00
Masayuki Nakano 9aac6d1750 Bug 1678553 - part 7: Make `TSFTextStore` store its `Composition` with `Maybe` r=m_kato
Then, `TSFTextStore::mComposition` becomes much simpler.

Differential Revision: https://phabricator.services.mozilla.com/D97953
2020-11-27 02:01:03 +00:00
Masayuki Nakano e863ff22f1 Bug 1678553 - part 6: Make `TSFTextStore::MouseTracker` store the range from TSF with `Maybe<StartAndEndOffsets>` r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D97952
2020-11-27 01:58:05 +00:00
Masayuki Nakano d68bac6acf Bug 1678553 - part 5: Make `TSFTextStore` store `Content` with `Maybe` r=m_kato
`TSFTextStore::Content` has a bool member to indicate whether it's been
initialized or not.  So, storing `Content` with `Maybe` can indicate it.

Differential Revision: https://phabricator.services.mozilla.com/D97951
2020-11-26 12:38:02 +00:00
Masayuki Nakano e81cec7fe4 Bug 1678553 - part 4: Make `TSFTextStore::Content` store minimum offset of modified text with `Maybe` r=m_kato
If text is not modified, it should be represented with `Nothing` rather than
`UINT32_MAX`.

Differential Revision: https://phabricator.services.mozilla.com/D97950
2020-11-26 12:37:55 +00:00
Masayuki Nakano 8e6587ecde Bug 1678553 - part 3: Make `TSFTextStore::Content` store the latest composition range with `Maybe` and new class which stores start and end offsets r=m_kato
They are not always set. Therefore, it should be managed with `Maybe`.
And this creates a new class `StartAndEndOffsets` and it's similar to
`OffsetAndData` class so that similar API makes the code easier to read.

Differential Revision: https://phabricator.services.mozilla.com/D97949
2020-11-26 12:37:42 +00:00
Masayuki Nakano eb1c061636 Bug 1678553 - part 2: Make `TSFTextStore::Content` store the last composition with `Maybe<OffsetAndData>` r=m_kato
When there is no composition, `Nothing` is clearer to indicate it.

Differential Revision: https://phabricator.services.mozilla.com/D97948
2020-11-26 12:37:30 +00:00
Masayuki Nakano 94eaae30be Bug 1678553 - part 1: Make `TSFTextStore::Composition` manage start offset and composition string with a class r=m_kato
This patch creates `OffsetAndData` for managing start offset in flat-text
content and composition string in one place.  And it supports stream to
log it easier.

Then, this patch makes `TSFTextStore::Composition` inherits it for sharing
similar code with other similar data.

Note that the new class guarantees that it won't return overflown offset
and it won't cut overflown string from max offset.

Differential Revision: https://phabricator.services.mozilla.com/D97947
2020-11-26 10:34:13 +00:00
Masayuki Nakano fbf626bd55 Bug 1677926 - Make `TSFTextStore::GetTextExt()` consider whether it can query content with relative offset from last composition start with `TextEventDispatcher::IsComposing()` r=m_kato
Immediately after committing composition, i.e., still remote content is
handling the commit, `ContentCacheInParent` does not think that it still
has composition, but `TSFTextStore::GetTextExt()` tries a query whose offset
is relative offset from the last composition start offset and then,
`ContentCacheInParent` solves it with selection start (typically, the last
composition end offset).  Therefore, this may cause returning error from
`GetTextExt()` and some TIP may fail to do something for next typing.

This patch makes `TSFTextStore::GetTextExt()` consider whether it'll query
content with relative offset from last composition start or selection start,
from `TextEventDispatcher::IsComposing()` result rather than
`TextEventDispatcher::IsHandlingComposition()` since the former means whether
there is composition in the chrome process, but the latter is there is
composition in focused process, and `ContentCacheInParent` state matches the
former.

Depends on D97270

Differential Revision: https://phabricator.services.mozilla.com/D97392
2020-11-19 09:34:45 +00:00
Masayuki Nakano 3fd73c16fb Bug 1589497 - Make PendingAction of TSFStore copy of key message r=m_kato
`TSFTextStore::sHandlingKeyMsg` refers pointer of struct, but referred via
`TSFTextStore::PendingAction` so that we should make it has a copy of
`sHandlingKeyMsg` because of for async handling.

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

--HG--
extra : moz-landing-system : lando
2020-03-26 07:33:37 +00:00
Makoto Kato 546edaf1e6 Bug 1549394 - Part 2. Set IS_PRIVATE input scope in private browsing. r=masayuki
Microsoft IME on Windows 10 20H1 (build 19025+) supports IME private mode by
input scope. Although previous Windows version uses undocumented API for
Edge and IE only, next Windows will use public API for it.

So let's use IS_PRIVATE input scope in private browsing mode.

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

--HG--
extra : moz-landing-system : lando
2019-11-21 06:23:40 +00:00
Brindusan Cristian 7a6e373ea1 Backed out 2 changesets (bug 1549394) for MinGW bustages at TSFTextStore.cpp. CLOSED TREE
Backed out changeset 5da3dcd12b69 (bug 1549394)
Backed out changeset fb2f4ca36af4 (bug 1549394)
2019-11-21 05:37:04 +02:00
Makoto Kato 2fa6c3bce0 Bug 1549394 - Part 2. Set IS_PRIVATE input scope in private browsing. r=masayuki
Microsoft IME on Windows 10 20H1 (build 19025+) supports IME private mode by
input scope. Although previous Windows version uses undocumented API for
Edge and IE only, next Windows will use public API for it.

So let's use IS_PRIVATE input scope in private browsing mode.

Depends on D53917

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

--HG--
extra : moz-landing-system : lando
2019-11-20 05:08:09 +00:00
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Masayuki Nakano 55978ba309 Bug 1504963 - part 2: Make IMEHandler manage whether native caret is created by it r=m_kato
IMEHandler needs to create native caret later (when there is no composition).
Therefore, IMEHandler should manage whether it creates native caret or not
and IMMHandler and TSFTextStore should create/destroy native caret via
IMEHandler.

Note that this patch makes IMMHandler stops managing whether native caret
is created for plugin or not because native caret is created only one instance
and anyway IME handlers should stop managing native caret when they loses
focus.

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

--HG--
extra : moz-landing-system : lando
2018-12-18 08:38:22 +00:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Masayuki Nakano 34ee9cefe7 Bug 1467373 - part 1: Split hack for TS_E_NOLAYOUT part from TSFTextStore::GetTextExt() r=m_kato
The block in TSFTextStore::GetTextExt() which decides whether we should return
S_OK with unmodified character rectangle rather than TS_E_NOLAYOUT is too big.

Additionally, we need to add new condition to check Windows 10's version there.
That makes the large block more complicated.  So, we should split the block
off from TSFTextStore::GetTextExt().  Then, we can use early-return-style to
reduce the deep indentations.

MozReview-Commit-ID: J2BJMB1QD0T

--HG--
extra : rebase_source : 3c86b5ed3a83fda1045a6453250e784f11419b97
2018-08-02 14:36:03 +09:00
Masayuki Nakano bb49027e6b Bug 1475153 - Make TSFTextStore::RecordCompositionStartAction() merge new composition with previous composition if IME commits composition and restart composition to replace the previous commit string r=m_kato
When user removes all composition string of MS Pinyin, MS Wubi, MS ChangJie and
MS Quick with Backspace key, IME commits last character temporarily and
restart composition to replace the last character with empty string when
user tries to remove last one character.

This causes flicking composition string because the additional composition
selects the character and it may be painted immediately before removed, and
also editor will have unnecessary undo transaction.

Therefore, as same as bug 1208043, TSFTextStore::RecordCompositionStartAction()
should restart last composition in such case.  Fortunately, we implemented
similar code for bug 1208043, however, unfortunately, we don't have preceding
pending compositionstart in this case.  Therefore, this patch makes
pending compositionend store start offset of composition.  Then, we can
restart composition only with information stored by pending compositionend
action.  Additionally, this patch renames the method checking pending
actions for self-describing the new meaning.

MozReview-Commit-ID: 1RyuacxEbky

--HG--
extra : rebase_source : 1c8ecc0b63114ae65c77cd76cb85a21d2716442c
2018-07-12 22:40:07 +09:00
Masayuki Nakano 19af69cf33 Bug 1456381 - TSFTextStore should discard pending composition update actions before recording composition end action r=m_kato
TSFTextStore should discard pending composition update actions when it records
end composition update action because end composition update action causes
dispatching eCompositionCommit event and it replaces old composition string
anyway.  So, following eCompositionChange which is dispatched by preceding
composition update actions are just redundant.

MozReview-Commit-ID: HBHx2jA15ro

--HG--
extra : rebase_source : 74d1e91d73bf9c8182a9c5e3fd55d052d8ec4bea
2018-04-19 20:42:00 +09:00
Masayuki Nakano f54903a9ee Bug 1259692 - Make TSFTextStore dispatch eKeyDown or eKeyUp event when TIP processes a WM_KEYDOWN or WM_KEYUP message r=m_kato
TSF doesn't send WM_KEYDOWN nor WM_KEYUP to us while it handles a key message
with ITfKeystrokeMgr::KeyDown() or ITfKeystrokeMgr::KeyUp().  Therefore,
TSFTextStore needs to store handling key event message during calling
those methods and if it does something, we need to dispatch eKeyDown event
or eKeyUp event before dispatching any events.

However, we shouldn't dispatch WidgetKeyboardEvent during a document lock
because TSF/TIP do not assume that document is broken during a document lock.
Therefore, TSFTextStore needs to put it as a pending action into the queue.

So, this patch wraps this with
TSFTextStore::MaybeDispatchKeyboardEventAsProcessedByIME().  It checks if
there is a document lock when it's called.  If it's locked (and not yet
dispatched keyboard event for the handling key message), it adds pending
action to dispatch keyboard event later.  Otherwise, (and not yet dispatched
one), it dispatches keyboard event directly.

MozReview-Commit-ID: 9rJTJykVLyf

--HG--
extra : rebase_source : 4f8297b2b9fe2905e4cd1f64086fcdbe3d0b6035
2018-02-28 21:53:23 +09:00
Masayuki Nakano b00776035f Bug 1435730 - part 2: TSFTextStore::GetTextExt() shouldn't adjust acpStart to start of composition string if ContentCacheInParent perhaps has some character rects in composition string r=m_kato
The renaming problem is, when I try to convert 2nd or later clause of
composition string with Japanist 10, it shows candidate window below the
start of composition string first, then, it moves candidate window to
below the selected clause.  This is caused by our bug of the hack in
TSFTextStore::GetTextExt().

First, we compute wrong minimum modified
offset of mContentForTSF.  It stores last composition string when it's
initialized.  Then, when a part of composition string is modified, it
sets minimum modified offset with the last composition string.  However,
we don't update it when we receive notifications from content which means
all dispatched composition events are handled in content and
ContentCacheInParent stores character rects at least in this time.  So,
this patch adds TSFTextStore::Content::OnCompositionEventsHandled() to
update the last composition string.

Next, TSFTextStore::GetTextExt() always adjusts acpStart to start of
composition string when acpStart is larger than composition start.
However, this causes this remaining problem.  If ContentCacheInParent
stores character rects of even older composition string, we should use
it as far as possible.  This must not be problem in most cases since
most Chinese characters and Japanese Kana characters have same width.

This touches share code of the hack between any TIPs.  However, this must
not be risky because this patch just reduces amount of adjusting acpStart
offset in safe range.

MozReview-Commit-ID: KlDeaGa26UG

--HG--
extra : rebase_source : 6d906f9810b8e067018f7ff3ab2fd31f5bef49f6
2018-02-06 21:59:52 +09:00
Masayuki Nakano c1ed5bb499 Bug 1422230 - part 3: TSFTextStore should store composition string information until both TSF/TIP and our content finish handling composition r=m_kato
If remote process hasn't handled dispatched commit event yet, TSFTextStore
needs to dispatch query content event relative to latest composition string
information.  So, TSFTextStore::mContentForTSF should cache composition start
and composition string length until pending composition events are handled
by content actually.

MozReview-Commit-ID: ARM851nNZGz

--HG--
extra : rebase_source : d4f1ddb197d3168f2db52849b2982779c388e2e8
2018-01-12 15:23:43 +09:00
Masayuki Nakano 0674b4fc1f Bug 1422230 - part 1: TextEventDispatcher should manage if dispatched composition events have been handled by remote content and TSFTextStore refer the state r=m_kato
When composition events are handled by content actually, widget receives
NOTIFY_IME_OF_COMPOSITION_EVENT_HANDLED notification.  If focused content
is in a remote process, this is notified only when all sending composition
events are handled in the remote process.  So, when widget receives the
notification can there is no composition in IME, that means that nobody is
composing composition at that time.

This patch adds TextEventDispatcher::IsHandlingComposition() which returns
false only when nobody has composition and makes TSFTextStore refer this
method because TSFTextStore needs to know if focused content has composition
in any cases.

MozReview-Commit-ID: F1ZZgFJAArD

--HG--
extra : rebase_source : 65e7f592e0ffd1c516e4dab16ab4ca8d7171f954
2018-01-12 11:31:53 +09:00
Masayuki Nakano 6b9a0451ae Bug 1420215 - Make TSFTextStore set input scope of URL bar to IS_DEFAULT when some Microsoft's Trandtional and Simplified Chinese IMEs and some Microsoft's Korean IMEs which change their open state to "closed" when input scope is IS_URL r=m_kato
This patch adds following Microsoft's IMEs into the black list which set
their open state to "closed" when input scope is set to IS_URL and sets
input scope for the URL bar to IS_DEFAULT.

Additionally, this adds a new pref to disable this hack because a lot of
users will affect this hack but perhaps, somebody may not like this if
they use tablet.

The new black listed IMEs:
 - Microsoft Bopomofo
 - Microsoft ChangJie
 - Microsoft Phonetic
 - Microsoft Quick
 - Microsoft New ChangJie
 - Microsoft New Phonetic
 - Microsoft New Quick
 - Microsoft Pinyin
 - Microsoft Pinyin New Experience Input Style
 - Microsoft Wubi
 - Microsoft IME for Korean (except on Win7)
 - Microsoft Old Hangul

MozReview-Commit-ID: BwJKFcu80B8

--HG--
extra : rebase_source : 75aeed04504b476520102984ab6e7875c98b36c8
2017-12-19 13:13:45 +09:00
Sylvestre Ledru d60d69e2cb Bug 1411001 - Remove the +x permissions on cpp & h files r=froydnj
MozReview-Commit-ID: DjDkL20wRg0

--HG--
extra : rebase_source : a343d83d1f4e97e4ba56d0f57fec93079df0b5ea
2017-10-23 20:59:55 +02:00
Tom Ritter 37b20d345d Bug 1409619 Resolve signed/unsigned comparison warning by fixing function definitions to be signed in widget/windows/TSFTextStore r=jimm
The functions changed are given signed arguments (that are converted to unsigned).
Changing them to signed resolves the warnings and preserves the original values.

MozReview-Commit-ID: BxIAECFiuQR

--HG--
extra : rebase_source : c48cef46f3ad5a060ad1f33d1c97744bfa8a82d7
2017-10-17 23:37:31 -05:00
Wes Kocher d8985b6e57 Merge inbound to central, a=merge
MozReview-Commit-ID: IUFdbLdYFhX
2017-10-04 16:37:59 -07:00
Masayuki Nakano 5726ada8a0 Bug 1404206 - Part 2: Make TSFTextStore and IMEHandler handle "mozAwesomebar" inputmode value. r=m_kato, r=gijs
When "mozAwesomebar" is set to inputmode value, that means that the Smart
Location Bar gets focus.  In that case, we should notify IME of input scopes
as "URL" because on-screen keyboard for URL has some useful additional keys
but they are not hindrances even when users want to type non-URL text.

On the other hand, MS-IME for Japanese and Google Japanese Input changes their
open state to "closed" if we notify them of URL input scope.  A lot of users
complain about this behavior.  Therefore, we should notify only them of
"Default" input scope even when "mozAwesomebar" has focus.

MozReview-Commit-ID: DIgqpR7TXQx
2017-09-29 15:15:14 +09:00
Tom Ritter c6c164aef4 Bug 1404147 Make string index and lengths unsigned to resolve signed/unsigned comparison warning r=jimm
MozReview-Commit-ID: Cpo5Gd1puzd

--HG--
extra : rebase_source : 0f47604366d2cfd8356c4d76c6dccdb03a42b0fe
2017-09-28 18:01:58 -05:00
Masayuki Nakano 253c8f2129 Bug 1361132 TSFTextStore::GetSelection() shouldn't return if it runs on Win10 Anniversary Update or later r=m_kato
This is remaining cases of bug 1312302.  TSF may set focus to context when it receives focus related message.  In such case, TSF tries to retrieve selection but TSFTextStore::GetSelection() returns E_FAIL due to still not initialized, TSF crashes.

This patch moves the hack to TSFTextStore::GetSelection() and restrict to work only on problematic versions of Windows 10.

MozReview-Commit-ID: 6cTiZ4HCO18

--HG--
extra : rebase_source : 733377be55d52c43ef90d6e949cb851cf4c6dcb2
2017-06-22 20:07:10 +09:00
Masayuki Nakano 8c4d9cfa43 Bug 1372560 TSFTextStore should cache compartment for keyboard open/close r=m_kato
TSFTextStore::GetIMEOpenState() may be called a lot.  Therefore, TSFTextStore should cache the compartment until shutting down.

MozReview-Commit-ID: 2jz8zQMBHRS

--HG--
extra : rebase_source : b322bcae129c73d7fdd1de080d525dbd6f34e6f8
2017-06-14 15:37:41 +09:00
Masayuki Nakano d4b010860a Bug 1369696 - part 2: TSFTextStore::sMessagePump should be QIed from TSFTextStore::sThreadMgr at first use r=m_kato
sMessagePump is necessary only when WinUtils::(Get|Peek)Message() retrieves a message from the queue.  Therefore, we can put off to initialize it until then.

MozReview-Commit-ID: ByMJk6AIw1r

--HG--
extra : rebase_source : e826fcd6e67b2b1599b31dda44140c1e7218da5a
2017-06-13 19:38:03 +09:00