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

1634 Коммитов

Автор SHA1 Сообщение Дата
Masayuki Nakano cb8f032c9f Bug 1276406 Remove "ime-enabled-state-changed" notification completely r=smaug
"ime-enabled-state-changed" notification was implemented for Android in bug 603848 but nobody currently observes this notification.  Therefore, we can stop notify the observer service of this.

MozReview-Commit-ID: 3TNHf1xWo2l

--HG--
extra : rebase_source : 39c7e9e391cd6c9510785bca92020707714f4101
2016-05-31 18:39:43 +09:00
Masayuki Nakano 0cf2d4de5f Bug 1275528 part.2 IMEContentObserver should use selection cache for computing absolute offset of WidgetQueryContentEvent if it's possible r=smaug
IMEContentObserver may have cache of normal selection.  If it's available, IMEContentObserver should use it for computing absolute offset of WidgetQueryContentEvent whose mInput::mOffset is relative offset to selection.

This patch just improves the performance of such query.

MozReview-Commit-ID: KHLgCc2uQzs

--HG--
extra : rebase_source : 1367aee0aadb88258135690aa5a8591201129c27
2016-06-20 15:57:38 +09:00
Masayuki Nakano 60bb642e47 Bug 1275528 part.1 Support a way to query content relative to insertion point r=smaug
Native IME handler may want to query content relative to start of selection (or composition if there is it). Additionally, in e10s mode, insertion point in actual content may be different from the cache in parent.  Therefore, in some cases, it does make sense to query content with offset relative to start of selection or composition.

This patch implements it simply and only in non-e10s mode.

Additionally, this fixes a bug of nsQueryContentEventResult::GetOffset() which hasn't been accepted its calls even if the event message is valid (eQueryTextContent, eQueryTextRect and eQueryCaretRect).

MozReview-Commit-ID: 34I7vyTUAgO

--HG--
extra : rebase_source : d79ba0dc3e002f7691495ee1ff8bdb3854d8f6fe
2016-06-16 14:10:49 +09:00
Blake Kaplan 166fd4584a Bug 1281072 - Fix a typo in this function name. r=smaug 2016-06-21 13:46:02 -07:00
Masayuki Nakano 13d4f396fe Bug 1185307 part.2 Replace upcast from nsISelection to mozilla::dom::Selection with nsISelection::AsSelection() r=smaug
MozReview-Commit-ID: Gs3oiAgJFG9

--HG--
extra : rebase_source : a136405d99ff3361a595157986b3a33026bcd5f5
2016-06-17 22:32:49 +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 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 99f2ffe496 Bug 1275914 part.6 ContentEventHandler::OnQuerySelectedText() shouldn't refer anchor and focus of selection if there are 2 or more selection ranges r=smaug
Selection's focus and anchor node and offset are stored only for the last range.  However, ContentEventHandler needs its first range.  Therefore, ContentEventHandler shouldn't refer them if there are two or more selection ranges.

MozReview-Commit-ID: ACflFE3ZrOM

--HG--
extra : rebase_source : 9a2d1ef0e18a07881f77deff579830a4a0c97fc5
2016-06-11 22:22:10 +09:00
Masayuki Nakano 4e5c167f73 Bug 1275914 part.5 Support special selections at handling eQuerySelectedText r=smaug
TextComposition needs to query first IME selection.  Therefore, we need to add support to query special selection range with eQuerySelectedText.

First, WidgetQueryContentEvent::mInput should have mSelectionType which should be initialized with InitForQuerySelectedText() but unfortunately, there is no method for eQuerySelectedText.  Therefore, this patch initializes WidgetQueryContentEvent::mInit::mSelectionType with SelectionType::eNormal in its constructor.

