Commit Graph
135 Commits
Author SHA1 Message Date
velzie 673a67963e initial commit for wasm work 2026-06-15 19:20:19 -04:00
serge-sans-paille c7033d0d67 Bug 2030936 - Activate clang-tidy's performance-for-range-copy check r=sylvestre,tschuster,media-playback-reviewers,webrtc-reviewers,firefox-style-system-reviewers,layout-reviewers,janerik,padenot,bwc,emilio,alwu
And apply the auto-fix from the linter. Note that we exclude RefPtr from
the check as it plays badly with our CanRunScriptChecker's linter.

We also explicitly silent warning for loops on nsTObserverArray, as their
iterator is designed to support invalidation.

Differential Revision: https://phabricator.services.mozilla.com/D293497
2026-05-20 06:51:32 +00:00
Daniel Holbert f156c83d71 Bug 2024406: Adjust progress-bar HCM colors to match design specifications. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D292639
2026-04-10 06:32:18 +00:00
Sylvestre Ledru 4f6b8b516d Bug 2023419 - Remove Emacs/Vim modelines from widget/ r=emilio
replaced by .editorconfig
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D287877
2026-03-16 17:22:02 +00:00
Emilio Cobos Álvarez 4021464773 Bug 2011709 - Make combobox select use a shadow tree for its contents. r=jjaschke,layout-reviewers,firefox-style-system-reviewers,accessibility-platform-reviewers,smaug,Jamie,jfkthame,dshin
For now, replicate the label + icon structure.

Use pseudo-elements for them. We could use select.css instead, but we
need a way to to prevent the display fix-up from applying (this is
needed because otherwise <select style=display:flex> starts getting the
label and button on different lines), and pseudo-elements is easier.

Use a <span> for the icon since we basically otherwise have a hidden,
unfocusable button and it simplifies the styling that way.

Use the same for the input file content since it simplifies the logic on
the frame constructor.

nsListControlFrame gets some clean-up as well since I was trying to make
sense of nsISelectFrame, but I could split that out if needed.

Tests for bug 323656 fail now because it tests explicit inheritance from
the <select> to the <option>, and now that goes through a <slot>.

Other elements have the same issue, see
https://github.com/whatwg/html/issues/3748. So for now remove those
tests.

Differential Revision: https://phabricator.services.mozilla.com/D280041
2026-02-03 14:33:36 +00:00
Oriol Brufau 680ac9cb58 Bug 2011072 - Centralize algorithm for adjusting border-radius inwards/outwards. r=emilio,layout-reviewers,gfx-reviewers,nical,bradwerth
Instead of duplicating the logic in WebRender, it will now take the
shadow radius as a parameter.

Differential Revision: https://phabricator.services.mozilla.com/D279473
2026-01-27 17:52:03 +00:00
Cristina Horotan de9b145ee6 Revert "Bug 2011072 - Centralize algorithm for adjusting border-radius inwards/outwards. r=emilio,layout-reviewers,gfx-reviewers,nical,bradwerth" for causing WR bustages
This reverts commit 5402343408.
2026-01-27 02:32:21 +00:00
Oriol Brufau 5402343408 Bug 2011072 - Centralize algorithm for adjusting border-radius inwards/outwards. r=emilio,layout-reviewers,gfx-reviewers,nical,bradwerth
Instead of duplicating the logic in WebRender, it will now take the
shadow radius as a parameter.

Differential Revision: https://phabricator.services.mozilla.com/D279473
2026-01-27 01:38:26 +00:00
Atila Butkovits 03063fba23 Revert "Bug 2011072 - Centralize algorithm for adjusting border-radius inwards/outwards. r=emilio,layout-reviewers,gfx-reviewers,nical" for causing WebRender bustages.
This reverts commit 91734d67e4.
2026-01-20 10:47:44 +00:00
Oriol Brufau 91734d67e4 Bug 2011072 - Centralize algorithm for adjusting border-radius inwards/outwards. r=emilio,layout-reviewers,gfx-reviewers,nical
Instead of duplicating the logic in WebRender, it will now take the
shadow radius as a parameter.

