Commit Graph

282 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
7719dba185 Bug 1845540 - Remove -moz-windows-default-theme and -moz-mac-graphite-theme. r=dao,pip-reviewers,mhowell
The former is just `not (prefers-contrast)` now. The later is unused.

Differential Revision: https://phabricator.services.mozilla.com/D184602
2023-07-26 18:22:26 +00:00
Emilio Cobos Álvarez
7e60f84b6e Bug 1843663 - Remove pre windows-10-specific media queries and styles. r=dao,Gijs,handyman,settings-reviewers
Some basic clean-up. I want to do this before doing bigger changes in
bug 1843044.

There's tons more code that can get cleaned-up on the widget side, but
let's start with this.

Differential Revision: https://phabricator.services.mozilla.com/D183622
2023-07-18 14:11:33 +00:00
Mark Banner
0b2d2afdea Bug 1837176 - Convert imports of httpd.js to consume the ES module directly. r=necko-reviewers,webcompat-reviewers,extension-reviewers,settings-reviewers,application-update-reviewers,credential-management-reviewers,devtools-reviewers,cookie-reviewers,twisniewski,robwu,issammani,bytesized,pbz,valentin
Differential Revision: https://phabricator.services.mozilla.com/D181159
2023-07-12 13:38:34 +00:00
Edgar Chen
7e2062a90b Bug 1837402 - Part 3: Make HeadlessClipboard supporting all clipboard types; r=spohl
Depends on D180369

Differential Revision: https://phabricator.services.mozilla.com/D180370
2023-06-29 23:11:08 +00:00
Edgar Chen
e84d8fa731 Bug 1837402 - Part 2: Support setting empty string to HeadlessClipboard; r=spohl
Depends on D180326

Differential Revision: https://phabricator.services.mozilla.com/D180369
2023-06-29 23:11:08 +00:00
Edgar Chen
f12272f1d4 Bug 1837402 - Part 1: Make HeadlessClipboard using nsBaseClipboard; r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D180326
2023-06-29 23:11:08 +00:00
Cosmin Sabou
d149326dd6 Backed out 3 changesets (bug 1837402) for bc failures on test_clipboard.xhtml.
Backed out changeset a41cdfcfecf9 (bug 1837402)
Backed out changeset 4238ef6d453a (bug 1837402)
Backed out changeset c2848c8fa668 (bug 1837402)
2023-06-29 19:08:26 +03:00
Edgar Chen
dbd011ce33 Bug 1837402 - Part 3: Make HeadlessClipboard supporting all clipboard types; r=spohl
Depends on D180369

Differential Revision: https://phabricator.services.mozilla.com/D180370
2023-06-29 15:41:54 +00:00
Edgar Chen
0663026e48 Bug 1837402 - Part 2: Support setting empty string to HeadlessClipboard; r=spohl
Depends on D180326

Differential Revision: https://phabricator.services.mozilla.com/D180369
2023-06-29 15:41:53 +00:00
Edgar Chen
aef5e0f26c Bug 1837402 - Part 1: Make HeadlessClipboard using nsBaseClipboard; r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D180326
2023-06-29 15:41:53 +00:00
Edgar Chen
8a1d360c1a Bug 1712122 - Part 3: Cancel pending write request when a new write request is made; r=nika,geckoview-reviewers,m_kato
The Async Clipboard API now allows using arbitrary promises for passing write data,
potentially enabling websites to delay writing data to an arbitrary future, which
may surprise the user. This patch introduces a solution: a new write request will
automatically cancel any previous pending request.

To implement that, this patch introduces a new method to nsIClipboard, new XPCOM
interfaces, and new IPC to efficiently track individual write requests. Additionally,
a new helper base class, ClipboardSetDataHelper, is introduced in widget to facilitate
platform code sharing.

Differential Revision: https://phabricator.services.mozilla.com/D174090
2023-05-14 21:02:08 +00:00
Edgar Chen
58bec5645b Bug 1823284 - Use SizeModeChanged notification to handle fullscreen change; r=geckoview-reviewers,rkraesig,stransky,bradwerth,smaug,m_kato
Depends on D175213

