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

2272 Коммитов

Автор SHA1 Сообщение Дата
Kartikaya Gupta 95fe01d527 Bug 1380680 - Fix test_bug1013412 so it passes with webrender enabled. r=dvander
MozReview-Commit-ID: BaHWdf9qJt1

--HG--
extra : rebase_source : 0a04c61681eee3061de0ddbffae29bd4cf380508
2017-07-13 11:15:59 -04:00
Carsten "Tomcat" Book 0edfa97e38 merge mozilla-inbound to mozilla-central a=merge 2017-07-12 11:07:09 +02:00
Boris Zbarsky 49dbf6fa43 Bug 1379728 part 1. Remove the double-definition of the 'close' event from EventNameList.h. r=smaug 2017-07-11 17:49:24 -04:00
Stone Shih 1da6cd22e9 Backed out changeset 367b6f947f87 (bug 1370630) for breaking mozilla-internal jenkins site. r=backout. 2017-07-11 15:59:03 +08:00
Masayuki Nakano b1f8f6d611 Bug 1377989 - part10: Rename local variables, |parent| which is set to container of nsRange to |container| r=smaug
MozReview-Commit-ID: 9w3O7MJEDBS

--HG--
extra : rebase_source : 92194bd18c9e79210c7cb4e9835a528d51e8ba7a
2017-07-11 23:52:39 +09:00
Masayuki Nakano 4ee17d1b8c Bug 1377989 - part2: Rename nsRange::GetEndParent() to nsRange::GetEndContainer() r=smaug
MozReview-Commit-ID: K4qPjtZ62yO

--HG--
extra : rebase_source : 8653db98b9bd70c77a6aac8d906f401f0222c58a
2017-07-11 21:11:37 +09:00
Masayuki Nakano 2f2ce53be5 Bug 1377989 - part1: Rename nsRange::GetStartParent() to nsRange::GetStartContainer() r=smaug
Web standards use "Container" instead of "Parent".  So, nsRange shouldn't use "Parent" for its members and methods.

MozReview-Commit-ID: Ho6N0diuWtE

--HG--
extra : rebase_source : ee4eb7068a68b118c7fe98e9e9e7fa9c9e7f13e2
2017-07-11 20:53:04 +09:00
Masayuki Nakano b2bebff74e Bug 1377672 - part5: IMEStateManager::OnChangeFocusInternal() should notify IME of blur when focus is moving from a remote process to another process r=m_kato
When focus is moving from a remote process to different process (including to the main process), destroying IMEContentObserver in the focused remote process occurs later.  I.e., NOTIFY_IME_OF_BLUR will be notified later.  However, it may be too late for new focused process especially when destroying the focused widget.

Therefore, this patch makes IMEStateManager notifies IME of blur in such case.

MozReview-Commit-ID: GkypubVjn3H

--HG--
extra : source : 9f4bd86dff910c2e3c3ae35f3e883d809c4a204e
2017-07-05 16:26:41 +09:00
Masayuki Nakano cac05f3ef3 Bug 1377672 - part4: ContentCacheInParent::RequestIMEToCommitComposition() should ignore too late requests r=m_kato
Requests to commit/cancel composition came from remote process with sync message.  So, it may be too late.  E.g.,

* If the process already sent new composition start but is not handled by the remote process yet.
* If the process already send commit message but it's not handled by the remote process yet.
* If focus was already moved to different process.

In the former 2 cases, the remote process should wait eCompositionCommit(AsIs) events for clearing TextComposition.  Therefore, the requested should be treated as it's handled asynchronously.

In the last case, the remote process should commit composition with latest composition string in the main process because if the remote process commits composition with "current" composition string in it, user may lost some inputted text.

MozReview-Commit-ID: 18BUoZZq7HS

--HG--
extra : source : fd1585ad670a87d8b1ef8908931f3d4037751475
2017-07-05 19:55:18 +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 c726abb366 Bug 1377672 - part2: IMEStateManager::SetIMEState() should set input context with proper origin information r=m_kato
Currently, IMEStateManager always sets input context as set by current process even when it needs to adjust IME state when a tab parent for current focused IME process is removed.  Then, input context for the widget is marked as for main process but the widget still have IME focus of a remote process.

For fixing this mismatch, IMEStateManager should set ORIGIN_CONTENT even when the tab parent is being destroyed.

MozReview-Commit-ID: C10YOAtkET4

--HG--
extra : source : 9430d123b19e0ac551c6048bb044fcfa22d13e45
2017-07-03 12:28:10 +09:00
Masayuki Nakano 0405f81c59 Bug 1377672 - part1: IMEStateManager in the main process should destroy active IME content observer when a tab parent takes focus r=m_kato
When focus is moved from the main process to a remote process and there is active IME content observer (i.e., an editor in the main process has focus), IMEStateManager should destroy the active IME content observer because it may cause notifying NOTIFY_IME_OF_BLUR when the main process takes focus again.