Differential Revision: https://phabricator.services.mozilla.com/D279473
2026-01-20 10:17:39 +00:00
Emilio Cobos Álvarez a71fc67673 Bug 2008041 - Make XUL disabled / checked attributes html-style boolean attributes. r=desktop-theme-reviewers,tabbrowser-reviewers,extension-reviewers,credential-management-reviewers,devtools-reviewers,fxview-reviewers,translations-reviewers,layout-reviewers,sthompson,nsharpley,robwu,nchevobbe,jwatt,dimi,dao
Much like bug 1979014 did for other attributes (these ones were a bit
harder because there's also native code that looked at them).

Make disabled imply :disabled, and checked imply :checked, which
simplifies the theming code while at it.

Differential Revision: https://phabricator.services.mozilla.com/D277665
2026-01-06 22:02:03 +00:00
Emilio Cobos Álvarez eab3d6646c Bug 2008419 - Remove nsITheme::WidgetIsContainer. r=jwatt
It's only used to avoid painting children of some widgets, but radios /
checkboxes are already frame tree leafs, and nowadays content can't
specify appearance: radio on arbitrary frames.

Differential Revision: https://phabricator.services.mozilla.com/D277795
2026-01-03 18:29:21 +00:00
Emilio Cobos Álvarez ab84a7e4c5 Bug 1993820 - Tweak checked radio rendering to minimize snapping artifacts. r=dholbert
We're drawing it as a background circle, and an inner background +
border circle, which means that the outer background can snap
differently.

Draw it as an outer background + border, and an inner circle instead, so
as to minimize snapping artifacts on the outer border.

Differential Revision: https://phabricator.services.mozilla.com/D270477
2025-10-31 12:45:27 +00:00
Serban Stanca 44c1e06107 Revert "Bug 1993820 - Tweak checked radio rendering to minimize snapping artifacts. r=dholbert" for causing reftests failures in radio-clamp-01.html.
This reverts commit 88016633b3.
2025-10-31 03:55:35 +00:00
Emilio Cobos Álvarez 88016633b3 Bug 1993820 - Tweak checked radio rendering to minimize snapping artifacts. r=dholbert
We're drawing it as a background circle, and an inner background +
border circle, which means that the outer background can snap
differently.

Draw it as an outer background + border, and an inner circle instead, so
as to minimize snapping artifacts on the outer border.

Differential Revision: https://phabricator.services.mozilla.com/D270477
2025-10-30 23:11:48 +00:00
serge-sans-paille 72609da313 Bug 1996641 - Remove unused mfbt inclusion in widget/** r=emilio,necko-reviewers,geckoview-reviewers,win-reviewers,gstoll,ohall,sunil
Differential Revision: https://phabricator.services.mozilla.com/D270216
2025-10-29 13:06:08 +00:00
Sandor Molnar 50c434493d Revert "Bug 1996641 - Remove unused mfbt inclusion in widget/** r=emilio,necko-reviewers,geckoview-reviewers,win-reviewers,gstoll,ohall,sunil" for causing build bustages @ nsHttpChannel.cpp
This reverts commit 66b97f2926.
2025-10-29 11:31:08 +00:00
serge-sans-paille 66b97f2926 Bug 1996641 - Remove unused mfbt inclusion in widget/** r=emilio,necko-reviewers,geckoview-reviewers,win-reviewers,gstoll,ohall,sunil
Differential Revision: https://phabricator.services.mozilla.com/D270216
2025-10-29 11:00:27 +00:00
Greg Stoll 0a310bf4d7 Bug 1956974 - make thin scrollbars have thumb buttons on Windows r=spohl,win-reviewers,desktop-theme-reviewers,handyman,emilio
Per the bug, all thin scrollbars in the Windows OS (that I could find)
do have thumb buttons for scrolling up/down, so we should match that.

Differential Revision: https://phabricator.services.mozilla.com/D269217
2025-10-20 21:24:02 +00:00
Emilio Cobos Álvarez 746265b214 Bug 1985190 - Snap outline offsets like border-widths. r=firefox-style-system-reviewers,layout-reviewers,dshin
This implements https://github.com/w3c/csswg-drafts/issues/12906 for
chrome contexts and nightly, for now, pending working group discussion.

We might want to do this only for negative offset but that's a bit
weird. For now do it unconditionally.

Add a test and fix border-width-rounding to also test outline-width, and
also report tests per entry, since we fail one subtest due to floating
point precision.

Differential Revision: https://phabricator.services.mozilla.com/D267770
2025-10-07 18:09:04 +00:00
Lee Salzman 21321f708d Bug 1988370 - Replace AlphaBoxBlur with Skia's Gaussian blur. r=gfx-reviewers,ahale
Our AlphaBoxBlur implementation has the downside that it is parameterized by
an integer radius, rather than using a floating-point sigma, so that for small
blurs less than a pixel, they are all rounded up to a larger whole-integer blur
radius. This causes significant aliasing in blur results for these small radius
blurs.

As well, the older method of using a triple box blur to approximate a Gaussian
blur is slowly being outmoded by more modern SIMD and shader-based blurs. Rather
than reimplement a more modern blur ourselves, we can just reuse Skia's
implementation which allows us to remove a substantial amount of old code and
also solve the issue of small radius blurs due to Skia's blur being parameterized
by sigma.

This renames (gfx)AlphaBoxBlur to (gfx)GaussianBlur and changes the implementation
to use Skia's blur internally. This also allows us to support BGRA blurs, not just
A8, and allows us to opt into different edge-clamping behaviors that our old triple
box blur did not support.

Differential Revision: https://phabricator.services.mozilla.com/D264837
2025-09-16 06:17:54 +00:00
Cristina Horotan 4c0e25bf2c Revert "Bug 1988370 - Replace AlphaBoxBlur with Skia's Gaussian blur. r=gfx-reviewers,ahale" for causing build bustages on DrawTargetSkia.cpp
This reverts commit 2137b0d059.
2025-09-16 05:28:21 +00:00
Lee Salzman 2137b0d059 Bug 1988370 - Replace AlphaBoxBlur with Skia's Gaussian blur. r=gfx-reviewers,ahale
Our AlphaBoxBlur implementation has the downside that it is parameterized by
an integer radius, rather than using a floating-point sigma, so that for small
blurs less than a pixel, they are all rounded up to a larger whole-integer blur
radius. This causes significant aliasing in blur results for these small radius
blurs.

As well, the older method of using a triple box blur to approximate a Gaussian
blur is slowly being outmoded by more modern SIMD and shader-based blurs. Rather
than reimplement a more modern blur ourselves, we can just reuse Skia's
implementation which allows us to remove a substantial amount of old code and
also solve the issue of small radius blurs due to Skia's blur being parameterized
by sigma.

This renames (gfx)AlphaBoxBlur to (gfx)GaussianBlur and changes the implementation
to use Skia's blur internally. This also allows us to support BGRA blurs, not just
A8, and allows us to opt into different edge-clamping behaviors that our old triple
box blur did not support.

Differential Revision: https://phabricator.services.mozilla.com/D264837
2025-09-16 03:58:57 +00:00
Emilio Cobos Álvarez 08d8a894db Bug 1984859 - Use a common type for layout rounded corners and graphics rounded corners. r=layout-reviewers,gfx-reviewers,jfkthame,jnicol
Differential Revision: https://phabricator.services.mozilla.com/D262041
2025-08-23 22:55:18 +00:00
Emilio Cobos Álvarez 28f3064617 Bug 1984859 - Use Margin to represent border widths in nsCSSRendering. r=layout-reviewers,gfx-reviewers,jfkthame,jnicol
Makes next patches easier.

Differential Revision: https://phabricator.services.mozilla.com/D262040
2025-08-23 22:55:14 +00:00
Atila Butkovits 533eabba32 Revert "Bug 1984859: apply code formatting via Lando" for causing failures at element-paint-native-widget.html.
This reverts commit c7950c03d7.

Revert "Bug 1984859 - Use a common type for layout rounded corners and graphics rounded corners. r=layout-reviewers,gfx-reviewers,jfkthame,jnicol"

This reverts commit 2991156989.

Revert "Bug 1984859 - Use Margin to represent border widths in nsCSSRendering. r=layout-reviewers,gfx-reviewers,jfkthame,jnicol"

This reverts commit 446150abe6.
2025-08-23 19:10:23 +00:00
Emilio Cobos Álvarez 2991156989 Bug 1984859 - Use a common type for layout rounded corners and graphics rounded corners. r=layout-reviewers,gfx-reviewers,jfkthame,jnicol
Differential Revision: https://phabricator.services.mozilla.com/D262041
2025-08-23 17:57:50 +00:00
Emilio Cobos Álvarez 446150abe6 Bug 1984859 - Use Margin to represent border widths in nsCSSRendering. r=layout-reviewers,gfx-reviewers,jfkthame,jnicol
Makes next patches easier.

Differential Revision: https://phabricator.services.mozilla.com/D262040
2025-08-23 17:57:46 +00:00
Timothy Nikkel 963a4a5684 Bug 1981495. In Theme::PaintCircleShadow check if we can create a similar draw target before trying to create one. r=gfx-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D260615
2025-08-12 03:46:02 +00:00
Emilio Cobos Álvarez b7fcfe8cb6 Bug 1973664 - Avoid different scrollbar colors in inactive windows. r=stransky
On Ubuntu 24, we see two kinds of test failures. One of them is that we
have some different scrollbars in a few places, depending on window
activeness.

No other platform draws different scrollbars on active vs inactive
window, and GTK4 and Libadwaita don't either.

Differential Revision: https://phabricator.services.mozilla.com/D254786
2025-06-24 17:30:31 +00:00
Emilio Cobos Álvarez 7e9f44c2d3 Bug 1971450 - Remove internal appearance values for meter / progress / range thumb / chunk. r=dshin
This is technically a behavior change because we don't really look at
the appearance value of the progressbar etc anymore. We could do that if
wanted, but it's more consistent to just look at the individual frame
(looking forward to appearance: base and other potential compat
improvements we could make in the area).

Differential Revision: https://phabricator.services.mozilla.com/D253256
2025-06-16 23:16:37 +00:00
Emilio Cobos Álvarez 25e2b875e3 Bug 1969765 - Simplify and improve toolbarbutton styling on Linux. r=desktop-theme-reviewers,dao
This improves the looks of the places window a little bit by not giving
the toolbarbuttons a default background. They were already using
currentColor as the color so that can cause wrong contrast anyways.

Unify the toolbarbutton.css styling to use macOS approach. I don't think
we rely on any of the differences nowadays because the linux/windows
styling is suspicious at best (e.g. using color: inherit but specifying
a native appearance / background). This is just simpler.

Differential Revision: https://phabricator.services.mozilla.com/D252007
2025-06-05 16:33:17 +00:00
Emilio Cobos Álvarez 54e18af917 Bug 1968925 - Remove unused sColorGrey30 to fix non-unified builds. 2025-05-30 16:30:26 +00:00
Emilio Cobos Álvarez 3d50342c7e Bug 1968925 - Better themed buttons in GTK. r=stransky,desktop-theme-reviewers,dao
This patch got a bit larger than expected mostly to deal well with
windows HCM, but the TLDR is that we introduce Button*border colors, and
deal with them in the non-native theme, rather than hard-coding them.

We also leave the previous hardcoded colors in the standin set, so that
web content doesn't change behavior, and reorder a bit the colors to be
closer together.

Differential Revision: https://phabricator.services.mozilla.com/D251648
2025-05-30 14:55:08 +00:00
Emilio Cobos Álvarez c6c3fc84c0 Bug 1967530 - Remove some xpcom gunk from nsITheme. r=win-reviewers,gstoll
Differential Revision: https://phabricator.services.mozilla.com/D250282
2025-05-20 20:08:25 +00:00
agoloman 5cbe8c23b6 Revert Bug 1967530 - for causing build bustages.
This reverts commit 9ea62cb6aa.

Revert "Bug 1967530 - Remove AssumeThemePartAndStateAreTransparent. r=win-reviewers,handyman"

This reverts commit f036ae0fdb.

Revert "Bug 1967530 - Remove some xpcom gunk from nsITheme. r=win-reviewers,gstoll"

This reverts commit 9c54c6c68a.

Revert "Bug 1967530 - Clean-up a bit nsNativeThemeGTK. r=stransky"

This reverts commit d040aadf24.
2025-05-20 19:44:50 +00:00
Emilio Cobos Álvarez 9c54c6c68a Bug 1967530 - Remove some xpcom gunk from nsITheme. r=win-reviewers,gstoll
Differential Revision: https://phabricator.services.mozilla.com/D250282
2025-05-20 18:18:23 +00:00
Emilio Cobos Álvarez 04bcaf8683 Bug 1964022 - Update libadwaita colors. r=stransky
See comments for sources.

Differential Revision: https://phabricator.services.mozilla.com/D247559
2025-05-05 19:34:14 +00:00
Emilio Cobos Álvarez 11e59443f7 Bug 1955998 - Restore call to Theme::LookAndFeelChanged on init. r=dshin
This is not easy to test because this doesn't have any effect on
windows, and only startup is affected (so any ui.* pref that I could
tweak to write a reftest will "fix it").

I initially removed it to move it to nsXPLookAndFeel (thus making the
"refresh" and "init" code-paths more similar), but I think I forgot to
add it there, and it's not like it makes a big difference, so just put
it back where it was.

Differential Revision: https://phabricator.services.mozilla.com/D242746
2025-03-24 15:19:48 +00:00
Emilio Cobos Álvarez 3618e5ed50 Bug 1955591 - Make LookAndFeel APIs safe to call off the main thread. r=jfkthame
Make IntID::AlertNotificationOrigin not terribly slow on windows, since
that's the only thing we had a carveout for avoid querying on startup:

 * Modern windows doesn't let you move the taskbar to a separate side.
 * Even with that, on a multi-monitor setup there are multiple taskbars.
 * More importantly, even with that, now we have native notifications by
   default, so this is less important (this is only useful for the
   non-native alerts).

Avoid GTK CRITICALs and crashes when calling into LookAndFeel from
XPCShell, which now happens.

Differential Revision: https://phabricator.services.mozilla.com/D242566
2025-03-22 03:24:00 +00:00
Emilio Cobos Álvarez 7be12cff6b Bug 1951930 - Keep 1px outer border width tho. r=Julian
For consistency with the unchecked state.

Differential Revision: https://phabricator.services.mozilla.com/D241043
2025-03-11 16:37:49 +00:00
Emilio Cobos Álvarez ccf5ca2e5e Bug 1951930 - Back out checked radio rendering change from bug 1941755. r=Julian
And add a comment pointing to this and related bugs.

Differential Revision: https://phabricator.services.mozilla.com/D240979
2025-03-11 16:37:48 +00:00
Emilio Cobos Álvarez 3d1806d8f8 Bug 1938683 - Don't support menulist-button as a proper widget. r=dshin
Use it only to enable the combobox dropmarker. This matches wpt and
blink.

Differential Revision: https://phabricator.services.mozilla.com/D240314
2025-03-04 15:21:34 +00:00
Emilio Cobos Álvarez 149e87e8ce Bug 1951562 - Make ProgressBar appearance honor UA sheet borders. r=dholbert
Much like button and most other widgets. This is the lower-risk fix for
these tests and it makes sense.

Differential Revision: https://phabricator.services.mozilla.com/D240311
2025-03-04 15:18:09 +00:00
Emilio Cobos Álvarez c98d401fa6 Bug 1941755 - Tweak checked radio rendering as per UX feedback. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D234341
2025-01-17 09:05:19 +00:00
Emilio Cobos Álvarez c8048340be Bug 1941755 - Tweak checkbox border size per UX feedback. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D234340
2025-01-17 09:05:19 +00:00
Norisz Fay 490cd268ba Backed out 3 changesets (bug 1941755) for causing reftest failure on radio-clamp-01.html CLOSED TREE
Backed out changeset 236a7b7aee3b (bug 1941755)
Backed out changeset c2dd557f5734 (bug 1941755)
Backed out changeset 2606ec966d5c (bug 1941755)
2025-01-16 23:45:25 +02:00
Emilio Cobos Álvarez 4ee8cccb03 Bug 1941755 - Tweak checked radio rendering as per UX feedback. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D234341
2025-01-16 18:23:11 +00:00
Emilio Cobos Álvarez b331c52cf9 Bug 1941755 - Tweak checkbox border size per UX feedback. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D234340
2025-01-16 18:23:11 +00:00
Alexandru Marc 8b56e6f94e Backed out 6 changesets (bug 1941755) for causing wr3 failures @ transform-input-018.html
Backed out changeset 4f612a4f2b91 (bug 1941755)
Backed out changeset ba75a8e0c246 (bug 1941755)
Backed out changeset 81d3f4ef3f78 (bug 1941755)
Backed out changeset 481bdd9544eb (bug 1941755)
Backed out changeset 23accc252467 (bug 1941755)
Backed out changeset 27cc29112880 (bug 1941755)
2025-01-16 07:52:23 +02:00