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
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
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
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
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
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
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
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
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
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
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.
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
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
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
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
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
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