Commit Graph

513 Commits

Author SHA1 Message Date
Boris Zbarsky
921ee1d522 Bug 1387143 part 4. Stop using nsISelection in remaining xpidl. r=mats 2018-05-08 13:52:36 -04:00
Boris Zbarsky
3463812125 Bug 1387143 part 2. Stop using nsISelection in nsIDocumentEncoder. r=mats 2018-05-08 13:52:36 -04:00
arthur.iakab
2f2f2ffdbf Merge mozilla-central to inbound 2018-05-08 15:44:33 +03:00
Chris Peterson
71422dcaa9 Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj
s/NS_PRECONDITION/MOZ_ASSERT/ and reindent

MozReview-Commit-ID: KuUsnVe2h8L

--HG--
extra : source : c14655ab3df2c9b1465dd8102b9d25683359a37b
2018-04-28 12:50:58 -07:00
Chris Pearce
d60b11662f Bug 1452536 - Don't gesture activate for events targetting editable elements. r=masayuki
We don't want to gesture activate for key and mouse/pointer events sent to
editable elements, as that would mean user interaction intended as text input
could start media playback, which would not likely be the user's intention.

MozReview-Commit-ID: VemPfpuziz

--HG--
extra : rebase_source : b2267f5ae2c9f0f6626f622bc98e3c5f18faf8bb
2018-04-30 09:44:31 +12:00
Chris Pearce
21ea5f2ad6 Bug 1452536 - Don't gesture activate documents on non-printable key events. r=masayuki
We don't want key presses of keys which are likely to be intended to be
interaction with the browser or OS to gesture activate documents and unblock
autoplay videos. So don't gesture activate for key events which are modifier
keys, or which don't have a pseudo char code.

MozReview-Commit-ID: 6uyPmlzbAvg

--HG--
extra : rebase_source : 8be949228b666a2ff54385f14b38b8f89459b1e2
extra : source : 59979388ba67d5fbfa8f3801bb65ac0fd2a49408
2018-04-23 15:53:50 +12:00
Emilio Cobos Álvarez
14dba54ee1 Bug 1459401: Remove unused container argument in EventStateManager::ContentRemoved. r=smaug
MozReview-Commit-ID: HAuTfzuo3iY
2018-05-06 16:38:30 +02:00
Cosmin Sabou
603420de74 Backed out 3 changesets (bug 1452536) for causing crashes bug 1458166. a=backout
Backed out changeset 1259c5bc20a7 (bug 1452536)
Backed out changeset c454505cc025 (bug 1452536)
Backed out changeset 006f976d7963 (bug 1452536)
2018-05-04 20:56:41 +03:00
Botond Ballo
9033e3e120 Bug 1458063 - Introduce a new wheel action for pinch-zooming. r=kats
MozReview-Commit-ID: 7DWNvQc2pBE

--HG--
extra : rebase_source : 02d3efe180fb1cd6d49ca9b8a49e4051e6e05cac
2018-05-02 16:51:27 -04:00
Botond Ballo
2add094650 Bug 1458063 - Refactor WillHandleWheelEvent() to also indicate the type of action APZ should take. r=kats
MozReview-Commit-ID: LfinNZYqiwt

--HG--
extra : rebase_source : 2ea04360700530e1fbbbaaf94b484b6df2f79fe4
2018-04-30 22:11:10 -04:00
Chris Pearce
441564e8a4 Bug 1452536 - Don't gesture activate for events targetting editable elements. r=masayuki
We don't want to gesture activate for key and mouse/pointer events sent to
editable elements, as that would mean user interaction intended as text input
could start media playback, which would not likely be the user's intention.

MozReview-Commit-ID: VemPfpuziz

--HG--
extra : rebase_source : b2267f5ae2c9f0f6626f622bc98e3c5f18faf8bb
2018-04-30 09:44:31 +12:00
Chris Pearce
cd9d5f0dbf Bug 1452536 - Don't gesture activate documents on non-printable key events. r=masayuki
We don't want key presses of keys which are likely to be intended to be
interaction with the browser or OS to gesture activate documents and unblock
autoplay videos. So don't gesture activate for key events which are modifier
keys, or which don't have a pseudo char code.

