Commit Graph

23268 Commits

Author SHA1 Message Date
James Willcox
e7c0c03f32 Bug 1432485 - Add GeckoSession.NavigationListener.onNewSession r=jchen,esawin
This allows apps to decide which GeckoSession should handle a load that
will be in a new window (e.g., window.open()).

MozReview-Commit-ID: BkJM93489Ga
2018-02-22 09:18:32 -06:00
Dorel Luca
6ad641c5c4 Merge mozilla-inboud to mozilla-central. a=merge 2018-02-22 11:59:54 +02:00
Aaron Klotz
a26b59fe0b Bug 1424505: Block osk.exe from UIA instantiation; r=Jamie 2018-02-20 12:24:47 -07:00
Eugen Sawin
05eba99d35 Bug 1432235 - [1.2] Move GeckoView API classes to org.mozilla.geckoview. r=snorp,jchen 2018-02-22 00:46:26 +01:00
Gurzau Raul
67898ab5c2 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-02-21 19:32:45 +02:00
Martin Stránský
924797ef59 Bug 1434621 - part 2: ignore vertical titlebar padding from the Gtk+ theme since we set it with CSS on #titlebar-buttonbox. r=dao
MozReview-Commit-ID: ETrNNianj3e
2018-02-21 16:43:11 +01:00
Martin Stransky
fb13e4d63d Bug 1433068 - Titlebar/Linux - load and draw HiDPI titlebar icons on HiDPI screens, r=jhorak
MozReview-Commit-ID: KxbBvf6mgo1

--HG--
extra : rebase_source : f1c3b083d4e83684b1046a3c439d802de6547c21
2018-02-20 16:16:23 +01:00
Martin Stransky
f6623f64ce Bug 1433068 - Reload WidgetstyleCache when theme changes, r=jhorak
MozReview-Commit-ID: 1cZmJNWjS4N

--HG--
extra : rebase_source : 1e9406c2090b19049c37ac21eff11e05e0be2cc9
2018-02-20 13:15:52 +01: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
Adrian Wielgosik
2d4df58ad8 Bug 1439751 - Remove all members from nsIDOMHTMLInputElement. r=qdot
MozReview-Commit-ID: JVagEzvSONN

--HG--
extra : rebase_source : a7e1cf2e5ccc1925f3a11c7d935438ef6307c70c
2018-02-20 23:10:44 +01:00
Valentin Gosu
55a7a824c6 Bug 1435671 - Reduce binary size by making NS_MutateURI.Apply not be a templated method r=mayhemer
We instead add a templated method NS_MutatorMethod that returns a std::function<nsresult(nsIURIMutator*)> which Apply then calls with mMutator as an argument.
The function returned by NS_MutatorMethod performs a QueryInterface, then calls the passed method with arguments on the result.

MozReview-Commit-ID: Jjqp7gGLG1D

--HG--
extra : rebase_source : f2a17aee7bb66a7ba8652817d43b9aa7ec7ef710
2018-02-21 01:00:54 +01:00
nbeleuzu@mozilla.com
01eef6aff1 Backed out changeset c9dcce0a1068 (bug 1435671) for build bustages on nsIURIMutator.h. CLOSED TREE 2018-02-21 00:06:46 +02:00
Valentin Gosu
f1850e9354 Bug 1435671 - Reduce binary size by making NS_MutateURI.Apply not be a templated method r=mayhemer
We instead add a templated method NS_MutatorMethod that returns a std::function<nsresult(nsIURIMutator*)> which Apply then calls with mMutator as an argument.
The function returned by NS_MutatorMethod performs a QueryInterface, then calls the passed method with arguments on the result.

MozReview-Commit-ID: Jjqp7gGLG1D

--HG--
extra : rebase_source : 592d13349a8c4627c7ce3146ec592f577b39f3cc
2018-02-20 22:39:40 +01:00
shindli
f1c5255ad4 Merge inbound to mozilla-central. a=merge 2018-02-20 21:09:49 +02:00
Jonathan Watt
f6cb92ef33 Bug 1432409 part 1 - Prevent nsDeviceContextSpecProxy using RemotePrintJobChild if initialization fails. r=dholbert
When RemotePrintJobChild::InitializePrint sends a message to the parent
process to ask it to initialize printing it spins the event loop and
waits for a reply.  If the parent fails to initialize printing it will
send back an error message followed immediately by a second message
telling the child process to delete its RemotePrintJobChild.  The error
message causes the nested event loop to terminate and blocks
RemotePrintJobChild::InitializePrint.  We then do various async things
to clean up, some of which can try to post messages to the parent
process's RemotePrintJobParent.  This is a problem since the delete
message is pending in the child process's event loop resulting in a
race between the code that wants to use the RemotePrintJobChild to send
a message to the parent process, and the delete event that will make us
crash if anyone tries to use the RemotePrintJobChild.