Differential Revision: https://phabricator.services.mozilla.com/D175215
2023-04-23 21:28:43 +00:00
Norisz Fay
e14b74864b Backed out 2 changesets (bug 1823284) for causing failures on element-request-fullscreen-timing.html, test_fullscreen-api.html CLOSED TREE
Backed out changeset 54bce7b5d558 (bug 1823284)
Backed out changeset 65747f283949 (bug 1823284)
2023-04-20 17:14:12 +03:00
Edgar Chen
b665ebfef0 Bug 1823284 - Use SizeModeChanged notification to handle fullscreen change; r=geckoview-reviewers,rkraesig,stransky,bradwerth,smaug,m_kato
Depends on D175213

Differential Revision: https://phabricator.services.mozilla.com/D175215
2023-04-20 08:17:57 +00:00
CanadaHonk
2d520652e0 Bug 1794628 - Implement inverted-colors media feature r=geckoview-reviewers,morgan,emilio,m_kato,cmartin
Implemented the inverted-colors media feature from Media Queries Level 5
for all platforms.
Spec: https://drafts.csswg.org/mediaqueries-5/#inverted

Platform specific implementations:
- Windows: Checks system color filter setting, and if it is inverted
  (note: Windows does not live update due to having to read a reg key)
- Mac: Checks dedicated inverted accessibility system setting
- Android: Checks dedicated inverted system setting
- Linux: No GTK API exposes anything like it so always none

Locked behind new pref `layout.css.inverted-colors.enabled`,
always off by default for now.

Also added new WPT tests (none previously).

Other browsers:
- WebKit: shipped since Safari 9.1 (Jan 2017)
- Blink: no signal

Test page: https://goose.icu/inverted-colors

