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

3230 Коммитов

Автор SHA1 Сообщение Дата
Olivia Hall 41785a703d Bug 1659818 - Android window.print Implemented for Nightly r=emilio,m_kato,geckoview-reviewers
This bug implements and opens window.print() for Android in Nightly.
Adds "GeckoView:DotPrintRequest" and "GeckoView:DotPrintFinish" events.
GeckoView:DotPrintRequest requests a PDF of the current window.print
page for Android to print. GeckoView:DotPrintFinish releases the static
browser clone created by window.print. PDF generation was additionally
adjusted to get the expected canonical browser context when printing
iframes.

Differential Revision: https://phabricator.services.mozilla.com/D171159
2023-03-15 21:23:12 +00:00
Nika Layzell 3b40268cc1 Bug 1818305 - Part 2: Add a streamStatus method to nsIInputStream, r=xpcom-reviewers,necko-reviewers,geckoview-reviewers,valentin,jesup,m_kato,mccr8
This is semantically similar to the existing available() method, however will
not block, and doesn't need to do the work to actually determine the number of
available bytes.

As part of this patch, I also fixed one available() implementation which was
incorrectly throwing NS_BASE_STREAM_WOULD_BLOCK.

Differential Revision: https://phabricator.services.mozilla.com/D170697
2023-03-15 19:52:34 +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
Makoto Kato 051c921a72 Bug 1813573 - Part 2. Restart vsync when refresh rate is changed. r=geckoview-reviewers,owlish
When refresh rate is changed, `DisplayListener` is called. So we restart vsync
when refresh rate may be changed.

Differential Revision: https://phabricator.services.mozilla.com/D168666
2023-03-01 03:12:32 +00:00
Makoto Kato 9aca857df0 Bug 1813573 - Part 1. Clean up AndroidVsyncSource to get current refresh rate when enabling vsync. r=geckoview-reviewers,owlish
Newer Android supports multiple refresh rate that is dynamically changed.
Actually, GeckoView will always pass the refresh rate value to vsync when
getting it first time.

So this fix changes that GeckoView gets the refresh rate when vsync is started.

Differential Revision: https://phabricator.services.mozilla.com/D168665
2023-03-01 03:12:31 +00:00
Makoto Kato a81830ccdb Bug 1812938 - Part 1. GetWidgetScreen returns Screen instead of nsIScreen. r=emilio,geckoview-reviewers,owlish
`nsIWidget` isn't scriptable, so it is unnecessary to return `nsIScreen` for
`GetWidgetScreen`.

Differential Revision: https://phabricator.services.mozilla.com/D168029
2023-02-06 04:51:26 +00:00
Calixte 41eb47c48a Bug 1810761 - Add API to save a pdf file opened in pdf.js r=pdfjs-reviewers,geckoview-reviewers,marco,ohall,calu
Differential Revision: https://phabricator.services.mozilla.com/D168413
2023-02-03 10:01:34 +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 3a46916749 Bug 1812698 - Expose desktopEnvironment via nsIXULRuntime rather than nsIGfxInfo. r=stransky
This is:

 * An easier way for browser code to access it.
 * Avoids having a bunch of per-platform implementations.
 * We don't need to actually get graphics info for it to work.

So it should be a bit nicer over all.

Differential Revision: https://phabricator.services.mozilla.com/D168373
2023-02-01 13:14:50 +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
Florian Quèze d7356251cd Bug 1768920 - Avoid polling every 5 seconds in nsUserIdleService, r=dthayer,geckoview-reviewers,owlish.
This changes the behavior in a few ways:
- the 'active' notification is now only fired when a new user event has been received by Firefox, rather than by any application on the entire system.
- the 'active' notification will fire immediately when Firefox receives a new event. Before the patch is was fired within 5s of the user returning on some plateforms (eg. Mac) and immediately on some other platforms that already called ResetIdleTimeout (windows, gtk, android). I'm not sure if these existing calls to ResetIdleTimeout are really needed, nor if they add significant overhead.
- when an idle observer has been notified of 'idle', it won't be notified again until Firefox receives events. Before the patch, if the user used other applications while Firefox was in the background, we would keep sending active and idle notifications to our idle observers. This behavior was probably initially intended when the nsUserIdleService was introduced to support the use case of instant messaging clients, but doesn't seem to match the expectations of the existing consumers of the service.

Differential Revision: https://phabricator.services.mozilla.com/D166306
2023-01-16 19:53:33 +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
Nicholas Rishel 47a9fb5513 Bug 1787004 - Fix notifications not closing when `notification.close()` is called. r=nalexander,geckoview-reviewers,smaug,jonalmeida
This adds context to `CloseAlert()` such that explicitly closing the notification e.g. `notification.close()` can be differentiated from a tab or window implicitly closing the notification. This is necessary as we want notifications to persist after a tab or window is closed for Windows.

