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

104 Коммитов

Автор SHA1 Сообщение Дата
Masayuki Nakano a50a0700d4 Bug 1530649 - Improve composition string handling which ends with whitespaces r=m_kato
If insertion string ends with ASCII whitespace and there is no following
content in the block, `HTMLEditRules::AdjustWhitespaces()` needs to insert
`<br>` element.  It's called only by `HTMLEditRules::AfterEditInner()` and
that does only simple things with `WSRunObject`.  Therefore, this moves the
code into `AfterEditInner()`.

For making it adjust the whitespaces, `HTMLEditRules::WillInsertText()` needs
to notify `AfterEditInner()` of dirty range with `mDocChangeRange`.  Therefore,
this patch makes it set `mDocChangeRange` manually after inserting composition
string.

On the other hand, there is another bug.  `WSRunObject` was designed to treat
only inserting text for `WSRunObject::InsertText()`.  I.e., not designed to
treat replacing existing composition string with new string.  Therefore,
`WSRunObject::InsertText()` adjusts whitespaces only around start of
composition string.  Therefore, if composition string ends with an ASCII
whitespace, it's not replaced with NBSP and that causes:
- failing `WSRunObject::AdjustWhitespaces()` inserts `<br>` element at
  `AfterEditInner()` of committing composition.
- then, next composition's first `WSRunObject::InsertText()` removes the
  last whitespace due to not followed by `<br>` nor any other content.
Therefore, this patch makes `WSRunObject` takes 2 DOM points to be able to
treat replaced range.

In strictly speaking, the latter change require more changes and tests for
supporting replacement with any other methods.  However, it's risky and out
of scope of this bug.

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

--HG--
extra : moz-landing-system : lando
2019-04-09 05:28:38 +00:00
Masayuki Nakano 9165a150a1 Bug 1540930 - Make nsPresContext use mozilla::PresShell directly rather than via nsIPresShell r=emilio
`nsPresContext` should use `mozilla::PresShell` directly instead of
`nsIPresShell`.  This patch makes it.

Unfortunately, `nsPresContext` and `nsIFrame` have `PresShell()`.  Therefore,
we cannot use `PresShell*` in its methods so that this patch uses `mozilla::`
namespace prefix.

It might be better to rename them as `PresShellPtr()` in another bug.

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

--HG--
extra : moz-landing-system : lando
2019-04-03 12:40:26 +00:00
Mark Banner 92ff75156f Bug 1531693 - Relax the assertion for another editor handling the composition to take account of cycle collection. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D24529

--HG--
extra : moz-landing-system : lando
2019-03-26 18:01:01 +00:00
Oana Pop Rus 3bd8930fc3 Backed out 2 changesets (bug 1531693) for bc failures browser_privatebrowsing_about.js on a CLOSED TREE
Backed out changeset 4d2429507163 (bug 1531693)
Backed out changeset bf5460df1909 (bug 1531693)
2019-03-25 12:16:46 +02:00
Mark Banner a07272112f Bug 1531693 - Relax the assertion for another editor handling the composition to take account of cycle collection. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D24529

--HG--
extra : moz-landing-system : lando
2019-03-23 11:54:24 +00:00
Henri Sivonen 976ad7e3a6 Bug 1524242 - Capture TabParent of out-of-process iframe when creating TextComposition. r=masayuki
Depends on D23641

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

--HG--
extra : moz-landing-system : lando
2019-03-19 13:37:20 +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
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 7bd2c26c2c Bug 1288640 - Make TextComposition not dispatch eCompositionChange events (DOM "text" event) in the default group of web content r=smaug
The usage of our specific "text" event is enough low (0.0003%).  So, let's
stop dispatching the event in the default group of web content.  Once we
release this new behavior, we can get rid of dispatching the event even in
chrome.  Then, we can optimize the event order for new specs.

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

--HG--
extra : moz-landing-system : lando
2018-11-27 13:26:51 +00:00
Masayuki Nakano b98777fe41 Bug 1462257 - TextComposition should dispatch eCompositionChange event when eCompositionCommit is being fired immediately after eCompositionStart r=m_kato
TextEditor modifies composition string or selected string when first
eCompositionChange event is received.  However, TextComposition dispatches
eCompositionChange event ("text" event of DOM) only when composition string
becomes non-empty if current composition string is empty.  So, when IME
dispatches only eCompositionStart and eCompositionCommit events for removing
selected text, TextEditor does nothing.  This hacky behavior is used by
MS Pinyin on Windows 10 at least.

