Commit Graph

2134 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
e341b20ec4 Bug 1447483: Merge nsStyleContext and ServoStyleContext, rename to ComputedStyle. r=jwatt on a CLOSED TREE
MozReview-Commit-ID: JPopq0LudD
2018-03-22 20:06:24 +01:00
Emilio Cobos Álvarez
5dd797f154 Back out changeset b683bb3f22a1 (Bug 1447483) for not landing with all the files. r=me on a CLOSED TREE
This reverts commit 1808914126bb9f9e4a82d2c3d7ac961885fe7d62.

MozReview-Commit-ID: 5skESBseEvo
2018-03-22 20:05:22 +01:00
Emilio Cobos Álvarez
ca5ac79cca Bug 1447483: Merge nsStyleContext and ServoStyleContext, rename to ComputedStyle. r=jwatt
MozReview-Commit-ID: JPopq0LudD
2018-03-22 19:48:42 +01:00
Miko Mynttinen
65c6bee9d6 Bug 1445302 - Replace TArray.RemoveElementAt(TArray.Length() - 1) pattern with TArray.RemoveLastElement() or TArray.PopLastElement() r=froydnj
MozReview-Commit-ID: rGjabnP2iz

--HG--
extra : rebase_source : 1ef6c5ce028ac9ebd9f3176d57835c43fe46bada
2018-03-13 14:51:33 +01: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
Boris Zbarsky
d05e564049 Bug 1446710. Get rid of nsIDOMXULCommandEvent. r=qdot
MozReview-Commit-ID: C2C6oWtagG3
2018-03-19 15:50:37 -04:00
Bogdan Tara
4785e99532 Merge inbound to mozilla-central. a=merge 2018-03-17 12:29:57 +02:00
Jeff Muizelaar
b0c6c75854 Bug 1439006. Allow multiple kinds of WebRenderUserData on a DisplayItem. r=mstange
Currently we can only have one type of WebRenderUserData on an Item. We already
have a hash table of WebRenderUserData so it's not hard to include type in the
hash to support one per type.

MozReview-Commit-ID: geJ0BeWv8b
2018-03-16 19:15:27 -04:00
Kartikaya Gupta
874af3e540 Bug 1441324 - Extract an APZInputBridge interface from IAPZCTreeManager. r=rhunt
This separates the methods that are used to deliver input events
synchronously over IPDL to the compositor; this interface will be
remoted over a new APZInputBridge IPDL protocol in future patches.

MozReview-Commit-ID: 1f3V9SUKlfW

--HG--
rename : gfx/layers/apz/public/IAPZCTreeManager.cpp => gfx/layers/apz/src/APZInputBridge.cpp
extra : rebase_source : 523abce7949baf9e3b7803a61632eb4434a6967f
2018-03-16 16:28:18 -04:00
Markus Stange
e890cbae46 Bug 1445131 - When testing the event's position against the window's draggable region, read the position when it's still in the correct coordinate space. r=spohl
MozReview-Commit-ID: HqnXgIjDWrW

--HG--
extra : rebase_source : 9baf99dd7fc3715b7e7bedeea72fbe2b3728766d
2018-03-14 17:04:49 -04:00
Xidorn Quan
5d9c70d584 Bug 1445519 - Use frameRectForContentRect:styleMask: for nsCocoaWindow::ClientToWindowSize. r=mstange
This aligns the behavior with windows, though that may not be the right thing
to do, see bug 1445738.

MozReview-Commit-ID: 6p97SXWfchA
2018-03-14 20:45:51 +01:00
arthur.iakab
8976abf9ca Merge inbound to mozilla-central. a=merge 2018-03-14 12:00:13 +02: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
Masayuki Nakano
6857169b5e Bug 1343451 - part 4: Make TextInputHandler dispatches eKeyDown event with marking it as "processed by IME" r=m_kato
First of all, TextInputHandler::HandleKeyDown() dispatches an eKeyDown event
before sending IME.  This is different behavior from Gecko on the other
platforms and it means TextInputHandler does not know if the eKeyDown event
will be handled by IME.  Therefore, we need to make TextInputHandler dispatch
an eKeyDown event dispatch when it needs to dispatch another event.  Therefore,
this patch makes TextInputHandler not dispatch an eKeyDown even from
its HandleKeyDown() unless it's already has composition (because if it's
already had composition, any eKeyDown event except modifier keys should be
marked as "processed by IME" for compatibility with the other browsers).