This patch makes sure that if nsDeviceContextSpecProxy's BeginDocument
returns failure (remote print job initialization failed) that its
EndDocument and AbortDocument methods are then no-ops and will not try
to use its RemotePrintJobChild.  (BeginPage and EndPage are not changed
since they are not called if BeginDocument returns an error result.)

MozReview-Commit-ID: 2H6GHjngX7R
2018-02-16 14:53:26 +00:00
Jan Horak
6c58e369e7 Bug 1431337 - Scale content for the actual monitor, not the first one; r=stransky
We need to use scaling factor of the monitor on which application is actually positioned.
Previously we used ScreenHelperGTK::GetGTKMonitorScaleFactor() which use the first monitor.
This does not work on hidpi+normal dpi monitors setup.

The GetSystemFontInfo() cannot return scaled value of the font by default monitor
scale factor. We need to scale it in nsLookAndFeel::GetFontImpl
by aDevPixPerCSSPixel like implementation for Windows does.

We also need to check layout.css.devPixelsPerPx because we cannot
scale per monitor when this preference is set to positive number.

MozReview-Commit-ID: AwT2NvkEqvz

--HG--
extra : rebase_source : 5b956a6abd7d215b06ebcd8c56e34c038d012940
2018-01-18 11:52:59 +01:00
Jan Horak
6234216f8c Bug 1417847 - [CSD] Doubleclick event on draggable area restores/maximizes window; r=stransky
The drag area should process doubleclick event as request for restore/maximize
because otherwise there's no other option to do the action when Firefox
is drawing window decoration. We follow similar path as mac which handles this
in mouseUp event.

MozReview-Commit-ID: KpCnHTdteLr

--HG--
extra : rebase_source : bf0680e33fd5a5b6c931b5260430fdd3fd995769
2018-02-15 09:50:56 +01:00
Martin Stransky
45ea89eb15 Bug 1433866 - Rename CSD_SUPPORT_FULL/FLAT to better names, r=jhorak
MozReview-Commit-ID: 8btSuxa5oeT

--HG--
extra : rebase_source : 775f98623f5fd9b11c6d7bb152ddf74fc8c7d7e1
2018-02-19 16:35:43 +01:00
Martin Stransky
1bca24f221 Bug 1423985 - Force CSD titlebar mode when GTK_CSD is set, r=jhorak
MozReview-Commit-ID: KxKI20TEY7U

--HG--
extra : rebase_source : a4194276c65c22d5c45429469e4a8cda6f6bb040
2018-02-19 16:26:50 +01:00
Dorel Luca
037478c033 Backed out 9 changesets (bug 1410456) for Mochitest failure on mobile/android/tests/browser/chrome/test_media_playback.html
Backed out changeset 36f6b40dfa88 (bug 1410456)
Backed out changeset 19f3248502d9 (bug 1410456)
Backed out changeset 18ef18999175 (bug 1410456)
Backed out changeset 0ec75a56b4c7 (bug 1410456)
Backed out changeset f7eae1545d5e (bug 1410456)
Backed out changeset d59060ecd24c (bug 1410456)
Backed out changeset f996b9dce4a6 (bug 1410456)
Backed out changeset 1f75636b5bce (bug 1410456)
Backed out changeset c170d37b1a04 (bug 1410456)
2018-02-19 21:45:10 +02:00
Eugen Sawin
327a3bcb38 Bug 1410456 - Allow OMT access to Android system audio properties. r=esawin
MozReview-Commit-ID: DQ8ubHECtBQ

--HG--
extra : rebase_source : 1a6314681b6ad0e00950e5e06d602e2ca2e8348e
2018-02-19 18:28:09 +02:00
Csoregi Natalia
dd63683685 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-02-21 23:52:24 +02:00
Martin Stransky
9c4741153c Bug 1418770 - Truncate DBus names used for remote service to DBUS_MAXIMUM_NAME_LENGTH, r=jhorak
MozReview-Commit-ID: 3Hrt3Ef87WD

