Commit Graph

1877 Commits

Author SHA1 Message Date
Neil Deakin
21426e24f4 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
Tom Schuster
0e50632706 Bug 1811863 - Replace the remaining users of privacy_resistFingerprinting(). r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D168081
2023-01-30 21:37:04 +00:00
Tom Schuster
b2efb9a24e Bug 1810964 - Replace callers of nsContentUtils::ResistFingerprinting. r=tjr,emilio
Differential Revision: https://phabricator.services.mozilla.com/D167169
2023-01-23 11:52:56 +00:00
Emilio Cobos Álvarez
1c2bf381ee Bug 1809126 - Remove moz-fonttable protocol. r=jfkthame,necko-reviewers
We only use it to generate a dummy URI for SVG-in-Opentype documents. We
don't really need the URIs to be unique or anything in practice.

I noticed this code while looking at the load flags set up for
bug 1809006.

Differential Revision: https://phabricator.services.mozilla.com/D166291
2023-01-20 18:41:16 +00:00
Florian Quèze
1de3c2c020 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
Olli Pettay
96675a9568 Bug 1807838, try to translate elements before load event fires, r=emilio
...but call sizeToContent* only after AppWindow::OnChromeLoaded().

Differential Revision: https://phabricator.services.mozilla.com/D166011
2023-01-10 22:47:20 +00:00
Nika Layzell
2d53f3d108 Bug 1808630 - Part 2: Rename CallerInnerWindow to IncumbentInnerWindow and add EntryInnerWindow, r=smaug
This makes the correlation between the method names and what they do
more clear, and adds an Entry variant for the entry global.

Depends on D166119

Differential Revision: https://phabricator.services.mozilla.com/D166207
2023-01-09 22:22:05 +00:00
Edgar Chen
6fdeb785ed Bug 1809152 - Remove unused argument from nsContentUtils::IPCTransferableItemToVariant; r=nika
which is unused after bug 1781129.

Differential Revision: https://phabricator.services.mozilla.com/D166314
2023-01-09 18:26:49 +00:00
Emilio Cobos Álvarez
25327b5629 Bug 1807687 - Simplify Windows keyboard indicator setting handling. r=NeilDeakin
The only thing that can explain this is the WM_UPDATEUISTATE state
getting out of sync in a way that we think we need to unconditionally
show focus indicators for a window.

I tried to first make this less error prone (see patch above) but
digging more into these messages, I'm pretty sure we just don't need all
this code. See:

 * https://devblogs.microsoft.com/oldnewthing/20130516-00/?p=4343
 * https://devblogs.microsoft.com/oldnewthing/20130517-00/?p=4323

In particular, this is intended to be a windows feature to not show
keyboard indicators on dialogs until you use the keyboard. But that's
how Gecko dialogs behave already due to how :focus-visible behaves as
per:

  https://searchfox.org/mozilla-central/rev/43ee5e789b079e94837a21336e9ce2420658fd19/toolkit/components/prompts/src/CommonDialog.jsm#319

I haven't been able to repro this state, but sounds believable that it
could happen after opening a native dialog or so on?

The purpose of this code is to implement the 'Underline access keys' in
the Keyboard Accessibility control panel of windows.

There's an easier way of tracking this, via the SPI_GETKEYBOARDCUES SPI,
documented in:

  https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-systemparametersinfoa

Hook that into LookAndFeel rather than using custom IPC and so on.

Differential Revision: https://phabricator.services.mozilla.com/D165578
2023-01-09 18:19:03 +00:00
Florian Quèze
a8c43b98e6 Bug 1809130 - remove unused nsContentUtils::IsUserIdle, r=smaug.
Differential Revision: https://phabricator.services.mozilla.com/D166307
2023-01-09 14:49:32 +00:00
Tim Huang
b2221bdec9 Bug 1808212 - Part 2: Implement the ETP level2 list pref for the private browsing mode. r=dimi
Depends on D165937