For dispatching eKeyDown event only once for a native keydown event,
this patch implements TextInputHandlerBase::MaybeDispatchCurrentKeydownEvent()
to check whether eKeyDown event has already been dispatched for the event
and if it's not so, dispatches eKeyDown event.

Note that on macOS, dead keys are implemented as IME.  However, we need to
treat dead keys as is.  Therefore, if current keydown event is a dead keydown
event, MaybeDispatchCurrentKeydownEvent() should NOT mark dispatching
eKeyDown event and its following eKeyDown event as "processed by IME".

MozReview-Commit-ID: 7epk8wdAznd

--HG--
extra : rebase_source : 0ed30ff3e108170fd96eabe626e0530473f2f3b1
2018-02-23 23:09:43 +09:00
Markus Stange
1211c84c8c Bug 1401195 - Make double-clicking draggable parts of the window always do the titlebar-double-click action, regardless of whether the click targeted the titlebar or some other draggable element. r=spohl
In the past there were cases where treating double click behavior differently from draggability
was necessary, but there don't seem to exist such cases any more. For example, we don't have any
windows with bottom bars / draggable status bars any more.
This change simplifies the code and frees the frontend from having to use special -moz-appearance
values to indicate titlebary parts of the window.

MozReview-Commit-ID: IRe3FPU2EaT

--HG--
extra : rebase_source : e52b79d4cbc15b3c3a70b8411c5917309a7f78d8
2018-03-09 14:41:50 -05:00
Markus Stange
1b083a52dd Bug 1370131 - Allow shadows on accelerated popups. r=kmag
It looks like the work in bug 1291457 was all that was necessary to get working
window shadows for accelerated popups. It seems that macOS is able to compute
the correct shadow style consistently for whatever is drawn in the
NSOpenGLContext during the first paint of the window (inside the drawRect call
during the orderFront call that opens the window).

We only ran into problems when we animated the contents of the window in a way
that affects the shadow style; we're no longer doing that after bug 1291457.

MozReview-Commit-ID: 62mfWuAsrg2

--HG--
extra : rebase_source : bf8121451474629f0194ccbb422147d5f05ff5b3
extra : source : 57b4a3dff2a5799c5c994a5b577b76c98ebc8226
2017-06-04 22:47:58 -04:00
Emilio Cobos Álvarez
b7cf65fe60 Bug 1442938: Nil-check the title in nsCocoaWindow::importState / exportState. r=mstange
Looking at the docs for [NSWindow title] I don't think it's supposed to return
nil under any circumstances...

But it does in our automation, for some reason, with the patches for bug 1439875
which make our fullscreen code run a bit earlier.

MozReview-Commit-ID: AX4qzjzsqST

--HG--
extra : rebase_source : a01f2ba6b42b4067e7a4886c4814e85f317a4a6f
2018-03-03 18:47:41 +01:00
Brian Grinstead
1dcca6b84e Bug 1442695 - Remove unused GetScrollbarPressStates method;r=spohl
MozReview-Commit-ID: GA9kzatUKfp

--HG--
extra : rebase_source : e9bc6b16de2b9848d765b9150813a0d844016895
2018-03-02 09:42:55 -08:00
Ciure Andrei
234819650e Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-03-02 12:19:09 +02:00
Adrian Wielgosik
d61c7fbed5 Bug 1441270 - Remove unused WebGL parameter getters. r=jgilbert
MozReview-Commit-ID: 7PqaPG2STUs

--HG--
extra : rebase_source : e24d7534964d15c54c1f8706ad01e17a4e31dd8c
2018-02-26 20:35:12 +01:00
Emilio Cobos Álvarez
2988d4e66d Bug 1442207: Remove unneeded arguments to nsIMutationObserver. r=smaug
aDocument is always content->OwnerDoc().
aContainer is always content->GetParent().

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

MozReview-Commit-ID: 4xwPCOnhyIL
2018-03-01 22:45:17 +01:00
Emilio Cobos Álvarez
9f26540cc4 Bug 1441547: Make character data change notifications use a const reference for the info parameter. r=smaug
It's not intended to be mutated.

MozReview-Commit-ID: 5nkD1YkidlV