--HG--
extra : rebase_source : 9ece42adec435b244f5875f7e3449f6268c0beea
2018-02-13 13:59:39 +01:00
Martin Stransky
d59d4f1d86 Bug 1434572 - [Wayland] Implement Gtk+ clipboard shortcut for copy->paste between Firefox windows, r=jhorak
When we perform copy -> paste in one Firefox process on Wayland we're locked because Wayland clipboard paste
operation just reads data from filedescriptor and does not run main event loop.

A solution is to use Gtk+ shortcut here, when clipboard selection owner is the same as data receiver.
Gtk+ then does not go through X11/Wayland but calls clipboard data getter callback directly,
which we can use on Wayland because it also does not main event loop and the operation
stays synchronous.

MozReview-Commit-ID: G8myCBUSzxb

--HG--
extra : rebase_source : 34cb3095be4b2f00d19c589dc5f676b1b895eb15
2018-02-01 11:23:01 +01:00
Masayuki Nakano
cf83ee7bb4 Bug 1438157 - part 2: Remove unnecessary second argument of EventUtils.synthesizeKey() r=smaug
Note that this patch also replaces legacy VK_* with KEY_*, and replaces
synthesizeKey() for inputting some characters with sendString() because
it's better and clearer what it does and it sets shiftKey state properly.

MozReview-Commit-ID: De4enbjux3T

--HG--
extra : rebase_source : 2296b84bff8e22f01eeb48cd8614fac5db11136a
2018-02-15 04:15:39 +09:00
Masayuki Nakano
2a6bd77194 Bug 1438133 - Ctrl + Enter should cause keypress event even though the key combination doesn't input any character r=smaug
Currently, we dispatch keypress event when Enter is pressed without modifiers
or only with Shift key.  However, the other browsers dispatch keypress event
for Ctrl + Enter in any platforms even if it doesn't cause any text input.
So, we should fire keypress event for Ctrl + Enter even in strict keypress
dispatching mode.

Note that with other modifiers, it depends on browser and/or platform.
So, anyway, web developers shouldn't use keypress event to catch
Alt + Enter, Meta + Enter and two or more modifiers + Enter.

MozReview-Commit-ID: 3uUMkhL5VfJ

--HG--
extra : rebase_source : 8149acd958b238c8216f683a42fa05c3cf24570a
2018-02-14 21:21:18 +09:00
Chris Peterson
50e9affc6b Bug 1436263 - Part 4: Remove unnecessary virtual and final from non-overriding final virtual function declarations. r=froydnj
AccessibleNode::GetParentObject is a non-overriding final virtual function. GetParentObject is a common virtual function in many DOM classes, but AccessibleNode does not derive from any base classes that define virtual GetParentObject or have any derived classes of its own.

WebCryptoTask::CalculateResult and CallCallback are non-overriding final virtual functions that mirror virtual function names in the CryptoTask class, even though WebCryptoTask does not actually derive from CryptoTask.

nsWindowBase::GetWindowHandle is a non-overriding final virtual function. The only other function called GetWindowHandle is MouseScrollHandler::EventInfo::GetWindowHandle, which is not related to the nsWindowBase class.

MozReview-Commit-ID: 4ldSAyP3ZpP

--HG--
extra : rebase_source : cd6fea309c042183db59653ed39e1e63b70c6a63
2018-02-09 01:31:38 -08: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
Tooru Fujisawa
24e33e9a2b Bug 1437118 - Null-check principalURI returned by URI getter. r=froydnj 2018-02-16 03:20:26 +09:00
Olli Pettay
b9ac198b01 Bug 1413102 - Ensure Shadow DOM boundaries are dealt properly in event handling, r=masayuki 2018-02-15 12:08:42 +02:00
Dorel Luca
4234703a53 Merge mozilla-inbound to mozilla-central a=merge 2018-02-15 00:23:02 +02:00
Gurzau Raul
c550afcd80 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-02-14 12:49:32 +02:00
Arthur Edelstein
7d2a9476f0 Bug 1433030 - Stop nsTransferable writing to /tmp in PB windows r=jdm
We shouldn't assume it's safe to write to /tmp unless we know
for sure we are not in a private browsing window. So
use mPrivateData = true as default.

Based on a patch by Neill Miller:
https://trac.torproject.org/projects/tor/ticket/21830
2018-02-12 10:34:00 +02: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
Martin Stransky
515ac7b992 Bug 1434544 - When launching remote instance without profile name search for already running firefox instances, r=jhorak
We don't have profile name available when running with default profile.
With this patch Firefox looks for existing DBus interfaces and tries to pick one
instead of creating a new instance.