MozReview-Commit-ID: 6uyPmlzbAvg

--HG--
extra : rebase_source : 8be949228b666a2ff54385f14b38b8f89459b1e2
extra : source : 59979388ba67d5fbfa8f3801bb65ac0fd2a49408
2018-04-23 15:53:50 +12:00
Boris Zbarsky
25aa42d9a4 Bug 1455674 part 16. Remove most use of nsIDOMElement in dom. r=qdot 2018-04-26 23:37:34 -04:00
Boris Zbarsky
dd4506eee2 Bug 1457155. Rename various focus manager variables to make it clearer that they're Elements. r=mccr8 2018-04-26 15:28:31 -04:00
shindli
af700315a1 Backed out 2 changesets (bug 1457155, bug 1457156) for B failures in builds/worker/workspace/build/src/dom/html/HTMLObjectElement.cpp on a CLOSED TREE
Backed out changeset 8b2a6b54336c (bug 1457155)
Backed out changeset 4e267d999797 (bug 1457156)
2018-04-27 01:34:37 +03:00
Boris Zbarsky
25cec96459 Bug 1457155. Rename various focus manager variables to make it clearer that they're Elements. r=mccr8 2018-04-26 15:28:31 -04:00
Boris Zbarsky
dac6314cb8 Bug 1456588 part 2. Change nsIFocusManager::MoveFocus to take Element. r=enndeakin 2018-04-26 10:37:47 -04:00
Boris Zbarsky
8a0b50bea8 Bug 1456588 part 1. Change nsIFocusManager::SetFocus to take Element. r=enndeakin 2018-04-26 10:37:46 -04:00
Chris Pearce
ed477977c2 Bug 1456037 - Gesture activate documents on key/mouse down not up. r=masayuki
We should gesture activate documents in key/mouse down instead of up because
if a web app wants to play a video inside a key/mouse handler, the document
needs to be activated before the handler runs.

Also, Chrome activates on key/mouse down, so we may have compat issues if
we have different behaviour.

MozReview-Commit-ID: JgGaQcNQfzz

--HG--
extra : rebase_source : edf5673be59a3714c3dd4eb239efd17d6a91ec32
2018-04-23 15:56:29 +12:00
shindli
b1f0ca2585 Backed out 2 changesets (bug 1456037) for bustage in z:/build/build/src/dom/events/EventStateManager.cpp on a CLOSED TREE
Backed out changeset 10ac210e88db (bug 1456037)
Backed out changeset e3b70cecf471 (bug 1456037)
2018-04-24 08:27:22 +03:00
Chris Pearce
a2d85597fe Bug 1456037 - Gesture activate documents on key/mouse down not up. r=masayuki
We should gesture activate documents in key/mouse down instead of up because
if a web app wants to play a video inside a key/mouse handler, the document
needs to be activated before the handler runs.

Also, Chrome activates on key/mouse down, so we may have compat issues if
we have different behaviour.

MozReview-Commit-ID: JgGaQcNQfzz

--HG--
extra : rebase_source : de4269db9538e9c8aa5ff686c215bd619cf0c573
2018-04-23 15:56:29 +12:00
Zhang Junzhi
f88d5331e5 Bug 1455007 - Temporarily disable the auto-dir feature for redefining the behaviour according to the feedbacks r=kats
MozReview-Commit-ID: A4E6yF9z94g

--HG--
extra : rebase_source : cce10be5bc26adc81db5ab9e7c9b6b743341d85d
2018-04-19 03:33:23 +08:00
Andrew McCreight
3f7472aec1 Bug 1449670, part 1 - Convert IsNodeOfType(nsINode::eTEXT) to IsText(). r=bz
This method is not a virtual call, and also looks nicer.

This patch was mostly generated by a Python script, but I manually
cleaned up the code in a few places where statements didn't need to be
split across multiple lines any more.

MozReview-Commit-ID: 8JExxqSRc59