--HG--
extra : rebase_source : 810d429208fa3eaf30e220e77a7d27107cb77346
2018-02-27 15:30:27 +01:00
Emilio Cobos Álvarez
3eb90874c6 Bug 1432490: followup: Fix mac-only bustage on a CLOSED TREE. r=me
MozReview-Commit-ID: TNquyPQhkL
2018-02-25 02:44:18 +01:00
Cosmin Sabou
462b445081 Backed out 6 changesets (bug 1343451) for mochitest android perma failures on testInputConnection.
Backed out changeset e07105d9698e (bug 1343451)
Backed out changeset dc4a2a5932c3 (bug 1343451)
Backed out changeset 9561ed261d04 (bug 1343451)
Backed out changeset 84a5ec921442 (bug 1343451)
Backed out changeset b34d48936db8 (bug 1343451)
Backed out changeset 4dce7ab14f71 (bug 1343451)
2018-03-12 18:07:46 +02:00
Masayuki Nakano
2c2365305c Bug 1343451 - part 4: Make TextInputHandler dispatches eKeyDown event with marking it as "processed by IME" r=m_kato
First of all, TextInputHandler::HandleKeyDown() dispatches an eKeyDown event
before sending IME.  This is different behavior from Gecko on the other
platforms and it means TextInputHandler does not know if the eKeyDown event
will be handled by IME.  Therefore, we need to make TextInputHandler dispatch
an eKeyDown event dispatch when it needs to dispatch another event.  Therefore,
this patch makes TextInputHandler not dispatch an eKeyDown even from
its HandleKeyDown() unless it's already has composition (because if it's
already had composition, any eKeyDown event except modifier keys should be
marked as "processed by IME" for compatibility with the other browsers).

For dispatching eKeyDown event only once for a native keydown event,
this patch implements TextInputHandlerBase::MaybeDispatchCurrentKeydownEvent()
to check whether eKeyDown event has already been dispatched for the event
and if it's not so, dispatches eKeyDown event.

Note that on macOS, dead keys are implemented as IME.  However, we need to
treat dead keys as is.  Therefore, if current keydown event is a dead keydown
event, MaybeDispatchCurrentKeydownEvent() should NOT mark dispatching
eKeyDown event and its following eKeyDown event as "processed by IME".

MozReview-Commit-ID: 7epk8wdAznd

--HG--
extra : rebase_source : 4f4e23a8cc5005d8f0da3c35910eba30f8777e6b
2018-02-23 23:09:43 +09:00
Markus Stange
e4fe809278 Bug 1170312 - Don't let the desktop background influence the vibrancy effect's backdrop for context menus. r=spohl
MozReview-Commit-ID: FKLVouZg8ac

--HG--
extra : rebase_source : 6b338186c4a3c6adf02d4311d8b172d0fb31f646
2018-02-22 23:35:33 -05:00
Masayuki Nakano
ed18f14624 Bug 1036008 - Use alternative ASCII capable keyboard layout information to decide keyCode even if the key produces an ASCII punctuation character r=smaug
Gecko decides keyCode from an ASCII character which is produced by the key
by itself or with Shift on active keyboard layout or alternative ASCII capable
keyboard layout if active keyboard layout isn't ASCII capable.  However, we've
ignored alternative ASCII capable keyboard layout's character if both the
key itself and with Shift don't produce ASCII alphabet nor ASCII numeral,
i.e., ASCII punctuation characters are not used in alternative ASCII capable
keyboard layout because of avoiding mapping a keyCode value to 2 or more keys.

However, setting 0 to keyCode value makes Firefox unusable with some web
applications which are aware of neither KeyboardEvent.key nor
KeyboardEvent.code.  So, even if we map same keyCode value to a key, we should
avoid setting keyCode value to 0 as far as possible.

This patch's approach is, we behave same keyCode value as the alternative ASCII
capable keyCode is selected when computed keyCode value of active keyboard
layout is 0.  This means that we will make some language users whose keyboard
layout for their language is not ASCII capable can use global web services
which support US keyboard layout of Firefox since the new keyCode values
are mostly computed with US layout on Windows or actual alternative ASCII
capable keyboard layout on macOS and Linux.  In other words, we cannot improve
compatibility with web applications which don't support Firefox  by this patch
since our keyCode values are really different from Chrome's.  So, unfortunately,
if we'd use exactly same keyCode computation as Chromium, we'd break
compatibility with existing web applications which are aware of Firefox since
it's necessary to check UA name or something before using keyCode values.

Note that the most important difference between Windows and the others is,
such keyCode value is computed with alternative ASCII capable keyboard
layout on macOS and Linux but only on Windows, it's computed with OEM virtual
keycode.  This means that only on Windows, the keyCode value may be different
from actual alternative ASCII capable keyboard layout's keyCode.

MozReview-Commit-ID: As289r9wp6i

