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

71 Коммитов

Автор SHA1 Сообщение Дата
Srujana Peddinti b44e48bff4 Bug 1259660 - Moved mozilla::WidgetMosueEventBase::buttonType in MouseEvents.h to mozilla::MouseButton in EventForwards.h, and mozilla::WidgetMouseEventBase::buttonsFlag to mozilla::MouseButtonsFlag r=masayuki
Moved mozilla::WidgetMosueEventBase::buttonType in MouseEvents.h to mozilla::MouseButton in EventForwards.h, and mozilla::WidgetMouseEventBase::buttonsFlag to mozilla::MouseButtonsFlag so that any referer in header files do not need to include MouseEvents.h only for referring them. Instead, they just need to include EventForwards.h. Now when MouseEvents.h is changed, the rebuild speed becomes faster.

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

--HG--
extra : moz-landing-system : lando
2019-04-21 20:13:34 +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
Masayuki Nakano fd2f9270a7 Bug 1504963 - part 1: Make IME modules not touch native caret if a11y module handles native caret r=Jamie,m_kato
If a11y module is active, it observers caret position and size, and when caret
position or size is changed, it creates/moves native caret to overlap with
our caret.

On the other hand, IME module also creates native caret if active IME requires
it.  Therefore, both of them conflicts each other.

This patch makes IME module stop touching native caret if a11y module is active.

Although, a11y module with Flush Player does not work well for IME.  Therefore,
this patch keeps the conflict between them as-is for now.

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

--HG--
extra : moz-landing-system : lando
2018-12-18 10:40:50 +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
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
Milan Sreckovic bd27b86da3 Bug 1423559: Use BaseRect access methods instead of member variables in widget/ r=mstange
MozReview-Commit-ID: AqnztoUbsmk

--HG--
extra : rebase_source : 76a232a08b42ed73b4922c03bc0f2e9d1769203b
2018-01-10 11:14:16 -05:00
Masayuki Nakano e78b3f56ea Bug 1409155 - IMEHandler should not associate IMC with any window if active IME is ATOK 2010 or earlier with x64 build on Win8 or later r=m_kato
ATOK started to be TIP of TSF since 2011.  Older than it, i.e., ATOK 2010 and
earlier have a lot of problems even for daily use.  Perhaps, the reason is
Win 8 has a lot of changes around IMM-IME support and TSF, and ATOK 2010 is
released earlier than Win 8.

ATOK 2006 crashes while converting a word with candidate window.
ATOK 2007 doesn't paint and resize suggest window and candidate window
correctly (showing white window or too big window).
ATOK 2008 and ATOK 2009 crash when user just opens their open state.
ATOK 2010 isn't installable newly on Win 7 or later, but we have a lot of
crash reports.

Note that ATOK 2006 is the first version supporting Win XP x64.  So, ATOK 2005
must not support x64 apps.

Unfortunately, we cannot block loading DLLs of them.  Therefore, IMEHandler
should disassociate IMC from active window when user changes active keyboard
layout to the legacy ATOK and not associate IME with any window when
SetInputContext() is called even with "enabled".  Additionally, when user
changes active keyboard layout from the legacy ATOK to one of the other
keyboard layouts, IMEHandler should associate IMC with current window for
new active IME.

MozReview-Commit-ID: RVYwmYxzO7

--HG--
extra : rebase_source : c237a3aca6ceb6a1f7251bd9421e4b905be5bc6c
2017-10-25 23:51:27 +09:00
Chris Peterson 9f4c1f5278 Bug 870698 - Part 1: Replace Assign("") with AssignLiteral(""). r=erahm
MozReview-Commit-ID: A0u9PP49OW3