Differential Revision: https://phabricator.services.mozilla.com/D173201
2023-04-11 13:34:00 +00:00
serge-sans-paille
13e51277df Bug 1825324 - Make widget/* buildable outside of a unified build environment r=andi,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D173969
2023-04-01 08:31:12 +00:00
Cristian Tuns
8e06a7a853 Backed out 12 changesets (bug 1825325, bug 1825336, bug 1825333, bug 1825332, bug 1825324, bug 1824557, bug 1825328, bug 1825335, bug 1825330, bug 1825329, bug 1825327, bug 1825331) for causing build bustages in nsClipboard.cpp CLOSED TREE
Backed out changeset 9de3ed24d3a0 (bug 1825336)
Backed out changeset aef787728f19 (bug 1825335)
Backed out changeset a04c341244c1 (bug 1825333)
Backed out changeset e3ad15f762ba (bug 1825332)
Backed out changeset eed23da92a27 (bug 1825331)
Backed out changeset 8213bb54376e (bug 1825330)
Backed out changeset 747ec5ac4994 (bug 1825329)
Backed out changeset e91ff431f92d (bug 1825328)
Backed out changeset 59c18d13768b (bug 1825327)
Backed out changeset 538096d99e49 (bug 1825325)
Backed out changeset c76eb9d9b095 (bug 1825324)
Backed out changeset 8b81410eb686 (bug 1824557)
2023-03-31 12:58:53 -04:00
serge-sans-paille
0702cdc836 Bug 1825324 - Make widget/* buildable outside of a unified build environment r=andi,geckoview-reviewers,m_kato
Depends on D173637

Differential Revision: https://phabricator.services.mozilla.com/D173969
2023-03-31 13:29:44 +00:00
CanadaHonk
3bbca01da2 Bug 1736914 - Implement prefers-reduced-transparency media query r=geckoview-reviewers,emilio,jonalmeida,ohall
Implemented the prefers-reduced-transparency media query for all
platforms.

Windows and Mac have specific settings which are used, others (Android
and Linux/GTK) have it enabled if prefers-reduced-motion is also enabled
as there is no dedicated setting to check.

Locked behind new pref `layout.css.prefers-reduced-transparency.enabled`,
off by default always for now.

Also added new WPT tests (none previously).

Demo video: https://goose.icu/firefox_prt.mp4
Test page: https://goose.icu/prefers-reduced-transparency

Differential Revision: https://phabricator.services.mozilla.com/D172424
2023-03-13 21:30:17 +00:00
Andreas Pehrson
24035fdfb6 Bug 1816139 - In HeadlessWidget don't by default focus alwaysontop windows. r=karlt
webrtcIndicator is an alwaysontop window of type Dialog or TopLevel, but should
not receive focus by default.

Differential Revision: https://phabricator.services.mozilla.com/D169788
2023-02-20 08:05:08 +00:00
Andreas Pehrson
dea5671716 Bug 1816139 - In HeadlessWidget for default focus, check WindowType::TopLevel instead of mTopLevel. r=karlt
webrtcLegacyIndicator is a parentless window of type Popup, but should not
receive focus by default.

Differential Revision: https://phabricator.services.mozilla.com/D169787
2023-02-20 08:05:08 +00:00
Gijs Kruitbosch
387cf24ca0 Bug 1810141 - fix tests to deal with changes to loadURI, r=mossop,perftest-reviewers,geckoview-reviewers,extension-reviewers,sparky,owlish
Depends on D168396

Differential Revision: https://phabricator.services.mozilla.com/D168397
2023-02-13 23:50:41 +00:00
Cristina Horotan
5f4356e527 Backed out 9 changesets (bug 1810141) for several test failures on a CLOSED TREE
Backed out changeset 8781a0d1254d (bug 1810141)
Backed out changeset 131037295784 (bug 1810141)
Backed out changeset 3852fbe290f4 (bug 1810141)
Backed out changeset 118f131a524a (bug 1810141)
Backed out changeset ab5d76846e10 (bug 1810141)
Backed out changeset dce3aa683445 (bug 1810141)
Backed out changeset 4dc41d90dbb3 (bug 1810141)
Backed out changeset 50b57ba1a061 (bug 1810141)
Backed out changeset 569de94781e4 (bug 1810141)
2023-02-13 16:05:30 +02:00
Gijs Kruitbosch
ff1cc20bd7 Bug 1810141 - fix tests to deal with changes to loadURI, r=mossop,perftest-reviewers,geckoview-reviewers,extension-reviewers,sparky,owlish
Depends on D168396

Differential Revision: https://phabricator.services.mozilla.com/D168397
2023-02-13 12:55:26 +00:00
Neil Deakin
9c2e7458ba Bug 1776879, replace text/unicode for clipboard and drag and drop and use text/plain directly, r=edgar,mak,stransky,geckoview-reviewers,extension-reviewers,zombie,m_kato
Most usage is a straight replacement but gtk needs extra changes as it transfers plain text in UTF8 natively and needs to be converted into UTF16, and Windows uses single-byte characters for RTF and CF_HTML formats so we preserve this.

Differential Revision: https://phabricator.services.mozilla.com/D158587
2023-02-01 23:30:55 +00:00
Emilio Cobos Álvarez
e7fa71f013 Bug 1813303 - Clean up nsIWidget::SetNonClientMargins usage. r=spohl
Make it take a const reference and simplify callers.

No behavior change, but noticed while looking through this code.

Differential Revision: https://phabricator.services.mozilla.com/D168199
2023-01-28 21:43:47 +00:00
Emilio Cobos Álvarez
9e530f224a Bug 1811834 - Clean up nsWidgetInitData. r=cmartin,geckoview-reviewers,calu
Move it to the mozilla::widget namespace.

Use enum classes for transparency, popup type, popup level, etc.

Mostly automated with sed, but there were a few manual changes required
as well in windows code because they relied on Atomic<TransparencyMode>
working (which now doesn't because TransparencyMode is 1 byte instead of
4 bytes).

Differential Revision: https://phabricator.services.mozilla.com/D167537
2023-01-23 23:58:41 +00:00
Edgar Chen
e5fe0a40c0 Bug 1796548 - Introduce a generic method to check clipboard capabilities in nsIClipboard; r=geckoview-reviewers,nika,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D166475
2023-01-16 19:50:17 +00:00
Emilio Cobos Álvarez
fd0099ee19 Bug 1807000 - Use a DataMutex in HeadlessCompositorWidget. r=gfx-reviewers,nical
Much like GtkCompositorWidget. Clean some stuff up while at it.

Differential Revision: https://phabricator.services.mozilla.com/D165957
2023-01-05 15:53:53 +00:00
Olli Pettay
5d21de32ac Bug 1807812 - Remove WidgetEventTime::mTime, r=masayuki,geckoview-reviewers,m_kato
HTMLSelectEventListener changes are needed, since currently that code works somewhat by accident given that
mTime often contains totally bogus values, like PR_IntervalNow(). Those changes then reveal issues also in
browser_editAddressDialog.js.

Differential Revision: https://phabricator.services.mozilla.com/D165618
2023-01-02 12:31:40 +00:00
Ben Freist
ce6cd37bc7 Bug 1802799 - [refactor] Migrate NS_STYLE_TEXT_DECORATION_STYLE_* defines r=emilio,geckoview-reviewers,ohall
Differential Revision: https://phabricator.services.mozilla.com/D163177
2022-12-19 22:47:24 +00:00
Matthias Camenzind
5d9dfb1656 Bug 1786048 - Part 1: AppWindow can't skip SetSize calls, HeadlessWidget has to notify when moved. r=emilio
Two minor changes that otherwise might go unnoticed in the following
parts:

- AppWindow can't skip SetSize calls that match the current size. On
  Linux a previous call might not have changed the size yet. If the
  current call is skipped, the previous call can ultimately dictate the
  resulting size.

- BrowserParent should not have to call UpdatePosition when receiving
  new dimensions from BrowserChild. But HeadlessWidget needs to call
  NotifyWindowMoved when moved.

Differential Revision: https://phabricator.services.mozilla.com/D160259
2022-12-15 23:12:59 +00:00
Sandor Molnar
a1e9c1d43b Backed out 4 changesets (bug 1786048) for causing multiple failures. CLOSED TREE
Backed out changeset ae94135e68ef (bug 1786048)
Backed out changeset f505df8a481a (bug 1786048)
Backed out changeset 999a18d6f33e (bug 1786048)
Backed out changeset e71e8644b8a9 (bug 1786048)
2022-12-02 20:30:07 +02:00
Matthias Camenzind
c772b6a141 Bug 1786048 - Part 1: AppWindow can't skip SetSize calls, HeadlessWidget has to notify when moved. r=emilio
Two minor changes that otherwise might go unnoticed in the following
parts:

- AppWindow can't skip SetSize calls that match the current size. On
  Linux a previous call might not have changed the size yet. If the
  current call is skipped, the previous call can ultimately dictate the
  resulting size.

- BrowserParent should not have to call UpdatePosition when receiving
  new dimensions from BrowserChild. But HeadlessWidget needs to call
  NotifyWindowMoved when moved. HeadlessWidget no longer stays in
  "maximized" size mode after being resized or moved.

Differential Revision: https://phabricator.services.mozilla.com/D160259
2022-12-02 16:47:45 +00:00
Marian-Vasile Laza
bec56391bf Backed out 4 changesets (bug 1786048) for causing bc failures on browser_modal_resize.js. CLOSED TREE
Backed out changeset 318a2d2e6e39 (bug 1786048)
Backed out changeset 17a9990d6d19 (bug 1786048)
Backed out changeset 205f129c648a (bug 1786048)
Backed out changeset 0750c885a688 (bug 1786048)
2022-12-01 05:00:38 +02:00
Matthias Camenzind
f3fd130da3 Bug 1786048 - Part 1: AppWindow can't skip SetSize calls, HeadlessWidget has to notify when moved. r=emilio
Two minor changes that otherwise might go unnoticed in the following
parts:

- AppWindow can't skip SetSize calls that match the current size. On
  Linux a previous call might not have changed the size yet. If the
  current call is skipped, the previous call can ultimately dictate the
  resulting size.

- BrowserParent should not have to call UpdatePosition when receiving
  new dimensions from BrowserChild. But HeadlessWidget needs to call
  NotifyWindowMoved when moved. HeadlessWidget no longer stays in
  "maximized" size mode after being resized or moved.

Differential Revision: https://phabricator.services.mozilla.com/D160259
2022-11-30 19:37:15 +00:00
Botond Ballo
68c71a503c Bug 1802225 - Remove Layers.{h,cpp}. r=tnikkel,geckoview-reviewers,jgilbert,media-playback-reviewers,padenot,m_kato
Where appropriate, `#include "Layers.h"` is replaced with
more specific inclusions.

Differential Revision: https://phabricator.services.mozilla.com/D162934
2022-11-29 01:52:03 +00:00
Hiroyuki Ikezoe
0ca171b4b6 Bug 1786657 - Implement HeadlessWidget::SynthesizeNativeTouchpadPan. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D155437
2022-08-25 00:34:17 +00:00
Sandor Molnar
23b2e332ed Backed out changeset b0af62dc599f (bug 1786657) for causing build bustage in widget/headless/HeadlessWidget.cpp CLOSED TREE 2022-08-25 00:46:51 +03:00
Hiroyuki Ikezoe
1185858506 Bug 1786657 - Implement HeadlessWidget::SynthesizeNativeTouchpadPan. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D155437
2022-08-24 21:09:10 +00:00
Edgar Chen
3e5030eb96 Bug 1755863 - Part 2: Add async API/IPC for getting matching data flavors from clipboard; r=nika,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D152516
2022-08-15 20:27:26 +00:00
Edgar Chen
f6014ee7c6 Bug 1755863 - Part 1: Add async API for getting data on nsIClipboard; r=geckoview-reviewers,NeilDeakin,m_kato,nika
Differential Revision: https://phabricator.services.mozilla.com/D145378
2022-08-15 20:27:24 +00:00
Mark Banner
7428be4a86 Bug 1782008 - Remove now unnecessary .eslintrc.js files. r=webcompat-reviewers,extension-reviewers,media-playback-reviewers,pip-reviewers,denschub,rpl,alwu,mossop
Differential Revision: https://phabricator.services.mozilla.com/D152736
2022-08-03 11:16:20 +00:00
Tooru Fujisawa
bf93d07148 Bug 1667455 - Part 5: Stop importing Services.jsm from chrome-priv JS code, top-level single-line cases. r=kmag,webdriver-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,extension-reviewers,application-update-reviewers,pip-reviewers,twisniewski,m_kato,jdescottes,mconley,AlexandruIonescu,mossop
Differential Revision: https://phabricator.services.mozilla.com/D150894
2022-07-11 12:41:50 +00:00
Emilio Cobos Álvarez
9fc2aa47fc Bug 1773558 - Move fixed-point font types to Rust. r=layout-reviewers,jfkthame
Now that cbindgen and rust support const generics, it seems more simple.

This centralizes all the relevant font constants etc in rust and avoids
conversions when going from rust to C++ and vice versa.

Differential Revision: https://phabricator.services.mozilla.com/D148847
2022-06-13 00:59:23 +00:00
Noemi Erli
841e350bc4 Backed out changeset 7585591a9bad (bug 1773558) for causing failures in system-fonts.html 2022-06-12 19:02:33 +03:00
Emilio Cobos Álvarez
e441089ca0 Bug 1773558 - Move fixed-point font types to Rust. r=layout-reviewers,jfkthame
Now that cbindgen and rust support const generics, it seems more simple.

This centralizes all the relevant font constants etc in rust and avoids
conversions when going from rust to C++ and vice versa.

Differential Revision: https://phabricator.services.mozilla.com/D148847
2022-06-12 10:48:58 +00:00
Emilio Cobos Álvarez
9349aeea85 Bug 1771796 - Remove -moz-scrollbar-thumb-proportional. r=dholbert
It unconditionally matches on all platforms, so it's not returning any useful information.

Depends on D147689

Differential Revision: https://phabricator.services.mozilla.com/D147690
2022-06-02 11:58:18 +00:00
Karl Tomlinson
b0862b31cc Bug 1771278 - remove unused nsIRollupListener::NotifyGeometryChange() r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D147408
2022-05-26 21:04:26 +00:00
Emilio Cobos Álvarez
31d3fcdb9b Bug 1767172 - Remove custom screen info handling from GfxInfo, use ScreenManager for that. r=jrmuizel,handyman,stransky
This removes a bunch of custom code from GfxInfo to obtain screen
information, and instead collects that screen information in
ScreenManager.

This, apart of removing duplicated code, has the extra benefit of
reporting multi-monitor information on GTK (and potentially in the
future reporting scale and refresh rate properly as well, I've kept the
telemetry as it was on that regard).

Differential Revision: https://phabricator.services.mozilla.com/D145178
2022-05-06 23:37:25 +00:00