For supporting this behavior, we need to make TextComposition dispatch
eCompositionChange event when eCompositionChange(AsIs) event is fired
even before dispatching eCompositionChange event.

Although from point of view of web apps, the hacky composition should be
merged into the previous composition if it's possible but it's out of scope
of this bug.

MozReview-Commit-ID: 7QfeBJamGTU

--HG--
extra : rebase_source : 8de1353021f2961ae9f8bdf17ddded1058175339
2018-07-11 23:05:39 +09:00
Masayuki Nakano 6e8192fd45 Bug 1425390 - part 1: Move some IME related members of EditorBase into TextComposition r=m_kato
EditorBase stores a text node, offset in it and length in it of composition
string directly.  However, this wastes memory space if user never uses IME
or user only sometimes uses IME.  Additionally, storing all data in
TextComposition is better than current design when other classes like
CompositionTransaction wants some information of both EditorBase and
TextComposition.

This patch moves those 3 members from EditorBase to TextComposition.

MozReview-Commit-ID: 4N7wmGGfxmt

--HG--
extra : rebase_source : bd7cb37fe9631b959ec21da40c20751fec269dca
2017-12-15 13:14:51 +09:00
Masayuki Nakano c4f2acf2f3 Bug 1405832 - part 2: TextComposition::RequestToCommit() should request IME to commit or cancel composition only when it hasn't been request it yet and hasn't received commit event yet r=m_kato
According to the log in crash reports, eCompositionCommitRequestHandled is
sent to ContentCacheInParent twice or more for a composition.  This causes
breaking mPendingCompositionCount and mPendingEventsNeedingAck management.

Currently, nsIWidget::NotifyIME() should be called only by
TextComposition::RequestToCommit().  Therefore, the method should manage if
it should request it actually.  If the composition has already received
eCompositionCommit(AsIs) event, it shouldn't request it because parent process
may have already stated new composition and it shouldn't be broken by request
for old composition.

MozReview-Commit-ID: 2ekSa6EIeRP

--HG--
extra : rebase_source : d23aa29ce7871e83b99cec8c15aff0c580e08fb4
2017-11-20 22:59:04 +09:00
Masayuki Nakano 4f4a93e19c Bug 1384584 - TextComposition::DispatchCompositionEvent() shouldn't send composition events to focused TabParent after its RequestIMEToCommitComposition() synthesizes eCompositionCommit(AsIs) event synchronously r=m_kato
When TextComposition::RequestIMEToCommitComposition() is called but the request is handled by native IME asynchronously, TextComposition synthesizes eCompositionCommit(AsIs) event to commit composition synchronously. (This behavior helps web apps which tries to commit composition from JS.) Then, TextComposition::DispatchCompositionEvent() should ignore following composition events which are actually sent from native IME.

However, if composition is in a remote process, TextComposition::DispatchCompositionEvent() in the main process doesn't discard the following events coming from native IME.  Therefore, ContentCacheInParent is confused by this unexpected events.  So, TextComposition::DispatchCompositionEvent() shouldn't send the following unnecessary composition events to TabParent.

Note that in remote process, composition is committed synchronously with the hack mentioned above and synthesized eCompositionCommit(AsIs) event of TextComposition::RequestIMEToCommitComposition() in the parent process looks like coming from native IME.  Therefore, following composition events coming from native IME are not necessary for the remote process.

MozReview-Commit-ID: 2uKFxcAq88J

--HG--
extra : rebase_source : f4fc3f19c86b03813479e6751cc19424f361d537
2017-07-26 23:23:38 +09:00
Masayuki Nakano d6e921676c Bug 1377672 - part3: IMEStateManager::NotifyIME() should ignore notifications and requests which comes from unexpected process r=m_kato,smaug
IME should receive notifications and requests only from proper process.  E.g., IME shouldn't commit composition by a request which came from previous focused process.

This patch makes that IMEStateManager::NotifyIME() takes pointer to TabParent optionally.  If the request or notification came from remote process, it should be non-nullptr.  Then, this makes it ignore notifications and requests from unexpected process.

Note that this patch also touches some gfx headers because they use |ipc::| but compiler is confused at the ambiguousness between |mozilla::ipc::| and |mozilla::dom::ipc::|.