--HG--
extra : rebase_source : 7d5286959f510eb4b7df1b7e32d5b9b58719c48b
extra : intermediate-source : f552b4a78236c42bc09030b3eb008725a3edb9c8
extra : source : 26ac4a1014f6661a70e3bf9f552407e12c2c3981
2017-09-03 22:12:56 -07:00
Eric Rahm 0617c21c24 Bug 1393230 - Part 2: Fix more improper string usages. r=njn
This fixes improper usages of Find where an offset was actually being use for
the boolean ignore case flag. It also fixes a few instances of passing in a
literal wchar_t to our functions where a NS_LITERAL_STRING or char16_t should
be used instead.

--HG--
extra : rebase_source : 5de1e9335895d65e6db06c510e8887d27be3390f
extra : source : f762f605dd83fc6331161a33e1ef5d54cafbd08d
2017-08-31 15:52:30 -07:00
Nicholas Nethercote d4f9aa5530 Bug 1384835 (part 2, attempt 2) - Remove the Preferences::Get*String() variants that return nsAdoptingString. r=froydnj.
--HG--
extra : rebase_source : 6c24fbacb03d4adebe5f22b5e7fc60b069913f20
2017-07-31 14:23:50 +10:00
Nicholas Nethercote fe9268c4cd Bug 1374580 (part 2) - Remove nsAFlat{,C}String typedefs. r=froydnj.
All the instances are converted as follows.

- nsAFlatString  --> nsString
- nsAFlatCString --> nsCString

--HG--
extra : rebase_source : b37350642c58a85a08363df2e7c610873faa6e41
2017-06-20 19:19:05 +10:00
Eric Rahm ab9516d40d Bug 1353593 - Part 2: Remove wwc functions. r=froydnj
This removes the use of |wwc| functions in favor of char16ptr_t's implicit
conversion operators.

MozReview-Commit-ID: GHONYieMPla
2017-06-12 16:20:49 -07:00
Masayuki Nakano f6dd08693e Bug 1367692 - Make IMEHandler not restore default IMC unless legacy IMM-IME is active. r=m_kato
TIPs (and normal keyboard layouts) don't need IMC on focused window.  So, in most environment, it's not necessary to restore default IMC of focused window.

Therefore, this patch makes IMEHandler not restore default IMC unless legacy IMM-IME is active and disassociate IMC from focused window when IMM-IME isn't active.

However, this is risky change.  Therefore, the new behavior is disabled in default settings.  On the other hand, we need the new behavior only when MS-IME for Japanese is active on Win10.  Therefore, this patch adds a pref to enable/disable the hack and make it true in the default settings.

MozReview-Commit-ID: KAVxVT9CrsW
2017-06-07 11:42:27 +09:00
Masayuki Nakano 61ce5526c6 Bug 1296220 Rename nsIMEUpdatePreference to mozilla::widget::IMEUpdatePreference r=m_kato
MozReview-Commit-ID: 2rIXTlwA6my

--HG--
extra : rebase_source : a51be3edd717092738c2b5e8ccc4f60540712bfd
2017-04-11 21:24:55 +09:00
Ting-Yu Chou 9e66f3af06 Bug 1322465 part 14 - Use explicit/MOZ_IMPLICIT for the unary constructors in widget/. r=Ehsan
MozReview-Commit-ID: JOrzksTzwVT

--HG--
extra : rebase_source : a7e92ef309025f6243fc8dba5cf30dfda591b181
2016-12-16 16:00:43 +08:00
Makoto Kato 4dd22032fa Bug 1300140 - Return error when IME attribute array doesn't have valid. r=masayuki
MozReview-Commit-ID: 2paKhQNSR11

--HG--
extra : rebase_source : 407622cc47defcb34cbbe87734d95a96ce66cf14
2016-09-14 11:09:00 +09:00
Makoto Kato fe2967b415 Bug 1300143 - Set length before accessing array even if array capacity has enougth size. r=masayuki
MozReview-Commit-ID: F5IoXBOnouc