MozReview-Commit-ID: BG3eZhxoWBW

--HG--
extra : source : 3447abd6be7ad112e97bfe860507a382c5d19385
2017-07-02 22:00:18 +09:00
Wes Kocher 19d135c982 Merge m-c to autoland, a=merge
MozReview-Commit-ID: 4R4GFHPiij
2017-07-06 16:19:38 -07:00
Sylvestre Ledru 4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02:00
Stone Shih 3fdee5b48d Bug 1370630 - Untrusted submit event shouldn't trigger form submission. r=smaug.
MozReview-Commit-ID: 6jl7Xvh1Y1Y
2017-06-19 15:46:07 +08:00
Carsten "Tomcat" Book 49921c11be Merge mozilla-central to autoland 2017-07-05 13:05:51 +02:00
Masayuki Nakano 5533f095cb Bug 1377653 - part3: WidgetEvent::mFlags should have a bool flag if it's been posted to at least one remote process r=smaug
Currently, it's not been managed yet that whether an event is posted to at least one remote process.  So, for managing the state, BaseEventFlags should have a new bool flag and WidgetEvent and BaseEventFlags should have helper methods for it.

Additionally, this fixes a bug of nsGUIEventIPC.h. In a lot of ParamTraits, static_cast<Foo> is used for using base class's ParamTraits.  However, it causes creating temporary instance with copy constructor.  Therefore, WidgetEvent::MarkAsPostedToRemoteProcess() call in ParamTraits<mozilla::WidgetEvent>::Write() didn't work as expected.

MozReview-Commit-ID: DdafsbVfrya

--HG--
extra : rebase_source : 94205f3a7b36455c3c9f607c35866be033e627c1
2017-07-05 18:59:44 +09:00
Masayuki Nakano 57f359b0de Bug 1377653 - part2: Add helper methods to WidgetEvent and BaseEventFlags to manage propagation state between parent process and remote process r=smaug
Currently, we have 2 bool flags (and optional 2 bool flags with related purpose) for managing propagation state between parent process and remote process.  However, it's really complicated.  Actually, setting these flags and referring the flags is usually follow explanation.

So, for making simpler, WidgetEvent and BaseEventFlags should have some utility methods for making them as self documented code.

This patch moves WidgetKeyboardEvent::mIsReserved to BaseEventFlags::mIsReservedByChrome.  That allows us to manage the cross process event propagation state in same place.

MozReview-Commit-ID: IXEDQJ4GpAZ

--HG--
extra : rebase_source : 5b63ac4f1d15e40e8bfc88423e336de28caa8ab6
2017-07-05 13:58:41 +09:00
Nicholas Nethercote 5d446671a8 Bug 1375776 (part 4) - Allow ProfilerMarkerPayload.h to be #included unconditionally. r=mstange.
This requires:

- Moving the constructors of ProfilerMarkerPayload and its subclasses into the
  .h file so they are visible even when ProfilerMarkerPayload.cpp isn't
  compiled.

- Similarly, using a macro to make StreamPayload() a crashing no-op when the
  profiler isn't enabled. (It is never called in that case.)

--HG--
extra : rebase_source : 7aad2fdb1bd4e49782024dba6664e8f992771520
2017-06-23 16:24:15 +10:00
Dylan Roeh e11705f181 Bug 1356921 - Enable SENSOR_ROTATION_VECTOR for DeviceOrientation events. r=esawin 2017-06-30 10:27:24 -07:00
Yoshi Huang 150b31524e Bug 1374944 - rewrite mochitest-3 tests for using data: URI. r=smaug 2017-06-30 10:21:52 -07:00
Sebastian Hengst d5b9a05962 Backed out changeset bc8aa66de70b (bug 1374944) for frequently timing out in test_fullscreen-api-race.html. r=backout 2017-06-29 21:42:23 +02:00
Yoshi Huang 8ebd97f178 Bug 1374944 - rewrite mochitest-3 tests for using data: URI. r=smaug 2017-06-29 10:46:25 -07:00
Carsten "Tomcat" Book 1367c473cd Merge mozilla-central to mozilla-inbound 2017-06-29 15:49:39 +02:00
Olli Pettay da0ec0a364 Bug 1375491, make child process to cache ime properties only at animation tick time, r=masayuki
--HG--
extra : rebase_source : 6f13f4d91fc4873d135824431adb4b0b2843b738
2017-06-29 14:46:11 +03:00
Masayuki Nakano 5a78a77b68 Bug 1375825 - part2: ContentEventHandler::ExpandToClusterBoundary() should check the return value of nsTextFrame::PeekOffsetCharacter() r=jfkthame
ContentEventHandler::ExpandToClusterBoundary() doesn't check the return value of nsTextFrame::PeekOffsetCharacter().  Therefore, it may set its result to reversed offset. (e.g., when aForward is true and offset is 6, the result may be 5.  When aForward is false and offset is 5, the result may be 6.)