Differential Revision: https://phabricator.services.mozilla.com/D165938
2023-01-05 13:37:33 +00:00
Emilio Cobos Álvarez
59e7b13fee Bug 1805414 - Remove nsMenuFrame and nsMenuParent. r=smaug,Jamie,desktop-theme-reviewers,settings-reviewers,dao
Move most the event handling stuff to the DOM. I've left nsMenuBarFrame
for now, but I will be removing that in the future.

The basic set up is:

  * nsMenuParent becomes XULMenuParentElement (menubar or popup, manages
    the current active menu item)

  * nsMenuFrame -> XULButtonElements that return true for IsMenu().
    Can't use XULMenuElement because of <button type=menu>, which
    behaves like a, well, menu.

This makes the a11y events for menus (DOMMenuItem{Active,Inactive}) make
sense (before that we were firing duplicate Inactive events etc, and the
event order was rather suspicious).

Differential Revision: https://phabricator.services.mozilla.com/D164210
2023-01-04 19:01:13 +00:00
Csoregi Natalia
16528aebb2 Backed out changeset f11c529b2407 (bug 1805414) for failures on test_submenuClose.xhtml and nsMenuPopupFrame.cpp. CLOSED TREE 2023-01-04 01:48:30 +02:00
Emilio Cobos Álvarez
dd6fd3a3b0 Bug 1805414 - Remove nsMenuFrame and nsMenuParent. r=smaug,Jamie,desktop-theme-reviewers,settings-reviewers,dao
Move most the event handling stuff to the DOM. I've left nsMenuBarFrame
for now, but I will be removing that in the future.

The basic set up is:

  * nsMenuParent becomes XULMenuParentElement (menubar or popup, manages
    the current active menu item)

  * nsMenuFrame -> XULButtonElements that return true for IsMenu().
    Can't use XULMenuElement because of <button type=menu>, which
    behaves like a, well, menu.

This makes the a11y events for menus (DOMMenuItem{Active,Inactive}) make
sense (before that we were firing duplicate Inactive events etc, and the
event order was rather suspicious).

Differential Revision: https://phabricator.services.mozilla.com/D164210
2023-01-03 22:06:01 +00:00
Olli Pettay
f18298c006 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
Olli Pettay
d36caa3245 Bug 1804295, RequestGeckoTaskBurst for process switch, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D165134
2022-12-27 13:12:22 +00:00
Nika Layzell
26bdf63600 Bug 1806709 - Part 1: Allow nsIGlobalObject::PrincipalOrNull to be used on workers, r=asuth
Since bug 1804093, all globals should use a nsJSPrincipals for their
JSPrincipals, meaning that the checks for NS_IsMainThread() should no
longer be necessary.

Differential Revision: https://phabricator.services.mozilla.com/D165198
2022-12-21 15:53:21 +00:00
Emilio Cobos Álvarez
f3b7d96ebf Bug 1806390 - Make nsContentUtils::GetLocalizedString / FormatLocalizedString safe to call from workers. r=yulia,smaug
Differential Revision: https://phabricator.services.mozilla.com/D165017
2022-12-19 16:44:36 +00:00
Cristian Tuns
1279c43204 Backed out changeset 31f2cde2df8f (bug 1806390) for causing multiple failures CLOSED TREE 2022-12-19 09:43:28 -05:00
Emilio Cobos Álvarez
2ebf3624b4 Bug 1806390 - Make nsContentUtils::GetLocalizedString / FormatLocalizedString safe to call from workers. r=yulia,smaug
Differential Revision: https://phabricator.services.mozilla.com/D165017
2022-12-19 13:51:04 +00:00
Tom Schuster
3ce17fcff1 Bug 1774866 - Always allow cloning error stacks. r=nika,sfink,smaug
Differential Revision: https://phabricator.services.mozilla.com/D164577
2022-12-15 19:03:53 +00:00
Yoshi Cheng-Hao Huang
62e1fa3d0f Bug 1797506 - Add EnsureAndLoadStringBundle to preload the string bundle on main thread. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D163309
2022-12-12 13:25:09 +00:00
Manuel Bucher
ed85486bcc Bug 1771867 - Early Hints Phase 2 - Part 11: Don't preload anchored links from early hints r=necko-reviewers,valentin
They won't get passed to the PreloadService anyway. Resulting in an unnecessary
additional load

