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

27413 Коммитов

Автор SHA1 Сообщение Дата
Erik Nordin d9f598b6bf Bug 1666734 - Add two-sided printing checkbox to print UI r=sfoster,fluent-reviewers,flod,AlaskanEmily
This patch adds a new checkbox to the print UI for two-sided printing.
The checkbox is only visible if the currently selected printer supports
two-sided printing.

Notable Changes:
  - Add new section and checkbox for two-sided printing.
  - Add new getter to settings proxy for supportsDuplex.
  - Add new setter/getter to settings proxy for printDuplex.
  - Add new test for no duplex with PDF printer.
  - Add new test for toggle duplex in portrait orientation.
  - Add new test for toggle duplex in landscape orientation.
  - Add new test for toggle orientation with duplex checked.
  - Correctly set duple mode in GTK print settings.

Depends on D94026

Differential Revision: https://phabricator.services.mozilla.com/D93621
2020-11-06 06:33:27 +00:00
Razvan Maries 78b884f32d Backed out changeset 905f54a1dfed (bug 1666734) for perma failures on test_get_printer_paper_sizes.html. CLOSED TREE 2020-11-06 08:01:06 +02:00
Erik Nordin f3863e87b5 Bug 1666734 - Add two-sided printing checkbox to print UI r=sfoster,fluent-reviewers,flod,AlaskanEmily
This patch adds a new checkbox to the print UI for two-sided printing.
The checkbox is only visible if the currently selected printer supports
two-sided printing.

Notable Changes:
  - Add new section and checkbox for two-sided printing.
  - Add new getter to settings proxy for supportsDuplex.
  - Add new setter/getter to settings proxy for printDuplex.
  - Add new test for no duplex with PDF printer.
  - Add new test for toggle duplex in portrait orientation.
  - Add new test for toggle duplex in landscape orientation.
  - Add new test for toggle orientation with duplex checked.
  - Correctly set duple mode in GTK print settings.

Depends on D94026

Differential Revision: https://phabricator.services.mozilla.com/D93621
2020-11-06 01:14:15 +00:00
Nika Layzell 188a162ad4 Bug 1658084 - Avoid creating a mozilla::OffTheBooksMutex in a static initializer, r=emilio,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D95660
2020-11-04 18:56:13 +00:00
Sylvestre Ledru 9bfd4073b2 Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D95434
2020-11-04 18:46:00 +00:00
Hiroyuki Ikezoe 9a544e618f Bug 1663000 - Return UNHANDLED even if there's no event handler which uses preventDefault() and the root content is not covered by the dynamic toolbar. r=botond,geckoview-reviewers,snorp
This change has a couple of tests but they are for scrollable/non-scrollable
contents, they are not for non-scrollable contents but covered by the dynamic
toolbar cases, e.g. 100vh body element.  Those cases will be introduced in the
subsequent change.

Differential Revision: https://phabricator.services.mozilla.com/D93915
2020-11-04 03:16:07 +00:00
Razvan Maries 10425eddfc Backed out 7 changesets (bug 1658084, bug 1671983) for perma failures on browser_async_remove_tab.js and browser_e10s_chrome_process.js. CLOSED TREE
Backed out changeset 2e6309c1cdbd (bug 1658084)
Backed out changeset 99aafd9304ef (bug 1671983)
Backed out changeset 80280b85280a (bug 1671983)
Backed out changeset 008db2659002 (bug 1671983)
Backed out changeset 32bd45c7fe3a (bug 1671983)
Backed out changeset 56e227e6580c (bug 1671983)
Backed out changeset a404f809f79d (bug 1671983)
2020-11-04 04:23:47 +02:00
Nika Layzell 2531c52959 Bug 1658084 - Avoid creating a mozilla::OffTheBooksMutex in a static initializer, r=emilio,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D95660
2020-11-04 00:55:40 +00:00
Razvan Maries cb6d5f13c0 Bug 1663652 - Deleted the whitespace that caused the Lint failure. DONTBUILD CLOSED TREE 2020-11-03 23:04:05 +02:00
Emily McDonough 6635212e1a Bug 1663652 part 2 - Add combined printerInfo method to nsPrinterCUPS r=emilio
Since we no longer are using the PaperList or CreateDefaultSettings methods on
nsPrinterBase, and we can remove them from nsPrinterBase.

