Commit Graph

62 Commits

Author SHA1 Message Date
Masayuki Nakano
598dee428f Bug 1257446 part.1 ContentCache should store previous character of selection r=m_kato
This patch makes ContentCache store previous character's rect of selection anchor and selection focus because if caret is at end of a line, IME may query the last character of the line.

MozReview-Commit-ID: 5X1K8KtrYfl

--HG--
extra : rebase_source : 403e4c993b48a832d50b4f44738c5b5c6d5ce085
2016-07-22 20:47:51 +09:00
Masayuki Nakano
d5bace6236 Bug 1257446 part.0 ContentCacheInParent::HandleQueryContentEvent() should log the cause of failure when it makes the event's input offset absolute r=m_kato
MozReview-Commit-ID: JVGHPQ5gC3G

--HG--
extra : rebase_source : 77d541f21b78b4270c109f2a4e9db59c19129e03
2016-07-12 17:44:44 +09:00
Masayuki Nakano
ddf5f8fb25 Bug 1291082 ContentCacheInParent::GetUnionTextRects() shouldn't use mTextRectArray when it's empty r=m_kato
This must be able to reproduce with some IMEs which creates 0 length composition string.  In such case, mTextRectArray isn't available, but mTextRectArray.GetUnionRectAsFarAsPossible() always assumes that it's valid and has at least one rect.  Therefore, it can meet this crash.

Therefore, this patch makes that ContentCacheInParent::GetUnionTextRects() not use mTextRectArray when it's not valid nor doesn't have rects.

MozReview-Commit-ID: 2yLMo4lxI3Z

--HG--
extra : rebase_source : 3ef3f2c6ba6473fd3eefbd5c909c1ef6c51c76af
2016-08-02 12:02:14 +09:00
Masayuki Nakano
1373da05f3 Bug 1286489 TSFTextStore.cpp and ContentCache.cpp shouldn't put \n, \r and \t to log file directly r=m_kato
MozReview-Commit-ID: 630lZINQteb

--HG--
extra : rebase_source : 9841cfdb199d1a7964d1ad4516d9862f498b0f39
2016-07-13 18:16:04 +09:00
Masayuki Nakano
3bba9b37d5 Bug 1284422 part.9 Remove "ContentCache(InParent|InChild)?: " from log of ContentCache.cpp since the classes are not in same process under current design r=m_kato
MozReview-Commit-ID: LwDBBwfkZKx

--HG--
extra : rebase_source : 1944e40a55bcc3de83fa4a309b0090ec87b766f9
2016-07-05 18:56:18 +09:00
Makoto Kato
c603b26d13 Bug 1203871 - Part 5. Use mozilla::Move for rect array. r=masayuki
To optimize copy of text rect array, we should use mozilla::Move.  Also, after using it, we should mark is invalid result into SetEventResult

MozReview-Commit-ID: HH9H7DhK12

--HG--
extra : rebase_source : 4e02ece73583306c386597bc92e203fa147cfcbc
extra : histedit_source : 726621cdaf262b9d173ae19d505575f10563cc36
2016-06-14 16:52:31 +01:00
Makoto Kato
8e42cbc802 Bug 1203871 - Part 3. Use eQueryTextRectArray on ContentCache for e10s. r=masayuki
Use new event to update cotent process's cache.

MozReview-Commit-ID: CexTXW4knMQ

--HG--
extra : rebase_source : 525a8b0a1fe6ef533e06f76ac5156e264b158c70
extra : histedit_source : 2a8c46a64eb5c6a7a05adc28917422c488b2b1c4
2016-03-14 16:03:31 +09:00
Masayuki Nakano
e195616e12 Bug 1280182 ContentCache should return non-empty rect as far as possible if query content event is relative to insertion point r=m_kato
ContentCache may store composition string's rects which are inserted by one or more older composition event.  Even in such case, native IME, especially TIP of TSF, expects non-empty rects.

Therefore, if native IME handler uses "insertion point relative query", ContentCache should return non-empty rect as far as possible.  For example, even if query offset or range is not in its rect array of composition string, ContentCache should adjust the offset into the stored range.

MozReview-Commit-ID: 7hcIqxOWFk2