Finally, this patch changes the NS_ASSERTION in IMEHandler::OnDestroyWindow() to MOZ_ASSERT because the orange caused by the NS_ASSERTION was not realized since there was already an intermittent orange bug caused by different NS_ASSERTION.

MozReview-Commit-ID: 9CgKXQRJWmN

--HG--
extra : source : f3b5711908870c5e0e852a399a07e0ae721a12f1
2017-07-06 00:47:40 +09:00
Masayuki Nakano a6f874fcf1 Bug 1376424 - part0: Backout the patch for bug 1368554 r=m_kato
TextComposition in the main process is destroyed when the main process sends eCompositionCommit(AsIs) to focused remote process.  Therefore, ContentCacheInParent::mCompositionPendingCount is never 2 or more now.

It may cause ContentCacheInParent::Assign() setting older composition's start offset to current composition's start offset in the main process.

For making uplift the following patch easier, the wrong patch should be backed out first.

MozReview-Commit-ID: IHWc7qZBQtc

--HG--
extra : rebase_source : d3936fa82ed670217b711d15bbb0201a8741501b
2017-06-27 22:02:07 +09:00
Bill McCloskey f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Masayuki Nakano 583dafd5d4 Bug 1374207 - part2: TextComposition, IMEContentObserver and IMEStateManager should use EditorBase instead of nsIEditor r=m_kato
MozReview-Commit-ID: IdHmseTiv2t

--HG--
extra : rebase_source : b2f9f42dee97e1ba2cc081014d1696506088d375
2017-06-20 19:23:44 +09:00
Masayuki Nakano ec9ae17b0c Bug 1368554 ContentCacheInParent::mPendingCompositionCount should be decreased when TextCompositin which has dispatched composition events to corresponding remote process r=m_kato
ContentCacheInParent::mPendingCompositionCount is now managed with composition events which TabParent received. However, TextComposition doesn't dispatch composition events after coming request to commit active composition.  Therefore, composition is committed forcibly in a remote process over 255 times, the main process crashes.

It's the safest way to use TextComposition to manage ContentCacheInParent::mPendingCompositionCount.

MozReview-Commit-ID: DEhzYcK1zcW

--HG--
extra : rebase_source : a47891b1d620bbe4e380e73134ec6da5d21f4ea9
2017-06-10 02:42:16 +09:00
Masayuki Nakano c038f800f7 Bug 1339331 TextEventDispatcher should replace \r in composition string with \n and TextComposition should allow to input \n with composition events r=m_kato
According to ATOK's behavior, IME may send different line breaker from its platform's standard.  Therefore, we should treat \r as \n too.

Additionally, currently, TextComposition doesn't allow to input \n with composition.  However, this was added for preventing to see odd control characters as boxes with code point.  Therefore, we should allow \n for IMEs. (It was allowed, this limitation is unexpected when I reviewed the patch to reject control characters in TextComposition.)

MozReview-Commit-ID: DzGSMgp89Av

--HG--
extra : rebase_source : 0644e5941a080583af8701546111fbf46ec646ec
2017-03-16 16:26:43 +09:00
Masayuki Nakano 3b6cadf939 Bug 1305355 part.1 TextComposition::GetSelectionStartOffset() should query normal selection range when composition string is empty r=smaug
TextComposition::GetSelectionStartOffset() tries to query the start offset of the composition if there is a composition. Therefore, it tries to query first clause when it has some clause information of the composition string.  However, even if the composition string is empty, TextComposition::mRanges which refers CompositionEvent::mRanges of the last eCompositionChange event may have empty clause information.  In such case, this method tries to query not existing IME selection range.  Then, this returns UINT32_MAX and ContentCacheInChild will query character rects around the offset and ContentEventHandler::SetRangeFromFlatTextOffset() will meet odd case.

For avoiding this issue, TextComposition::GetSelectionStartOffset() should query normal selection when composition string in the editor is empty.  Note that TextComposition::mString will be updated after the editor completes updating its DOM contents.  Therefore, TextComposition should refer mLastData which is set before dispatching eCompositionChange in the tree.

MozReview-Commit-ID: F2UGCQLXLSz

--HG--
extra : rebase_source : 0349a74f20f0948afa9989552a88047788aa1585
2016-09-26 21:06:26 +09:00
Kan-Ru Chen b6d880aca1 Bug 1297276 - Rename mfbt/unused.h to mfbt/Unused.h for consistency. r=froydnj
The patch is generated from following command:

  rgrep -l unused.h|xargs sed -i -e s,mozilla/unused.h,mozilla/Unused.h,