Next, ContentEventHandler needs to support to handle eQuerySelectedText with special selection types.  However, we need to create 2 paths in some cases, one is for normal selection and the other is for special selections because there are no selection ranges may be usual case for special selections but not so for normal selection.  Therefore, ContentEventHandler::InitCommon() becomes a little bit more complicated.  ContentEventHandler::mSelection and ContentEventHandler::mFirstSelectedRange is initialized with the specified selection type but normal selection type is also necessary to compute the selection root since the selection root is computed from the first selected range which may not be anywhere if its selection type is not normal.

Finally, ContentEventHandler::OnQuerySelectedText() returns "there are no selections" as succeeded case in special selection type cases.

MozReview-Commit-ID: 9WzUx8b5piw

--HG--
extra : rebase_source : fb07b40748b594d36315f1fc21c0a02ff9f668bb
2016-06-21 13:13:11 +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
Nathan Froyd 150bcb573b Bug 1278925 - micro-optimize nsCOMArray appending with already_AddRefed AppendElement; r=erahm
In all of the places touched by this patch, the smart pointer we're
appending is about to become unused, so simply .forget()'ing its
reference into the appropriate nsCOMArray works just fine.
2016-06-20 18:38:10 -04:00
Sebastian Hengst edb7a37036 Backed out 5 changesets (bug 1208328) for frequent failures in test_peerConnection_addtrack_removetrack_events.html on Android 4.3 debug. r=backout
Backed out changeset 3160ce8f8759 (bug 1208328)
Backed out changeset aa209325161f (bug 1208328)
Backed out changeset d48bc6eca9c3 (bug 1208328)
Backed out changeset 945141b1f8da (bug 1208328)
Backed out changeset 48da132353c7 (bug 1208328)
2016-06-14 11:04:28 +02:00
Andreas Pehrson 5bc6c4811d Bug 1208328 - Test MediaStreamTrackEvent like RTCTrackEvent. r=smaug
MozReview-Commit-ID: GAEu2FskUJr

--HG--
extra : rebase_source : ec18520447f4e9a554e0ab35a057d1248063d86e
extra : source : ece1345d0b6558ff5358f906aad56f0f32648bcd
2016-06-10 11:58:06 +02:00
Jonathan Watt b15368cfcb Bug 1279451 - Remove a lot of unnecessary includes of nsAutoPtr.h. rs=sparky 2016-06-07 21:10:18 +01:00
Andrea Marchesini 64734bf74c Bug 1278838 - Remove separate worker binding for Performance API, r=smaug
--HG--
rename : dom/performance/nsPerformance.cpp => dom/performance/Performance.cpp
rename : dom/performance/nsPerformance.h => dom/performance/Performance.h
rename : dom/workers/Performance.cpp => dom/performance/PerformanceWorker.cpp
rename : dom/workers/Performance.h => dom/performance/PerformanceWorker.h
2016-06-09 19:04:42 +02:00
Carsten "Tomcat" Book 801ccd962d Merge mozilla-central to mozilla-inbound 2016-06-09 15:41:40 +02:00
Carsten "Tomcat" Book afff301b32 Backed out changeset 5c836acf3197 (bug 906420) on developer request by baku
--HG--
extra : rebase_source : 9f109cdb706feef6d2bcd9a2e71f8c4d3c17ebdf
2016-06-09 15:30:53 +02:00
Carsten "Tomcat" Book cec713e0c7 Backed out changeset e3615a839821 (bug 906420)
--HG--
extra : rebase_source : f9898c9163ce45b9ecfeff88a0f140e890f40ef6
2016-06-09 15:30:37 +02:00
Carsten "Tomcat" Book ed14bc0dce Backed out changeset 18b3c95f1a38 (bug 906420)
--HG--
extra : rebase_source : 2cb14884f71aa8a41e56c935abe93755b0b0d8db
2016-06-09 15:30:35 +02: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
Bob Owen 7c3321c672 Bug 1277475 Part 1: Add a chrome and XBL accessor for the sandboxed scripts flag to Document WEBIDL. r=bz
This also incldues changes to use the new function instead of getting and checking the sandbox flags in most places.