--HG--
extra : rebase_source : df6330a89e8d65dfe7a6fda0c8cb9f9732302efc
2018-04-12 15:41:00 -07:00
Sebastian Hengst
0819f35e51 Backed out 4 changesets (bug 525063) on request from Andi. a=backout
Backed out changeset 516c4fb1e4b8 (bug 525063)
Backed out changeset 6ff8aaef2866 (bug 525063)
Backed out changeset bf13e4103150 (bug 525063)
Backed out changeset d7d2f08e051c (bug 525063)
2018-04-13 16:01:28 +03:00
Zhang Junzhi
891d6c4b37 Bug 1358017 - Part 6: Implements the auto-dir scrolling feature(without the "honour root" functionality) in non-APZ r=masayuki
This commit implements the auto-dir scrolling functionality in non-APZ, based on
part 1 to part 3. However, the functionality of mousewheel.autodir.honourroot is
unimplemented in this commit.

MozReview-Commit-ID: 2vYABOx4RkK

--HG--
extra : rebase_source : 7dc45e6747a101c1a2c3a22bc695b2a0b2494b50
2018-03-19 17:05:45 +08:00
Zhang Junzhi
660ec7462d Bug 1358017 - Part 2: Introduces the concept of auto-dir wheel scrolling and adds two new related prefs. r=kats,masayuki
This commit only introduces the concept and the functionality of retrieving the
values from the two new related prefs. Still no actual functionality change is
involved.

MozReview-Commit-ID: 2Gl3Wqdo6jL

--HG--
extra : rebase_source : bf30483e3e32829a5d6fd927740471ba348448f9
2018-03-15 21:57:19 +08:00
Zhang Junzhi
414177f87e Bug 1358017 - Part 1: Adds some comments, renames some identifiers and refactors some other trivial things. r=kats,masayuki
Do some work in preparation for implementing actual functionalities for this
bug. No actual functionality change is involved in this commit.

MozReview-Commit-ID: 5aLhr38n1N4

--HG--
extra : rebase_source : 15cfc2cea5b7668367dd3bd4a0746ae8c61b7d20
2018-03-15 16:31:07 +08:00
Tristan Bourvon
a3a77c0312 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02:00
Ciure Andrei
873d562bc3 Backed out 8 changesets (bug 1451169) on request from njn a=backout
Backed out changeset b92f856e15a8 (bug 1451169)
Backed out changeset 348e825756fa (bug 1451169)
Backed out changeset 624d82428726 (bug 1451169)
Backed out changeset 4d51610ca08e (bug 1451169)
Backed out changeset bb76a9589717 (bug 1451169)
Backed out changeset c145fbd03947 (bug 1451169)
Backed out changeset 6d36289e0f54 (bug 1451169)
Backed out changeset 914fb7cd9fc3 (bug 1451169)

--HG--
extra : histedit_source : 94de6631919f895dec422bc0e564f5baf885ba4a%2C18f52c6c11d3064d3137a6847575effb7d407894
2018-04-11 11:22:05 +03:00
Boris Zbarsky
f2f3fe42ff Bug 1452185 part 3. Remove unnecessary nsIDOMXULElement includes. r=qdot
MozReview-Commit-ID: Ft5MnbFtyB9
2018-04-09 16:30:32 -04:00
Johann Hofmann
bdf6e7ffee Bug 1446904 - Do not generate drag gestures from synthesized/mouse events while in touch drag mode. r=kats,smaug
Calling GenerateDragGesture at this point should not be necessary, since
eTouchMove events are already handled in the same function. This code
is intermittently triggered through (what I can only call "rogue")
eMouseMove, ePointerDown and ePointerMove events, which is causing hangs
in the native DoDragDrop function further down the stack.

Arguably this shouldn't be triggered by e.g. ePointerDown either, and
I'm unclear on why exactly DoDragDrop is hanging (likely because it is
called again before the user does a drop), but this is a quick fix that
should be suitable for uplift.

MozReview-Commit-ID: A0hBlS85icx

