Commit Graph

2491 Commits

Author SHA1 Message Date
Kartikaya Gupta
ba4b3b9101 Bug 1384233 - Remove SizePrintfMacros.h. r=froydnj
We have a minimum requirement of VS 2015 for Windows builds, which supports
the z length modifier for format specifiers. So we don't need SizePrintfMacros.h
any more, and can just use %zu and friends directly everywhere.

MozReview-Commit-ID: 6s78RvPFMzv

--HG--
extra : rebase_source : 009ea39eb4dac1c927aa03e4f97d8ab673de8a0e
2017-07-26 16:03:57 -04:00
Carsten "Tomcat" Book
198430bca2 merge mozilla-inbound to mozilla-central a=merge 2017-07-26 11:11:40 +02:00
Makoto Kato
27cd039649 Bug 1383641 - GetFlatTextLengthInRange shouldn't use nsIDOMNode version of nsRange::SetStart. r=masayuki
nsGenericDOMDataNode::SetData uses GetFlatTextLengthInRange.  But GetFlatTextLengthInRange still use nsIDOMNode.  It means that we need additional QI twice.  So we should use nsINode version directly instead.

MozReview-Commit-ID: 3FX0uPGh53O

--HG--
extra : rebase_source : 1a4689ae8744062af8cc1f112b89075ddf3e1271
2017-07-24 18:29:19 +09:00
Masayuki Nakano
9d0610a118 Bug 1381732 - IMEStateManager::OnChangeFocusInternal() shouldn't set IME state when focus is not being changed, input context of the widget was already set by a remote process and our process is being activated r=m_kato
This patch fixes a simple mistake which was written when we support IME in e10s mode.

IMEStateManager::OnChangeFocusInternal() already has code which makes the method doesn't set IME state again when focus is not being changed, input context of the widget was already set by a remote process and our process is being activated.  However, the condition of checking if input context of the widget was set by which process is reversed.

MozReview-Commit-ID: 61ZH0VnKqPq

--HG--
extra : rebase_source : 14eb8e276e6307ed30d018d4385c454f80c1e831
2017-07-25 16:34:07 +09:00
Xidorn Quan
4a92d308fc Bug 1374872 - Disable tests involving web components for stylo. r=wchen
MozReview-Commit-ID: JWA210RkpAW

--HG--
extra : rebase_source : cd2a4ed75b43d500bf3a6e1e49eccb1bd38ed777
2017-06-21 14:51:37 +10:00
Stone Shih
ab1b5d8d46 Bug 1379949 - Explicitly hold OverOutElementsWrapper. r=smaug
MozReview-Commit-ID: AF8Gc0KABy7
2017-07-21 10:40:42 +08:00
Masayuki Nakano
c8d5ce8e59 Bug 1333459 - part4: Make EventStateManager resets "waiting reply from remote process" when the focused content isn't in remote process r=smaug
On macOS, we fall back eKeyPress event to native menu.  Therefore, widget always requests a reply from remote process because it's difficult to check if the eKeyPress event will be sent to a remote process actually.  If it's not sent to any remote processes, PresShell needs to dispatch the event into the DOM tree.  Additionally, even if it's marked as "waiting reply from remote process", it needs to dispatch the DOM event in the main process first because we need to check if the key combination is reserved by chrome (if it's reserved, the eKeyPress event shouldn't be fired in the remote process).

Therefore, this patch makes EventStateManager::PreHandleEvent() resets the state when focused content isn't in any remote processes and the event's propagation hasn't been stopped.

Additionally, this patch makes PresShell::HandleEventInternal() checks WidgetEvent::PropgationStopped() with WidgetEvent::IsWaitingReplyFromRemoteProcess() before dispatching the event into the DOM tree.

MozReview-Commit-ID: FmgL3rCuQ8y

--HG--
extra : rebase_source : aa8d6b924fc78d1d9dd35a35c92976c35c758657
2017-07-21 17:22:08 +09:00
Masayuki Nakano
44d5a33919 Bug 1333459 - part2-2: EventStateManager should check if it needs to wait reply from remote content before handling access keys r=smaug
Currently, access key is handled in EventStateManager::PreHandleEvent() with eKeyPress event, i.e., before dispatching it into the DOM tree, if the access key is registered in EventStateManager.  So, the main process does not check if the preceding eKeyDown event is consumed in focused remote process.

When preceding eKeyDown event is consumed in the main process, eKeyPress event won't be dispatched by widget.  However, if remote process has focus, it's impossible widget to stop dispatching eKeyPress event because preceding eKeyDown event hasn't been handled in the focused remote process yet.  Therefore, main process needs to post eKeyPress event to check if preceding eKeyDown event was consumed.  When eKeyPress event is marked as "waiting reply from remote process", TabChild sends it back to the main process only when preceding eKeyDown event wasn't consumed.  So, only when eKeyPress event is back to the main process, main process should handle accesskey with it.

This patch makes EventStateManager::PreHandleEvent() check if a remote target has focus before handling accesskey.  If a remote process has accesskey and there is an accesskey matching with eKeyPress event, it marks the event as "waiting reply from remote content" and stop propagation in the process.

Finally, when eKeyPress event is sent back to TabParent, TabParent::RecvReplyKeyEvent() calls EventStateManager::HandleAccessKey() before dispatching the reply event into the DOM tree.

MozReview-Commit-ID: KsOkakaIVzb

--HG--
extra : rebase_source : 7e0c6966a1bde085e34d45bca4b0166b9fc2f3f1
2017-07-22 10:50:41 +09:00
Masayuki Nakano
908b7f2e51 Bug 1333459 - part2-1: EventStateManager should have a way to check if there is accesskey which is executed by a specific keyboard event r=smaug
Protected EventStateManager::HandleAccessKey() walks ESMs to handle access key and EventStateManager::ExecuteAccessKey() looks for an accesskey which matches given char code values and execute an accesskey if it finds a target.  These names are hard to understand what they do and we need an option not to execute accesskey but looks for a target.  Therefore, this patch renames the former to WalkESMTreeToHandleAccessKey() and the latter to LookForAccessKeyAndExecute().

Then, they take a new bool argument, aExecute.  When it's true, LookForAccessKeyAndExecute() executes found accesskey.  Otherwise, i.e., it's false, they return true if they find an accesskey target for the given event in the process.

MozReview-Commit-ID: ETYbNmtTMGj

--HG--
extra : rebase_source : 553676384db5f795de1087a439f30eded11d22fe
2017-07-20 17:33:53 +09:00
Masayuki Nakano
6c68caecd7 Bug 1333459 - part1: Move methods of EventStateManager which check modifiers of access key to WidgetKeyboardEvent r=smaug
EventStateManager checks if every keypress event's modifiers match with access key modifiers which are in prefs. Moving related methods of this to WidgetKeyboardEvent makes EventStateManager simpler and we can hide the NS_MODIFIER_* constants (they may make developers confused between Modifiers of WidgetInputEvent) into WidgetEventImpl.cpp.

MozReview-Commit-ID: 23NUQ51lJ1M

--HG--
extra : rebase_source : 341f3764ef62575577572d8b349159e2d5512b26
2017-07-06 17:36:19 +09:00
Wes Kocher
d45eb771f0 Merge m-c to inbound, a=merge
MozReview-Commit-ID: Ah48RzFU8Mt
2017-07-21 18:20:46 -07:00
Wes Kocher
051dc17e6c Merge inbound to central, a=merge CLOSED TREE
MozReview-Commit-ID: GYc8r8gnS0j
2017-07-21 18:12:55 -07:00
Ehsan Akhgari
bdbc611bd3 Bug 1382917 - Avoid AddRef()ing the Range object in IMEContentObserver::InitWithEditor(); r=smaug 2017-07-21 10:40:01 -04:00
Stone Shih
de2f289129 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
Johann Hofmann
3eac596d72 Bug 1371219 - Add an inputSource attribute to XULCommandEvent. r=smaug
In the frontend we need to know if XUL buttons in the toolbar were
triggered by a touch event, so we're passing on the inputSource
in the command event.

MozReview-Commit-ID: DMvgZULk9hT

--HG--
extra : rebase_source : c455c8ec77e439bf02c1e3e8d34a36e1fb5e3bd0
2017-07-20 17:45:56 +02:00
Nicholas Nethercote
6e6ae2ea9b Bug 1382099 - Remove MOZ_WIDGET_GONK from several dom/ subdirectories. r=mccr8,jdm.
As well as the obvious #ifdef stuff, the patch removes
TCPSocket::SetAppIdAndBrowser(), which means
{TCPSocketParent,TCPServerSocketParent}::{GetAppId,GetInIsolatedMozBrowser}()
can also be removed.
2017-07-21 10:52:44 +10:00
Jessica Jong
3342b6100d Bug 1375599 - Change IsDisabled() to look at NS_EVENT_STATE_DISABLED instead of the "disabled" attribute. r=bz
In order to speed up IsDisabled(), instead of querying for the @disabled
attribute, we're now using the NS_EVENT_STATE_DISABLED flag to know whether an
element is disabled.
It is safe to use the NS_EVENT_STATE_DISABLED flag for the following reasons:
- For form elements, nsGenericHTMLFormElement::IsDisabled() is only called on
  form elements that can be disabled; form elements that can't be disabled
  overrides IsDisabled() to return false directly.
  And, before this patch, NS_EVENT_STATE_DISABLED flag is set by
  nsGenericHTMLFormElement::IntrinsicState() if and only if IsDisabled() in all
  cases when CanBeDisabled() is true, and when CanBeDisabled() is false then
  IsDisabled() is always false and the flag is not set.
