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

2348 Коммитов

Автор SHA1 Сообщение Дата
Stone Shih 35110f00e9 Bug 1389086 Part2: Use once event listeners to avoid they are triggered after the test is done. r=smaug.
MozReview-Commit-ID: JrYXWs2yhSO
2017-08-31 16:55:39 +08:00
Stone Shih 35fc5fd478 Bug 1389086 Part1: Remove windows line ending in the test file. r=smaug.
MozReview-Commit-ID: 6JHn14XXDLM
2017-09-01 10:12:54 +08:00
Sebastian Hengst a56d428b1f merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: Gf0QPFp52Bj
2017-08-30 11:05:16 +02:00
Andrew McCreight 78807d8776 Bug 1391005 - Eliminate NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED. r=peterv
Replace it with NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION, because it
has been the same for a while.

MozReview-Commit-ID: 5agRGFyUry1

--HG--
extra : rebase_source : 5388c56b2f6905c6ef969150f0c5b77bf247624d
2017-08-29 16:02:48 -07:00
Stone Shih 22e157686e Bug 1292134 - Revise touch-action related test cases to wait for the scroll event to avoid resetting scrollLeft break the following scroll behaviors. r=kats.
MozReview-Commit-ID: JidGiZmyzk5
2017-08-17 13:45:00 +08:00
Masayuki Nakano 5c2c570f9b Bug 1393816 - part1: Cache a range until new range is created in Selection r=smaug
When setting value of <input type="text">, nsTextEditorState removes all
ranges of normal selection first.  Then, TextEditor sets the value.  Finally,
TextEditor collapses the selection at the end of the text.

In bug 1386471, we got that there are some problems to remove the call of
Selection::RemoveAllRanges() in nsTextEditorState.  Therefore, we need another
approach to improve Selection::Collapse().

The approach of this patch is, when removing all ranges from normal selection,
Selection can cache an nsRange instance if there is an instance which is not
referenced from other than the Selection (i.e., it'll be removed when
Selection::Clear() is called).  Then, Selection::Collapse() can reuse it.  With
this fix, Selection::Collapse() can reduce allocation cost and may reduce some
other cost like adding it to mutation observer.

However, keeping nsRange instance may cause increasing mutation observer's cost
since nsRange will be adjusted its start node/offset and end node/offset with
mutation observer to guarantee that the range is always valid.  So, we can
cache such range only when the caller (or its callee) will set selection range
later.  Therefore, this patch adds Selection::RemoveAllRangesTemporarily()
and make only nsTextEditorState::SetValue() and
ContentEventHandler::OnSelectionEvent() use it.

MozReview-Commit-ID: FjWrbz4S1ld

--HG--
extra : rebase_source : 83677640525e0b1a84bdd7fce63ff4704b9cc22b
2017-08-25 19:21:39 +09:00
Masayuki Nakano e3529fd155 Bug 1375502 - part2: Add nsIContentIterator::Init(nsINode*, uint32_t, nsINode*, uint32_t) r=mats
nsIContentIterator::Init() takes nsRange but it's too expensive for some users.
So, there should be another Init() which can be specified a range in DOM tree
with 2 pairs of nsINode* and uint32_t.

MozReview-Commit-ID: 6JXic0KOM2d

--HG--
extra : rebase_source : 28ff355a2aa0dcb5d65495806ef8c67f1da642ea
2017-06-26 17:26:27 +09:00
Masayuki Nakano acde25fb18 Bug 1375502 - part1: ContentEventHandler shouldn't use nsRange for temporary use r=mats
Allocating and initializing nsRange is too expensive especially for temporary
use.  However, ContentEventHandler uses nsRange only for representing two DOM
points.  So, it should use simpler helper class, RawRange, for reducing some
unnecessary runtime cost.

Note that this still uses nsRange for initializing nsIContentIterator.  This
will be fixed by the following patch.

MozReview-Commit-ID: 5TUy6yJf7HA

--HG--
extra : rebase_source : c4eb58e8f37c408c75479e6961ba9225f8bcee77
2017-06-23 13:21:47 +09:00
Eric Rahm a33f11e0f5 Bug 1391803 - Use nsStringFwd.h for forward declaring string classes. r=froydnj
We should not be declaring forward declarations for nsString classes directly,
instead we should use nsStringFwd.h. This will make changing the underlying
types easier.