Differential Revision: https://phabricator.services.mozilla.com/D161281
2022-12-02 16:15:57 +00:00
Manuel Bucher
211015d6f1 Bug 1771867 - Early Hints Phase 2 - Part 7: Pass early hint preload to image preloader r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D161177
2022-12-02 16:15:55 +00:00
Csoregi Natalia
51f523d872 Backed out 13 changesets (bug 1771867) for causing CanonicalBrowsingContext crashes. CLOSED TREE
Backed out changeset 120838b58449 (bug 1771867)
Backed out changeset aea7ca0bbd17 (bug 1771867)
Backed out changeset 2fe2afdee09d (bug 1771867)
Backed out changeset 8bdb1f682d22 (bug 1771867)
Backed out changeset a9f3158ed688 (bug 1771867)
Backed out changeset 1177913e1edf (bug 1771867)
Backed out changeset d33ccbbf407d (bug 1771867)
Backed out changeset 110ac12e16f5 (bug 1771867)
Backed out changeset 7f20525f5e94 (bug 1771867)
Backed out changeset b3d65b1aa872 (bug 1771867)
Backed out changeset 7cdf3cef2773 (bug 1771867)
Backed out changeset 5090eae24a5c (bug 1771867)
Backed out changeset f8a03d226c73 (bug 1771867)
2022-12-02 13:44:55 +02:00
Manuel Bucher
6f865fac2b Bug 1771867 - Early Hints Phase 2 - Part 11: Don't preload anchored links from early hints r=necko-reviewers,valentin
They won't get passed to the PreloadService anyway. Resulting in an unnecessary
additional load

Differential Revision: https://phabricator.services.mozilla.com/D161281
2022-12-02 09:45:28 +00:00
Manuel Bucher
bb8505a5e4 Bug 1771867 - Early Hints Phase 2 - Part 7: Pass early hint preload to image preloader r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D161177
2022-12-02 09:45:26 +00:00
Otto Länd
7ba03f1a07 No bug: apply code formatting via Lando
# ignore-this-changeset
2022-11-29 02:27:36 +00:00
Botond Ballo
bcf265578a 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
Tom Schuster
4a41fcbbbd Bug 1799156 - Filter unknown DataTransferItem flavors. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D161487
2022-11-21 10:18:38 +00:00
Masayuki Nakano
5dfd7f8719 Bug 1800553 - part 2: Change HTMLAnchorElement::GetText to a const method r=smaug
This needs to change `nsContentUtils` methods because of used by the method.
Then, we can make some there callers are also `const` methods.

Depends on D162065

Differential Revision: https://phabricator.services.mozilla.com/D162066
2022-11-16 00:21:30 +00:00
Emilio Cobos Álvarez
e0d51dcf90 Bug 1798207 - Use shadow-including tree order to sort selection ranges. r=smaug
So that painting code doesn't get confused when trying to paint
selections that span across shadow boundaries.

Differential Revision: https://phabricator.services.mozilla.com/D160787
2022-11-11 12:21:25 +00:00
Butkovits Atila
832483e49b Backed out changeset c73d7c982726 (bug 1798207) for causing failures at Range-comparePoint.html. CLOSED TREE 2022-11-11 12:59:50 +02:00
Emilio Cobos Álvarez
0bf775069a Bug 1798207 - Use shadow-including tree order to sort selection ranges. r=smaug
So that painting code doesn't get confused when trying to paint
selections that span across shadow boundaries.