--HG--
extra : rebase_source : 66181403dbe8ca8dab893edc8f4eec1991d544d0
2018-02-16 15:54:07 +09:00
Chris Peterson
fe5cd3d5d9 Bug 1436263 - Part 3: Remove virtual from final virtual function declarations. r=froydnj
MozReview-Commit-ID: 8pjYjEvQF42

--HG--
extra : rebase_source : 5eb0bea2ef5f06a811b4f3daf57ce8720f12dd07
2018-02-08 21:22:43 -08:00
Chris Peterson
0129d900f3 Bug 1436263 - Part 2: Replace override final virtual function specifiers with just final. r=froydnj
MozReview-Commit-ID: 70gt5SUu4Dv

--HG--
extra : rebase_source : 71912c6bde22aaed01e70615a4ee794a36e70d0e
extra : source : 1c22d4c65d70b797ee3e963ec426c90e1f89b5e3
2018-02-05 22:50:00 -08:00
Chris Peterson
d09123f248 Bug 1436263 - Part 1: Replace final override virtual function specifiers with just final. r=froydnj
MozReview-Commit-ID: DE5HkIhsZ6D

--HG--
extra : rebase_source : 94831c1e13a840dd2ea0600f64bcf70c2bf938d9
extra : source : cf9283bf1b0bca3a6311c98e227329d451f80ecb
2018-02-05 22:46:57 -08:00
Timothy Guan-tin Chien
a2a559db3e Bug 1234008 - Recompress some png images with zopflipng r=Dolske,Grisha,jryans
MozReview-Commit-ID: Cr2iMSB04uu

--HG--
extra : rebase_source : 49f69cca3a4f27af1060ed82283b5cc96f717229
2018-01-27 15:57:42 +08:00
Boris Zbarsky
9bdcffc985 Bug 1436902 part 3. Replace usage of NS_IMPL_ISUPPORTS_INHERITED0 with NS_INLINE_DECL_REFCOUNTING_INHERITED when possible. r=mccr8
The change to RootAccessible.cpp fixes an obvious bug introduced in bug 741707.

The visibility changes in gfx/thebes are because NS_DECL_ISUPPORTS has a
trailing "public:" that those classes were relying on to have public
constructors.

MozReview-Commit-ID: IeB8KIJCGhU
2018-02-12 15:44:40 -05:00
Boris Zbarsky
523343906d Bug 1436508 part 16. Remove nsIDOMSimpleGestureEvent. r=masayuki
MozReview-Commit-ID: 8JDovhthKtx
2018-02-09 11:17:10 -05:00
Boris Zbarsky
92bbd744e1 Bug 1436508 part 11. Remove the use of the nsIDOMKeyEvent::DOM_VK* constants in C++. r=masayuki
MozReview-Commit-ID: Honw0NrVMuV
2018-02-09 11:17:09 -05:00
Boris Zbarsky
928d0d4fa7 Bug 1434318 part 13. Remove nsIDOMDocument::CreateEvent. r=mystor
MozReview-Commit-ID: EaUjTLeaQ0n
2018-01-31 15:18:11 -05:00
Boris Zbarsky
ede65cfa38 Bug 1434318 part 8. Remove nsIDOMDocument::GetElementById. r=mystor
MozReview-Commit-ID: IzjmFqySBpB
2018-01-31 15:18:10 -05:00
Boris Zbarsky
e565b1fe1b Bug 1432944 part 11. Remove nsIDOMElement::GetAttribute. r=mccr8
MozReview-Commit-ID: 2f1vFvRdCPG
2018-01-29 23:28:00 -05:00
Masayuki Nakano
df8f5c37dc Bug 1430628 - TextInputHandler::HandleCommand() should use native key event when it dispatches a keypress event either initializing with native event or creating fake event r=m_kato
TextInputHandler::HandleCommand() has two bugs.  One is, checking whether
the key event has caused composition events.  Even if it caused composition
events, we decided to dispatch keypress event for emulating native behavior.
Therefore, this patch removes the check of
|currentKeyEvent->CanDispatchKeyPress()|.

The other is, for making content handle dispatching keypress event as given
command, it needs to dispatch a keypress event whose key combination will
cause the command.  However, HandleCommand() needs to set native key event
since content may not refer key combination for some edit actions, they just
refer command which is computed with native key event with NativeKeyBindings.
Therefore, even if current native key event has already caused dispatching
some events, HandleCommand() needs to set
WidgetKeyboardEvent::mNativeKeyEvent to current native key event for
NativeKeyBindings.  Although it must be rare case, given key could be
not related to the command or not key could cause the command.  In this
case, and perhaps in all cases, we should set all commands of dispatching
keypress event before dispatching it.  Howevever, this needs more work,
so, we shouldn't do it in this bug to making it possible to uplift.
Therefore, this patch makes always set mNativeKeyEvent to current native
key event.  So, just warning it when command is caused without native
key event.