MozReview-Commit-ID: Cv0vJCdLH4D
2016-06-09 11:22:22 +01:00
Nicholas Nethercote a06aec9a0b Bug 1278452 - Avoid a null deref in dom/events/. r=mccr8.
--HG--
extra : rebase_source : 2ea15ae1cc93409d3657a820a74ba750223a93e2
2016-06-07 16:03:34 +10:00
Nicholas Nethercote 509ff29387 Bug 1278452 - Add some null checks when getting streams. r=froydnj.
--HG--
extra : rebase_source : 92d6792f23599f51f65022f61539b84faefe9c6b
2016-06-07 16:03:32 +10:00
Michael Layzell 5cb6cd1b79 Bug 906420 - Part 3: Either expose files or strings generated by system drag or clipboard events to content, not both, r=baku 2016-06-07 18:05:55 -04:00
Michael Layzell eec2a353e0 Bug 906420 - Part 2: Add support for images to DataTransfer, r=baku 2016-06-07 18:05:55 -04:00
Michael Layzell bd973fcaa4 Bug 906420 - Part 1: Implement DataTransferItem and DataTransferItemList, r=baku 2016-06-07 18:05:55 -04: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
Gregor Wagner ea1566d538 Bug 1277234 - Rename key name VolumeUp to AudioVolumeUp. r=masayuki 2016-06-02 15:55:53 +02:00
Xidorn Quan db335d4869 Bug 1274520 followup - Make EventListenerOptions.mozSystemGroup option thread-safe. r=smaug
MozReview-Commit-ID: L3Oox3DgsZa

--HG--
extra : source : e9f90d47418d674009dd3a7aeafe2684343757ab
2016-06-02 20:15:23 +10:00
Kannan Vijayan ext:(%2C%20Jonas%20Sicking%20%3Cjonas%40sicking.cc%3E) 8687d34336 Bug 1272099, Bug 1272101 - FlyWeb core implementation, DOM and Network changes. r=baku r=hurley
--HG--
extra : amend_source : 73ed6e6bccb6b39d7aafd5851bb836a46bcd4e10
2016-06-02 02:47:00 -04:00
Nathan Froyd 1578760736 Bug 1272813 - part 3 - try to take advantage of string sharing in JSEventHandler::HandleEvent; r=peterv
The Rebind() call in HandleEvent was attempting to be clever by sharing
string data with the error event's message.  Unfortunately, we
eventually needed to pass the message out to JS, which required copying
the string for JS's purposes.  Fortunately, we can attempt to be even
more clever by noticing whether the error event's message is already
allocated as a string buffer and sharing that, rather than just the raw
data.  In the best case, the string buffer can be shared out to JS and
we avoid some needless copying.
2016-06-01 16:26:59 -04:00
Xidorn Quan ef5e94c156 Bug 1274520 part 1 - Add mozSystemGroup to EventListenerOptions for chrome and XBL to add listener in the system group. r=smaug
MozReview-Commit-ID: 6DdLMEazWIC

--HG--
extra : source : 3469098f26ccae51855666073cfbc3ff82b3685b
2016-06-01 11:35:53 +10:00
Marcos Caceres 095622d6de Bug 1265279 - Web Manifest: Implement window.oninstall. r=baku
* Add tests for window.oninstall
* Teach manifestMessages how to fire install event
* Test that the install event fired from Parent process
2016-05-30 18:52:00 +02:00
Masayuki Nakano a58a540708 Bug 1251063 PuppetWidget should cache InputContext which is set with SetInputContext() and use it in GetInputContext() only when it is the widget which has active input context in the process r=smaug
PuppetWidget::GetInputContext() needs to communicate with its parent process with synchronous IPC. This is very expensive for focus move.

Currently, IMEStateManager uses nsIWidget::GetInputContext() only for checking the IME enabled state.  Therefore, it's enough to cache input context when nsIWidget::SetInputContext() is called.  Then, we can avoid to communicate with synchronous IPC with PuppetWidget::GetInputContext() in most cases.