This should dramatically improve latency when the remote printer is not
available, or when the print server is slower. In the best-case scenario it may
increase the latency to displaying the print preview somewhat.

Differential Revision: https://phabricator.services.mozilla.com/D94482
2020-11-03 20:35:38 +00:00
Emily McDonough 1fbcb914c4 Bug 1663652 part 1 - Implement combined CreateDefaultSettings and GetPaperList interface for nsPrinterBase r=emilio,mstriemer
This also changes the frontend to use this interface.

This will be a bit less efficient in the general case, as it will serialize the
PaperList and DefaultSettings fetches. But most of the large delays seem to
occur when the print server is slow to respond, and ultimately using a single
live connection for both these requests when possible (particularly with CUPS)
should improve the total latency when the printer or print server is not
available, or is very slow.

Differential Revision: https://phabricator.services.mozilla.com/D93688
2020-11-03 20:35:38 +00:00
Markus Stange f2606240fd Bug 1615858 - Propagate historical touch data from Java to C++. r=kats,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D95650
2020-11-03 19:48:43 +00:00
Markus Stange fc8aedee99 Bug 1615858 - Add MultiTouchInput::SingleTouchData::mHistoricalData. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D95649
2020-11-03 16:46:19 +00:00
Neil Deakin 942c385d2a Bug 1671526, use DispatchInputEvent for drag events on windows, r=kats
Differential Revision: https://phabricator.services.mozilla.com/D95552
2020-11-02 22:01:21 +00:00
Robert Mader a715823143 Bug 1670444 - [Wayland] Some vsyncsource improvements, r=stransky
This implements the following three things:
 - use the frame callback timestamp. While there are few guarantees about
its behaviour, it still seems to make sense to use it assuming: a) the compositor
uses monotonic system time (we do a simple sanity check) b) the compositor is
more likely to run at high priority, thus making the offset from the actual
vsync less jittery c) the timestamp is closer to the actual vsync event,
making it more fitting for how we use it internally
 - implement a very simplistic estimate of the refresh interval.
Since bug 1653737 WR takes an estimated next output time to optimize
for. Until now this was hardcoded to 16.6ms from the last `Now()`. Now
we adjust the value on each interval slightly, making it much more
precise on non-60Hz refresh rates (this certainly can get improved more)
 - Shuffle around mutex looking a bit, making sure we don't hold it
while calling `NotifyVsync()`. That should make it less likely to run
into deadlock conditions.

Depends on D95515

Differential Revision: https://phabricator.services.mozilla.com/D93169
2020-11-03 11:39:18 +00:00
Robert Mader 37e13baa75 Bug 1674758 - [wayland] Prevent vsyncsource from restarting after shutdown, r=stransky
This is necessary to prevent crashes if there are multiple consumers, see e.g. D93173

Differential Revision: https://phabricator.services.mozilla.com/D95515
2020-11-03 11:38:35 +00:00
stransky 3081c62a8e Bug 1674982 [Wayland] Revert frame callbacks timeout due to OOM crashes, r=jhorak
Wayland protocol does not include a mechanism how to inform compositor about deleted frame callbacks.
We delete a callback only locally on client side and it remains active at server (compositor) side.

When large amount of callbacks is accumulated at server Firefox is closed due to OOM
so we need to keep frame callback on local side untill is fired and don't create a new one.

Differential Revision: https://phabricator.services.mozilla.com/D95678
2020-11-03 09:53:51 +00:00
Markus Stange 1958913b1e Bug 1674010 - Draw a shadow under the range thumb in the basic theme. r=spohl
What's implemented in this patch doesn't match the spec to 100%, but it comes
pretty close. This patch is cutting two corners: We're only using one shadow
instead of two, and we're using a smaller blur radius (2 instead of 2 and 4).
Both adjustments are done to improve performance; blurring is a computationally
expensive operation, so we should minimize its cost.

As the shadow color, I'm using a transparent black instead of a transparent
gray, because this makes it easier to do the blurring on an A8 surface rather
than on a full RGBA surface, given the current Moz2D API.