Differential Revision: https://phabricator.services.mozilla.com/D160787
2022-11-11 10:04:50 +00:00
Emilio Cobos Álvarez
12e596995e Bug 1799435 - Make RFP checks faster. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D161447
2022-11-08 02:36:25 +00:00
Sandor Molnar
93a6e1c506 Backed out changeset c7f5349824c4 (bug 1799435) for causing crashes in mozilla::dom::HTMLImageElement::LoadSelectedImage CLOSED TREE 2022-11-08 02:39:14 +02:00
Emilio Cobos Álvarez
79700d8de9 Bug 1799435 - Make RFP checks faster. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D161447
2022-11-07 22:23:50 +00:00
Iulian Moraru
281af99f4d Backed out changeset 44cb21194dc0 (bug 1799435) for causing multiple resist fingerprint related failures. CLOSED TREE 2022-11-07 18:42:11 +02:00
Emilio Cobos Álvarez
553deca383 Bug 1799435 - Make RFP checks faster. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D161447
2022-11-07 14:40:57 +00:00
Adam Vandolder
88882be017 Bug 1665151 - Part 2: Expose custom element default accessibility attributes. r=edgar,Jamie,credential-management-reviewers,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D159237
2022-11-02 14:50:56 +00:00
Sean Feng
fab18c713d Bug 1785331 - Allow partially implemented ORB to be used in Nightly r=emilio,smaug,necko-reviewers,valentin
This patch starts to actually blocking opaque responses
for most type of the resources that are defined in the spec.
There are still pieces missing such as blocking JSON responses,
and this is why it's called partially implemented.

This patch was originally written by farre, and I made some
modifications based on it.

Depends on D155128

Differential Revision: https://phabricator.services.mozilla.com/D155129
2022-10-27 19:18:11 +00:00
sunil mayya
a592f5e8c6 Bug 1790311 - update handling of request headers in Fetch/XHR. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D157729
2022-10-24 09:17:22 +00:00
Tom Schuster
40ee6e5b33 Bug 1778565 - Remove IsFileImage and SlurpFileToString. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D155754
2022-10-20 11:11:59 +00:00
Tom Schuster
bef2534cb3 Bug 1778565 - Editor: Handle nsIFile transferable as blob. r=nika,masayuki
Differential Revision: https://phabricator.services.mozilla.com/D155753
2022-10-20 11:11:59 +00:00
Adam Vandolder
6f58b8cfd7 Bug 1795733 - Add support for patterns on input elements with the multiple attribute. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D159523
2022-10-19 16:00:02 +00:00
Sandor Molnar
6a387fbe72 Backed out 2 changesets (bug 1778565) for causing mochitest plain failures in editor/libeditor/tests/test_bug490879.html CLOSED TREE
Backed out changeset 5f6350cfab61 (bug 1778565)
Backed out changeset 420e02d37505 (bug 1778565)
2022-10-18 22:18:00 +03:00
Tom Schuster
55a8e07788 Bug 1778565 - Remove IsFileImage and SlurpFileToString. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D155754
2022-10-18 17:35:34 +00:00
Tom Schuster
f1f7083ece Bug 1778565 - Editor: Handle nsIFile transferable as blob. r=nika,masayuki
Differential Revision: https://phabricator.services.mozilla.com/D155753
2022-10-18 17:35:33 +00:00
Emilio Cobos Álvarez
bbb56ef32a Bug 1308080 - Make <details> use a shadow tree as per spec. r=TYLin,smaug
The behavior changes match WebKit and Blink. I can look into upstreaming
some of these to WPT.

Differential Revision: https://phabricator.services.mozilla.com/D34754
2022-09-16 14:54:12 +00:00
Sandor Molnar
99feb142d1 Backed out changeset 27c0485f1740 (bug 1308080) for causing assertion failure in dom/ShadowRoot.h & wr failures in /css/css-multicol/multicol-span-all-dynamic CLOSED TREE 2022-09-14 05:47:49 +03:00