This patch makes IMEStateManager stores the last widget which sets input context.  When PuppetWidget uses its input context cache, it should check if it is the last widget to set input context with IMEStateManager since an input context may be shared with other widgets and another one may have update the input context.  I.e., PuppetWidget's input context cache may be already outdated after IMEStateManager sets input context with another widget.

This patch gives up to support retrieving IME open state from child process. However, perhaps, this is not necessary for everybody including add-on developers because the only user of IME open state in child process is nsIDOMWindowUtils. So, add-ons can send IME open state from chrome process instead.  If this decision is wrong, unfortunately, we should support it again in another bug.  It's easy to support with creating another nsIWidget::GetInputContext() or adding additional argument to it.

MozReview-Commit-ID: B2d2CCTsPKj

--HG--
extra : rebase_source : 4117330ba7871753176da960063b612e96f11752
2016-05-28 11:27:56 +09:00
Bill McCloskey 291c555f34 Bug 1262671 - void** -> PickleIterator (r=froydnj) 2016-05-27 09:57:38 -07:00
Xidorn Quan a0c4bff836 Bug 931445 part 3 - Reset synth centering pointer when unlocking pointer. r=smaug
MozReview-Commit-ID: LcStCmm4iRV

--HG--
extra : source : e27b7ceefe72c64cd72774522c2cebe884bf3d08
2016-05-27 17:13:05 +10:00
Xidorn Quan adf9f94c38 Backed out 4 changesets (bug 931445) for e10s mochitest failures
Backed out changeset 5a92875424b0
Backed out changeset 79ba5815f9aa
Backed out changeset b084784405ef
Backed out changeset 67bf9ee17564

--HG--
extra : rebase_source : 9604d138e1d333d7bcf6edc8b886340b8371524d
2016-05-27 16:08:41 +10:00
Xidorn Quan 3dd5fb9587 Bug 931445 part 3 - Reset synth centering pointer when unlocking pointer. r=smaug
MozReview-Commit-ID: LcStCmm4iRV

--HG--
extra : rebase_source : f679431c8d30a211e776fd7a1c652767a0da62e6
extra : source : e27b7ceefe72c64cd72774522c2cebe884bf3d08
2016-05-27 11:09:58 +10:00
Matt Woodrow a8bd22981b Bug 881832 - Fix test_bug602962.xul to not assume that resizes have finished flushing when the resize event fires. r=tnikkel 2016-05-12 12:09:50 +12:00
Boris Zbarsky 49a90cb122 Bug 1268852. Change <label> elements to not be form-associated anymore. r=bkelly,hsivonen,surkov
The web platform tests changes are just a cherrypick of
https://github.com/w3c/web-platform-tests/pull/2926 so I don't have to add
failure annotations until the next test uplift.

I've audited our uses of nsIFormControl, and this patch looks to me like it
preserves existing behavior in all but the following cases:

1)  nsXBLPrototypeHandler::DispatchXBLCommand, the case of scrolling when space
is pressed while something inside a <label> is focused.  We used to not scroll
in this situation; I think this is a bug, so I'm changing that behavior to
scroll instead.

2)  In Accessible::RelationByType for the RelationType::DEFAULT_BUTTON case,
when mContent is a <label> we used to return its form's default submit element.
Now we will just return Relation().
2016-05-26 19:39:03 -04:00
Kartikaya Gupta 5bb2f43706 Bug 1203140 - Don't add touch listener areas to dispatch-to-content regions unless touch events are enabled. r=smaug
MozReview-Commit-ID: 1EI8hrzOcBz
2016-05-24 11:24:31 -04:00
Kartikaya Gupta 5e8020956e Bug 1203140 - Add a pref cache for the touch events pref, as it can get called a lot. r=smaug
MozReview-Commit-ID: EQD3oxFaInO
2016-05-24 11:24:30 -04:00
Masayuki Nakano 38e54402b2 Bug 1272599 part.2 Rename KeyboardEvent.key values, "MozHomeScreen" and "MozCameraFocusAdjust" to "GoHome" and "CameraFocus" except on B2G r=smaug
KEYCODE_HOME was temporarily named as "MozHomeScreen" and KEYCODE_FOCUS was temprarily named as "MozCameraFocusAdjust" since they were not defined by the spec. However, in the latest spec, they are defined as "GoHome" and "CameraFocus". So, it is the time to rename them.