--HG--
extra : rebase_source : f6dde2d1efad1d26c2c6c22e54142cf21105db8c
2016-09-14 11:07:19 +09:00
Ryan VanderMeulen 01c4e8cc1b Merge inbound to m-c. a=merge 2016-08-19 09:52:53 -04:00
Nicholas Nethercote 67af4817e9 Bug 1293596 (part 2) - Rework nsIWidget bounds getters. r=mstange.
This patch makes GetBounds(), GetScreenBounds() and GetClientBounds() more
obviously infallible, like existing functions such as GetNaturalBounds() and
GetClientSize(). This results in clearer behaviour in nsCocoaWindow.mm if
Objective C exceptions occur. Along the way, the patch removes some useless
failure checks for these functions.

The patch also removes the NS_IMETHOD from GetRestoredBounds and makes that
function MOZ_MUST_USE.
2016-08-19 09:03:04 +10:00
Masayuki Nakano 19cd3248f2 Bug 1273510 part.2 Modify comment in IMMHandler::SetCandidateWindow() r=m_kato
MozReview-Commit-ID: KX1frgDFsPi

--HG--
extra : rebase_source : e8478a5d61b68e01b2b7bce34705273d8a891e11
2016-08-09 17:46:44 +09:00
Masayuki Nakano bcaaf6d927 Bug 1284422 part.3 Remove "IMM: " from log of IMMHandler.cpp r=m_kato
MozReview-Commit-ID: IfPneGddBfR

--HG--
extra : rebase_source : 9fb203ef7666f77894d49b77c946379e88fc43e8
2016-07-05 18:35:43 +09:00
Masayuki Nakano e1d8dafcd9 Bug 1282668 Get rid of nsIMEUpdatePreference::NOTIFY_SELECTION_CHANGE r=m_kato
Currently, all widgets request selection change notifications to IMEContentObserver.  Additionally, IMEContentObserver needs to listen selection changes for caching latest selection for eQuerySelectedText.  Therefore, it doesn't make sense to keep defining nsIMEUpdatePreference::NOTIFY_SELECTION_CHANGE.

If widgets didn't need selection change notifications, they could just ignore the unnecessary notifications.