MozReview-Commit-ID: AtLcWApZfES


--HG--
rename : mfbt/unused.h => mfbt/Unused.h
2016-08-24 14:47:04 +08:00
Chris Peterson d634a99cad Bug 1277106 - Part 4: Remove MOZ_UTF16() macro. r=Waldo 2016-07-19 21:07:53 -07: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 de8073afbb Bug 1275914 part.8 TextComposition should always update its composition start offset during composing r=smaug
TextComposition should update its composition start offset after every DOM event dispatch with first clause's selection type if there is composition string.

MozReview-Commit-ID: HFkePci1PhU

--HG--
extra : rebase_source : c7af075115505b52e48d8bbd5f2dd1d9001fe36e
2016-06-20 16:34:40 +09:00
Masayuki Nakano dafb6dae1b Bug 1275914 part.3 TextComposition should use IMEContentObserver or ContentEventHandler directly when it queries the selection r=smaug
TextComposition queries selection start offset a lot of times.  Therefore, for reducing the runtime cost, it should use IMEContentObserver if it's available or ContentEventHandler, otherwise.

MozReview-Commit-ID: 61GgQZDX2HP

--HG--
extra : rebase_source : 2080f77fa36e967e070495b11cc7b72e42e63fd1
2016-06-10 19:45:21 +09:00
Masayuki Nakano b44f10c1f3 Bug 1275914 part.2 Modify TextComposition::mCompositionStartOffset after every composition event dispatch r=smaug
When composition string hasn't been non-empty, insertion point of the composition string can be changed by a DOM event handler.  E.g., compositionstart, first compositionupdate and first text.  Therefore, TextComposition should update the composition start offset cache after every event dispatch.

MozReview-Commit-ID: FOPewPTRuCn

--HG--
extra : rebase_source : 95fbba8130a1d21e957cee305b3b2a433bfae56a
2016-06-10 19:32:49 +09:00
Masayuki Nakano 7716923106 Bug 1275914 part.1 TextComposition should store target clause offset from start of the composition instead of start of the editor r=smaug
It's enough to store target clause offset from start of the composition and better to modify mCompositionStartOffset because when even if mCompositionStartOffset is changed, we don't need to modify the target clause offset.

This patch renames mCompositionTargetOffset to mTargetClauseOffsetInComposition.

MozReview-Commit-ID: 1wt2OTUUjkY

--HG--
extra : rebase_source : 1bb87899c6f2e374252aaa00535915d42c6bb29d
2016-06-02 14:26:47 +09:00
Masayuki Nakano 77f6ee4369 Bug 1278084 part.3 TextComposition shouldn't decide composition string which is only an ideographic space as a placeholder r=m_kato
Currently, when TextComposition tries to forcibly commit composition synchronously, it cancels the composition if there is only an ideographic space since legacy Chinese IMEs for Windows were used an ideographic space as a placeholder and shows actual composition string in its owning window (called reading window).

However, Japanese TIPs basically use composition to input an ideographic space. Unfortunately, this intentional input of an ideographic space is always canceled if an editor commits to composition at every input event in TSF mode because TSF cannot commit during a call of ITextStore::RequestLock().  Additionally, we will enable e10s mode, then, on all platforms, requesting commit composition is handled asynchronously.

Therefore, we should make the hack disabled in default settings now. If we'll find a way to distinguish if an ideographic space is a placeholder, we should recover this hack. Note that such input fields cannot handle such legacy IMEs, so, disabling the hack in default settings must be fine.

MozReview-Commit-ID: IdBcfBxeJum

--HG--
extra : rebase_source : 18ca5cd1083ade8813703cec05c020dc03f09f63
2016-06-07 21:25:24 +09:00
Masayuki Nakano 54e57600e1 Bug 1275906 part.2 TextComposition should use IMEContentObserver for sending NOTIFY_IME_OF_COMPOSITION_EVENT_HANDLED if the editor which has the composition is in the active IMEContentObserver r=smaug
For sending NOTIFY_IME_OF_COMPOSITION_EVENT_HANDLED after the other change notifications which was caused by the user input, we need to use IMEContentObserver::IMENotificationSender because it sends the notifications when it's safe to do it.

This patch makes TextComposition use IMEContentObserver to send the notification.  However, if there is no active IMEContentObserver, e.g., composition events are fired on unfocused window, TextComposition sends it by itself (same as current implementation).