--HG--
extra : rebase_source : 8b1572e01cc56e5596ffba4eac0f7d5818b85a89
2016-06-22 14:16:59 +09:00
Masayuki Nakano
02e3dc2d1b Bug 1275528 part.3 Support selection relative WidgetQueryContentEvent in e10s mode r=m_kato
In e10s mode and during focus is in a remote process, ContentCache handles WidgetQueryContentEvent instead of ContentEventHandler.  Therefore, for supporting selection relative WidgetQueryContentEvent in e10s mode, we need to support it in ContentCache too.

MozReview-Commit-ID: L5d5ilmpetG

--HG--
extra : rebase_source : 46d646677ac0a5803398d18efbfd667bc3bf0c17
2016-06-14 20:54:54 +09:00
Masayuki Nakano
f8210c2a4e Bug 1275918 part.2 Update TextComposition::mCompositionStartOffset when it's modified in the remote process r=m_kato
MozReview-Commit-ID: H1SJTWWav6G

--HG--
extra : rebase_source : 6d7d79e7d4d719b720bed4f4c20196079fb8b5fb
2016-06-14 21:06:34 +09:00
Masayuki Nakano
50a7dd324b Bug 1275918 part.1 ContentCache should retrieve the latest composition start offset from TextComposition and send it to the parent process r=m_kato
MozReview-Commit-ID: EoMZtqoMue3

--HG--
extra : rebase_source : c4a60248e765cddeccd1be3607f80358a99dda34
2016-06-13 18:17:58 +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
07b6f24132 Bug 1259657 Rename WidgetGUIEvent::widget to WidgetGUIEvent::mWidget r=smaug
MozReview-Commit-ID: 167PQWJDEHW