Differential Revision: https://phabricator.services.mozilla.com/D95090
2020-11-02 17:09:05 +00:00
Markus Stange 495d5646be Bug 1671704 - Draw macOS native-looking scrollbars when using the basic theme on macOS. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D93846
2020-11-02 17:10:24 +00:00
Markus Stange 3caf85f6a6 Bug 1671704 - Add nsNativeBasicTheme::PaintScrollbarTrack which does nothing by default. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D95078
2020-11-02 17:09:00 +00:00
Markus Stange 2b0dcca520 Bug 1671704 - Give scrollbar painting functions access to the nsIFrame*. r=spohl
The Mac theme will need this to check for RTL, and for whether the scrollbar has
the hover attribute, and for whether the scrollbar is on a dark background.

It looks like the philosophy of the virtual DrawScrollbar* methods was to supply
narrow pieces of information, instead of the frame itself. So this patch undoes
that separation of concerns.
In theory, we could grab the three pieces of state in
nsNativeBasicTheme::DrawWidgetBackground, but then we'd do a bunch of
computations (especially the "dark background" check) unnecessarily on platforms
that don't need them.

Differential Revision: https://phabricator.services.mozilla.com/D95077
2020-11-02 17:08:58 +00:00
Markus Stange aa21c0548f Bug 1671704 - Unify some calls to ComputeScrollbarParams and call nsLayoutUtils::StyleForScrollbar in the caller. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D95076
2020-11-02 17:08:56 +00:00
Markus Stange 30cc69eb90 Bug 1671704 - Remove IsSmallScrollbar. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D95075
2020-11-02 17:08:53 +00:00
tobar2018 d7a64d8211 Bug 1673051 - Remove OnYosemiteOrLater(), OnElCapitanOrLater(), and OnSierraOrLater(). r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D95304
2020-11-02 16:25:18 +00:00
Bob Owen a97117e3ac Bug 1673708: Use the original required length for paperIDs in nsPrinterWin::PaperList. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D95404
2020-11-02 12:05:22 +00:00
Emilio Cobos Álvarez 2952e1cd23 Bug 1674716 - Fix printing selection-only from the GTK print dialog. r=jfkthame
I don't know when this broke, but we were not reading the gtk-specific
boolean even before https://hg.mozilla.org/mozilla-central/rev/c61a3b0cf79e350c400b48f6be97e08c1bfbe4aa

Differential Revision: https://phabricator.services.mozilla.com/D95488
2020-11-02 11:19:15 +00:00
Kartikaya Gupta 719ed26689 Bug 1673728 - Default to adding phase information to the synthesized scroll events on macOS. r=tnikkel
This causes the generated scroll events to be turned into PanGestureInput events
instead of ScrollWheelInput events. This exercises different codepaths that are
more representative of real-world behaviour on mac laptops. This patch also
allows a pref to flip the behaviour back to the old behaviour of triggering
ScrollWheelInputs, since in some cases we may want to test that behaviour
explicitly.

Depends on D95320

Differential Revision: https://phabricator.services.mozilla.com/D95321
2020-10-30 18:33:54 +00:00
Kartikaya Gupta e81dabfa00 Bug 1673728 - Don't put garbage in the synthesized scrollwheel event. r=tnikkel
Apparently objective-C doesn't do a great job when you give a vararg function
that takes int32_t arguments double values. I guess tests that use macOS
synthesized wheel inputs were basically only working by accident.

Differential Revision: https://phabricator.services.mozilla.com/D95320
2020-10-30 18:32:25 +00:00
Markus Stange 71c34591a0 Bug 1673923 - Draw the range thumb with the thumb rect. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D95032
2020-10-30 15:34:50 +00:00
Nicolas Silva 1e1f1c839a Bug 1653649 - Limit widget size to 16k. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D94332
2020-10-30 09:40:25 +00:00
Doug Thayer 30478629cf Bug 1666874 - Support maximized windows for skeleton UI r=agashlin
Most of this patch is a dance to avoid size flickering of the skeleton UI
window. We change all Resize/Move/SetSizeMode calls from before the first
nsWindow::Show call. Normally those have no effect, since the window isn't
shown yet, and if the window is not maximized, they typically match the
sizes we've gotten out of the registry anyway. However, if we are maximized,
then they produce a lot of visual noise. We can however achieve the desired
effect by just calling SetWindowPlacement.