However, these temporary key names are still used by Gaia. Until it's fixed, we should keep using the temporary names only on B2G.

MozReview-Commit-ID: 9ILtZdf6EUQ

--HG--
extra : rebase_source : f673ca6e128705af3071dafbd7ab1eb8e310297d
2016-05-20 21:29:10 +09:00
Masayuki Nakano 18d7f8212d Bug 1272599 part.1 Rename KeyboardEvent.key value, "MozPhoneCall" to "Call" r=smaug
Android's KEYCODE_CALL was temporarily named as "MozPhoneCall" since proper key name was not defined in the spec. However, now, it's defined as "Call" in the latest spec. Therefore, we should rename this key name.

Note that this isn't available on Android because the key event is never fired on applications. However, this key may be useful on B2G. Although, the key is not used by current Gaia.

MozReview-Commit-ID: GF4STYrGMig

--HG--
extra : rebase_source : 7d94c0a3c47d9ba1fadc4de475d71967d6281545
2016-05-20 21:00:20 +09:00
Masayuki Nakano 4205d9edae Bug 1272578 part.3 Rename key name VolumeMute to AudioVolumeMute except on B2G r=smaug
VolumeMute was renamed to AudioVolumeMute in the latest draft and Chromium uses the new name. Therefore, we need to update this but Gaia uses the old name. So, we shouldn't rename on B2G until Gaia is fixed.

Note that this patch changes tests but they are not used by B2G. Therefore, just replacing with new name is enough.

Only forms.js is necessary #ifdef because the main purpose of forms.js is for B2G's IME framework. However, it's available on the other platforms if chrome needs to use it.

MozReview-Commit-ID: KSkcPbIovin

--HG--
extra : rebase_source : 4ff5d92b000599806367b002fd08aa5ae858ee4d
2016-05-21 00:57:18 +09:00
Masayuki Nakano 65d3998d32 Bug 1272578 part.2 Rename key name VolumeUp to AudioVolumeUp except on B2G r=smaug
VolumeUp was renamed to AudioVolumeUp in the latest draft and Chromium uses the new name. Therefore, we need to update this but Gaia uses the old name. So, we shouldn't rename on B2G until Gaia is fixed.

Note that this patch changes tests but they are not used by B2G. Therefore, just replacing with new name is enough.

Only forms.js is necessary #ifdef because the main purpose of forms.js is for B2G's IME framework. However, it's available on the other platforms if chrome needs to use it.

MozReview-Commit-ID: KzLVL5Y2dIN

--HG--
extra : rebase_source : d7a70f556684cdc99989e408e0e87a04e2da43d9
2016-05-21 00:55:48 +09:00
Masayuki Nakano 97f043ea9e Bug 1272578 part.1 Rename key name VolumeDown to AudioVolumeDown except on B2G r=smaug
VolumeDown was renamed to AudioVolumeDown in the latest draft and Chromium uses the new name. Therefore, we need to update this but Gaia uses the old name. So, we shouldn't rename on B2G until Gaia is fixed.

Note that this patch changes tests but they are not used by B2G. Therefore, just replacing with new name is enough.

Only forms.js is necessary #ifdef because the main purpose of forms.js is for B2G's IME framework. However, it's available on the other platforms if chrome needs to use it.

MozReview-Commit-ID: cq98qJnS8M

--HG--
extra : rebase_source : 98653e5427d9d4720d19011673cbb0f9cdf36f1a
2016-05-21 00:52:03 +09:00