Note that all widgets don't need selection change notifications if a plugin has focus and IMEContentObserver cannot observe selection changes in the plugin.  Therefore, if IMEContentObserver is initialized with a plugin, it shouldn't listen selection changes (and doesn't need to notify widgets of selection changes).

MozReview-Commit-ID: FOVFFgA2nOz

--HG--
extra : rebase_source : 3e16d5023835f99f82934e754d2e7db70474f9ee
2016-06-28 15:23:12 +09:00
Masayuki Nakano b04303d171 Bug 1275528 part.4 IMMHandler should use insertion point relative query for getting character rect and caret rect r=m_kato
IMM always queries character rect or caret rect relative to insertion point.  Therefore, it makes sense to use the new feature, insertion point relative query content events for them.  Then, IMMHandler doesn't need to care mismatch between its cache and actual content information.

MozReview-Commit-ID: LCCrJkR77I8

--HG--
extra : rebase_source : c75f1b29e34e13df397de351909f07e2a95b6c5f
2016-06-15 13:52:03 +09:00
Masayuki Nakano 258c1f97d6 Bug 1277756 part.7 Rename TextRangeType::NS_TEXTRANGE_SELECTEDCONVERTEDTEXT to TextRangeType::eSelectedClause r=smaug
MozReview-Commit-ID: GyRYWzfeWrm

--HG--
extra : rebase_source : 8bebacaf675ec4a3cf91cfd434d07beeb7fb1567
2016-06-03 19:15:21 +09:00
Masayuki Nakano 3fa2003d17 Bug 1277756 part.6 Rename TextRangeType::NS_TEXTRANGE_CONVERTEDTEXT to TextRangeType::eConvertedClause r=smaug
MozReview-Commit-ID: 3mexBm278As

--HG--
extra : rebase_source : ef363b0ac50396631e9b145b7e869330509fe259
2016-06-03 19:05:32 +09:00
Masayuki Nakano 98f069e029 Bug 1277756 part.5 Rename TextRangeType::NS_TEXTRANGE_SELECTEDRAWTEXT to TextRangeType::eSelectedRawClause r=smaug
MozReview-Commit-ID: MbG4siLb4Q

--HG--
extra : rebase_source : 23c20c55c3936dc6af5f57414ef7630003480275
2016-06-03 18:57:21 +09:00
Masayuki Nakano f4254e7f7f Bug 1277756 part.4 Rename TextRangeType::NS_TEXTRANGE_RAWINPUT to TextRangeType::eRawClause r=smaug
MozReview-Commit-ID: KLC1VPiYTdz

--HG--
extra : rebase_source : 3f750e526bb04b26ed66d2c0fada14e7d5b43d73
2016-06-03 18:48:37 +09:00
Masayuki Nakano 6b5425853a Bug 1277756 part.3 Rename TextRangeType::NS_TEXTRANGE_CARETPOSITION to TextRangeType::eCaret r=smaug
MozReview-Commit-ID: CaqmOSxYYU7

--HG--
extra : rebase_source : 5820d491b97be7899150516d05f1426e74dab5b5
2016-06-03 18:40:06 +09:00
Masayuki Nakano 4fc95828b6 Bug 1277756 part.1 Make anonymous enum for NS_TEXTRANGE_* to an enum class named "TextRangeType" r=smaug
For making our code clearer by the stronger type check, we should change the anonymous enum for NS_TEXTRANGE_* to enum class whose name is "TextRangeType" and whose type is "RawTextRangeType" which is an alias of uint8_t.

Additionally, this also adds some utility methods for them.

Note that some lines which are changed by this patch become over 80 characters but it will be fixed by the following patches.

MozReview-Commit-ID: 76izA1WqTkp

--HG--
extra : rebase_source : 27cd8cc8f7f8e82055dbfe82aba94c02beda5fa4
2016-06-04 09:49:21 +09:00
Masayuki Nakano e67330e0b4 Bug 1275906 part.1 Rename NOTIFY_IME_OF_COMPOSITION_UPDATE to NOTIFY_IME_OF_COMPOSITION_EVENT_HANDLED r=m_kato
It's not clear to me what NOTIFY_IME_OF_COMPOSITION_UPDATE means only from the name. For making the name clearer, this patch renames it to NOTIFY_IME_OF_COMPOSITION_EVENT_HANDLED and add some explanation to the definition.

MozReview-Commit-ID: 8ySYCNJ1Ytz

--HG--
extra : rebase_source : 3331b8f48e8b460c7f9b088064dcda9488f3403c
2016-05-31 11:39:15 +09:00
Masayuki Nakano 93330474c8 Bug 1267526 part.0 IMMHandler and TSFTextStore should use LazyLogModule instead of PR_NewLogModule for consistency with related logs in dom/events r=m_kato
MozReview-Commit-ID: IDmV291bKsz

--HG--
extra : rebase_source : 7065c5f25e5c25b4e1c832356e1dc3eee7a144bf
2016-05-11 18:01:34 +09:00
Makoto Kato 79b5a1a459 Bug 1137561 - Follow up VS2015 build error. r=masayuki
MozReview-Commit-ID: 52ccdKvzVbK
2016-03-17 13:56:15 +09:00
Masayuki Nakano 4de2cb08cc Bug 1137561 part.3 Make IMMHandler use TextEventDispatcher r=m_kato 2016-03-16 13:47:48 +09:00
Makoto Kato f506ded619 Bug 1243268 - Adjust ATOK workaround. r=masayuki 2016-02-02 17:06:14 +09:00
Masayuki Nakano a8ff928f0d Bug 1238899 Create hidden native caret for ATOK at composing in windowless plugin r=m_kato 2016-01-13 12:44:39 +09:00
Makoto Kato d2c2d37a8b Bug 1208944 - Part 10-b. Call DefaultProc When CompositionEvent isn't handled correctly by plugin. r=masayuki 2015-12-29 22:57:38 +09:00
Makoto Kato 000416b7b5 Bug 1208944 - Part 9. Hook IMM32 APIs on plugin process. r=masayuki 2015-12-29 22:57:38 +09:00
Makoto Kato 0ceadd73a8 Bug 1208944 - Part 7. Don't post WM_IME_REQUEST on windowless plugin since we don't convert pointer over process. r=masayuki 2015-12-29 22:57:38 +09:00
Makoto Kato 2c9e1b8011 Bug 1208944 - Part 1. Dispatch CompositionEvent to Plugin. r=masayuki 2015-12-29 22:57:37 +09:00
Sebastian Hengst e082884d78 Backed out 15 changesets (bug 1208944) for failing tests M(2,5) on OSX. r=backout
Backed out changeset c29de223de2f (bug 1208944)
Backed out changeset 3d99da255be1 (bug 1209844)
Backed out changeset 3c915942af38 (bug 1209844)
Backed out changeset 759b425b5503 (bug 1208944)
Backed out changeset bf73cf8f0fda (bug 1208944)
Backed out changeset 0e337d912b7d (bug 1208944)
Backed out changeset 31c47f2980b5 (bug 1208944)
Backed out changeset 3e0d70a6e809 (bug 1208944)
Backed out changeset 7685dcb63e5f (bug 1208944)
Backed out changeset 3c2b9372dd36 (bug 1208944)
Backed out changeset 18160d306493 (bug 1208944)
Backed out changeset 4974e397b655 (bug 1208944)
Backed out changeset fde7e439844d (bug 1208944)
Backed out changeset 4213a355fbdc (bug 1208944)
Backed out changeset 33cfddbbf5f2 (bug 1208944)
2015-12-29 17:42:02 +01:00
Makoto Kato da206c5192 Bug 1208944 - Part 10-b. Call DefaultProc When CompositionEvent isn't handled correctly by plugin. r=masayuki 2015-12-29 22:57:38 +09:00
Makoto Kato 836a9aee5c Bug 1208944 - Part 9. Hook IMM32 APIs on plugin process. r=masayuki 2015-12-29 22:57:38 +09:00
Makoto Kato 288292e066 Bug 1208944 - Part 7. Don't post WM_IME_REQUEST on windowless plugin since we don't convert pointer over process. r=masayuki 2015-12-29 22:57:38 +09:00
Makoto Kato 5242cc42e7 Bug 1208944 - Part 1. Dispatch CompositionEvent to Plugin. r=masayuki 2015-12-29 22:57:37 +09:00
Masayuki Nakano 9bc88b0acb Bug 1234120 part.3 IMMHandler should forget caret position specified by IME when IMMHandler doesn't set caret range to eCompositionChange event r=m_kato 2015-12-22 14:58:48 +09:00
Masayuki Nakano 6cad726628 Bug 1179632 part.1 native IME context should not be stored in InputContext but should be able to retrieve with nsIWidget::GetNativeData() r=smaug 2015-12-11 15:15:57 +09:00
Masayuki Nakano 17e8d0a0e1 Bug 1224454 part.2 IMMHandler::OnFocusChange() should cancel remaining composition when given nsWindow is being destroyed r=m_kato 2015-11-17 16:47:06 +09:00
Nicholas Nethercote a63371ae36 Bug 1224403 (part 7) - Use LayoutDeviceIntMargin more in IMMHandler. r=kats.
--HG--
extra : rebase_source : bd16246a0f6d79f9a5c40813dd5d9a1085b06c6a
2015-11-12 05:22:44 -08:00
Nicholas Nethercote 3ce44673ed Bug 1224403 (part 6) - Remove one WidgetToScreenOffsetUntyped() call. r=kats.
--HG--
extra : rebase_source : fe8441c71cf642684c5b2edee1e7175630917760
2015-11-12 05:08:31 -08:00