--HG--
extra : rebase_source : 4d26c92c556068fc25dca5ad5d106187274b3e2a
2018-04-05 19:02:14 +02:00
Nicholas Nethercote
a560608963 Bug 1451169 - Use nsStaticAtom* instead of nsStaticAtom** in Element.h. r=baku
And then fix up everything else that needs to change as well.

MozReview-Commit-ID: GDMfERqdQAc

--HG--
extra : rebase_source : 01fe06c3182245a409099a53383d92bf4fa0155c
2018-04-03 13:21:06 +10:00
Olli Pettay
57fd877895 Bug 1447993, when handling pointerup while there is pointercapture, do a hit test in order to find the click target, r=masayuki
--HG--
extra : rebase_source : 160ef0aae3922cb32b11476650c15a3f55334691
2018-03-29 19:22:59 +03:00
Boris Zbarsky
75860ea92d Bug 1445005. Remove the eventMode bits from frameloader. r=qdot 2018-03-28 18:01:46 -04:00
Boris Zbarsky
b7f9b8d095 Bug 1446527 part 4. Remove nsIDOMUIEvent::SCROLL_PAGE_* constants. r=qdot
MozReview-Commit-ID: 6F9Q6kOogEo
2018-03-26 14:53:02 -04:00
Boris Zbarsky
4e7d30f872 Bug 1444143 part 6. Remove nsIFrameLoader::Get/SetEventMode. r=mystor
MozReview-Commit-ID: Jvevh2puiLY
2018-03-21 22:43:16 -04:00
Boris Zbarsky
9cb6df0dac Bug 1444143 part 2. Remove nsIFrameLoader::GetDocShell. r=mystor
The change from "docShell" to "mDocShell" for the SetName call in the
OwnerIsMozBrowserFrame case in nsFrameLoader::MaybeCreateDocShell is a
drive-by correctness fix for a bug the rename of "docShell" to "parentDocShell"
caught: setting the name of our _parent_ docshell based on the name attr of our
owner makes no sense.

MozReview-Commit-ID: DwnWt8jTokV
2018-03-21 22:43:15 -04:00
Boris Zbarsky
29d232e53f Bug 1447098 part 1. Rename FromContent on various DOM classes to FromNode. r=mystor
MozReview-Commit-ID: 202nkbmkwfR
2018-03-21 17:39:04 -04:00
Boris Zbarsky
89ea512161 Bug 1446711 part 7. Switch the nsIDOMMouseEvent::MOZ_SOURCE_* constants over to MouseEventBinding. r=qdot
We can't include MouseEventBinding.h in MouseEvents.h because that produces
this include loop:

MouseEventBinding.h -> UIEventBinding.h ->
nsGlobalWindow.h -> nsGlobalWindowInner.h -> nsRefreshDriver.h ->
AnimationEventDispatcher.h -> AnimationComparator.h -> Animation.h ->
EffectCompositor.h -> PseudoElementHashEntry.h -> Element.h ->
PointerEventHandler.h -> MouseEvents.h -> MouseEventBinding.h

MozReview-Commit-ID: 6FNksGil7uD
2018-03-20 00:16:06 -04:00
Boris Zbarsky
1a7c5067ca Bug 1446851. Get rid of nsIDOMWheelEvent. r=qdot
We can't include WheelEventBinding.h in MouseEvents.h because that produces
this include loop:

WheelEventBinding.h -> MouseEventBinding.h -> UIEventBinding.h ->
nsGlobalWindow.h -> nsGlobalWindowInner.h -> nsRefreshDriver.h ->
AnimationEventDispatcher.h -> AnimationComparator.h -> Animation.h ->
EffectCompositor.h -> PseudoElementHashEntry.h -> Element.h ->
PointerEventHandler.h -> MouseEvents.h -> WheelEventBinding.h

MozReview-Commit-ID: 5KNwH69aJYW
2018-03-20 00:16:05 -04:00
Emilio Cobos Álvarez
90ea2d4ab7 Bug 1446832: Update hover state before firing mouseleave, to match other browsers. r=smaug
Reviewers: smaug

Bug #: 1446832

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