If IMEContentObserver stops observing when it has pending NOTIFY_IME_OF_COMPOSITION_EVENT_HANDLED, it cannot send the notification (i.e., it is discarded completely in such case). However, in such case, IMEContentObserver sends NOTIFY_IME_OF_BLUR.  So, anyway, native IME handler should treat the blur notification as it including NOTIFY_IME_OF_COMPOSITION_EVENT_HANDLED.

On the other hand, we're buggy if composition events are fired in non-active window.  Even in such case, IMEContentObserver should be created for active editor in each document and it notifies IME of the changes. But this is out of the scope of this bug.

MozReview-Commit-ID: 7Q0ZsJTh4hX

--HG--
extra : rebase_source : 6417f991fa8c0fbe3f25b27bacf4257e5485aecc
2016-06-01 22:14:41 +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
Arata Furukawa 28360f6c90 Bug 1259655 - part 2 Rename WidgetEventTime::timeStamp to WidgetEventTime::mTimeStamp r=masayuki
MozReview-Commit-ID: LRgPxoynx0

--HG--
extra : source : 506d58da4e67501a00b676c99997597fa5fe5679
2016-03-28 13:49:02 +09:00
Arata Furukawa 676913b9bb Bug 1259655 - part 1 Rename WidgetEventTime::time to WidgetEventTime::mTime r=masayuki
MozReview-Commit-ID: 7lBCEVkanvF

--HG--
extra : source : d629f018d02594951b7deccf1e1fce279d04694c
2016-03-28 13:29:42 +09:00
Masayuki Nakano cea0b9cf02 Bug 1256589 part.6 Move the implementation of IsTrusted() from dom::Event to WidgetEvent r=smaug
MozReview-Commit-ID: 1SgMbTL8csl

--HG--
extra : rebase_source : 748fa8a594176edf7b2addd038b8031019d0dd35
extra : source : f4ce36e68ce06c405a6fab31facc120b94709aed
2016-03-17 16:01:30 +09:00
Masayuki Nakano d185d40ab2 Bug 1256589 part.1 Move the implementation of StopPropagation() from dom::Event to WidgetEvent r=smaug
MozReview-Commit-ID: Br5eBgC8TbW

--HG--
extra : rebase_source : 0e5743583f80b3e9e09397f49bd438bfe0f49d06
extra : source : 745c9d855d209780a884bd7a3d2cd3cdc20632af
2016-03-17 11:17:42 +09:00
Makoto Kato b8e6c382ed Bug 1208944 - Part 6. Get vaild TextRangeArray on compositionupdate. r=masayuki 2015-12-29 22:57:38 +09:00
Makoto Kato 75748e49e3 Bug 1208944 - Part 2-b. Workaround for OSX. r=masayuki 2015-12-29 22:57:38 +09:00
Makoto Kato 7d206bd88b Bug 1208944 - Part 2-a. Handle CompositionEvent on 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 d1e8691a64 Bug 1208944 - Part 6. Get vaild TextRangeArray on compositionupdate. r=masayuki 2015-12-29 22:57:38 +09:00
Makoto Kato a8252f4408 Bug 1208944 - Part 2-b. Workaround for OSX. r=masayuki 2015-12-29 22:57:38 +09:00
Makoto Kato 6046567f5d Bug 1208944 - Part 2-a. Handle CompositionEvent on plugin. r=masayuki 2015-12-29 22:57:37 +09:00
Masayuki Nakano 4d21fa83d0 Bug 1179632 part.6 KeyboardEvent.isComposing shouldn't expose IME state on different document r=smaug 2015-12-04 18:50:43 +09:00
Masayuki Nakano 3d27dcecfa Bug 1179632 part.5 WidgetCompositionEvent::mNativeIMEContext should be used at looking for a TextComposition instance for a WidgetCompositionEvent r=smaug 2015-12-04 18:50:34 +09:00
Masayuki Nakano da7a2f4f8d Bug 1179632 part.2 WidgetCompositionEvent should store NativeIMEContext which caused the event and PuppetWidget should store it for GetNativeIMEContext() r=smaug, sr=smaug 2015-12-11 15:15:57 +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
Birunthan Mohanathas 9985829ecc Bug 1219392 - Capitalize mozilla::unused to avoid conflicts. r=froydnj 2015-11-02 07:53:26 +02: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 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