--HG--
extra : rebase_source : b2c7554e8632f078167ff2f609392e63a136c299
2017-08-16 16:48:52 -07:00
Gabor Krizsanits 5acd81eb72 Bug 1376895 - Disable preloaded browser in two mochitests. r=me
nsIIOService based events when used via SpecialPowers in mochitests
combined with the preloaded browser in the same process can cause
IsSafeToRun() assertion in SchedulerGroup.h:81. To avoid that we make sure that
previous tests in the suit do not create a preloaded browser. This cannot happen
in a real life scenario.
2017-08-16 13:00:04 +02:00
Carsten "Tomcat" Book 1fc6e56a12 merge autoland to mozilla-central a=merge 2017-08-16 11:20:31 +02:00
Carsten "Tomcat" Book 786ca37886 Backed out changeset 6949fdc7f97c (bug 1376895) 2017-08-16 11:16:04 +02:00
Wes Kocher 3945278423 Merge m-c to autoland, a=merge
MozReview-Commit-ID: D96bIJACwZe
2017-08-15 19:16:12 -07:00
Bryce Van Dyk d5ec1b23bd Bug 1275856 - Update dom event tests to reflect removal of RecorderErrorEvent and new MediaRecorderErrorEvent. r=smaug
MozReview-Commit-ID: 52YJMJncLyM

--HG--
extra : rebase_source : dc3db183c900bc7269fc85e84f599ba2ae8ab278
2017-08-11 14:03:23 +12:00
Carsten "Tomcat" Book 6b36e00b7c merge mozilla-inbound to mozilla-central a=merge 2017-08-15 11:42:11 +02:00
Aryeh Gregor 2df3e475b4 Bug 1387828 - Reinstate support for initKeyboardEvent; r=smaug
https://github.com/w3c/uievents/issues/112

This is supported by all other UAs.  In the past we had compatibility
problems when trying to add support, but it seems these might be fixed
if we make all arguments optional beyond the first.

The interface chosen for the method is from the spec, which has been
updated to match Chrome.  This is also very similar to WebKit, but the
final four arguments are different from IE.

MozReview-Commit-ID: 36AeX1JwJTt

--HG--
extra : rebase_source : 28b298d370f0f9a5ab4090a71a2aae91f1d90025
2017-08-06 16:52:39 +03:00
Chung-Sheng Fu 7a392d6952 Bug 1382499 - Enhance fingerprinting resistance for Touch API r=arthuredelstein,bz
MozReview-Commit-ID: 8nzOkvIvwrD

--HG--
extra : rebase_source : 15cfa77ffc639838d6345fa4bffc7079d8d198e7
2017-07-31 17:30:38 +08:00
Masayuki Nakano 9467d56cf9 Bug 1388647 - part1: IMEStateManager::OnChangeFocusInternal() shouldn't request to commit composition with sFocusedIMETabParent r=m_kato
When a remote process has focus and it loses focus,
IMEStateManager::OnChangeFocusInternal() sends NOTIFY_IME_OF_BLUR via
IMEStateManager::NotifyIMEOfBlurForChildProcess().  Therefore,
sFocusedIMETabParent and sFocusedIMEWidget are set to nullptr here. So, if a
window becomes active, REQUEST_IME_TO_COMMIT_COMPOSITION in
IMEStateManager::OnChangeFocusInternal() won't work because
IMEStateManager::NotifyIME() ignores the request because of coming from wrong
process.

Therefore, IMEStateManager::OnChangeFocusInternal() needs to send
REQUEST_TO_COMMIT_COMPOSITION with proper process information which is only
stored by TextComposition instance.

MozReview-Commit-ID: KNEvOoQtK1E