For avoiding that, ContentEventHandler::ExpandToClusterBoundary() should check the result and only when it returns nsIFrame::FOUND, it should compute the proper offset.

On the other hand, it's too bad for ContentEventHandler that nsTextFrame::PeekOffsetCharacter() to return nsIFrame::CONTINUE_UNSELECTABLE when the user-select style is "all" because IME doesn't expect such cases.

Therefore, this patch adds additional argument to nsIFrame::PeekOffsetCharacter(), aOptions which is a struct containing bool members.  The reason why it's not a bit mask enum is, such struct doesn't cause simple mistake at checking the value and the code is shorter.  When mIgnoreUserStyleAll of it is true, this patch makes nsTextFrame not return nsIFrame::CONTINUE_UNSELECTABLE.

MozReview-Commit-ID: ACNNBTP92YZ

--HG--
extra : rebase_source : bd85da902e7fb59135d15514cb20a5599a4a640b
2017-06-29 10:58:16 +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
Sebastian Hengst 4da7fd48e3 Backed out changeset e744a3029de2 (bug 1375940) for failing dom/events/test/test_dblclick_kill_window.html. r=backout 2017-06-28 02:24:15 +02:00
Sebastian Hengst 6485200026 Backed out changeset 852f7fddf9a7 (bug 1375940) 2017-06-28 02:20:44 +02:00
Michael Layzell f4df168819 Bug 1375940 - Part 3: Fix test check to match updated behaviour, a=bustage
MozReview-Commit-ID: 22w56hVrJgI
2017-06-27 18:02:57 -04:00
Michael Layzell 068e7442ed Bug 1375940 - Part 1: Add a test for destroying a window during a click event while double-clicking, r=smaug
MozReview-Commit-ID: BdyWjvG9q8m
2017-06-27 16:24:48 -04:00
Ryan Hunt 1432b9109d Bug 1351783 part 8 - Gather whether there are key listeners on the focused element. r=kats,smaug
This commit updates FocusTarget to collect whether there are key listeners
on the event target chain for the focused element. This is needed because we
cannot do async scrolling when this is the case.

MozReview-Commit-ID: FhSyF6ffZ4

--HG--
extra : rebase_source : 3e7e8e88ddda1a6b9e8542c131fdbb37e578d7e1
2017-06-05 19:22:16 -05:00
Ryan Hunt 99499fb9d6 Bug 1351783 part 7 - Create FocusState and FocusTarget types. r=kats,botond
This commit begins the work needed for tracking focus by creating two new classes,
FocusTarget and FocusState. FocusState is created and used by APZCTreeManager to
track the global focus information, while FocusTarget is created per layer tree and
sent to APZ with local focus information. Between the two we are able to figure out
what the correct scrollable layer is to use in response to a keyboard scroll.

See the comment in `FocusState.h` for more details on the architecture and things
needed in future patches to complete this.

MozReview-Commit-ID: F75VZv3i9U2

--HG--
extra : rebase_source : 3d04bced8e13a9884f0c1b320bad8ba2205d7011
2017-06-05 19:12:22 -05: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
Florian Quèze 2924991bf6 Bug 1368456 - remove Promise.jsm imports in tests, r=mconley. 2017-06-23 11:25:52 +02:00
Nicholas Nethercote 58786e1ea7 Bug 1375392 - Tweak the PROFILER_LABEL* macros. r=mstange.
This patch makes the following changes to the macros.

- Removes PROFILER_LABEL_FUNC. It's only suitable for use in functions outside
  classes, due to PROFILER_FUNCTION_NAME not getting class names, and it was
  mostly misused.

- Removes PROFILER_FUNCTION_NAME. It's no longer used, and __func__ is
  universally available now anyway.

- Combines the first two string literal arguments of PROFILER_LABEL and
  PROFILER_LABEL_DYNAMIC into a single argument. There was no good reason for
  them to be separate, and it forced a '::' in the label, which isn't always
  appropriate. Also, the meaning of the "name_space" argument was interpreted
  in an interesting variety of ways.

- Adds an "AUTO_" prefix to PROFILER_LABEL and PROFILER_LABEL_DYNAMIC, to make
  it clearer they construct RAII objects rather than just being function calls.
  (I myself have screwed up the scoping because of this in the past.)

- Fills in the 'js::ProfileEntry::Category::' qualifier within the macro, so
  the caller doesn't need to. This makes a *lot* more of the uses fit onto a
  single line.

