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

3658 Коммитов

Автор SHA1 Сообщение Дата
Molly Howell 9b1bc951f4 Bug 1863583 - Add disablePictureInPicture attribute to HTMLVideoElement WebIDL. r=webidl,emilio,mconley
Differential Revision: https://phabricator.services.mozilla.com/D195466
2023-12-11 16:27:21 +00:00
Jens Stutte 95be758f8e Bug 1839051 - Use nsTArray::Sort for Sort and have also StableSort in nsCOMArray. r=necko-reviewers,kershaw,emilio,places-reviewers,mak
Depends on D181344

Differential Revision: https://phabricator.services.mozilla.com/D181889
2023-12-11 06:53:26 +00:00
Jens Stutte 989d33f031 Bug 1839051 - Use std::sort for nsTArray and deprecate NS_QuickSort. r=emilio,nika,janv,dom-storage-reviewers
Until now we used our own, well-aged C-style implementation of quick sort, based on code from 1992/93. Apart from being old (which is not bad as such), this code had some
disadvantages, namely:

- It was not typesafe and invocations could not be optimized by inlining.
- [Quick Sort](https://en.wikipedia.org/wiki/Quicksort) has a worst case performance of O(n<sup>2</sup>).
- Quick Sort can recurse deeply and thus cause stack overflows.
- On Windows, [Control Flow Guard](https://learn.microsoft.com/en-us/windows/win32/secbp/control-flow-guard) inspects any function invocation via function pointers to check if the called function was known at compile time. This comes with a [notable overhead](https://bugzilla.mozilla.org/show_bug.cgi?id=1842079) when calling the compare function repeatedly.

`std::sort` and `std::stable_sort` are preferred and have an optimal, guaranteed worst case performance.

Differential Revision: https://phabricator.services.mozilla.com/D181339
2023-12-11 06:53:25 +00:00
Adam Vandolder 23775aed9b Bug 1712140 - Part 1: Add Declarative ShadowDOM template attributes to parser. r=dom-core,emilio,hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D193673
2023-12-07 21:27:09 +00:00
Iulian Moraru ec88b58413 Backed out 6 changesets (bug 1712140) for causing sanitizer failures on nsHtml5TreeBuilder.cpp. CLOSED TREE
Backed out changeset b374469160e9 (bug 1712140)
Backed out changeset dfc44cccff32 (bug 1712140)
Backed out changeset 3a35e1401130 (bug 1712140)
Backed out changeset a93481858c38 (bug 1712140)
Backed out changeset a861fd445f56 (bug 1712140)
Backed out changeset dc1dc389f2dc (bug 1712140)
2023-12-07 08:16:23 +02:00
Adam Vandolder df73a82637 Bug 1712140 - Part 1: Add Declarative ShadowDOM template attributes to parser. r=dom-core,emilio,hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D193673
2023-12-06 22:50:48 +00:00
Emilio Cobos Álvarez 5985762903 Bug 1868411 - Remove -moz-non-native-content-theme media feature. r=jwatt
Non-native theme shipped a while ago. Let's make our UA sheet
consistent.

Differential Revision: https://phabricator.services.mozilla.com/D195567
2023-12-06 10:58:09 +00:00
Vincent Hilla 0c8b54eb5e Bug 1589554 - Part 1: Screen Wake Lock boilerplate. r=dom-core,smaug,emilio,edgar
Differential Revision: https://phabricator.services.mozilla.com/D189508
2023-12-05 23:58:06 +00:00
Stanca Serban 88e5c5662f Backed out 6 changesets (bug 1712140) for causing Linux related wpt failures in nsHtml5TreeBuilder.cpp. CLOSED TREE
Backed out changeset 3d799b386f3e (bug 1712140)
Backed out changeset 2ed53d545d6d (bug 1712140)
Backed out changeset 6f50077df42a (bug 1712140)
Backed out changeset e7c5449482f9 (bug 1712140)
Backed out changeset 5490dad148ef (bug 1712140)
Backed out changeset 50828058065e (bug 1712140)
2023-12-06 00:18:38 +02:00
Adam Vandolder 4d8797b909 Bug 1712140 - Part 1: Add Declarative ShadowDOM template attributes to parser. r=dom-core,emilio,hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D193673
2023-12-05 18:18:15 +00:00
Cosmin Sabou 0917a1636c Backed out 7 changesets (bug 1589554) for causing non-unified bustages on WakeLockJS.cpp.
Backed out changeset a0db8be67659 (bug 1589554)
Backed out changeset 76a3c248813f (bug 1589554)
Backed out changeset f1500173aa53 (bug 1589554)
Backed out changeset e02e11c3d977 (bug 1589554)
Backed out changeset 202c4f5c642b (bug 1589554)
Backed out changeset 82e03a404c2f (bug 1589554)
Backed out changeset b55991835aec (bug 1589554)
2023-12-05 19:12:31 +02:00
Vincent Hilla a4c27e92b0 Bug 1589554 - Part 1: Screen Wake Lock boilerplate. r=dom-core,smaug,emilio,edgar
Differential Revision: https://phabricator.services.mozilla.com/D189508
2023-12-05 15:37:05 +00:00
Iulian Moraru 95f4da1719 Backed out 8 changesets (bug 1839051) for causing assertion failures on NotificationController.cpp. CLOSED TREE
Backed out changeset 94a4c163e417 (bug 1839051)
Backed out changeset 5204b97e40bc (bug 1839051)
Backed out changeset 8443a22a399d (bug 1839051)
Backed out changeset 2ab1e27d5945 (bug 1839051)
Backed out changeset 20a850a4fd7e (bug 1839051)
Backed out changeset 658568fe9662 (bug 1839051)
Backed out changeset 82525b11a7c3 (bug 1839051)
Backed out changeset 720e6863c41a (bug 1839051)
2023-12-04 22:34:25 +02:00
Iulian Moraru 9dc5faecc0 Backed out 6 changesets (bug 1712140) for causing wpt failures on declarative-shadow-dom-opt-in.html.
Backed out changeset 78e3a33470ae (bug 1712140)
Backed out changeset 8601fce480ef (bug 1712140)
Backed out changeset 4d2749962c5f (bug 1712140)
Backed out changeset b65511d17150 (bug 1712140)
Backed out changeset 8ae1f766f1f9 (bug 1712140)
Backed out changeset 4ffe7a6ad366 (bug 1712140)
2023-12-04 22:30:04 +02:00
Jens Stutte badb30f6c0 Bug 1839051 - Use nsTArray::Sort for Sort and have also StableSort in nsCOMArray. r=necko-reviewers,kershaw,emilio,places-reviewers,mak
Depends on D181344

Differential Revision: https://phabricator.services.mozilla.com/D181889
2023-12-04 18:33:40 +00:00
Jens Stutte c0200af50a Bug 1839051 - Use std::sort for nsTArray and deprecate NS_QuickSort. r=emilio,nika,janv,dom-storage-reviewers
Until now we used our own, well-aged C-style implementation of quick sort, based on code from 1992/93. Apart from being old (which is not bad as such), this code had some
disadvantages, namely:

- It was not typesafe and invocations could not be optimized by inlining.
- [Quick Sort](https://en.wikipedia.org/wiki/Quicksort) has a worst case performance of O(n<sup>2</sup>).
- Quick Sort can recurse deeply and thus cause stack overflows.
- On Windows, [Control Flow Guard](https://learn.microsoft.com/en-us/windows/win32/secbp/control-flow-guard) inspects any function invocation via function pointers to check if the called function was known at compile time. This comes with a [notable overhead](https://bugzilla.mozilla.org/show_bug.cgi?id=1842079) when calling the compare function repeatedly.

`std::sort` and `std::stable_sort` are preferred and have an optimal, guaranteed worst case performance.

Differential Revision: https://phabricator.services.mozilla.com/D181339
2023-12-04 18:33:39 +00:00
Adam Vandolder a393b958d0 Bug 1712140 - Part 1: Add Declarative ShadowDOM template attributes to parser. r=dom-core,emilio,hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D193673
2023-12-04 17:35:48 +00:00
Sylvestre Ledru ef35fa7374 Bug 1519636 - Reformat recent changes to the Google coding style r=emilio,media-playback-reviewers,padenot
clang-format version 17.0.6 (taskcluster-QueHFUviQeyM8Y7r_d7MQQ)

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D195397
2023-12-04 10:09:36 +00:00
Stanca Serban c69cbb70a3 Backed out 6 changesets (bug 1712140) for causing wpt failures in declarative-shadow-dom-opt-in.html.
Backed out changeset 554a46ed8046 (bug 1712140)
Backed out changeset 14ebbfca2e84 (bug 1712140)
Backed out changeset 98dd5766dd46 (bug 1712140)
Backed out changeset 4241a7241a9b (bug 1712140)
Backed out changeset 59ee434d503e (bug 1712140)
Backed out changeset ff3bb42f91d1 (bug 1712140)
2023-12-01 03:26:27 +02:00
Adam Vandolder 657698433a Bug 1712140 - Part 1: Add Declarative ShadowDOM attributes to parser. r=dom-core,emilio,hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D193673
2023-11-30 23:17:14 +00:00
Emilio Cobos Álvarez 0789b3b2fc Bug 1863620 - Use an accelerated animation for overlay scrollbar. r=hiro
This also simplifies ScrollbarActivity, and removes some attributes that
aren't looked up while at it.

Differential Revision: https://phabricator.services.mozilla.com/D193049
2023-11-20 21:47:50 +00:00
Sandor Molnar ca527593f2 Backed out 2 changesets (bug 1863620) for causing multiple failure CLOSED TREE
Backed out changeset 298c668b4347 (bug 1863620)
Backed out changeset e34670e74c31 (bug 1863620)
2023-11-20 14:02:26 +02:00
Emilio Cobos Álvarez 9a99e14862 Bug 1863035 - Implement a native WinRegistry key. r=win-reviewers,rkraesig
Use it to implement nsIWindowsRegKey, and to replace existing native
callers like WinUtils and nsLookAndFeel.

Differential Revision: https://phabricator.services.mozilla.com/D192756
2023-11-20 10:08:09 +00:00
Emilio Cobos Álvarez b468a9fcd0 Bug 1863620 - Use an accelerated animation for overlay scrollbar. r=hiro
This also simplifies ScrollbarActivity, and removes some attributes that
aren't looked up while at it.

Differential Revision: https://phabricator.services.mozilla.com/D193049
2023-11-20 09:32:00 +00:00
Sandor Molnar b7fe69a4ab Backed out changeset 4c7dab5cb50c (bug 1864291) for causing multiple failures on test_input_color_picker_popup.html / forms/browser_selectpopup_invoke.js CLOSED TREE 2023-11-15 19:44:05 +02:00
Luke Warlow ed12e0d2d0 Bug 1864291 - Implements HandleInvokeInternal for select and input elements. r=smaug
Implements invoketarget defaults for select and input element, as specified in the open-ui "Invokers explainer".

(https://open-ui.org/components/invokers.explainer/)

Differential Revision: https://phabricator.services.mozilla.com/D193363
2023-11-15 14:20:48 +00:00
Luke Warlow d695b3bbfd Bug 1864331 - Implements HandleInvokeInternal for details element. r=smaug,CanadaHonk
Implements invoketarget defaults for details element, as specified in the open-ui "Invokers explainer".

(https://open-ui.org/components/invokers.explainer/)

Differential Revision: https://phabricator.services.mozilla.com/D193382
2023-11-13 23:12:15 +00:00
keithamus c9c6527520 Bug 1857887 - Add invoketarget & invoketarget action attributes r=smaug
This adds support for the experimental `invoketarget` and `invokeaction`
attributes, as specified in the open-ui "Invokers" explainer.

(https://open-ui.org/components/invokers.explainer/)

The `invoketarget` attribute maps to the IDL `invokeTargetElement`,
similar to `popoverTargetElement`, and the `invokeaction` is a freeform
string.

The Button behaviour checks for `invokeTargetElement` in its activation
behaviour, and dispatches an `InvokeEvent` if there is one.

This also adds some basic scaffolding for `handleInvokeInternal` which
will allow elements to provide their own invocation action algorithms.

Differential Revision: https://phabricator.services.mozilla.com/D190449
2023-11-08 13:41:51 +00:00
Emilio Cobos Álvarez 0a0d1b0dbe Bug 1863035 - Remove unused watching functions in nsIWindowsRegKey. r=win-reviewers,rkraesig
They were added in bug 292981 but this interface is not great,
as it is poll-based. Instead, we want a registry key change
notification of sorts.

Removing this simplifies upcoming patches.

Differential Revision: https://phabricator.services.mozilla.com/D192755
2023-11-03 23:38:44 +00:00
Olli Pettay 83bf875e8f Bug 1862987 - Consider to have two caches for the main thread atoms, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D192688
2023-11-03 18:16:13 +00:00
Emilio Cobos Álvarez 2efe17814f Bug 1860666 - Add pref-gated ::slider-* pseudo-elements, and some tests. r=layout-reviewers,jfkthame
We fail some because we right now we have a track pseudo for meter/progress.

I plan to fix this, but a lot of these frame classes are basically copy-pasta,
so I wanted to get rid of them first.

Differential Revision: https://phabricator.services.mozilla.com/D192097
2023-10-30 15:15:24 +00:00
Emilio Cobos Álvarez d03c3ae7d8 Bug 1861010 - Avoid some duplicated string hashing in the html parser. r=smaug
I need to check whether we can remove the recently used atom stuff, but this
should be uncontroversial.

Differential Revision: https://phabricator.services.mozilla.com/D191853
2023-10-25 11:50:59 +00:00
Emilio Cobos Álvarez 73b1942f93 Bug 1860386 - Use non-native drawing for -moz-menulist-arrow-button. r=stransky
The current code is unused, because we hide the combobox dropmarker in:

 * https://searchfox.org/mozilla-central/rev/cc35ffeaf33a3f4e0b2ce6b77f9e5817a705e0c8/toolkit/themes/linux/global/menulist.css#46

If you remove that rule, you'll see that what we draw is very far from a
dropmarker.

Use non-native rendering like windows to have a proper implementation of
this if someone needs it, and remove the native code.

Remove parentfocused check which can't ever work (that attribute isn't
set anywhere).

Differential Revision: https://phabricator.services.mozilla.com/D191563
2023-10-24 21:20:56 +00:00
Emilio Cobos Álvarez 325bc7b486 Bug 1859538 - Allow chrome stylesheets to be parsed in parallel. r=layout-reviewers,desktop-theme-reviewers,dao,Gijs,tlouw
This changes -moz-bool-pref from @supports to @media, bringing various
improvements:

 * @media (-moz-bool-pref) properly reacts to dynamic changes.
 * We no longer need to parse chrome:// stylesheets in the main thread
   (-moz-bool-pref was the only thing that forced us to do that).

This makes privileged and non-privileged stylesheets more similar.

Differential Revision: https://phabricator.services.mozilla.com/D191196
2023-10-19 10:50:27 +00:00
Emilio Cobos Álvarez 4f9476fe27 Bug 1857743 - Move system-accent-color-in-tabs pref to the front-end. r=desktop-theme-reviewers,win-reviewers,dao,rkraesig
Differential Revision: https://phabricator.services.mozilla.com/D190952
2023-10-16 17:16:21 +00:00
Sylvestre Ledru d0f6c7fc66 Bug 1856795 - Remove redundant member init r=emilio
Done with:
./mach static-analysis check --checks="-*, readability-redundant-member-init" --fix .

https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-member-init.html

Differential Revision: https://phabricator.services.mozilla.com/D190002
2023-10-15 15:29:02 +00:00
Cristina Horotan 6a90f5eded Backed out 2 changesets (bug 1856795) for causing build bustage at BasicEvents.h CLOSED TREE
Backed out changeset 1d98b028923a (bug 1856795)
Backed out changeset eae2ac93e17c (bug 1856795)
2023-10-14 21:42:14 +03:00
Sylvestre Ledru cc8a0ee742 Bug 1856795 - Remove redundant member init r=emilio
Done with:
./mach static-analysis check --checks="-*, readability-redundant-member-init" --fix .

https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-member-init.html

Differential Revision: https://phabricator.services.mozilla.com/D190002
2023-10-14 17:34:26 +00:00
Emilio Cobos Álvarez eef28bac5c Bug 1858397 - Pref for always underlining links. r=morgan
This doesn't change the settings UI.

Differential Revision: https://phabricator.services.mozilla.com/D190671
2023-10-11 17:46:56 +00:00
Emilio Cobos Álvarez 9dd667f180 Bug 1858106 - Increase atom table count. r=smaug
This gives a significant windows sp3 improvement, without negatively
affecting memory usage much (on a preallocated content process I get
0.13mb of atoms both with and without this patch).

We could consider bumping it further to 1024, though the relative
improvement vs. this patch is small.

Differential Revision: https://phabricator.services.mozilla.com/D190692
2023-10-11 15:05:35 +00:00
Emilio Cobos Álvarez a32679c2c2 Bug 1858104 - Use constexpr for initial subtable size + count. r=smaug
No behavior change.

Differential Revision: https://phabricator.services.mozilla.com/D190562
2023-10-10 11:51:36 +00:00
Emilio Cobos Álvarez 9f9798a6d2 Bug 1857828 - Use an RWLock for atom tables. r=smaug
See comment 0. This should avoid some lock contention, specially when
parsing CSS and other off-main-thread uses of atoms.

Differential Revision: https://phabricator.services.mozilla.com/D190408
2023-10-09 11:42:49 +00:00
Jan Varga c458754592 Bug 1855134 - Move existing MOZ_TRY macros to a dedicated header file; r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D189226
2023-09-28 20:46:07 +00:00
Andrew McCreight d13ae00539 Bug 1855796 - Add a debug check to nsTArray::RemoveElementAtUnsafe(). r=emilio
Also make RemoveElementsAtUnsafe() private again because there are no
external callers. If any external callers are added, then we probably
want them to be made to a different version that does checks in
debug builds.

Differential Revision: https://phabricator.services.mozilla.com/D189557
2023-09-28 19:53:19 +00:00
Emilio Cobos Álvarez 9e6751a082 Bug 1854446 - Make dynamic atoms store an nsStringBuffer. r=smaug,xpcom-reviewers,nika
Performance results pending, but this shouldn't hurt utf-8 atomization
at all, and it should also make utf-16 atomization potentially cheaper.

So sending for review under the assumption that perf numbers will look
good.

Differential Revision: https://phabricator.services.mozilla.com/D189021
2023-09-27 09:06:06 +00:00
Natalia Csoregi a6437d542f Backed out changeset 65f49a810f52 (bug 1854446) for causing multiple failures e.g. 368504-4.html. CLOSED TREE 2023-09-27 03:26:28 +03:00
Emilio Cobos Álvarez 128ee32ee2 Bug 1854446 - Make dynamic atoms store an nsStringBuffer. r=smaug,xpcom-reviewers,nika
Performance results pending, but this shouldn't hurt utf-8 atomization
at all, and it should also make utf-16 atomization potentially cheaper.

So sending for review under the assumption that perf numbers will look
good.

Differential Revision: https://phabricator.services.mozilla.com/D189021
2023-09-26 23:14:14 +00:00
Logan Rosen f024d94b2b Bug 1786490 - reformat the tree using black 23.3.0 r=sylvestre,webdriver-reviewers,taskgraph-reviewers,whimboo,jmaher,ahal,perftest-reviewers,geckoview-reviewers,afinder,m_kato
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D186092
2023-09-06 16:14:30 +00:00
Emilio Cobos Álvarez 884175baf6 Bug 1850827 - Implement rounded bottom corners in GTK. r=rmader
The implementation is uglier than it needs to be. We basically need to
override the GTK styles for the window decorations with the desired
radius.

This is because of two reasons:

 * Adwaita on gtk3 doesn't provide a bottom corner radius.
 * Even if it did we couldn't reasonably query it, see comment 4.

So in order for stuff to look sensible we need to make sure that we and
GTK agree on what radius to use. Using the titlebar radius makes sense
here.

Differential Revision: https://phabricator.services.mozilla.com/D187343
2023-09-05 18:07:08 +00:00
Emilio Cobos Álvarez 02cec2af35 Bug 1851577 - Remove support for the drawintitlebar attribute. r=smaug
It was replaced by chromemargin, but some leftovers remained in the
tree.

Differential Revision: https://phabricator.services.mozilla.com/D187440
2023-09-05 13:26:46 +00:00