--HG--
extra : rebase_source : 2d0c9297a6ffd3e7883130c80deec0479212148e
2017-08-09 18:04:28 +09:00
Stone Shih c6b5aece03 Bug 1351148 Part7: Revise window_wheel_default_action.html to wait event 'FullZoomChange' and then check the result. r=smaug.
MozReview-Commit-ID: E56dfMIxtSl
2017-07-07 11:48:42 +08:00
Stone Shih 98ad196e24 Bug 1389086: Disable intermittent failed test case test_bug1323158.html. r=bevis.
MozReview-Commit-ID: LtXZ17ScNaY
2017-08-14 16:02:06 +08:00
Gabor Krizsanits 2322764f34 Bug 1376895 - Disable preloaded browser in two mochitests. r=me
nsIIOService based events when used via SpecialPowers in mochitests
combined with the preloaded browser in the same process can cause
IsSafeToRun() assertion in SchedulerGroup.h:81. To avoid that we make sure that
previous tests in the suit do not create a preloaded browser. This cannot happen
in a real life scenario.
2017-08-15 14:04:54 +02:00
Stone Shih de7f705042 Bug 1351148 Part2: Add a priority queue for input events. r=smaug.
MozReview-Commit-ID: 5ud1Ex9UNVo
2017-03-21 15:44:12 +08:00
Masatoshi Kimura dec070e4cf Bug 1389460 - Remove @deprecated nsIDOMEventTarget.DispatchDOMEvent. r=smaug
MozReview-Commit-ID: E88DZK5sfwx

--HG--
extra : rebase_source : 64e1a47c9366a970f20ec459dde9b379a207e802
2017-08-07 02:28:52 +09:00
Wes Kocher eb3058e466 Backed out 3 changesets (bug 1382499) for eslint failures a=backout
Backed out changeset 0ebb9924affa (bug 1382499)
Backed out changeset c25b50b0edc5 (bug 1382499)
Backed out changeset 1dcdc22d4919 (bug 1382499)

MozReview-Commit-ID: 9rygU1QF1kb
2017-08-11 13:49:34 -07:00
Chung-Sheng Fu c28d4be7b3 Bug 1382499 - Enhance fingerprinting resistance for Touch API r=arthuredelstein,bz
MozReview-Commit-ID: 8nzOkvIvwrD

--HG--
extra : rebase_source : 15cfa77ffc639838d6345fa4bffc7079d8d198e7
2017-07-31 17:30:38 +08:00
Sebastian Hengst b3269bec34 Backed out changeset 685802013f43 (bug 1389460) for OS X bustage at widget/cocoa/nsMenuX.mm:364: no member named 'DispatchDOMEvent' in 'nsIContent'. r=backout 2017-08-11 17:46:42 +02:00
Masatoshi Kimura 58d29db70b Bug 1389460 - Remove @deprecated nsIDOMEventTarget.DispatchDOMEvent. r=smaug
MozReview-Commit-ID: E88DZK5sfwx

--HG--
extra : rebase_source : 63300d87c0496394d3f75cb76bc47c75d640d369
2017-08-07 02:28:52 +09:00
Carsten "Tomcat" Book c329d562fb merge mozilla-inbound to mozilla-central a=merge 2017-08-09 11:37:08 +02:00
Wes Kocher 7651bde05c Merge m-c to inbound, a=merge
MozReview-Commit-ID: 9Abf0fILvvK
2017-08-08 15:16:00 -07:00
Eric Rahm 01f545fea7 Bug 1386825 - Part 1: Remove MOZ_B2G from dom. r=bkelly
MozReview-Commit-ID: 1zzP2r01B7U
2017-08-08 14:41:05 -07:00
Aryeh Gregor 82ee59d8c7 Bug 1388119 - Drop support for createEvent("ErrorEvent"/"PopStateEvent"); r=smaug
They were just dropped from the spec:

https://github.com/whatwg/dom/issues/362
https://github.com/whatwg/dom/pull/489

ErrorEvent we never supported anyway until it was added recently to
match the spec.  PopStateEvent is not supported by WebKit, Blink is
planning to try dropping support, our telemetry shows usage is
basically zero, and we never supported any way to initialize it anyway.

The changes to Document-createEvent.html and Document-createEvent.js are
taken from upstream.  The other wpt changes are new in this commit.

MozReview-Commit-ID: A6GzhLwL08l