The patch also makes the following changes to the macro uses (beyond those
required by the changes described above).

- Fixes a bunch of labels that had gotten out of sync with the name of the
  class and/or function that encloses them.

- Removes a useless PROFILER_LABEL use within a trivial scope in
  EventStateManager::DispatchMouseOrPointerEvent(). It clearly wasn't serving
  any useful purpose. It also serves as extra evidence that the AUTO_ prefix is
  a good idea.

- Tweaks DecodePool::SyncRunIf{Preferred,Possible} so that the labelling is
  done within them, instead of at their callsites, because that's a more
  standard way of doing things.

--HG--
extra : rebase_source : 318d1bc6fc1425a94aacbf489dd46e4f83211de4
2017-06-22 17:08:53 +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
Nicholas Nethercote 915a56fb41 Bug 1375299 (part 2) - Remove PROFILER_MARKER. r=mstange.
PROFILER_MARKER is now just a trivial wrapper for profiler_add_marker(). This
patch removes it.

--HG--
extra : rebase_source : 9858f34763bb343757896a91ab7ad8bd8e56b076
2017-06-22 13:40:21 +10:00
Nicholas Nethercote 4b364cf3f3 Bug 1375299 (part 1) - Reduce usage of MOZ_GECKO_PROFILER. r=mstange.
This patch reduces the differences between builds where the profiler is enabled
and those where the profiler is disabled. It does this by removing numerous
MOZ_GECKO_PROFILER checks.

These changes have the following consequences.

- Various functions and classes are now defined in all builds, and so can be
  used unconditionally: profiler_add_marker(), profiler_set_js_context(),
  profiler_clear_js_context(), profiler_get_pseudo_stack(), AutoProfilerLabel.
  (They are effectively no-ops in non-profiler builds, of course.)

- The no-op versions of PROFILER_* are now gone. The remaining versions are
  almost no-ops when the profiler isn't built.

--HG--
extra : rebase_source : 8fb5e8757600210c2f77865694d25162f0b7698a
2017-06-22 06:26:16 +10:00
Wes Kocher 3bb3ab3c6b Merge m-c to inbound, a=merge
MozReview-Commit-ID: Ot7Jjxzf5r
2017-06-22 14:18:12 -07:00
Olli Pettay 8d489930b6 Bug 1374416 - don't dispatch the selectionchange event for pages that don't have such a listener registered, r=mystor
--HG--
extra : rebase_source : 7fb95e7f3c766b9de3a00175a0133093e2d194b1
2017-06-22 21:01:27 +03:00
Carsten "Tomcat" Book 7fa56f5378 Merge mozilla-central to autoland 2017-06-22 14:11:46 +02:00
Florian Quèze 5b8f8b884c Bug 1374282 - script generated patch to remove Promise.defer calls, r=Mossop. 2017-06-22 12:51:42 +02:00
Florian Quèze 66f6d259bc Bug 1374282 - script generated patch to remove Task.jsm calls, r=Mossop. 2017-06-22 12:51:42 +02: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
Ehsan Akhgari 4eac977034 Bug 1373857 - Part 3: Optimize the PostHandleEvent() events that we dispatch for checkboxes and radiocontrols when they get toggled in order to make it use direct WidgetEvent dispatch; r=smaug 2017-06-20 13:59:52 -04:00
Ehsan Akhgari 580222cb8e Bug 1373857 - Part 2: Add some AsyncEventDispatcher helpers for dispatching WidgetEvents directly; r=smaug 2017-06-20 13:59:52 -04:00
Boris Zbarsky 8afc692082 Bug 1373798 part 2. Introduce event state flags that track the state of an element's "dir" attribute. r=mystor
MozReview-Commit-ID: EDCV2fUWGmX
2017-06-19 23:24:59 -04:00
Wes Kocher 84816f4647 Backed out 5 changesets (bug 1373798) for browser_parseable_css.js failures a=backout CLOSED TREE
Backed out changeset ef2e6aa3ae88 (bug 1373798)
Backed out changeset 0970ac62b245 (bug 1373798)
Backed out changeset dc19b4db7e51 (bug 1373798)
Backed out changeset a5dd7744170e (bug 1373798)
Backed out changeset 2c8752c4b6fb (bug 1373798)

MozReview-Commit-ID: J1WkPvRqELs
2017-06-19 15:56:47 -07:00
Boris Zbarsky 54df8acf71 Bug 1373798 part 2. Introduce event state flags that track the state of an element's "dir" attribute. r=mystor
MozReview-Commit-ID: EDCV2fUWGmX

--HG--
extra : rebase_source : b2e588d6aab951eeb46b5b1e9321c82c83e0afa4
2017-06-19 14:41:58 -04:00