--HG--
extra : rebase_source : 6cd44095b9f33e03190972f043087786cbd772f2
2016-04-14 17:03:14 +09:00
Makoto Kato
b4dbd36b25 Bug 1208944 - Part 8. Don't get selection on start compostion when plugin has foucs. r=masayuki 2015-12-29 22:57:38 +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
d7699eb987 Bug 1208944 - Part 8. Don't get selection on start compostion when plugin has foucs. r=masayuki 2015-12-29 22:57:38 +09:00
Masayuki Nakano
6a05ca7e0d Bug 1179632 part.4 Clean up the code to request IME to commit composition across process boundary r=smaug 2015-12-11 15:15:58 +09:00
Nathan Froyd
01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Masayuki Nakano
ce885416ed Bug 1204439 part.3 Create methods to get enum item name r=smaug 2015-09-17 12:05:44 +09:00
Masayuki Nakano
888b2103ea Bug 895274 part.194 Rename NS_COMPOSITION_COMMIT to eCompositionCommit r=smaug 2015-09-11 21:21:27 +09:00
Masayuki Nakano
ed4dac1ca6 Bug 895274 part.193 Rename NS_COMPOSITION_CHANGE to eCompositionChange r=smaug 2015-09-11 21:21:27 +09:00
Masayuki Nakano
1e538fa11e Bug 895274 part.192 Rename NS_COMPOSITION_UPDATE to eCompositionUpdate r=smaug 2015-09-11 21:21:27 +09:00
Masayuki Nakano
ebdc7bd69b Bug 895274 part.191 Rename NS_COMPOSITION_END to eCompositionEnd r=smaug 2015-09-11 21:21:27 +09:00
Masayuki Nakano
0f2bfad9b1 Bug 895274 part.190 Rename NS_COMPOSITION_START to eCompositionStart r=smaug 2015-09-11 21:21:27 +09:00
Masayuki Nakano
966f685af3 Bug 895274 part.188 Rename NS_COMPOSITION_COMMIT_AS_IS to eCompositionCommitAsIs r=smaug 2015-09-11 21:21:26 +09:00
Masayuki Nakano
1d6a202900 Bug 895274 part.187 Rename NS_QUERY_TEXT_RECT to eQueryTextRect r=smaug 2015-09-11 21:21:26 +09:00
Masayuki Nakano
bb413ca230 Bug 895274 part.155 Rename NS_QUERY_EDITOR_RECT to eQueryEditorRect r=smaug 2015-09-10 10:40:06 +09:00
Masayuki Nakano
4a34ce078a Bug 895274 part.154 Rename NS_QUERY_CARET_RECT to eQueryCaretRect r=smaug 2015-09-10 10:40:06 +09:00
Masayuki Nakano
e463292274 Bug 895274 part.153 Rename NS_QUERY_TEXT_CONTENT to eQueryTextContent r=smaug 2015-09-10 10:40:05 +09:00
Masayuki Nakano
a8fd5ffc76 Bug 895274 part.152 Rename NS_QUERY_SELECTED_TEXT to eQuerySelectedText r=smaug 2015-09-10 10:40:05 +09:00
Masayuki Nakano
d177b04a17 Bug 895274 part.145 Rename NS_SELECTION_SET to eSetSelection r=smaug 2015-09-08 23:33:38 +09:00
Masayuki Nakano
0d22745cda Bug 895274 part.3 Make the enum of event messages a named enum IGNORE IDL r=smaug 2015-08-26 21:56:59 +09:00
Masayuki Nakano
66f2c27305 Bug 895274 part.1 Rename WidgetEvent::message to WidgetEvent::mMessage r=smaug 2015-08-22 10:34:51 +09:00
Bobby Holley
97b9240b34 Bug 1188696 - Hoist nsRefPtr.h into MFBT. r=froydnj 2015-07-29 10:44:59 -07:00
Masayuki Nakano
9906797f75 Bug 1185316 TabParent should flush pending IME notifications after child process handles all sending events r=smaug 2015-07-22 14:51:36 +09:00
Masayuki Nakano
a2baa83320 Bug 1184986 NOTIFY_IME_OF_POSITION_CHANGE should be put off until all sending events are recieved by child process r=smaug 2015-07-22 14:15:06 +09:00
Masayuki Nakano
0265f6a476 Bug 1184004 part.3 IPC methods to notify IME should use IMENotification for its argument r=smaug 2015-07-17 13:30:01 +09:00
Masayuki Nakano
500bdf163d Bug 1176954 part.8 ContentCacheInParent::OnEventNeedingAckReceived() should log the event message r=smaug 2015-07-11 10:53:56 +09:00
Masayuki Nakano
69720d0ea0 Bug 1176954 part.3 Don't send selection change, text change nor composition update notification to IME from TabParent until all events sent to the child process is received by it r=smaug 2015-07-11 10:53:55 +09:00
Masayuki Nakano
d35ea2b72d Bug 1176954 part.2 ContentCache in parent process should manage how many events are sent but not yet received r=smaug 2015-07-11 10:53:55 +09:00
Makoto Kato
e7d7a10538 Bug 1179695 - Remove mWasAsync from WidgetQueryContentEvent. r=masayuki,nchen 2015-07-09 15:09:56 +09:00
Masayuki Nakano
8750e33449 Bug 1177388 Create ContentCacheInParent and ContentCacheInChild for making their purpose clearer r=m_kato 2015-06-26 08:21:13 +09:00
Masayuki Nakano
729d547dd5 Bug 1173678 ContentCache should return union rect even if some character rects are not cached but the first character of the range is cached r=m_kato 2015-06-17 10:03:58 +09:00
Masayuki Nakano
5ff01538e0 Bug 1171814 ContentCache should store first character rect because Yosemite's Japanese IME sometimes tries to query it r=m_kato 2015-06-17 10:03:58 +09:00
Masayuki Nakano
952a6f274e Bug 1171810 ContentCache should store union text rect of whole selected text r=m_kato 2015-06-08 11:46:17 +09:00
Masayuki Nakano
e91d94ba0d Bug 1166436 part.19 ContentCache::mSelection should have invalid state and it should be checked r=m_kato 2015-06-05 18:28:21 +09:00
Masayuki Nakano
fefa36dd36 Bug 1166436 part.18 ContentCache should guess caret rect if there is a text rect cache of the previous character r=m_kato 2015-06-05 18:28:21 +09:00
Masayuki Nakano
649a872a61 Bug 1166436 part.17 ContentCache::HandleQueryContentEvent() should return caret rect if mInput.mLength of NS_QUERY_TEXT_RECT event is 0 r=m_kato 2015-06-05 18:28:21 +09:00
Masayuki Nakano
1bd6e63d5b Bug 1166436 part.16 Make each member of mozilla::ContentCache used by chrome process or content process r=m_kato 2015-06-05 18:28:21 +09:00
Masayuki Nakano
6f27274bd3 Bug 1166436 part.15 ContentCache::CacheTextRects() should refer TextComposition::LastData() because TextComposition::String() may not be modified yet when it's called r=m_kato 2015-06-05 18:28:20 +09:00