Similarly, we switch the window styles of the skeleton UI window to match those
of the toplevel Windows window, and adjust the client rect from our window proc
in a way that matches the adjustments in nsWindow in the WM_NCCALCSIZE handler.
We do this because otherwise we get a flicker as soon as we change the styles
and nonclient margins as the fake chrome pops up and then back down.

Lastly we also change the extended window styles so that they match. We
historically added WS_EX_TOOLWINDOW here to hide the toolbar entry, because it
would otherwise switch out to a new toolbar entry when we changed the window
styles. However since our new styles match, we no longer need to do this. It
was also causing the maximized window to paint over the Windows taskbar.

Differential Revision: https://phabricator.services.mozilla.com/D93534
2020-10-29 19:04:02 +00:00
Andrew Osmond e5865e88c9 Bug 1674197 - Allow WebRender for Intel driver 23.20.16.4973 on early beta. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D95192
2020-10-29 19:18:53 +00:00
Butkovits Atila 304bfab038 Backed out 2 changesets (bug 1666874, bug 1665455) for causing bustage on PreXULSkeletonUI.cpp. CLOSED TREE
Backed out changeset 967c4cf56fd2 (bug 1666874)
Backed out changeset e46238e6aabf (bug 1665455)
2020-10-29 16:57:35 +02:00
Doug Thayer 38c0351ae3 Bug 1666874 - Support maximized windows for skeleton UI r=agashlin
Most of this patch is a dance to avoid size flickering of the skeleton UI
window. We change all Resize/Move/SetSizeMode calls from before the first
nsWindow::Show call. Normally those have no effect, since the window isn't
shown yet, and if the window is not maximized, they typically match the
sizes we've gotten out of the registry anyway. However, if we are maximized,
then they produce a lot of visual noise. We can however achieve the desired
effect by just calling SetWindowPlacement.

Similarly, we switch the window styles of the skeleton UI window to match those
of the toplevel Windows window, and adjust the client rect from our window proc
in a way that matches the adjustments in nsWindow in the WM_NCCALCSIZE handler.
We do this because otherwise we get a flicker as soon as we change the styles
and nonclient margins as the fake chrome pops up and then back down.

Lastly we also change the extended window styles so that they match. We
historically added WS_EX_TOOLWINDOW here to hide the toolbar entry, because it
would otherwise switch out to a new toolbar entry when we changed the window
styles. However since our new styles match, we no longer need to do this. It
was also causing the maximized window to paint over the Windows taskbar.

Differential Revision: https://phabricator.services.mozilla.com/D93534
2020-10-29 14:09:54 +00:00
Kagami Sascha Rosylight 8dde7f4f23 Bug 1121822 - Remove NS_ENABLE_TSF r=m_kato,masayuki
Differential Revision: https://phabricator.services.mozilla.com/D95037
2020-10-29 01:46:05 +00:00
Kartikaya Gupta 33f67abeea Bug 1664558 - Propagate the layers id from InputData to gecko WidgetEvent types. r=botond
Seems like an oversight that these fields were never propagated from APZ to
the generated main-thread WidgetEvents.

Differential Revision: https://phabricator.services.mozilla.com/D94894
2020-10-28 22:02:00 +00:00
Emilio Cobos Álvarez 9ef65719fc Bug 1673864 - Fix vertical scrollbar thumb drawing on GTK's non-native theme. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D94988
2020-10-28 14:40:24 +00:00
Jeff Muizelaar 938d2dffe9 Bug 1672899. Avoid CGFonts in ctfont_create_exact_copy when possible. r=jfkthame
We should be able to use CTFontCreateCopyWithAttributes for non-system fonts
because we don't need to worry about them changing. This avoids the leaks
caused by going through a CGFont.

Differential Revision: https://phabricator.services.mozilla.com/D94772
2020-10-28 14:16:41 +00:00
stransky 9fda24b4c1 Bug 1673601 [Wayland] Remove WindowBackBufferShm and use only WindowBackBuffer, r=jhorak
Depends on https://phabricator.services.mozilla.com/D94735