This change in behavior is necessary to match user expectations. Users expect notifications to persist in the system tray and do not expect notifications to be lost due to a tab being closed. The content of the message is more important than the interaction in that lens. This change is also necessary for parity with Chrome.

Differential Revision: https://phabricator.services.mozilla.com/D161024
2023-01-06 18:36:23 +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
Valentin Gosu 21d7e0ba7e Bug 1596845 - Turn nsIDNSService dns flags into a cenum r=necko-reviewers,geckoview-reviewers,kershaw,m_kato
This allows us to use a consistent size for the dnsFlags field.
across different files (previously some would use uint16_t and some uint32_t).
It also improves type safety - making sure we don't pass in the wrong value
to DNSFlags.

Depends on D164856

Differential Revision: https://phabricator.services.mozilla.com/D164857
2022-12-23 09:26:17 +00:00
Marian-Vasile Laza 56b22ee0ba Backed out 9 changesets (bug 1596845) for causing xpcshell failures on test_trr_enterprise_policy.js. CLOSED TREE
Backed out changeset 231acfc052bb (bug 1596845)
Backed out changeset 7d02dad4d720 (bug 1596845)
Backed out changeset b0449eec2671 (bug 1596845)
Backed out changeset 5cd033c9ef7c (bug 1596845)
Backed out changeset 98d583f1d19e (bug 1596845)
Backed out changeset b78bc0049605 (bug 1596845)
Backed out changeset 88919aaff89b (bug 1596845)
Backed out changeset f4adb3e7b8e1 (bug 1596845)
Backed out changeset b171f7ac0b40 (bug 1596845)
2022-12-23 09:21:39 +02:00
Valentin Gosu 10723cc64f Bug 1596845 - Turn nsIDNSService dns flags into a cenum r=necko-reviewers,geckoview-reviewers,kershaw,m_kato
This allows us to use a consistent size for the dnsFlags field.
across different files (previously some would use uint16_t and some uint32_t).
It also improves type safety - making sure we don't pass in the wrong value
to DNSFlags.

Depends on D164856

Differential Revision: https://phabricator.services.mozilla.com/D164857
2022-12-23 01:20:04 +00:00
Sandor Molnar 56d5efdcae Backed out 9 changesets (bug 1596845) for causing mochitest failures in browser/base/content/test/about/browser_aboutCertError_telemetry.js
Backed out changeset eb1e34c3041f (bug 1596845)
Backed out changeset af6d41439c60 (bug 1596845)
Backed out changeset f1447dd8df04 (bug 1596845)
Backed out changeset a383f2bbcaae (bug 1596845)
Backed out changeset 950c66dd6133 (bug 1596845)
Backed out changeset ab300239fd69 (bug 1596845)
Backed out changeset 8e1fe024b680 (bug 1596845)
Backed out changeset 80e5048d1f35 (bug 1596845)
Backed out changeset b14a4910d73b (bug 1596845)
2022-12-23 00:56:35 +02:00
Valentin Gosu 2f3eb78f06 Bug 1596845 - Turn nsIDNSService dns flags into a cenum r=necko-reviewers,geckoview-reviewers,kershaw,m_kato
This allows us to use a consistent size for the dnsFlags field.
across different files (previously some would use uint16_t and some uint32_t).
It also improves type safety - making sure we don't pass in the wrong value
to DNSFlags.

Depends on D164856

Differential Revision: https://phabricator.services.mozilla.com/D164857
2022-12-22 21:16:07 +00:00
Emilio Cobos Álvarez ba6c6b8e66 Bug 1802799 - Fix android build.
MANUAL PUSH: Trivial bustage fix CLOSED TREE
2022-12-20 00:19:16 +01: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
Razvan Cojocaru cf716c0f57 Bug 1702504 - Fix crash in [@ mozilla::widget::TouchResampler::NotifyFrame]. r=botond,geckoview-reviewers,m_kato
Give Observer a virtual destructor while at it.

Differential Revision: https://phabricator.services.mozilla.com/D164550
2022-12-19 21:05:44 +00:00
David Shin aab93348e9 Bug 1785046 - Part 3: Let `nsIDeviceContextSpec::EndDocument` & `nsDeviceContext::EndDocument` return `MozPromise`. r=nika,emilio,geckoview-reviewers,m_kato
All implementors currently simply resolve the promise right away, using
crutch code. Asynchronous usage will be added in the changeset that follows.

Differential Revision: https://phabricator.services.mozilla.com/D163508
2022-12-19 15:42:48 +00:00
Botond Ballo 7b3b788267 Bug 1785754 - Simplify Android widget code for handling the eIgnore status. r=dlrobertson,hiro,geckoview-reviewers,m_kato
APZ now ensures that GetHandledResult() is Unhandled when appropriate,
so the widget code doesn't need to special-case eIgnore any more.