MozReview-Commit-ID: 223rRcEvTWv

--HG--
extra : rebase_source : ba8fdd8447a8c66291b748fa0b71c975105b2662
2018-02-02 13:54:31 +01:00
Masayuki Nakano
8917ac460f Bug 1436926 - part 2: Remove unnecessary KeyboardEvent.code specification of callers of EventUtils.synthesizeKey() r=smaug
Now, callers of EventUtils.synthesizeKey() don't need to specify
KeyboardEvent.code value anymore if they assume that active keyboard layout
is US keyboard layout.

Note that this patch changes the meaning of only test_bug551434.html.
Some callers in it don't match the key value and code value but that looks
like that they don't checking such odd keyboard events.  So, they must be
bug of the test.

MozReview-Commit-ID: Itxo7yZ9rkK

--HG--
extra : rebase_source : 856ef3715c924ca16e993ea57d92d1243b5cc6be
2018-02-09 19:17:26 +09:00
Alex Gaynor
de20b74dc4 Bug 1407693 - Part 2 - when a child process crashes, write extra annotation data to a pre-opened file descriptor instead of creating a new file; r=gsvelto,rbarker
This removes the need for the content process to have permissions to create new
files on macOS, allowing more aggressive sandboxing.

MozReview-Commit-ID: 8agL5jwxDSL

--HG--
extra : rebase_source : 17ebcef3e9d24f3d4e7515e3fae95e65cef76a79
2017-11-27 14:37:34 -06: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
fce30e834b Bug 1436508 part 10. Remove use of nsIDOMKeyEvent in JS. r=masayuki
MozReview-Commit-ID: GGciORX62Yh
2018-02-09 11:17:09 -05:00
Boris Zbarsky
53daea632f Bug 1436508 part 9. Remove nsIDOMKeyEvent::DOM_KEY* constants. r=masayuki
MozReview-Commit-ID: JXCCrbaMcn
2018-02-09 11:17:09 -05:00
Tooru Fujisawa
48bb8e02c7 Bug 1424107 - Pass the triggering principal URI across processes in drag-and-drop. r=smaug 2018-02-09 10:43:53 +09:00
Brendan Dahl
754207afd4 Bug 1429943 - Define more look and feel values for headless GTK. r=jrmuizel
Values taken from running Firefox on Ubuntu with GTK.

MozReview-Commit-ID: K3aDicUBr8q

--HG--
extra : rebase_source : 3d9634a5398b768d091414ba76e2b8a027689832
2018-01-12 10:10:41 -08:00
Dorel Luca
a539f8f7fe Merge mozilla-inbound to mozilla-central. a=merge 2018-02-07 17:05:03 +02:00
David Parks
d2fcfd4724 Bug 1358372: Part 2 - Run Windows AudioSessionControl operations on main thread r=jimm
This plays better with sndvol.exe.  It reduces the impact of a bug that shows multiple volume sliders for the content processes.
2018-01-10 14:57:19 -08:00
Andrew McCreight
5dec0e0beb Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian
This patch was autogenerated by my decomponents.py

It covers almost every file with the extension js, jsm, html, py,
xhtml, or xul.

It removes blank lines after removed lines, when the removed lines are
preceded by either blank lines or the start of a new block. The "start
of a new block" is defined fairly hackily: either the line starts with
//, ends with */, ends with {, <![CDATA[, """ or '''. The first two
cover comments, the third one covers JS, the fourth covers JS embedded
in XUL, and the final two cover JS embedded in Python. This also
applies if the removed line was the first line of the file.

It covers the pattern matching cases like "var {classes: Cc,
interfaces: Ci, utils: Cu, results: Cr} = Components;". It'll remove
the entire thing if they are all either Ci, Cr, Cc or Cu, or it will
remove the appropriate ones and leave the residue behind. If there's
only one behind, then it will turn it into a normal, non-pattern
matching variable definition. (For instance, "const { classes: Cc,
Constructor: CC, interfaces: Ci, utils: Cu } = Components" becomes
"const CC = Components.Constructor".)

MozReview-Commit-ID: DeSHcClQ7cG

--HG--
extra : rebase_source : d9c41878036c1ef7766ef5e91a7005025bc1d72b
2018-02-06 09:36:57 -08:00
Gurzau Raul
476c3b3a55 Merge inbound to mozilla-central. a=merge 2018-02-06 23:53:56 +02:00