--HG--
extra : rebase_source : 4bdcd605b179ea787985845e9b1c53f76ebc179a
2017-08-07 21:19:59 +03:00
Joel Maher 0003b91c8f Bug 1388356 - add pref apz.test.fails_with_native_injection for windows to allow touch based events to work in windows 10 tests. r=kats
MozReview-Commit-ID: 3QJ1aFpxGxY
2017-08-08 15:08:04 -04:00
Kan-Ru Chen 87a450cad1 Bug 1386495 - Add timeStamp to DOMEventMarkerPayload. r=mstange,smaug
MozReview-Commit-ID: B3b4laxMqQM

--HG--
extra : rebase_source : 80e41c2f9d921ddd93d41c348594895046c7af8f
2017-08-03 15:42:42 +08:00
Aryeh Gregor 39290528d2 Bug 1388069 - Support createEvent("FocusEvent"); r=smaug
This is the one event we don't support in createEvent() that Blink
doesn't want to drop support for because they see nontrivial usage:

https://www.chromestatus.com/metrics/feature/timeline/popularity/1171

Supporting it shouldn't hurt us and might make us work better on
whatever the sites are that Blink is hitting.

MozReview-Commit-ID: FbfTd6AYnDg

--HG--
extra : rebase_source : f6bbcbd04af87349064b965814571e832932c130
2017-08-07 20:52:41 +03:00
Nicholas Nethercote f941156987 Bug 1386600 - Change nsIStringBundle methods to return |AString| instead of |wstring|. r=emk,sr=dbaron.
This removes about 2/3 of the occurrences of nsXPIDLString in the tree. The
places where nsXPIDLStrings are null-checked are replaced with |rv| checks.

The patch also removes a couple of unused declarations from
nsIStringBundle.idl.

Note that nsStringBundle::GetStringFromNameHelper() was merged into
GetStringFromName(), because they both would have had the same signature.

--HG--
extra : rebase_source : ac40bc31c2a4997f2db0bd5069cc008757a2df6d
2017-08-04 14:40:52 +10:00
Jan Henning 34bb1f8a36 Bug 1266683 - Part 2 - Add private browsing mode info to InputContext. r=masayuki
Android now supports telling an IME that it shouldn't store user-entered content into it's dictionary/language model/etc. and we want to automatically enable this in private browsing.

As the code that handles input on Android doesn't have any notion of tabs (and therefore of the difference between normal and private tabs), the best way to get that info across is to retrieve it directly within the IMEStateManager from the corresponding document and store it in the inputContext, which is then passed to Java for Fennec to handle.
Implementing this within Gecko also has the benefit that this part of the code can be used by other platforms as well should they want to support similar features in the future.

MozReview-Commit-ID: DsxjC4Ma7DR

--HG--
extra : rebase_source : f0940cb40170ab32cf5a172d07a61d083427be8a
2017-07-30 19:45:03 +02:00
Sebastian Hengst 39ccebaf18 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 9IxbB2vCH4S
2017-08-05 11:55:25 +02:00
Kate McKinley 092434c08c Bug 1376651 - Pass the nsIScriptElement instead of allocating a string every time r=ckerschb
Change the interface to GetAlowsInline to take an nsISupports* instead
of a string, and pass the nsIScriptElement directly. If we don't have an
element, then pass nullptr or the mock string created as an
nsISupportsString.

MozReview-Commit-ID: pgIMxtplsi

--HG--
extra : rebase_source : 4691643bb67ff6c78a74a4886a04c4816cff6219
2017-07-27 11:01:24 -07:00
Jim Mathies 57d9bf0aee Bug 1360666 - Update IME state when nsObjectLoadingContent content changes type from 'loading' to a valid content type. r=masayuki
MozReview-Commit-ID: JC3YGS75gpN
2017-08-03 14:07:14 -05:00
Olli Pettay f785d80029 Bug 1385666, ensure layout is flushed when editor gets focus, r=masayuki
--HG--
extra : rebase_source : 2dd86e64001fa48469a93849516e26c41c9163e4
2017-08-03 19:36:58 +03:00
Jessica Jong 47209070af Bug 1385478 - Part 2: Change Required/IsRequired() to look at NS_EVENT_STATE_REQUIRED instead. r=bz
In order to speed up Required/IsRequired(), instead of querying for the
@required attribute, we're now using the NS_EVENT_STATE_REQUIRED flag to know
whether an element's value is required.