Differential Revision: https://phabricator.services.mozilla.com/D164585
2022-12-19 05:16:54 +00:00
Botond Ballo 7b0f88ac4e Bug 1785754 - Report HANDLED_CONTENT on pages with a preventDefault()-ing event listener even if the page is not scrollable. r=geckoview-reviewers,hiro,dlrobertson,m_kato
This effectively backs out the fix for bug 1746336, while keeping the test
added in that bug (PanZoomControllerTest#touchActionWithWheelListener)
passing using a different fix approach (remembering the eager status
and using it in the computation of the delayed result).

Differential Revision: https://phabricator.services.mozilla.com/D164114
2022-12-19 05:16:52 +00:00
Nika Layzell 9e65358787 Bug 1799222 - Part 1: Prevent accidental dispatches to threadpool and timer threads, r=xpcom-reviewers,necko-reviewers,geckoview-reviewers,media-playback-reviewers,jesup,m_kato,padenot,kmag
Differential Revision: https://phabricator.services.mozilla.com/D161349
2022-12-16 17:09:16 +00:00
Makoto Kato a628865b23 Bug 1805127 - Don't use AndroidBridge to get release version. r=geckoview-reviewers,calu
Actually, we can get Android release version from JNI generator, so it is
unnecessary to use `AndroidBridge` to get it.

Also, this cleans up unused AndroidBridge functions.

Differential Revision: https://phabricator.services.mozilla.com/D164431
2022-12-13 11:57:06 +00:00
Emilio Cobos Álvarez fb4758fe7f Bug 1755564 - Make SpellCheckerUnderline go through the stand-in color code-path. r=geckoview-reviewers,calu
This doesn't change behavior since it's red for all platforms including
the standins.

Depends on D157748

Differential Revision: https://phabricator.services.mozilla.com/D163402
2022-12-07 18:44:57 +00:00
Daniel Baker 31973511fd Bug 1804287 - Added build version to cached features to refresh cache with new builds.;r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D163974
2022-12-06 23:04:33 +00:00
Cristian Tuns 77f27d96b0 Backed out changeset 42315c023471 (bug 1799222) for causing multiple failures CLOSED TREE 2022-12-06 16:35:58 -05:00
Nika Layzell 40a3a64aee Bug 1799222 - Prevent accidental dispatches to threadpool and timer threads, r=xpcom-reviewers,necko-reviewers,geckoview-reviewers,media-playback-reviewers,jesup,m_kato,padenot,kmag
Differential Revision: https://phabricator.services.mozilla.com/D161349
2022-12-06 20:44:15 +00:00
Emilio Cobos Álvarez bf94680a56 Bug 1638052 - Implement Buttonborder/mark/marktext. r=geckoview-reviewers,calu,dholbert
Needs some extra test expectation updates.

Differential Revision: https://phabricator.services.mozilla.com/D157748
2022-12-03 11:19:56 +00:00
Sandor Molnar 91267bb248 Backed out changeset 5f89b0e8bdb5 (bug 1638052) for causing wpt failures in css/css-color/deprecated-sameas-018.html 2022-12-03 00:51:39 +02:00
Emilio Cobos Álvarez d52a61dd38 Bug 1638052 - Implement Buttonborder/mark/marktext. r=geckoview-reviewers,calu,dholbert
Needs some extra test expectation updates.

Differential Revision: https://phabricator.services.mozilla.com/D157748
2022-12-02 19:12:22 +00:00
Andreas Pehrson 2c2be109c5 Bug 1796069 - Record decoded video frames in android/RemoteDataDecoder. r=jolin,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D160766
2022-12-01 09:52:49 +00:00
Makoto Kato 13c8a3a563 Bug 1802892 - Set screen refresh rate to Screen. r=geckoview-reviewers,owlish
Move getting refresh rate from AndroidVsync to GeckoAppShell, then use it.

Differential Revision: https://phabricator.services.mozilla.com/D163215
2022-11-29 04:22:37 +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
Makoto Kato b330c6558e Bug 1799379 - Update bug components for GeckoView. r=geckoview-reviewers,calu
There is no Core: Widget - Android now, so we should update bug component of
widget/android. Also, I add GVE for GVE path.

Differential Revision: https://phabricator.services.mozilla.com/D161413
2022-11-08 01:07:43 +00:00
Arturo Mejia 74b761feb0 Bug 1798402 - Improve GeckoView Save to PDF error reporting r=ohall,jonalmeida
Differential Revision: https://phabricator.services.mozilla.com/D160854
2022-11-02 23:40:15 +00:00
Jamie Nicol f79eeda7cc Bug 1798714 - Ensure compositor is always resumed with correct size on Android. r=gfx-reviewers,geckoview-reviewers,calu,jrmuizel
On Android when SWGL is enabled, occasionally when switching tabs it
refuses to render the new tab. The user will instead be left with the
contents of the previous tab, or if they have just switched to firefox
they will be left with a black screen.

This occurs when SyncResumeResizeCompositor is called from java code
prior to the gecko compositor having been created. This results in us
delaying the call to UiCompositorController::ResumeAndResize().
Instead, once the compositor eventually gets created we call
UiCompositorController::Resume() (without the resize).

This means that the compositor widget is left with a zero size, and
RenderCompositorLayersSWGL bails early on compositing as a result.

To fix this, we cache the X, Y, width, and height arguments passed to
SyncResumeResizeCompositor. Then to resume the compositor when it
eventually gets created, we call ResumeAndResize() with the cached
values, rather than just calling Resume.

Differential Revision: https://phabricator.services.mozilla.com/D161046
2022-11-02 21:39:19 +00:00
Arturo Mejia 3307fe95de Bug 1788720 - Expose private browsing flag in StorageController.getPermissions r=geckoview-reviewers,jonalmeida
Differential Revision: https://phabricator.services.mozilla.com/D160424
2022-11-02 13:20:13 +00:00
Cristian Tuns 47601caf13 Backed out changeset 6d8714cc305a (bug 1788720) for causing geckoview failures on clickNotificationParceled CLOSED TREE 2022-11-01 14:00:27 -04:00
Arturo Mejia b2bb2aa95a Bug 1788720 - Expose private browsing flag in StorageController.getPermissions r=geckoview-reviewers,jonalmeida
Differential Revision: https://phabricator.services.mozilla.com/D160424
2022-11-01 16:49:12 +00:00
Cosmin Sabou 76db5a7d62 Backed out changeset c7074f4cf73c (bug 1788720) for causing geckoview failures on PermissionDelegateTest. CLOSED TREE 2022-10-28 22:03:56 +03:00
Arturo Mejia fd35bab7a0 Bug 1788720 - Expose private browsing flag in StorageController.getPermissions r=geckoview-reviewers,jonalmeida
Differential Revision: https://phabricator.services.mozilla.com/D160424
2022-10-28 14:00:45 +00:00
Andrew Osmond 53608b802f Bug 1794722 - Part 1. Remove WebRender from the GfxInfo allowlist. r=jrmuizel
WebRender is a mature feature. We should start blocking it on known bad
devices over allowlisting known good devices. This may enable WebRender
in a few more obscure places than we shipped before.

Differential Revision: https://phabricator.services.mozilla.com/D160120
2022-10-28 12:36:05 +00:00
Jamie Nicol 6511f3c4e5 Bug 1797055 - Force crash early if compositor is resumed with abandoned Surface. r=geckoview-reviewers,m_kato
In bug 1772839 we were seeing a large number of crashes due to
encountering a webrender error after exhausting all fallback
configurations. At least in some cases, this was due to the compositor
being resumed with an Android Surface that was already in an abandoned
state, meaning we can never succeed in creating an EGL Surface.

We added a check for this condition, and a workaround, to the
GeckoView java code. However, we are still seeing crash reports
matching this signature. To help determine whether these are also due
to the Surface being abandoned, or due to some other reason, this
patch adds a deliberate crash much earlier in the pipeline if we
detect an abandoned Surface.

Differential Revision: https://phabricator.services.mozilla.com/D160042
2022-10-27 08:01:28 +00:00
Andrew Osmond a377b7bb98 Bug 1797580 - Fix broken assumptions with allowlists and the downloadable blocklist. r=jrmuizel
Ensure that when we evaluate the downloadable blocklist, we actually
only use the downloadable blocklist. We should not include any platform
specific checks in these prefs, as it causes confusion about why the
prefs were set in the first place. Allowlisted features should be
ignored when evaluating the downloadable blocklist; if we wish to
override the ALLOW/ALLOW_QUALIFIED/DENIED statuses, we should use OK or
BLOCKED_DEVICE or similar instead.

This caused allowlisted features (like WebRender) to be taken away from
users in the most recent nightly.

Differential Revision: https://phabricator.services.mozilla.com/D160408
2022-10-27 01:12:50 +00:00
Marian-Vasile Laza a0fe811cf3 Backed out changeset 9cda62240050 (bug 1788720) for causing linting failures. CLOSED TREE 2022-10-27 01:49:08 +03:00
Arturo Mejia bd826e4068 Bug 1788720 - Expose private browsing flag in StorageController.getPermissions r=geckoview-reviewers,jonalmeida
Differential Revision: https://phabricator.services.mozilla.com/D160424
2022-10-26 21:56:06 +00:00