- For non form elements, optgroup and option have the flag matching
  IsDisabled(). Note that option's IsDisabled() should also refer to optgroup's
  (if it exists) disabled state, which was not done before this patch.

For this to work correctly, we need to set NS_EVENT_STATE_DISABLED earlier,
that is, in AfterSetAttr(), before any consumer of IsDisabled().
We also need to update the flag whenever the element's parent (e.g. fieldset or
optgroup) disabled state changes and when moving into/out of a parent
container.

Note that NS_EVENT_STATE_DISABLED/ENABLED is now part of the
EXTERNALLY_MANAGED_STATES.

MozReview-Commit-ID: KSceikeqvvU
2017-07-20 02:15:00 -04:00
Jim Chen
41148177ef Bug 1351170 - 1. Correctly calculate start offset for non-text nodes; r=masayuki
When the start node is a non-container node (i.e. <br>), and the start
offset is 0, we should not include a newline character for the node. For
example, for this range,

> <br/>hello
>  \___/

the start node/offset is (<br/>, 0) and end node/offset is ("hello", 1).
The calculated range offset should be 0, and the range length should be
2: 1 for the <br/> newline character plus 1 for "h".

The patch also ensures this behavior for pre-mode nsContentIterator, for
both start and end node adjustments. For start nodes, we include any
non-container nodes with offset 0 in the range. For end node, we exclude
any non-container nodes with offset 0 from the range.

MozReview-Commit-ID: Lt2tCLbapq7

--HG--
extra : rebase_source : 7d86b6cf04581f1cd71fa85f8c8586541b3a84e9
2017-07-19 14:29:59 -04:00
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
Stone Shih
9573b6e439 Bug 1351148 Part2: Add a priority queue for input events. r=smaug.
MozReview-Commit-ID: 5ud1Ex9UNVo
2017-03-21 15:44:12 +08: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
Nicholas Nethercote
5d3808c6e5 Bug 1373436 (part 4) - Use UniquePtr with profile_add_marker(). r=mstange.
Once the |aPayload| argument to profile_add_marker() became a UniquePtr the
default value of nullptr caused compilation difficulties that could only be
fixed by #including ProfilerMarkerPayload.h into lots of additional places
(because the UniquePtr<T> instantiation required the T to be fully defined). To
get around this I just split profile_add_marker() into two functions, one with
1 argument and one with 2 arguments.

The patch also removes the definition of PROFILER_MARKER_PAYLOAD in the case
where MOZ_GECKO_PROFILER isn't defined. A comment explains why.
2017-06-16 12:26:26 +10:00
Ehsan Akhgari
8e9e1f185c Bug 1374036 - Annotate the unlikely branches in EventListenerManager::ListenerCanHandle() in order to allow the optimizer to reorder code more effectively; r=smaug 2017-06-18 12:06:34 -04:00
Ryan Hunt
fd8c1c280d Bug 1373285 - Remove keyboard apz telemetry probes. r=smaug
These are no longer needed as we have the data we were looking for.

MozReview-Commit-ID: 3WlPng3mAwt

--HG--
extra : rebase_source : 73a390f85f5c0894d53a5e8ee10b19278af58282
extra : amend_source : 6a2b9ff4191715d0ac6e43f92af1e64c59123ac6
2017-06-15 13:55:26 -05:00
Mats Palmgren
185a60c094 Bug 1372327 - Use LookupForAdd instead of Get+Put to avoid unnecessary hashtable lookups. r=froydnj
MozReview-Commit-ID: 5J6Ea73JX4f
2017-06-14 17:27:25 +02:00
Mats Palmgren
b909321f2a Bug 1372342 - Use LookupForAdd instead of Get+Put to avoid unnecessary hashtable lookups. r=froydnj
MozReview-Commit-ID: LAxL0tVtrFF
2017-06-14 17:27:25 +02:00
Olli Pettay
68da6780f3 bug 1367372, skip to be removed listeners when asking for listener info, r=xidorn 2017-06-14 02:40:35 +03: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
Jonathan Hao
dca1a28633 Bug 1217238 - Reduce time precision when privacy.resistFingerprinting is on. r=mystor
This patch is adapted from Tor bug 1517.

To offer some protection against timing attacks by JS content pages, in this
patch we round the various time-exposing APIs (such as Date and
Event.timeStamps) to the nearest 100 ms when the pref "privacy.resistFingerprinting" is on.

MozReview-Commit-ID: eGucM9nGTn

--HG--
extra : rebase_source : 3ee600b07943f3954e9a2a9561391f2f7821bb86
2017-06-06 11:45:14 +08:00
Masayuki Nakano
696e4cb85a Bug 1250823 part 2 - IMEContentObserver should cache adding ranges as a range during document change r=smaug
Between nsIDocumentObserver::BeginUpdate() and nsIDocumentObserver::EndUpdate(), IMEContentObserver can cache added nodes as a range if they are consecutive nodes.  Even if a node is removed, a data node is changed or attribute is changed unexpectedly, IMEContentObserver can post text change of the added node range and handle it normally.

MozReview-Commit-ID: IttDHBkr92Y

--HG--
extra : rebase_source : f0849d5fab0b28bdfa311cf833a216d43b9215d2
2017-06-08 11:24:58 +09:00
Masayuki Nakano
a5bc18e848 Bug 1250823 part 1 - Implement DocumentObserver as a nested class of IMEContentObserver for observing to begin and end update r=smaug
IMEContentObserver can reduce the number of times to compute node offsets with caching all added nodes as a range.  For that, it needs to know when it starts to update and ends updating the document.

nsIDocumentObserver is a subclass of nsIMutationObserver and IMEContentObserver is a mutation observer of editor's root content.  Therefore, if we change IMEContentObserver to a document observer, each mutation observer method needs to check if the change occurs in the observing editor.  Therefore, this patch implements document observer as its nested class and manages it as a member of IMEContentObserver.

MozReview-Commit-ID: HPSPfajxjnx