Differential Revision: https://phabricator.services.mozilla.com/D94827
2020-10-28 13:32:23 +00:00
stransky d478abbf50 Bug 1673313 [Wayland] Don't fail when Shm allocation fails, r=jhorak
- Make WaylandAllocateShmMemory() fallible.
- Implement WaylandReAllocateShmMemory() to re-allocate Shm pool.
- Remove WaylandShmPool::Resize() and use WaylandShmPool::Create() only.
- Implement and use WaylandShmPool::Release().
- Make WindowSurfaceWayland::CreateWaylandBuffer() as fallible.

Differential Revision: https://phabricator.services.mozilla.com/D94735
2020-10-28 11:35:05 +00:00
Mike Conley 52c4b74a96 Bug 1672419 - Make sure SystemStatusBar popup menus appear in the right spot regardless of device scaling. r=mhowell
Differential Revision: https://phabricator.services.mozilla.com/D94372
2020-10-27 23:55:59 +00:00
Markus Stange 31f1bafb71 Bug 1673503 - Simplify NSScroller.preferredScrollerStyle API usage. r=spohl
This API has been available since 10.7.

Differential Revision: https://phabricator.services.mozilla.com/D94796
2020-10-27 21:35:10 +00:00
Aaron Klotz d701017d5a Bug 1650118: Part 1 - Remove non-e10s mode from GeckoView; r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D90929
2020-10-27 16:43:29 +00:00
Mihai Alexandru Michis 6750b81daf Bug 1673120 - Fix python black lint failure in widget/moz.build
CLOSED TREE
2020-10-27 18:56:11 +02:00
Emilio Cobos Álvarez 7a1a5c1d8d Bug 1672625 - Make monochrome support on GTK work like on Mac. r=jfkthame
We do it in nsDeviceContextSpecG since that's what actually consumes the
settings. On GTK the options need to be prefixed by cups- for some
reason in order to work, so factor out a macro listing the options and
do the NSString / cups- prefixing in the platform specific places.

Differential Revision: https://phabricator.services.mozilla.com/D94479
2020-10-27 16:23:26 +00:00
Razvan Maries f3f6721caa Backed out 8 changesets (bug 1650118) for wpt failures on inside-dedicated-worker.html. CLOSED TREE
Backed out changeset ab6218dd84f5 (bug 1650118)
Backed out changeset a99d1aae6e2e (bug 1650118)
Backed out changeset ed357b8bb07e (bug 1650118)
Backed out changeset cd5155e732d9 (bug 1650118)
Backed out changeset 63cc752924f2 (bug 1650118)
Backed out changeset 7f0a281a399e (bug 1650118)
Backed out changeset 0fd77fef3c95 (bug 1650118)
Backed out changeset f397e86fd61e (bug 1650118)
2020-10-27 18:39:11 +02:00
Markus Stange c52ab8c422 Bug 1673287 - Clip out the range thumb when drawing the progress and track pieces. r=spohl
This makes the disabled state look good because the track pieces are no longer
visible behind the partially-transparent disabled thumb.

Differential Revision: https://phabricator.services.mozilla.com/D94701
2020-10-26 23:18:00 +00:00
Markus Stange 86bd737305 Bug 1673287 - Draw thumb as part of the range control. r=spohl
This makes the thumb respect the disabled, active and hover state of the range
control.

Differential Revision: https://phabricator.services.mozilla.com/D94700
2020-10-26 23:17:57 +00:00
Markus Stange 5288096ded Bug 1673287 - Draw range progress and track pieces with the same rounded rect but different rectangular clips. r=spohl
This feels a bit nicer but the difference isn't visible to the user.
But it demonstrates how we can fix progress bars.

Differential Revision: https://phabricator.services.mozilla.com/D94699
2020-10-26 23:17:50 +00:00
Markus Stange 716b39d928 Bug 1673121 - Simplify nsNativeBasicTheme scrollbar painting methods. r=spohl
This removes some duplication and replaces it with a bool aHorizontal parameter.
It also splits out scroll corner drawing into its own method.
And it consistently passes down the DPI ratio into all methods.

Drive-by fixes:
 - The border of horizontal scrollbars in the default theme now scales with the
   DPI ratio.
 - The border is device-pixel aligned by insetting the stroked rectangle by
   half the stroke width.

This patch also changes the scroll corner drawing in the default theme to no
longer draw a border on the left. We can revert that if needed

Differential Revision: https://phabricator.services.mozilla.com/D94662
2020-10-27 15:27:31 +00:00