MozReview-Commit-ID: HKkK5jReVVh
2018-03-20 01:32:51 +01:00
Zhang Junzhi
6f951120b1 Bug 1446724 - Lets plugins still receive original delta values instead of horizontalized values if the default action for wheel scrolling is horizontalizing vertical wheel scrolling. r=masayuki
Unlike a DOM wheel event listeners which receive original delta values, plugins
receive horizontalized ones. It's not reasonable to not send original values to
plugins.

Plugin developers can do any delta adjustment, and they are also capable of
DIRECTLY getting what inputs the user is manipulating, that is to say,
developers can horizontalize scrolling for [Shift+Vertical Wheel] or other other
inputs if they want, it's just their matter; conversely, they aren't capable of
getting what delta adjustment their upstream has already encapsulated for them.
So it's not reasonable to send adjusted delta values to plugins.

This patch restores horizontalized delta values to the original for plugins.

MozReview-Commit-ID: IX8XJn0lbKq

--HG--
extra : rebase_source : ea9abef4706701e2c43ee06563bd10bc0a863614
2018-03-19 13:50:49 +08:00
Hector Zhao
33a761b672 Bug 1340039 - Set contentPolicyType when copying image, and pass it between processes. r=smaug
MozReview-Commit-ID: CJj1a1Lj699

--HG--
extra : rebase_source : 63a033a64101f71b0b06fe68d037352fd637523f
2018-03-14 16:44:36 +08:00
Boris Zbarsky
acad63d428 Bug 1444686 part 5. Get rid of nsIDOMDataTransfer::Get/SetEffectAllowedInt. r=mystor
MozReview-Commit-ID: GIzIU7nWP5j
2018-03-13 16:24:00 -04:00
Boris Zbarsky
0da7198eee Bug 1444686 part 4. Get rid of nsIDOMDataTransfer::Get/SetDropEffectInt. r=mystor
MozReview-Commit-ID: EQ8KXMf4mnR
2018-03-13 16:23:59 -04:00
Boris Zbarsky
55ed30a9c6 Bug 1444686 part 3. Get rid of nsIDOMDataTransfer::Get/SetMozCursor. r=mystor
MozReview-Commit-ID: G7vuh1uuWGv
2018-03-13 16:23:59 -04:00
Boris Zbarsky
6139d9be8f Bug 1444686 part 2. Get rid of nsIDOMDataTransfer::GetMozItemCount. r=mystor
MozReview-Commit-ID: 1eo6czER8Qw
2018-03-13 16:23:59 -04:00
Emilio Cobos Álvarez
043503a6d4 Bug 1024082: Remove most of the nsIPresShell::FrameManager calls. r=dholbert
Most of them just want GetRootFrame(), and there's no need to explicitly go
through the frame manager for that, we have a handy alias in the shell.

MozReview-Commit-ID: GriEqkasidY
2018-03-07 10:17:49 +01:00
Kartikaya Gupta
45d31fa895 Bug 1442627 - Stop exporting APZCTreeManager.h in mozilla/layers/. r=botond
MozReview-Commit-ID: GC5fSWOYtF5

--HG--
extra : rebase_source : e2dfe679595bf9208e082699a99375cd509b66e3
2018-03-06 10:25:39 -05:00
Zhang Junzhi
3492fb331e Bug 1438794 - Makes single-line text controls in vertical-writing mode vertically scrollable if they overflow vertically; and makes them horizontally unscrollable no matter whether they overflow horizontally. r=kats
As for now, the scrollable direction with a mouse wheel for a single-line text
control is hard-coded; that is, only horizontal wheel scrolls are able to take
effect while vertical ones aren't. However, this isn't the desired case for
vertical writing mode, where the opposite case definitely suits better.

This commit refines the hard-coded scrollable direction for a single-line text
control to be writing-mode-adaptive.

MozReview-Commit-ID: 4Zkoe2ExPCZ

--HG--
extra : rebase_source : 113b2ea80b6bbbcd2d8379b438de97eedd616551
2018-02-23 02:40:44 +08:00