--HG--
extra : rebase_source : fd4bdcc24759040fb6c39317024049a3a924fc67
2017-06-08 11:21:28 +09:00
Peter Van der Beken
2310b3bd39 Bug 558184 - Part 8 - Load js plugins in a separate process. r=billm.
Every JS plugin is assigned a unique ID. When an instance of a JS plugin is created the
frame loader that we use to load the plugin's handler URI will create a special
TabContext. This TabContext causes the ContentParent to use the process for this specific
JS plugin (creating one if it hasn't already) when it creates the PBrowser actors.
This causes the iframes for all the instances of a specific JS plugin to be grouped in the
same process.

--HG--
extra : rebase_source : c39560bdf66cda1a005c7b823b3a46e4734878a4
extra : source : 9cba1db527c7eed4371c9f4caf96fd942608cab6
2017-05-29 12:38:46 +02:00
Masayuki Nakano
61af94acbd Bug 1367683 Optimize initializing nsRange r=smaug
nsRange::DoSetRange() adds/remove its root to/from mutation observer, initializes common ancestor, registers itself to the common ancestor, unregisters itself from old common ancestor, and notifies selection listeners of selection change.

However, those runtime cost is expensive but on the other hand, a lot of callers set both start and end of the range and that causes calling DoSetRange() twice.

This patch renames Set() to SetStartAndEnd() for easier to understand the meaning and make it call DoSetRange() only once.

MozReview-Commit-ID: FRV55tuBAgg

--HG--
extra : rebase_source : 67adf929cf119e2425f7d3741651217522094590
2017-05-30 13:18:25 +09:00
Stone Shih
d6d397a215 Bug 1355548 - Using cached perference values in WheelTransaction. r=masayuki
EventStateManager uses preferences of WheelTransaction frequently. Caches them to reduce overheads.

MozReview-Commit-ID: HhuCKu5QVsh
2017-04-13 10:41:23 +08:00
Bill McCloskey
691628a34e Bug 1364570 - Dispatch link prefetch events asynchronously to avoid DocGroup mismatches (r=bz)
When we send out a prefetch request, we act as if the load came
from one of the possibly many documents containing <link> element
for the given URL. The docgroup assigned to this request is
derived from this document. Later, when the load finishes, the
OnStopRequest code runs in a runnable labeled with this
docgroup. OnStopRequest dispatches a load event to *all* the link
elements, including some that might be in different docgroups
from the OnStopRequest runnable. This generates an assertion.

To fix this, I decided to dispatch the load events
asynchronously. I'm hoping the extra round trip through the event
loop shouldn't hurt us too much since I doubt anyone actually
listens for these events.

MozReview-Commit-ID: FTkjuHO7RFp
2017-05-23 13:56:49 -07:00
Ryan VanderMeulen
41f95294f5 Backed out changeset eeb73d8c0542 (bug 1364570) for static analysis failures on a CLOSED TREE. 2017-05-23 15:31:16 -04:00
Bill McCloskey
79d1a76b44 Bug 1364570 - Dispatch link prefetch events asynchronously to avoid DocGroup mismatches (r=bz)
When we send out a prefetch request, we act as if the load came
from one of the possibly many documents containing <link> element
for the given URL. The docgroup assigned to this request is
derived from this document. Later, when the load finishes, the
OnStopRequest code runs in a runnable labeled with this
docgroup. OnStopRequest dispatches a load event to *all* the link
elements, including some that might be in different docgroups
from the OnStopRequest runnable. This generates an assertion.

To fix this, I decided to dispatch the load events
asynchronously. I'm hoping the extra round trip through the event
loop shouldn't hurt us too much since I doubt anyone actually
listens for these events.

MozReview-Commit-ID: FTkjuHO7RFp
2017-05-23 12:04:31 -07:00
Mats Palmgren
297b9d70e1 Bug 1365614 part 3 - Backout bug 1333482 part 1-9. Removes support for [-webkit-]appearance for now b/c web compat issues. r=bz
MozReview-Commit-ID: IbwWM0FL6HF

--HG--
extra : source : bbb688fe1ba3f5201a190c6e25b693ef7272ea2d
2017-05-21 17:15:00 +08:00
Carsten "Tomcat" Book
00d4ea331d Backed out changeset bbb688fe1ba3 (bug 1365614) 2017-05-22 15:45:31 +02:00
Mats Palmgren
e706869580 Bug 1365614 part 3 - Backout bug 1333482 part 1-9. Removes support for [-webkit-]appearance for now b/c web compat issues. r=bz 2017-05-21 17:15:00 +08:00
Michael Layzell
0700aeac13 Bug 1360441 - Disable the IsHandlingUserInput timeout for execCommand(copy/cut) commands, r=ehsan
MozReview-Commit-ID: 341K1DEsVCg
2017-05-18 16:51:48 -04:00
Stephen A Pohl
99336e02ef Bug 429824: Properly forward native OSX events to the native menu bar if they haven't been handled by the child process in e10s. r=mstange,masayuki 2017-05-15 22:59:35 -04:00
Kartikaya Gupta
75759ac516 Bug 1360568 - Update wheel event coordinates to account for different styling on Ubuntu 16.04. r=jmaher
MozReview-Commit-ID: 5t2vTbsdzg4

--HG--
extra : rebase_source : 86965bb9617b0c218d3ac32ad8b6c9070312e0db
2017-05-11 15:26:44 -04:00
Yoshi Huang
6f3ea4d1b4 Bug 1361641 - Part 1: convert mochitest plain tests in dom to use srcdoc. r=smaug 2017-05-09 10:25:23 +08:00
Andrea Marchesini
1981f67eb3 Bug 1362119 - part 1 - Moving dom/base/Script{Loader,Element}.* in dom/script, r=ehsan
This patch does these things:

1. it moves nsScriptElement, nsScriptLoader, ScriptSettings, nsIScriptElement
   and nsIScriptLoaderObserver in dom/script
2. it renames nsScriptElement to mozilla::dom::ScriptElement
3. it renames nsScriptLaoder to mozilla::dom::ScriptLoader

--HG--
rename : dom/base/nsScriptElement.cpp => dom/script/ScriptElement.cpp
rename : dom/base/nsScriptElement.h => dom/script/ScriptElement.h
rename : dom/base/nsScriptLoader.cpp => dom/script/ScriptLoader.cpp
rename : dom/base/nsScriptLoader.h => dom/script/ScriptLoader.h
rename : dom/base/ScriptSettings.cpp => dom/script/ScriptSettings.cpp
rename : dom/base/ScriptSettings.h => dom/script/ScriptSettings.h
rename : dom/base/nsIScriptElement.h => dom/script/nsIScriptElement.h
rename : dom/base/nsIScriptLoaderObserver.idl => dom/script/nsIScriptLoaderObserver.idl
2017-05-08 08:24:22 +02:00
Carsten "Tomcat" Book
f0d6de60d7 Backed out changeset 5d77f6b14633 (bug 1362119) for android bustage in nsCCUncollectableMarker.cpp:500:7: error: 'TraceScriptHolder' is not a member of 'mozilla'
--HG--
rename : dom/script/ScriptSettings.cpp => dom/base/ScriptSettings.cpp
rename : dom/script/ScriptSettings.h => dom/base/ScriptSettings.h
rename : dom/script/nsIScriptElement.h => dom/base/nsIScriptElement.h
rename : dom/script/nsIScriptLoaderObserver.idl => dom/base/nsIScriptLoaderObserver.idl
rename : dom/script/ScriptElement.cpp => dom/base/nsScriptElement.cpp
rename : dom/script/ScriptElement.h => dom/base/nsScriptElement.h
rename : dom/script/ScriptLoader.cpp => dom/base/nsScriptLoader.cpp
rename : dom/script/ScriptLoader.h => dom/base/nsScriptLoader.h
2017-05-08 09:54:38 +02:00
Andrea Marchesini
7a4ef797cb Bug 1362119 - part 1 - Moving dom/base/Script{Loader,Element}.* in dom/script, r=ehsan
This patch does these things:

1. it moves nsScriptElement, nsScriptLoader, ScriptSettings, nsIScriptElement
   and nsIScriptLoaderObserver in dom/script
2. it renames nsScriptElement to mozilla::dom::ScriptElement
3. it renames nsScriptLaoder to mozilla::dom::ScriptLoader

--HG--
rename : dom/base/nsScriptElement.cpp => dom/script/ScriptElement.cpp
rename : dom/base/nsScriptElement.h => dom/script/ScriptElement.h
rename : dom/base/nsScriptLoader.cpp => dom/script/ScriptLoader.cpp
rename : dom/base/nsScriptLoader.h => dom/script/ScriptLoader.h
rename : dom/base/ScriptSettings.cpp => dom/script/ScriptSettings.cpp
rename : dom/base/ScriptSettings.h => dom/script/ScriptSettings.h
rename : dom/base/nsIScriptElement.h => dom/script/nsIScriptElement.h
rename : dom/base/nsIScriptLoaderObserver.idl => dom/script/nsIScriptLoaderObserver.idl
2017-05-08 08:24:22 +02:00
Iris Hsiao
0b748916e8 merge mozilla-inbound to mozilla-central a=merge 2017-05-08 11:11:20 +08:00
Ray Lin
fb62d2146b Bug 1361244 - Add an internal -moz-autofill-preview pseudo class for styling preview fields. r=heycam
MozReview-Commit-ID: 6siKEgBPTKt
2017-05-04 13:54:34 +08:00
Henri Sivonen
c18a3863eb Bug 1269490 - Merge nsHtml5Atoms into nsGkAtoms. r=wchen
MozReview-Commit-ID: EcfnXkFuJy3

--HG--
extra : rebase_source : eb4ba2c1b95a9ccabdcdecf65f3b757691f033b8
2017-04-20 11:47:02 +03:00
Emilio Cobos Álvarez
6e1af77eca Bug 1361301: Add nsContentUtils::GetCommonFlattenedTreeAncestor. r=smaug
MozReview-Commit-ID: EVyjTrjpid2

--HG--
extra : rebase_source : 7f0933c88b78275682be96f3ea596bfb24ec9aa4
2017-05-03 12:58:34 +02:00
Masayuki Nakano
d04632f559 Bug 1342552 - IMEStateManager should cache nsIWidget for sPresContext and use it. r=smaug
IMEStateManager should cache nsIWidget for sPresContext at caching sPresContext.  Then, even if sPresContext has gone, IMEStateManager can clean up with the nsIWidget cache.

Unfortunately, editor has some bugs about calling IMEStateManager::UpdateIMEState().  That is, calling it *before* IMEStateManager::OnFocusChange().  In such case, this patch makes UpdateIMEState() ignore the call.

MozReview-Commit-ID: 1cydI03WyB8
2017-04-20 13:43:50 +09:00
Carsten "Tomcat" Book
2a74ba4261 Merge mozilla-central to autoland 2017-05-02 11:23:38 +02:00
Emilio Cobos Álvarez
23bce99ae1 Bug 1361051: rename mozilla::FrameType to mozilla::LayoutFrameType. r=xidorn
This avoids conflicts with mozilla::dom::FrameType.

MozReview-Commit-ID: 7aEMbHRaTFk

--HG--
extra : rebase_source : 2d01321f5ce0ec8c0e3f70984674f82678034b3c
2017-05-01 19:32:52 +02:00
Ryan Hunt
d5bf64b9d4 Bug 1357880 - Add a telemetry probe for mousemove event listeners r=smaug, data-review=bsmedberg
This commit adds a telemetry probe to determine the percentage of pages
that ever have a 'mousemove' event listener added to the DOM. This is for
determining how often APZ key scrolling could handle interleaved mousemove
events.

A flag is added to nsPIDOMWindow to track whether a qualifying event
listener was ever added to the DOM for this window, and is updated by
EventListenerManager. There are several other similar flags to this.

The probe is reported in nsGlobalWindow::FreeInnerObjects() so that it
can be compared exactly with the non-passive keyboard listener APZ probe.

MozReview-Commit-ID: DqqCfrdRCGp

--HG--
extra : rebase_source : fad8159c28b587572a4191f7cbde1e97e166639c
2017-04-26 18:56:51 -04:00
Ryan Hunt
ebd2c4d010 Bug 1357880 - Add a telemetry probe for non-passive keyboard event listeners r=smaug, data-review=bsmedberg
This commit adds a telemetry probe to track the percentage of pages that ever
have a non-passive 'keydown' or 'keypress' event that could preventDefault()
APZ key scrolling of the root of a page.

A flag is added to each EventListenerManager to track whether it ever had
a qualifying event listener, and then in nsGlobalWindow::FreeInnerObjects()
the event targets that could preventDefault() a scroll are checked for this
flag. This check is done at nsGlobalWindow::FreeInnerObjects() so that the
DOM is still alive.

MozReview-Commit-ID: EkK3vxehZA5

--HG--
extra : rebase_source : 4642189d0065254cf74dfe8475403f0bf8210bca
2017-04-27 18:32:08 -04:00
Sebastian Hengst
71ca1d9609 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 4QFAkv28IPJ
2017-05-01 11:21:49 +02:00
Emilio Cobos Álvarez
e44543aad4 Bug 1360241: Devirtualize nsIFrame::GetType. r=heycam
MozReview-Commit-ID: 5Nzhyta5Hle

--HG--
extra : rebase_source : c2e9d4bfb9239f5e851d110cd7dff98c1e1a8d8b
2017-04-30 17:30:08 +02:00
Nicholas Nethercote
273ec65c56 Bug 1123754 (part 1) - Rename ProfilerMarkers.{h,cpp} as ProfilerMarkerPayload.{h,cpp}. r=mstange.
Because ProfilerMarkerPayload is the main type defined in these files, and
because the next patch is going to introduce ProfilerMarker.{h,cpp}, which
would be confusingly similar to the old names.

--HG--
rename : tools/profiler/core/ProfilerMarkers.cpp => tools/profiler/core/ProfilerMarkerPayload.cpp
rename : tools/profiler/public/ProfilerMarkers.h => tools/profiler/public/ProfilerMarkerPayload.h
extra : rebase_source : df22a2ab3867650348ae78fe959ff0366aff230b
2017-04-27 07:36:19 +10:00
Masayuki Nakano
78a637e5f7 Bug 1359547 EventStateManager should grab IMEContentObserver with local variable before calling HandleQueryContentEvent() r=smaug 2017-04-28 20:09:55 +09:00
Masatoshi Kimura
a4c9e326d4 Bug 1358758 - Use CSSIntRect for nsIFrame::GetScreenRect. r=kats
MozReview-Commit-ID: KXPL1ERbFDa

--HG--
extra : rebase_source : 263b18d1736b09bb62d914f066481281966b288c
2017-04-25 07:33:13 +09:00
Jared Wein
7dbb0e91c3 Bug 1347413 - Remove the unused browser-fullZoom:zoomReset and browser-fullZoom:zoomChange notifications. r=dao,mccr8
MozReview-Commit-ID: GeqfVngo9QT
2017-03-15 11:26:57 -04:00
Aryeh Gregor
af57d2df0f Bug 1251198 - Remove various obsolete events from document.createEvent r=smaug
Other browsers do not support any of these (IIRC), telemetry reports
essentially zero usage, and supporting them is contrary to the DOM spec.

Notes on specific events:

CommandEvent and SimpleGestureEvent: These are not supposed to be
web-exposed APIs, so I hid the interfaces from web content too
(necessary to avoid test_all_synthetic_events.html failures).

DataContainerEvent: This was a non-standard substitute for CustomEvent
that seemed to have only one user, so I removed it entirely and switched
the user (MozillaFileLogger.js) to CustomEvent.

ScrollAreaEvent: This is entirely non-standard, but we apparently expose
it deliberately to web content, so I didn't see any reason to remove it
from createEvent.

SimpleGestureEvent and XULCommandEvent: Can still be created from
createEvent(), but not by content.

TimeEvent: This is still in because it has no constructor, so there's no
other way to create it.  Ideally we'd update the SMIL spec to add a
constructor.  I did remove TimeEvents.

MozReview-Commit-ID: 7Yi2oCl9SM2

--HG--
extra : rebase_source : 199ab921acfc531b8b85e77f90fcd799b03c887b
2017-04-20 15:45:37 +03:00
Wes Kocher
05a47acee9 Merge m-c to inbound a=merge
MozReview-Commit-ID: 3NCtyMc525N
2017-04-24 16:14:52 -07:00
Olli Pettay
933a8daf58 Bug 1357872, nsPresContext is refcounted, so use it so, r=kats 2017-04-25 00:38:33 +03:00
Stone Shih
1f07ae94aa Bug 1357995 - Run the full screen test in a new window so that we can access to fullscreen API after pushing preference. r=masayuki
MozReview-Commit-ID: KGrOWUl453C

--HG--
extra : rebase_source : ad62689236d0f164b88309b606898a995bd609e8
2017-04-20 13:00:23 +08:00
btian
97ecce399a Bug 1357638 - Use Preferences::AddBoolVarCache() to accelerate dom.forms.inputmode access in IMEStateManager::SetIMEState(), r=masayuki
MozReview-Commit-ID: 8SMud0v3jFr

--HG--
extra : rebase_source : 262b33a1076a3a9c7b6d2d9794221bff756664fc
2017-04-21 14:48:36 +08:00
Masayuki Nakano
7b52d07cd2 Bug 1217700 part.2 IMEContentObserver should observe all possible notifications and check if it should be notified when it occurs r=m_kato
IMEContentObserver can store pointer of IMENotificationRequests of its mWidget.  Therefore, it can check the requests dynamically when it receives content change or layout change.

This patch makes IMEContentObserver stores IMENotificationRequests as pointer and check it at every change notification received.  Additionally, notification request may be changed due to focus move or something.  Therefore, this patch makes IMEContentObserver and IMEContentObserver::IMENotificationSender() check if the notifications are still necessary.

MozReview-Commit-ID: 2uU2wN15D8v

--HG--
extra : rebase_source : 6086e0293343632df43087c767ad00521e764476
2017-04-13 14:32:12 +09:00
Masayuki Nakano
0789f7b595 Bug 1217700 part.1 nsIWidget should return reference to IMENotificationRequests r=m_kato
IMEContentObserver may need to change notifications to send when TextInputProcessor begins input transaction.  In current design, IMEContentObserver needs to retrieve IMENotificationRequests at every change.  However, if nsIWidget returns a reference to its IMENotificationRequests, IMEContentObserver can call it only once.

For that purpose, this patch changes nsIWidget::GetIMENotificationRequests() to nsIWidget::IMENotificationRequestsRef() and make it return |const IMENotificationRequests&|.  However, if the lifetime of the instance of IMENotificationRequest is shorter than the widget instance's, it's dangerous.  Therefore, it always returns TextEventDispatcher::mIMENotificationRequests.  TextEventDispatcher's lifetime is longer than the widget.  Therefore, this guarantees the lifetime.

On the other hand, widget needs to update TextEventDispatcher::mIMENotificationRequests before calls of nsIWidget::IMENotificationRequestsRef().  Therefore, this patch makes TextEventDispatcher update proper IMENotificationRequests when it gets focus or starts new input transaction and clear mIMENotificationRequests when it loses focus.

Note that TextEventDispatcher gets proper requests both from native text event dispatcher listener (typically, implemented by native IME handler class) and TextInputProcessor when TextInputProcessor has input transaction because even if TextInputProcessor overrides native IME, native IME still needs to know the content changes since they may get new input transaction after that.

However, there may not be native IME handler in content process.  If it runs in Android, PuppetWidget may have native IME handler because widget directly handles IME in e10s mode for Android.  Otherwise, native IME handler is in its parent process.  So, if TextInputHandler has input transaction in content process, PuppetWidget needs to behave as native event handler.  Therefore, this patch makes PuppetWidget inherit TextEventDispatcherListener and implements PuppetWidget::IMENotificationRequestsRef().

MozReview-Commit-ID: 2SW3moONTOX

--HG--
extra : rebase_source : d2634ada6c33dbf7a966fadb68608411ee24bfab
2017-04-15 01:35:58 +09:00
Luke Chang
03c1939e54 Bug 1355438 - [Form Autofill] Implement an internal-only pseudo-class for highlighting elements with an autofilled value. r=heycam
MozReview-Commit-ID: BUqAWSekPsh

--HG--
extra : rebase_source : c3c9b7a98ca5895eb56c8b07b4c3845e6ac71de0
2017-04-20 17:44:14 +08:00
Wes Kocher
cb8ce82cca Merge inbound to m-c a=merge 2017-04-19 17:10:04 -07:00
Carsten "Tomcat" Book
7bcdfe36bc Merge mozilla-central to autoland 2017-04-19 10:57:24 +02:00
Mike Hommey
34e619d1c1 Bug 1357323 - Remove support for gonk in the build system. r=gps
Everything depending on the widget being gonk can go away, as well as
everything depending on MOZ_AUDIO_CHANNEL_MANAGER, which was only
defined on gonk builds under b2g/ (which goes away in bug 1357326).

--HG--
extra : rebase_source : 9f0aeeb7eea8417fa4e06d662d566d67ecaf2a24
2017-04-18 16:56:09 +09:00
Andrea Marchesini
50e007bc26 Bug 1357411 - Use IgnoredErrorResult in dom/events/ContentEventHandler.cpp, r=qdot 2017-04-18 21:11:08 +02:00
Andrea Marchesini
b623ab29ec Bug 1354599 - Implement DOMEventTargetHelper::KeepAliveIfHasListenersFor, r=smaug 2017-04-18 13:51:27 +02:00
Michael Layzell
52e859430e Bug 1352281 - Include KIND_OTHER types in DataTransfer.types, r=baku
MozReview-Commit-ID: EoqzAydaLea
2017-04-17 14:57:25 -04:00
Kartikaya Gupta
4444fcf4d5 Bug 1356695 - Don't expose DOM touch APIs with autodetection if APZ is disabled. r=smaug
When the dom.w3c_touch_events.enabled pref is set to "2" (autodetect) on Win/Linux,
it checks to see if the hardware supports touch events, and only enables the
DOM touch APIs if so. However, even if the hardware supports touch events, we
might have e10s or APZ disabled for other reasons, and in those cases we don't
actually turn on touch support in the widget (nsBaseWidget::RegisterTouchWindow
will not be called). So in those cases the widget will never actually dispatch
touch events, and the DOM touch APIs shouldn't be exposed either. This patch
implements this by checking the APZ state when deciding whether or not to
expose the DOM touch APIs.

MozReview-Commit-ID: EIvJh030b0X
2017-04-17 11:56:22 -04:00
Bill McCloskey
207af130a2 Bug 1343396 - Split CycledCollectedJSContext and XPCJSContext into separate context and runtime classes (r=mccr8)
To run JS in separate cooperative threads, we need to split up per-thread state
from per-runtime state. This patch does that for XPConnect.

MozReview-Commit-ID: 407SlJ7nR6v
2017-04-18 17:01:04 -07:00
Florian Queze
37ff4fc7cc Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Sebastian Hengst
a07223d699 Backed out changeset 322fde2d53bf (bug 1356569) so bug 1355161 can be backed out. r=backout 2017-04-14 23:39:22 +02:00
Florian Queze
95d4d20c17 Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Dan Banner
cdf987089d Bug 1107904 - Remove packed.js and references to it as it is unused. r=standard8
MozReview-Commit-ID: K5TLF92pHq4

--HG--
extra : rebase_source : 295bf325a07fa8ec4c55a8babf5418588308dca6
2017-04-12 11:10:00 +01:00
Wes Kocher
25d50f2c30 Merge inbound to central, a=merge 2017-04-12 14:39:09 -07:00
Stone Shih
2e53cceb40 Bug 1343760 - Label runnables in dom/events. f=bevistseng, r=smaug
--HG--
extra : rebase_source : c2d35e779f62b715f8077e326933303bfd85d197
2017-03-16 08:11:50 +08:00
Masayuki Nakano
61ce5526c6 Bug 1296220 Rename nsIMEUpdatePreference to mozilla::widget::IMEUpdatePreference r=m_kato
MozReview-Commit-ID: 2rIXTlwA6my

--HG--
extra : rebase_source : a51be3edd717092738c2b5e8ccc4f60540712bfd
2017-04-11 21:24:55 +09:00
Andrea Marchesini
3535802d8b Bug 1354441 - Update MediaQueryList to the latest version of the spec, r=jwatt 2017-04-10 16:29:06 +02:00
Aryeh Gregor
b03daa975a Bug 1314388 - Remove SVGZoomEvent; r=longsonr,smaug
Some code in SVGSVGElement.cpp might be unnecessary now, but Robert said
to leave it for a followup.

MozReview-Commit-ID: 8PpRGeGrREJ
2017-04-04 15:36:22 +03:00
Masayuki Nakano
7fff9e9d7f Bug 1352949 Remove dom.keyboardevent.code.enabled r=smaug
KeyboardEvent.code has already been enabled and it's already available with Chrome too. So, we won't disable it.

MozReview-Commit-ID: LLlAoMebtsU
2017-04-03 18:04:27 +09:00
Markus Stange
fcdd5dbd1f Bug 1351920 - Remove the nsCString&& version of PROFILER_LABEL_DYNAMIC because it makes misleading promises about performance. r=njn
MozReview-Commit-ID: I4y5xnFyfUj

--HG--
extra : rebase_source : 8cd3d9fc90df1cb7ff6199cf0a5b1cf3319bebe0
2017-03-29 21:47:51 -04:00
Sebastian Hengst
427e8f836d Backed out 2 changesets (bug 1314388) for timing out in dom/svg/test/test_zoom.xhtml. r=backout
Backed out changeset 804d8199aeca (bug 1314388)
Backed out changeset b7fab6a89c1d (bug 1314388)
2017-04-02 14:37:08 +02:00
Aryeh Gregor
4a039c1336 Bug 1314388 - Remove SVGZoomEvent; r=longsonr,smaug
Some code in SVGSVGElement.cpp might be unnecessary now, but Robert said
to leave it for a followup.

MozReview-Commit-ID: 8PpRGeGrREJ
2017-04-02 13:51:33 +03:00
Olli Pettay
d47c995985 Bug 1351860 - Move mType from HTMLInputElement to nsIFormControl and make GetType non-virtual inlined, r=jessica
--HG--
extra : rebase_source : b7d76ce3321ea0d622da74a72b7278fd0fa63310
2017-03-31 22:49:00 -04:00
Olli Pettay
31b1f5cc92 Backout Bug 1351860, r=backout 2017-03-31 16:55:32 -04:00
Olli Pettay
b84c192a09 Bug 1351860 - Move mType from HTMLInputElement to nsIFormControl and make GetType non-virtual inlined, r=jessica
--HG--
extra : rebase_source : 5f2cac2c4e944e2c9f2f1acf0d3064e153c40451
2017-03-31 13:13:36 -04:00
Wes Kocher
8e0bc97954 Merge inbound to central, a=merge 2017-03-29 15:41:57 -07:00
Sebastian Hengst
95d52e6546 Backed out changeset e4ecf720b3a1 (bug 713680) for crashing in dom/tests/mochitest/chrome/test_xray_event_constructor.xul on Windows 7 debug. r=backout 2017-03-29 21:51:05 +02:00
Emilio Cobos Álvarez
3ed9e13ba8 Bug 1350140: stylo: Implement all the remaining state pseudo-classes. r=heycam
Also implements :link, :visited, and :any-link more efficiently, and stops
matching :-moz-read-only in everything that is not read-write, which is kind of
dumb, and probably creates some artifacts.

MozReview-Commit-ID: 6BQqi7nAWdT

--HG--
extra : rebase_source : 39dc6b481b3a92942dc3732990d8b9040d8e6d84
2017-03-24 00:45:07 +01:00
Chris Peterson
9a7117b6ae Bug 713680 - Change default Windows monospace font from Courier New to Consolas. r=jfkthame r=masayuki
MozReview-Commit-ID: 6WPOOCcF43M

--HG--
extra : rebase_source : 83a416e89a479c25281128630935b0ec19dd915f
extra : histedit_source : cea4b90eb46eeac04fd2de120d1044576405aa2f%2C0dc86ac28399a3af673ebd40d11a75c57ef04f4b
2017-03-08 00:20:41 -08:00
Ryan VanderMeulen
89d7c65bcf Backed out changeset ce25d866bd65 (bug 1343760) for causing bug 1351328.
--HG--
extra : rebase_source : 6c5b3c981c1919f8f1134f63a03c77b920112c6c
2017-03-28 12:50:14 -04:00
Michael Layzell
23e8ac47d2 Bug 1348143 - Check nsresult values more places in DataTransfer. r=enndeakin
MozReview-Commit-ID: BP4avMImDB8
2017-03-27 17:44:27 -04:00
Stone Shih
43e0dce0f4 Bug 1343765 - Label timer in dom/events. f=bevistseng. r=smaug. 2017-03-16 08:12:25 +08:00
Stone Shih
58f1a120a2 Bug 1343760 - Label runnables in dom/events. f=bevistseng. r=smaug. 2017-03-16 08:11:50 +08:00
Wes Kocher
6d0b00069c Merge inbound to central, a=merge
MozReview-Commit-ID: JGfQoBJy2jt
2017-03-24 17:17:27 -07:00
Emilio Cobos Álvarez
045eb695b0 Bug 1350050: Remove unneeded nsTextFrame casts in ContentEventHandler. r=smaug
MozReview-Commit-ID: FcSYAuQSHUt

--HG--
extra : rebase_source : 41b23e164e721334923a0f3f16e65be80d4f667f
2017-03-23 20:41:58 +01:00
Carsten "Tomcat" Book
5f408d092d Merge mozilla-central to mozilla-inbound 2017-03-24 14:29:00 +01:00
Mats Palmgren
00b74113a3 Bug 1333482 part 4 - [css-ui] Amend all uses of '-moz-appearance:none' in tests to also specify 'appearance:none' (automated change). r=dholbert
MozReview-Commit-ID: BNOR5VRpV2E
2017-03-23 22:11:22 -07:00
Thinker K.F. Li
84c4fd2c69 Bug 1323076 - Part 2: EventDispatcher with flag checking for TaskTracer. r=smaug 2017-03-22 21:44:00 +01:00
Carsten "Tomcat" Book
332688962a Merge mozilla-central to mozilla-inbound
--HG--
rename : testing/web-platform/tests/storage/interfaces.html => testing/web-platform/tests/storage/interfaces.https.html
2017-03-23 13:57:16 +01:00
Olli Pettay
92bb395acd Bug 1339758, click() and similar can return 0 from various coordinate properties, r=masayuki
--HG--
extra : rebase_source : 71547cc6655c39ffeba89676d315bdb9bacc5ff4
2017-03-23 12:57:44 +02:00
Boris Zbarsky
e8efc43549 Bug 1349659. Implement :required and :optional in stylo. r=emilio
MozReview-Commit-ID: 50A3H4Qb3Yf

--HG--
extra : rebase_source : f9979da13016d717ddae00ed9be5c2818b77b6d2
2017-03-22 22:01:12 -04:00
Markus Stange
730b4fc829 Bug 1339897 - Rename PROFILER_LABEL_PRINTF to PROFILER_LABEL_DYNAMIC and make it really cheap. r=Ehsan,njn
Instead of copying and concatenating strings into an mDest buffer in
SamplerStackFramePrintfRAII, require callers to keep the string buffer alive
for the duration of the current scope, and store the pointer to the annotation
string in the ProfileEntry. During stackwalking, concatenate the label and the
annotation (separated by a space) and store the resulting string in the
profile buffer.

MozReview-Commit-ID: GEjcLrhhdvb

--HG--
extra : rebase_source : 683749421ee2122805a249cf413e882ee5f33331
2017-03-22 19:37:33 -04:00
Iris Hsiao
106889c6f6 Backed out 9 changesets (bug 1333482) for stylo test failures and this should be landed to autoland
Backed out changeset d8828e22dbaa (bug 1333482)
Backed out changeset a39aaecd10f7 (bug 1333482)
Backed out changeset c957d8c0281e (bug 1333482)
Backed out changeset d569fc566e43 (bug 1333482)
Backed out changeset 7e8c03090d34 (bug 1333482)
Backed out changeset c4511a175f2f (bug 1333482)
Backed out changeset 5483a82f7ce9 (bug 1333482)
Backed out changeset 4e7e5efb1bd8 (bug 1333482)
Backed out changeset 51d1accaeddb (bug 1333482)
2017-03-24 10:21:30 +08:00
Mats Palmgren
c0c0e154ea Bug 1333482 part 4 - [css-ui] Amend all uses of '-moz-appearance:none' in tests to also specify 'appearance:none' (automated change). r=dholbert
MozReview-Commit-ID: BNOR5VRpV2E
2017-03-23 23:13:18 +01:00
Wes Kocher
3c092e1002 Merge m-c to inbound, a=merge
MozReview-Commit-ID: GjXiiENYBmx
2017-03-21 16:20:08 -07:00
Boris Zbarsky
ec233151ac Bug 1348331 part 2. Switch Preferences::RegisterCallback/RegisterCallbackAndCall consumers that want prefix matches to the new RefisterPrefixCallback(AndCall) APIs. r=froydnj,padenot
MozReview-Commit-ID: 2ebVZO4fN6i
2017-03-21 14:59:02 -04:00
Wes Kocher
4f5262444c Merge inbound to central, a=merge
MozReview-Commit-ID: 2omKclRg40c
2017-03-20 18:19:52 -07:00
Nazım Can Altınova
8a533e93cf Bug 1341642 - Stylo: Add support for -moz-* pseudo-classes for alt text r=manishearth
MozReview-Commit-ID: 1t42xaTtUmb

--HG--
extra : rebase_source : 58072c6ea9df8a931671450f31e345e872ef6e53
2017-03-18 19:41:39 +03:00
Stone Shih
a207c2fcb5 Bug 1346605 - Add pointer events to popup blocking handling. r=smaug 2017-03-12 20:31:44 +08:00
Stone Shih
b4e127c044 Bug 1346166 - Test full screen api by pointer events. r=smaug
MozReview-Commit-ID: BBg7olhtMA
2017-03-15 13:11:36 +08:00
Carsten "Tomcat" Book
6f1ef358c8 Backed out changeset 801cde6d6c3c (bug 1296492) for test failures in pointerevent_multiple_primary_pointers_boundary_events-manual.html 2017-03-20 16:51:17 +01:00
Carsten "Tomcat" Book
7ad583bf13 Backed out changeset b5a2225f267d (bug 1296492) 2017-03-20 16:50:48 +01:00
Stone Shih
69318bffba Bug 1328210 - Wrap pointerevent_boundary_events_in_capturing-manual.html in mochitest form. r=smaug 2017-02-09 17:20:28 +08:00
Masayuki Nakano
87d8470a52 Bug 1347073 Get rid of UIEvent.isChar since it's not initialized properly on most platforms and the other browsers don't support this r=smaug
UIEvent.isChar is not supported by the other browsers and the value isn't initialized any platforms except on macOS. So, the value isn't useful and we have no reason to keep it.

MozReview-Commit-ID: 4BLpo88gSZj

--HG--
extra : rebase_source : ca950f8cb618a0cadc99ba4c80b5a8df94a20f27
2017-03-14 18:29:39 +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
Nazım Can Altınova
857e16e554 Bug 1341739 - Stylo: Add support for :valid/:invalid/:-moz-ui-valid pseudo-classes r=xidorn
MozReview-Commit-ID: K3WSun7UGFo

--HG--
extra : rebase_source : a31e508e4f0452ead2ccd3ee990b09e9ae691ef8
2017-03-15 17:34:29 +03:00
Nazım Can Altınova
70ea60c038 Bug 1348873 - Change ServoType to uint64_t instead of uint16_t in EventStates r=emilio
MozReview-Commit-ID: GDP6XaL96ez

--HG--
extra : rebase_source : 6aa38ac64b3706961709b27d31903dc24405ee57
2017-03-20 18:54:54 +03:00
Stone Shih
44253bfcb0 Bug 1296492 Part2: Synthesize native touch events to trigger pointerevent_multiple_primary_pointers_boundary_events-manual.html. r=smaug
MozReview-Commit-ID: JZSzh7pHd8T
2017-01-23 18:58:59 +08:00
Stone Shih
9e03cc7af8 Bug 1296492 Part1: Refine PE mochitest helpers to ignore the checks of synthesized pointer id. r=smaug
MozReview-Commit-ID: 5blUsJMnDfg
2017-03-03 16:52:56 +08:00
Sebastian Hengst
f131887bb8 Backed out changeset 2e0e49cb827f (bug 1355548) for failing mochitests widget/tests/test_wheeltransaction.xul and gfx/layers/apz/test/mochitest/test_scroll_inactive_bug1190112.html. r=backout 2017-04-24 16:19:43 +02:00
Stone Shih
e5d7071924 Bug 1355548 - Using cached perference values in WheelTransaction. r=masayuki
MozReview-Commit-ID: GpKgMpDwi3w

--HG--
extra : rebase_source : 07797de36b8724401675319dbdcd3d14f2c349d5
2017-04-13 10:41:23 +08:00
Neil Deakin
85b254f54b Bug 1347748, error check the write methods, r=layzell 2017-03-29 06:32:02 -04:00
Stone Shih
5aa31ac64d Bug 1323158 - Part 6: Check target and relatedTarget of mouse events are the same as their corresponding pointer events. r=smaug
--HG--
extra : rebase_source : 0b434396583e9231213f9fbc215f0594739c752a
extra : histedit_source : 780ad0b23238873b185227c17b1dd172e09bab0f
2017-03-08 13:14:29 +08:00
Stone Shih
7a1fe394b3 Bug 1323158 - Part 5: Update test_pointerevent_releasepointercapture_events_to_original_target-manual.html. r=smaug
--HG--
extra : rebase_source : a0bcfebeec733bd19de430169ee85311c3ceaa64
extra : histedit_source : de28bd8878ad23bad064e884e96a74f2855045a8
2017-03-03 13:24:20 +08:00
Stone Shih
e82b7fd9f9 Bug 1323158 - Part 4: Refine PE boundary events related testcases since boundary events are fired after capturing or releasing the pointer. r=smaug
--HG--
extra : rebase_source : acc2d7fb4df3168a5b81cc505d78f5f3b212af92
extra : histedit_source : 5acaa0c7361bb3694d05a33e104e9c861e213bc2
2017-01-19 11:11:50 +08:00
Stone Shih
b3c77294ca Bug 1323158 - Part 3: Fire boundary events when dispatching gotpointercapture. r=smaug
--HG--
extra : rebase_source : e70ab21585d38a64c657c260b722ef1a09d87ae9
extra : histedit_source : 46a0483c2c7efb76a752ef472baa1bca28650241
2017-01-20 15:00:07 +08:00
Stone Shih
eb9ee92c2d Bug 1323158 - Part 1: Fire pointer and mouse boundary events when capturing the pointer. r=smaug
--HG--
extra : rebase_source : 2895681bb5d0e4872dc37f9d67dc4e2928bdce33
extra : histedit_source : e08adaaf7299e9667eb1f3887ef518c5edf5dc59
2017-01-18 15:25:44 +08:00
Stone Shih
4b172a2881 Bug 1337963 - Coalesce wheel events in the content process so that long wheel event handlers don't hang the content process. r=smaug 2017-02-21 17:56:46 +08:00
Stone Shih
229b4ba331 Bug 606885 - Fire drag events with keyboard modifiers. r=enn
--HG--
extra : rebase_source : c6e4ac37ea2397d86368cb59b0a68aa3a9f43d79
2017-02-17 11:29:42 +08:00
Boris Zbarsky
b95ec5c51f Bug 1345996 followup. Update some tests for the new event behavior.
MozReview-Commit-ID: 1OAR6YcoiF3
2017-03-11 02:33:58 -05:00
Boris Zbarsky
728a89a4fe Bug 1345996. Change event handler invocation to only do the "true return cancels" for onerror handlers handed ErrorEvents, and only on globals. r=smaug
See https://github.com/whatwg/html/issues/2296 and
https://github.com/whatwg/html/issues/423 for details on what various browsers
do and whatnot.

MozReview-Commit-ID: DytkZreHudx
2017-03-10 23:53:09 -05:00
Ben Kelly
86443f020e Bug 1311324 P3 Remove ServiceWorkerMessageEvent interface. r=bz 2017-03-09 20:50:13 -05:00
Ben Kelly
546d811304 Bug 1311324 P2 Replace usage of ServiceWorkerMessageEvent with MessageEvent. r=bz 2017-03-09 20:50:13 -05:00
Ben Kelly
29ca0de50c Bug 1311324 P1 Update the MessageEvent webidl and implementation class. r=bz 2017-03-09 20:50:13 -05:00
Andrea Marchesini
78b899978b Bug 1299500 - Get rid of DeviceStorage API - part 2 - DeviceStorageChangeEvent, r=ehsan 2017-03-08 20:15:44 +01:00
Andrea Marchesini
bf74899736 Bug 1299500 - Get rid of DeviceStorage API - part 1 - DeviceStorageAreaChangedEvent, r=ehsan 2017-03-08 20:15:44 +01:00
Olli Pettay
626c1780d1 Bug 1345301 - elt.firstChild.remove() doesn't trigger a DOMSubtreeModified event, r=ms2ger
--HG--
extra : rebase_source : 884289e9471d7886661843cb45fe32e9a3514a18
2017-03-08 20:05:34 +02:00
Michael Layzell
a3d57f1d3f Bug 1342057 - Part 1: Use correct MIME type for files as DataTransferItem.type, r=baku
MozReview-Commit-ID: 4hrZ3YoGTJj
2017-03-07 18:18:42 -05:00
Wes Kocher
4424ad9cd7 Backed out 2 changesets (bug 1342057) for android failures in test_clipboard_events.html a=backout
Backed out changeset 5a1e069911fa (bug 1342057)
Backed out changeset 6758f6e0b836 (bug 1342057)

MozReview-Commit-ID: 6MHaDaORlqx
2017-03-07 11:44:03 -08:00
Michael Layzell
b985d62013 Bug 1342057 - Part 1: Use correct MIME type for files as DataTransferItem.type, r=baku
MozReview-Commit-ID: 4hrZ3YoGTJj
2017-03-07 12:45:58 -05:00
Carsten "Tomcat" Book
087da3f0d9 merge mozilla-inbound to mozilla-central a=merge 2017-03-07 15:13:31 +01:00
Iris Hsiao
b0564b3436 Backed out changeset da035ac87fe4 (bug 713680) for reftest failures 2017-03-07 14:55:21 +08:00
Chris Peterson
1fbca779ac Bug 713680 - Change default Windows monospace font from Courier New to Consolas. r=jfkthame r=masayuki
Consolas is narrower than Courier New, so we must adjust some tests to accommodate.

* Change some tests from generic 'monospace' to 'Courier New' to continue using previous font metrics.

* selectAtPoint.html no longer needs one of its Windows-only code paths because Firefox on Windows now selects the same text as it does on Mac and Linux.

* 323386-1.html's intermittent assertion failure (bug 718883) now appears to be 100% reliable on Windows, joining Linux and Android.

* size-1-ref.html reftest needs a little fuzz because the horizontal line of the test image's '4' character is ~1 pixel shorter than the reference image's.

MozReview-Commit-ID: EB5wzhG178U

--HG--
extra : rebase_source : e7aca6d16c255e45bef5dca93fff6c09bce787c4
2017-02-22 22:08:19 -08:00
Michael Layzell
d982a16df5 Bug 1338328 - Change error type for custom-clipdata mime type, and add test for correct exception type, r=baku
MozReview-Commit-ID: 9qwwXxWgWrO
2017-03-06 14:37:27 -05:00
Cameron McCormack
4e902578ed Bug 1341230 - Part 2: Add C++ API to add/remove manually managed EventStates bits. r=smaug
MozReview-Commit-ID: 11886pRRXSq

--HG--
extra : rebase_source : 6881181ab9e8bfd9559a4f92d77a8b2796daa9dc
2017-03-06 10:44:13 +08:00
Cameron McCormack
6e93d609a7 Bug 1341230 - Part 1: Rename ESM_MANAGED_STATES to EXTERNALLY_MANAGED_STATES. r=smaug
Since it's not just the EventStateManager that has access to modify
these EventStates bits.

MozReview-Commit-ID: 17EpfQT5M40

--HG--
extra : rebase_source : 6d5f7ecff2d41d66cbc23ea12e08dc6295e29875
2017-03-06 10:44:13 +08:00
Iris Hsiao
ddd2318db2 Backed out changeset 41bd2eefc823 (bug 1341230) 2017-03-06 11:48:58 +08:00
Iris Hsiao
a8b4a9d618 Backed out changeset f879b73eb504 (bug 1341230) 2017-03-06 11:48:52 +08:00
Cameron McCormack
78b9d4ee3b Bug 1341230 - Part 2: Add C++ API to add/remove manually managed EventStates bits. r=smaug
MozReview-Commit-ID: 11886pRRXSq

--HG--
extra : rebase_source : 6881181ab9e8bfd9559a4f92d77a8b2796daa9dc
2017-03-06 10:44:13 +08:00
Cameron McCormack
fd0d68c179 Bug 1341230 - Part 1: Rename ESM_MANAGED_STATES to EXTERNALLY_MANAGED_STATES. r=smaug
Since it's not just the EventStateManager that has access to modify
these EventStates bits.

MozReview-Commit-ID: 17EpfQT5M40

--HG--
extra : rebase_source : 6d5f7ecff2d41d66cbc23ea12e08dc6295e29875
2017-03-06 10:44:13 +08:00
Wes Kocher
8d2ba463c0 Backed out changeset bfc13d436dd4 (bug 1338328) for browser_context_menu_autocomplete_interaction.js failures a=backout
MozReview-Commit-ID: DfOAidZWnWF
2017-03-01 15:38:21 -08:00
Mats Palmgren
6ef6efaea3 Bug 1340771 part 2 - Introduce a WeakFrame class for heap allocated weak frame pointers, stored in a hashtable for fast lookup. r=tn
* * *
Bug 1340771 part 3 - Change existing heap allocated AutoWeakFrame instances to use WeakFrame instead.  r=tn

MozReview-Commit-ID: GSuUiy98jBa
2017-03-01 18:03:14 +01:00
Mats Palmgren
d13aaf9ce0 Bug 1340771 part 1 - Rename nsWeakFrame to AutoWeakFrame (automated change). r=tn
MozReview-Commit-ID: 8pl4nyeGEkr
2017-03-01 18:03:14 +01:00
Michael Layzell
2f4b475ed1 Bug 1338328 - Change error type for custom-clipdata mime type, and add test for correct exception type, r=baku
MozReview-Commit-ID: 9qwwXxWgWrO
2017-03-01 15:15:36 -05:00
Dylan Roeh
efb7f9566e Bug 1261894 - Update InitDeviceMotionEvent to handle high-res timestamps. r=smaug 2017-02-28 16:50:15 -06:00
Joel Maher
f297f17181 Bug 1339232 - annotate more dom/* moz.build files with BUG_COMPONENT. r=overholt
MozReview-Commit-ID: 2HbPxGkrVfv
2017-03-01 08:20:25 -05:00
Masatoshi Kimura
7be7b11a1c Bug 1342144 - Remove version parameter from the type attribute of script elements. r=jmaher
This patch is generated by the following sed script:
find . ! -wholename '*/.hg*' -type f \( -iname '*.html' -o -iname '*.xhtml' -o -iname '*.xul' -o -iname '*.js' \) -exec sed -i -e 's/\(\(text\|application\)\/javascript\);version=1.[0-9]/\1/g' {} \;

MozReview-Commit-ID: AzhtdwJwVNg

--HG--
extra : rebase_source : e8f90249454c0779d926f87777f457352961748d
2017-02-23 06:10:07 +09:00
Makoto Kato
a4109eb8fa Bug 1327798 - Part 2. Add test. r=enndeakin
MozReview-Commit-ID: 2B2mVNgcBEz

--HG--
extra : rebase_source : 994d68282b51289b61dd1cc1ea39711cb21acb00
2017-02-01 14:05:17 +09:00
Makoto Kato
2dcf7753c2 Bug 1327798 - Part 1. PasteNoFormatting shouldn't set text/html to clipboard event on paste. r=enndeakin
MozReview-Commit-ID: 8VMudiPiXcK

--HG--
extra : rebase_source : 2476f69296a60f6978f97da2daef021b90350dbf
2017-02-22 18:34:45 +09:00
Stone Shih
c77b60e0a7 Bug 1339359 - [Pointer Event] Trigger PointerEvent test cases after focus. r=smaug
MozReview-Commit-ID: J7AtGvSF1aP

--HG--
extra : rebase_source : a0ee506e69a6250c3b961d387ef49ede006606d6
2017-02-15 17:54:05 +08:00
Andrea Marchesini
d32aa97041 Bug 1285898 - [e10s-multi] Localstorage "storage" event is not fired with multiple content processes. r=asuth
--HG--
extra : rebase_source : 724b38c52139dee1c6f746152fefff05333dfc24
extra : intermediate-source : e56108122b9088555f29a28e6086d4d117a68c4e
extra : source : 6681b50c1f6d0d2d22d5f631234402e020c0b78a
2017-02-19 22:16:48 -05:00
Tom Tromey
5f8f360823 Bug 1060419 - make log_print use Printf.h, r=froydnj
MozReview-Commit-ID: BIZ1GQEZ1vs

--HG--
extra : rebase_source : 2f1f0aa12493c44f352d9a7e8683e7bb72d2d75b
2016-12-15 20:16:31 -07:00
Matt Woodrow
7df250f09a Bug 1302071 - Part 3: Remove flags parameter to NotifyInvalidation since it's unused. r=tnikkel
MozReview-Commit-ID: 8hC1GglMhk2

--HG--
extra : rebase_source : 79c2bb7af3ad8a878abd150fba9ad8f4a86011fd
2017-02-17 11:50:58 +13:00
Bill McCloskey
0cda76d680 Bug 1339289 - Give names to a lot of common timers (r=ehsan)
MozReview-Commit-ID: IMsv5bkyjBL
2017-02-15 12:30:01 -08:00
Bill McCloskey
194043ae97 Bug 1339289 - Give names to a lot of common runnables (r=ehsan)
MozReview-Commit-ID: 5IdvK6kgoAW
2017-02-15 12:30:01 -08:00
Nathan Froyd
816d0278d2 Bug 1338168 - micro-optimize GetListenerInfoFor; r=baku,smaug
We can use nsCOMArray::Forget() to avoid some unnecessary refcounting.
2017-02-15 11:06:39 -04:00
Jeff Walden
965f401e22 Bug 1287006 - Don't pass Nullable by value in various places, rather by const&. r=bz
--HG--
extra : rebase_source : cbdd6e33cc69f58983a4b6ce97642caf54ddbc9a
2017-02-13 09:07:40 -08:00
Carsten "Tomcat" Book
6215212efa Merge mozilla-central to mozilla-inbound 2017-02-14 13:41:43 +01:00
Stone Shih
27fc4c155d Bug 1292064 - [Pointer Event] Add digitizer/pen tangential (barrel) pressure and twist. r=smaug 2017-02-09 10:49:00 +08:00
Mantaroh Yoshinaga
8f8fb1a74a Bug 1302648 part 1 - Add animationcancel event handler. r=masayuki
The 'animationcancel' spec is as follow:
https://drafts.csswg.org/css-animations-1/#eventdef-animationevent-animationcancel

MozReview-Commit-ID: Z2BUwFtMwk

--HG--
extra : rebase_source : 2ebd9dfc2d7d01ea0be9c2b2b7310b974be2b716
2017-02-10 12:32:43 +09:00
Kris Maglione
d0f62ee58a Bug 1336988: Correctly handle dead callback objects when iterating over event listeners. r=peterv
MozReview-Commit-ID: 5vGlPL1p3uh

--HG--
extra : rebase_source : 7e33d93472faa1c047361addf8b15f8a78639255
2017-02-06 11:34:56 -08:00
Stone Shih
7d5071dd4b Bug 1338057 - [Pointer Event] Sync wpt test cases to mochitest test cases. r=smaug 2017-02-09 13:44:41 +08:00
Xidorn Quan
70377f6cf6 Bug 1332699 - Don't check handler of legacy version if the event is not trusted. r=smaug
MozReview-Commit-ID: A7G4bkyNsOe

--HG--
extra : rebase_source : b5831d05588fa5ca98430d606591ea05e42fd672
2017-01-23 16:08:41 +11:00
Masayuki Nakano
fa85dc8ad8 Bug 1337718 part.9 Make IMEStateManager::OnClickInEditor() take const WidgetMouseEvent* instead of nsIDOMMouseEvent* r=m_kato
MozReview-Commit-ID: KdoMcxW8lkT

--HG--
extra : rebase_source : a03316e3a6ca7daf937032f32e00f2a4b2fd23fc
2017-02-08 22:29:14 +09:00
Masayuki Nakano
cee96a2b9a Bug 1337718 part.7 Make IMEStateManager::OnMouseButtonEventInEditor() take WidgetMouseEvent* instead of nsIDOMMouseEvent r=m_kato
MozReview-Commit-ID: FDselwSymZq

--HG--
extra : rebase_source : 211e4f91075d0a93bf10fd82273856010957b3ee
2017-02-08 22:02:49 +09:00
Phil Ringnalda
f4d138720a Merge m-c to autoland 2017-02-02 22:11:54 -08:00
Phil Ringnalda
b1aadb3572 Backed out 5 changesets (bug 1285898) for causing the crashes of bug 1336242
Backed out changeset 15b3b9feb54f (bug 1285898)
Backed out changeset 1d0bfb02d6c0 (bug 1285898)
Backed out changeset bc99844772ee (bug 1285898)
Backed out changeset 8bbe285cf5c0 (bug 1285898)
Backed out changeset e56108122b90 (bug 1285898)
2017-02-02 22:02:24 -08:00
Wes Kocher
2dcccc4332 Merge inbound to central, a=merge
MozReview-Commit-ID: 9bhCPrArK3P
2017-02-02 16:39:24 -08:00
Boris Zbarsky
9516d2d41d Bug 1334957 part 3. Remove the use of IsCallerChrome() in NotifyPaintEvent. r=smaug 2017-02-01 18:26:31 -05:00
Boris Zbarsky
48f43b7f91 Bug 1334957 part 2. Remove all the accessors from the XPCOM interface for NotifyPaintEvent. r=smaug 2017-02-02 12:48:48 -05:00
Wes Kocher
ad037c851d Merge m-c to autoland, a=merge
MozReview-Commit-ID: 8vGne2PAweU
2017-02-02 16:45:43 -08:00
Stone Shih
c1cc98fed4 Bug 1304308: Investigate failure of test_pointerevent_setpointercapture_inactive_button_mouse-manual.html. r=masayuki
This test case should be triggered by pointerover and pointerout. Add new test API to fire mouse event at the specified position and refine the synthesized events fired to the test case to trigger it correctly.

MozReview-Commit-ID: DkLYrD6MwYc

--HG--
extra : rebase_source : f0ae002edcb6f39d301e83fea9bf1e74dc21c62a
2017-01-24 13:03:21 +08:00
Wes Kocher
8d4bb91470 Merge m-c to inbound, a=merge
MozReview-Commit-ID: Am6M5iHxmAr
2017-02-01 16:31:23 -08:00
Wes Kocher
f2cb5e7c63 Merge inbound to m-c a=merge
MozReview-Commit-ID: EZrwvZH5DsY
2017-02-01 16:22:11 -08:00
Andrea Marchesini
1e58b980f5 Bug 1285898 - [e10s-multi] Localstorage "storage" event is not fired with multiple content processes. r=asuth
--HG--
extra : rebase_source : 9968fd96960aecd516bfcc5c239b9de85280ab8a
extra : source : 6681b50c1f6d0d2d22d5f631234402e020c0b78a
2017-01-17 15:43:12 -05:00
Masayuki Nakano
7ab96b2cef Bug 1314053 part.2 Change EditorBase::IsAcceptableInputEvent()'s argument from nsIDOMEvent* to WidgetGUIEvent* r=smaug
MozReview-Commit-ID: Jo6EwQubUAM

--HG--
extra : rebase_source : 098b23946f349bbe7641a2059538ffb20ae4f5bb
2017-01-17 17:17:06 +09:00
Andrea Marchesini
e14c51cdfd Bug 1288768 - Better error reporting for network errors in workers, r=bz 2017-01-28 15:39:24 +01:00
Phil Ringnalda
85843f4cff Backed out 4 changesets (bug 1285898) for browser_localStorage_e10s.js failure
Backed out changeset 9c6057cde326 (bug 1285898)
Backed out changeset bd68ebab64fa (bug 1285898)
Backed out changeset 6fdb24e1256d (bug 1285898)
Backed out changeset 6681b50c1f6d (bug 1285898)
2017-01-30 21:49:42 -08:00
Andrea Marchesini
db2311e1e0 Bug 1285898 - [e10s-multi] Localstorage "storage" event is not fired with multiple content processes. r=asuth 2017-01-30 22:47:06 -05:00
Carsten "Tomcat" Book
29cd257175 merge mozilla-inbound to mozilla-central a=merge 2017-01-30 15:59:14 +01:00
Masayuki Nakano
c6705b1fde Bug 1333927 Make ScrollAreaEvent::mClientArea cycle collected r=smaug
ScrollAreaEvent extends a cycle collected class UIEvent.  It also contains a cycle collected DOMRect member field.

MozReview-Commit-ID: D1xsod4es0r

--HG--
extra : rebase_source : 1da827caecec7748ba8d89743b3bab59ba0faa73
2017-01-27 15:57:38 +09:00
Florian Quèze
bdc1ffa608 Bug 1334831 - script-generated patch to use .remove() instead of .parentNode.removeChild, r=jaws. 2017-01-30 08:10:22 +01:00
Florian Quèze
b11907c7aa Bug 1334156 - script-generated patch to replace .ownerDocument.defaultView with .ownerGlobal, r=jaws. 2017-01-27 10:51:03 +01:00