MozReview-Commit-ID: 2MvDTw4ruAu

--HG--
extra : rebase_source : 02a4ca980530aa16fa0e1aecd6d18fa42873c1dc
extra : source : 1e3137db3fe9822f34b98d59fb928497caca466a
2018-01-24 19:13:01 +09:00
Andrea Marchesini
fadb18e7bb Bug 1430997 - Rename nsINode::IndexOf to nsINode::ComputeIndexOf, r=me CLOSED TREE 2018-01-23 14:54:36 +01:00
Chris Peterson
37efe4d0e6 Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj
MozReview-Commit-ID: DCPTnyBooIe

--HG--
extra : rebase_source : cfec2d96faeb11656d86d760a34e0a04cacddb13
extra : intermediate-source : 6176724d63788b0fe8caa3f91607c2d93dbaa7ec
extra : source : eebbb0600447f9b64aae3bcd47b4be66c02a51ea
2017-11-05 19:37:28 -08:00
Jonathan Watt
f38fde0cc7 Bug 144114 part 3 - Clean up the headers of the nsPrintSettingsService subclasses. r=bobowen
* * *
[mq]: dtor

MozReview-Commit-ID: 8ghrXxeKiHF
2017-12-19 11:05:37 +00:00
Jonathan Watt
f9157dfa53 Bug 144114 part 2 - Rename nsPrintOptions and its subclasses to nsPrintSettingsService*. r=bobowen
MozReview-Commit-ID: HQSmyrMBdS8
2017-12-19 10:42:15 +00:00
Jonathan Watt
94df748ddb Bug 144114 part 1 - Rename the files for nsPrintOptions and its subclasses. r=bobowen
MozReview-Commit-ID: EcotGH6pXCR

--HG--
rename : widget/android/nsPrintOptionsAndroid.cpp => widget/android/nsPrintSettingsServiceAndroid.cpp
rename : widget/android/nsPrintOptionsAndroid.h => widget/android/nsPrintSettingsServiceAndroid.h
rename : widget/cocoa/nsPrintOptionsX.h => widget/cocoa/nsPrintSettingsServiceX.h
rename : widget/cocoa/nsPrintOptionsX.mm => widget/cocoa/nsPrintSettingsServiceX.mm
rename : widget/gtk/nsPrintOptionsGTK.cpp => widget/gtk/nsPrintSettingsServiceGTK.cpp
rename : widget/gtk/nsPrintOptionsGTK.h => widget/gtk/nsPrintSettingsServiceGTK.h
rename : widget/nsPrintOptionsImpl.cpp => widget/nsPrintSettingsService.cpp
rename : widget/nsPrintOptionsImpl.h => widget/nsPrintSettingsService.h
rename : widget/windows/nsPrintOptionsWin.cpp => widget/windows/nsPrintSettingsServiceWin.cpp
rename : widget/windows/nsPrintOptionsWin.h => widget/windows/nsPrintSettingsServiceWin.h
2017-12-19 10:06:39 +00:00
Cameron McCormack
4c3b9a279c Bug 1427512 - Followup fix for macOS test failure. 2018-01-12 13:39:49 +08:00
Ciure Andrei
93d5417e33 Merge mozilla-central to mozilla-inbound. r=merge a=merge CLOSED TREE 2018-01-11 12:08:47 +02:00
Cameron McCormack
0ec0b4a768 Bug 1427512 - Part 24: Stop using XPCOM interfaces to access CSS property values in nsMenuItemIconX. r=mstange
MozReview-Commit-ID: HWsKlAQraO5
2018-01-11 16:17:57 +08:00
Milan Sreckovic
bd27b86da3 Bug 1423559: Use BaseRect access methods instead of member variables in widget/ r=mstange
MozReview-Commit-ID: AqnztoUbsmk

--HG--
extra : rebase_source : 76a232a08b42ed73b4922c03bc0f2e9d1769203b
2018-01-10 11:14:16 -05:00
Sebastian Hengst
1ebdaf80de merge mozilla-central to autoland. r=merge a=merge on a CLOSED TREE 2018-01-10 01:52:28 +02:00
Andrea Marchesini
521ef90721 Bug 1425440 - Get rid of GetChildAt_Deprecated in nsMenuBarX, r=catalinb 2018-01-09 11:44:54 +01:00