For this to work correctly, we need to set NS_EVENT_STATE_REQUIRED earlier,
that is, in AfterSetAttr(), before any consumer of IsRequired(). We also need
to update or clear our required states when input type changes, since we may
have changed from a required input type to a non-required input type or
vice versa.

Note that NS_EVENT_STATE_REQUIRED/OPTIONAL is now part of the
EXTERNALLY_MANAGED_STATES.

MozReview-Commit-ID: Bjiby9GqJSB
2017-08-03 01:27:00 -04:00
Wes Kocher 8de77914f5 Backed out changeset bcd223309de8 (bug 1360666) for asserting in stylo reftests a=backout
MozReview-Commit-ID: HH3rwDwvYyz
2017-08-02 18:14:56 -07:00
Jim Mathies 37050ac3cc Bug 1360666 - Update IME state when nsObjectLoadingContent content changes type from 'loading' to a valid content type. r=masayuki
MozReview-Commit-ID: 2cjJ5SvJsTa
2017-08-02 15:31:55 -05:00
Ryan Hunt c38e071dbe Bug 1385071 - Add another method to EventTarget for detecting only non-passive key listeners. r=smaug
This is for adding a pref that will allow web content to have key listeners
and use keyboard APZ, if they are marked passive. This commit also reworks
the function names and comments to make them more accurate.

MozReview-Commit-ID: LGDaVQOK1CS

--HG--
extra : rebase_source : a6bb4b7fff3488dea62b9114aa164814c74561a4
2017-07-27 19:46:44 -04:00
Kestrel 91cfa95229 Bug 918780 - Add new PopupControlState for permitting file/color picker popup regardless of dom_allowed_events. r=smaug
MozReview-Commit-ID: 1GbjQ6IkMsv

--HG--
extra : rebase_source : 4ea11b78007d9ab67a932536843b3e12175732b3
2016-04-24 04:49:00 +01:00
Sebastian Hengst 915c63c332 merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-07-31 11:28:37 +02:00
Nicholas Nethercote 72c884bf74 Bug 1384835 (part 3, attempt 2) - Remove the Preferences::Get*CString() variants that return nsAdoptingCString. r=froydnj.
--HG--
extra : rebase_source : d317b25be2ec21d1a60d25da3689e46cdce0b649
2017-07-31 14:28:48 +10:00
Kyle Machulis d812ac4e87 Bug 1279218 - Additional applet tag logic removal; r=bz
I've been having problems with interdiffs on mozreview lately, so for
ease of review, this patch is being submitted as a seperate patch for
review. Once it is r+'d, it will be folded into the first patch in
this set before landing.

MozReview-Commit-ID: CS9MngaXlBd

--HG--
extra : rebase_source : 6a86fd4f7a66e73497a756976a2562d183002a2a
2017-07-28 16:44:39 -07:00
Masayuki Nakano 0fa4a64aa3 Bug 1384027 - part3: Don't send blur notification to IME from IMEStateManager::OnChangeFocusInternal() if no window becomes active and IME wants to keep composition during deactive r=m_kato
Currently, IMEStateManager::OnChangeFocusInternal() sends blur notification to IME when a remote process has IME focus and focus is moving from the process.  However, if IME wants to keep composition even during deactive and nobody will gets focus (i.e., all windows becomes deactive), IMEStateManager shouldn't send the blur notification because it causes committing composition.

Therefore, it should send blur notification only when focus is moving to a PresContext (that means that not all windows becomes deactive) or IME doesn't want to keep composition during deactive.

Then, even if another window becomes active next time, IMEStateManager can send "stop IME state management" message to the composing remote process and the remote process can commit composition normally.

Additionally, this patch ensures to send blur notification when IME focused TabParent or widget is being destroyed.  This fixes new memory leak bug of this patch (sFocusedIMETabParent keeps grabbing the instance until shutting down in some mochitests).

MozReview-Commit-ID: KYiFGo970a8

--HG--
extra : rebase_source : c3de0df442420979414b47d8d20c7988c49b205b
2017-07-26 00:57:29 +09:00
Carsten "Tomcat" Book de369deb98 Backed out changeset 284af26c1b53 (bug 1351148) 2017-07-28 09:20:27 +02:00