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

64 Коммитов

Автор SHA1 Сообщение Дата
Nathan LaPre a1ad0a690f Bug 1904814: Special-case Field, Fieldtext, MozDisabledField for HCM, r=emilio
This revision modifies the Windows definitions of Field, Fieldtext, and
MozDisabledField for high contrast mode. Scoping this more directly
to high contrast mode avoids undesirable knock-on effects in other schemes. In
particular, we want to keep Field mapping to field-like colors, rather than
button colors. This fixes the color of autofill richlistbox. This revision also
fixes the HCM color of disabled checkboxes and radio buttons, which weren't
discernible.

Differential Revision: https://phabricator.services.mozilla.com/D215176
2024-07-01 17:10:09 +00:00
Irene Ni 4f54c3f81f Bug 1902068 - Fix HCM styling of input type="range". r=accessibility-frontend-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D214417
2024-06-25 14:25:33 +00:00
Nathan LaPre 896da76ac7 Bug 1901157: Fix HCM styling of some controls r=emilio,morgan
This revision updates the HCM colors of many controls. In particular:
- HCM hover and active states for checkboxes, radio buttons are now discernible
- HCM focus ring colors fixed
- Field, Disabledfield on Windows adjusted to COLOR_BTNFACE
- FieldText on Windows adjusted to COLOR_BTNTEXT to match
- checkbox, radio button colors fixed to more closely match design

Differential Revision: https://phabricator.services.mozilla.com/D213674
2024-06-24 20:03:23 +00:00
Emilio Cobos Álvarez bb6693d9cd Bug 1903191 - Tweak sizing to allow zero-size checkboxes/radio buttons. r=dholbert
baseline-alignment-and-overflow.tentative.html starts failing because
the code to set up the reference stops working:

  https://searchfox.org/mozilla-central/rev/8011b6325f7ce05d228a3cdefd45d74fb98ee7b4/testing/web-platform/tests/html/rendering/widgets/baseline-alignment-and-overflow.tentative.html#169-174

But our rendering otherwise doesn't change, plus it fails similarly in
Safari, so I think we're good.

Differential Revision: https://phabricator.services.mozilla.com/D214081
2024-06-19 12:16:08 +00:00
Aron Cseh d102c4348c Backed out changeset 3c34c76566d2 (bug 1903191) for causing assertion failures on nsCheckboxRadioFrame.cpp CLOSED TREE 2024-06-19 13:48:19 +03:00
Emilio Cobos Álvarez 584a711d5c Bug 1903191 - Tweak sizing to allow zero-size checkboxes/radio buttons. r=dholbert
baseline-alignment-and-overflow.tentative.html starts failing because
the code to set up the reference stops working:

  https://searchfox.org/mozilla-central/rev/8011b6325f7ce05d228a3cdefd45d74fb98ee7b4/testing/web-platform/tests/html/rendering/widgets/baseline-alignment-and-overflow.tentative.html#169-174

But our rendering otherwise doesn't change, plus it fails similarly in
Safari, so I think we're good.

Differential Revision: https://phabricator.services.mozilla.com/D214081
2024-06-19 08:50:02 +00:00
Otto Länd 8b065c2f1c Bug 1896516: apply code formatting via Lando
# ignore-this-changeset
2024-05-30 06:36:30 +00:00
Ting-Yu Lin 1e80f659a2 Bug 1896516 Part 11 - Remove nsIScrollableFrame usages under layout/, widget/, and toolkit/. r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D211498
2024-05-30 06:32:22 +00:00
Sebastian Hengst ccb101be8f Backed out 15 changesets (bug 1896516) for causing scrolling crashes on macOS. a=backout
Backed out changeset fd6904338812 (bug 1896516)
Backed out changeset 2977ff81a23e (bug 1896516)
Backed out changeset c8a6b0e526d6 (bug 1896516)
Backed out changeset 3c06f22da72b (bug 1896516)
Backed out changeset f63b0c4335fe (bug 1896516)
Backed out changeset 6f7ab8adfa6e (bug 1896516)
Backed out changeset 997c9249dbed (bug 1896516)
Backed out changeset c964fccd5180 (bug 1896516)
Backed out changeset 7b481b747b7a (bug 1896516)
Backed out changeset 42e1bbe0ecb6 (bug 1896516)
Backed out changeset 717dac08b607 (bug 1896516)
Backed out changeset 2f0817331dbe (bug 1896516)
Backed out changeset b765169a7a8f (bug 1896516)
Backed out changeset a2d37b98273c (bug 1896516)
Backed out changeset ea9ecb543e66 (bug 1896516)
2024-05-29 11:22:52 +02:00
Otto Länd 0662f101d5 Bug 1896516: apply code formatting via Lando
# ignore-this-changeset
2024-05-28 04:59:10 +00:00
Ting-Yu Lin 6bd29e633d Bug 1896516 Part 11 - Remove nsIScrollableFrame usages under layout/, widget/, and toolkit/. r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D211498
2024-05-28 04:46:20 +00:00
tannal b8ce3e7b7f Bug 1895391 - Remove widget.non-native-theme.solid-outline-style pref r=gregp,emilio
Differential Revision: https://phabricator.services.mozilla.com/D210276
2024-05-14 10:05:49 +00:00
Gregory Pappas 7606beb5d4 Bug 1873138 - Remove widget.non-native-theme.webrender pref r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D209605
2024-05-06 21:55:36 +00:00
Emilio Cobos Álvarez 7c5959d988 Bug 1750072 - Allow to opt-out of password reveal using appearance: textfield. r=jwatt
Much like we do for the number input spinners.

Differential Revision: https://phabricator.services.mozilla.com/D208673
2024-05-06 15:13:35 +00:00
Emilio Cobos Álvarez a306ea0c5a Bug 1893949 - Don't use a semi-transparent autofill background. r=issammani
This was needed because we didn't use to override the color of the
textfield, so it needed to work with whatever color was there already.

Now that we enforce the color however, there's no point on it being
semi-transparent.

Add a darker version of the color so that it also works on dark mode
(<input style="color-scheme: dark"> or so).

Now that it's opaque, there's no need for Theme.cpp to blend with the
field background.

Differential Revision: https://phabricator.services.mozilla.com/D209021
2024-04-30 23:34:27 +00:00
Ting-Yu Lin 36a572ce27 Bug 1892778 Part 2 - Convert InlineDir and BlockDir to enum classes. r=dholbert
Also, rewrite GetInlineDir() and GetBlockDir() to remove bit operations for
computing the InlineDir and BlockDir enum variants.

Differential Revision: https://phabricator.services.mozilla.com/D208176
2024-04-23 03:56:42 +00:00
Mike Hommey cd082e3e9b Bug 1882900 - Fix build failures in widget/uikit. r=nika
This only really takes care of making it compile, although there are
still missing pieces for other directories to rely on it. This is enough
to unblock a bunch of other work.

While here, remove `virtual` on methods with `override`.

Differential Revision: https://phabricator.services.mozilla.com/D203198
2024-03-04 21:03:24 +00:00
Emilio Cobos Álvarez fec5def690 Bug 1871535 - Use a less opaque check color for dark disabled checkboxes. r=spohl
On a darker background this should be fine.

Differential Revision: https://phabricator.services.mozilla.com/D197875
2024-01-08 08:00:37 +00:00
Emilio Cobos Álvarez 7fb6dc20f7 Bug 1868338 - Improve non-native toolbarbutton appearance. r=dao,stransky
Differential Revision: https://phabricator.services.mozilla.com/D195546
2023-12-06 08:33:33 +00:00
Emilio Cobos Álvarez 4d0e714795 Bug 1866022 - Teach GTK to render non-native tree columns and toolbars. r=dao,stransky,desktop-theme-reviewers
This fixes various things, like sort arrows not working, even in regular
non-mixed-color-scheme settings, and is a lot less code.

The toolbarbutton appearance on the problematic case described in
comment 0 could get some work (the extra borders aren't exactly pretty),
but it's still a much better improvement.

Differential Revision: https://phabricator.services.mozilla.com/D195345
2023-12-04 18:57:35 +00:00
Emilio Cobos Álvarez 5e6062194f Bug 1861671 - Remove some dead macOS menu drawing code. r=mac-reviewers,bradwerth
Some of it was already dead like the arrow-button-{up,down} stuff.

Depends on D192082

Differential Revision: https://phabricator.services.mozilla.com/D192083
2023-10-31 18:57:12 +00:00
Emilio Cobos Álvarez 0cc423b3e3 Bug 1858349 - Remove now-unused menuarrow code. r=spohl,mac-reviewers,win-reviewers,rkraesig
The windows bits were already unused.

Depends on D190663

Differential Revision: https://phabricator.services.mozilla.com/D190664
2023-10-11 19:37:40 +00:00
Emilio Cobos Álvarez 84a3ba3580 Bug 1857513 - Clean up document state setup. r=smaug
Now that we have a DocumentState type we can be a bit less explicit
(before this used EventStates, so the extra Document in the names was
useful).

Differential Revision: https://phabricator.services.mozilla.com/D190602
2023-10-11 08:24:14 +00:00
Morgan Rae Reschenberg 085934ef0f Bug 1791024: Make focus ring use Canvastext and Selecteditem when HCM is enabled r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D189849
2023-10-03 20:22:17 +00:00
Emilio Cobos Álvarez 4b3775e6ac Bug 1849793 - Use non-native rendering for menuarrows on Linux. r=dholbert,stransky
Differential Revision: https://phabricator.services.mozilla.com/D186712
2023-08-29 11:16:36 +00:00
Jonathan Kew 7d604d33db Bug 1802687 - Account for direction:rtl in vertical writing-mode <input type=range> controls. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D171375
2023-07-08 13:19:45 +00:00
Iulian Moraru 2ab699d457 Backed out changeset 2a8a95dd8ab8 (bug 1802687) for causing wpt failures on range-snap-to-tick-marks-03.html. 2023-07-08 07:12:57 +03:00
Jonathan Kew d43d8f20e1 Bug 1802687 - Account for direction:rtl in vertical writing-mode <input type=range> controls. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D171375
2023-07-07 17:36:36 +00:00
Noemi Erli e6aff2fa18 Backed out changeset 811d8bd2f7f9 (bug 1802687) for causing failures in range-vlr.html CLOSED TREE 2023-07-07 19:32:17 +03:00
Jonathan Kew b6a6adf468 Bug 1802687 - Account for direction:rtl in vertical writing-mode <input type=range> controls. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D171375
2023-07-07 15:22:12 +00:00
Emilio Cobos Álvarez 0d8c192553 Bug 1838731 - Fix scrollbar kind computation for scrollcorner. r=mstange
The scrollcorner isn't a child of a scrollbar so we don't find it.
Instead, check for the scrollable node. This info is only used on macOS,
this fixes the rendering of rtl scrollcorners with non-overlay
scrollbars, e.g.:

  <div style="border: 1px solid; width: 100%; height: 100%; overflow: scroll; direction: rtl"></div>

Or so.

Differential Revision: https://phabricator.services.mozilla.com/D181259
2023-06-16 17:30:24 +00:00
Emilio Cobos Álvarez 604d8268b2 Bug 1813046 - Simplify scrollbar sizing code. r=spohl
This removes the capability of having differently-sized vertical and
horizontal scrollbars (which is only potentially used in windows, and in
practice almost-never used). For that case, we choose the larger of
vertical/horizontal scrollbar sizes.

This is in order to be able to realistically expose the scrollbar size
to CSS, see blocked bug.

We make RecomputeScrollbarParams the central place where each scrollbar
style decides its sizes, and make GetDPIRatioForScrollbarPart handle the
cocoa special-case of scaling to 1 or 2, but nothing else.

Differential Revision: https://phabricator.services.mozilla.com/D168080
2023-01-28 21:35:51 +00:00
Emilio Cobos Álvarez 4f1f5e7314 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 9807a6e6e8 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 3d82727505 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
Emilio Cobos Álvarez be6bc3a575 Bug 1802314 - Use non-native tooltips in the cocoa non-native theme too. r=spohl
We implemented a basic ThemeGeometry-based tooltip in
https://hg.mozilla.org/integration/autoland/rev/e8d65866112f, but now
that we have non-native theme support for these it seems ok to just use
it.

Differential Revision: https://phabricator.services.mozilla.com/D163023
2022-12-07 18:47:53 +00:00
Zach Hoffman 2079ccbe42 Bug 1803303 - Do not display input range tick marks that are step mismatches r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D163521
2022-12-02 16:48:40 +00:00
Zach Hoffman 6978315eec Bug 841942 - Display tick marks for <input type=range> when @list/<datalist> is used r=emilio,credential-management-reviewers,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D162882
2022-11-28 22:06:33 +00:00
Razvan Cojocaru 1629218702 Bug 1060421 - Change the type of [Int]PointTyped::[x|y] back to [Int]CoordTyped. r=botond
[Int]CoordTyped no longer inherits Units because otherwise
instances of [Int]IntPointTyped may get one Base subobject because
it inherits Units, and others because of BasePoint's Coord members,
which end up increasing the [Int]CoordTyped's objects size (since
according to the ISO C++ standard, different Base subobject are
required to have different addresses).

Differential Revision: https://phabricator.services.mozilla.com/D160713
2022-11-04 18:29:35 +00:00
Emilio Cobos Álvarez 6fa764c7d3 Bug 1796849 - Teach the non-native theme to draw tooltips. r=stransky
We haven't seen this with Adwaita because it uses dark tooltips in both
light and dark mode, so stuff kinda worked out in the end.

Differential Revision: https://phabricator.services.mozilla.com/D159966
2022-10-24 09:05:31 +00:00
Emilio Cobos Álvarez f4b0644e06 Bug 1793700 - follow-up: Make color control styling match Chromium. r=TYLin
The previous patch made me realize that we have this widget-imposed size
for color controls which doesn't match any other browser. This patch
removes it.

I don't feel strongly whether we should land this other than "it matches
other browsers, and removes a special case from Gecko". Behavior might
be simpler to understand for authors this way.

Differential Revision: https://phabricator.services.mozilla.com/D158620
2022-10-05 21:32:59 +00:00
Emilio Cobos Álvarez 2414af9244 Bug 1793689 - Make GetMinimumWidgetSize work properly on non-XUL flexbox. r=TYLin,layout-reviewers
The XUL behavior in nsBox.cpp is fairly different to what the non-XUL
layout code paths do. In particular, canOverride=false means that the
min-{width,height} properties cannot go under the min widget size of the
widget, but that doesn't mean that intrinsic sizes don't affect the
final size of the widget.

This is very visible if you turn on flex emulation on Windows or macOS,
where the toolbar has an appearance that returns
width=0,height=N,canOverride=false.

With flex emulation we'd collapse the item to be zero-width, which is
not good at all.

The good thing is that this is no longer exposed to the web
(non-native-theme always returns canOverride=true), and our front-end
code doesn't seem to rely on this, so we can just remove support for
canOverride=false.

Differential Revision: https://phabricator.services.mozilla.com/D158608
2022-10-05 19:09:29 +00:00
Emilio Cobos Álvarez 99570efc5b Bug 1790670 - Fix color of high-contrast checkboxes. r=morgan
This restores behavior from before my patch, and makes it so that it's
easier to see which color pair ends up getting used.

Differential Revision: https://phabricator.services.mozilla.com/D157271
2022-09-14 23:14:30 +00:00
Emilio Cobos Álvarez a5c3cafe6f Bug 1784855 - Add basic support for drawing non-native appearance: menuitem items. r=stransky
This allows us to correctly draw items with mismatched color-scheme
on GTK.

This is a reasonably simple fix. A more elaborate fix could be not using
appearance to draw menuitems on Linux at all, just like we don't use it
to draw menupopups anymore. But in practice it's a bit harder because we
use it also to draw menubar items (which probably should be its own
appearance type instead). I can look into that, but this seems
reasonable for now.

Differential Revision: https://phabricator.services.mozilla.com/D154680
2022-08-16 09:48:07 +00:00
Emilio Cobos Álvarez f2dbdbfde7 Bug 1776592 - Make auto outline draw two differently-colored strokes instead of one. r=mstange
Behind a pref, just in case.

Differential Revision: https://phabricator.services.mozilla.com/D150466
2022-07-20 11:43:35 +00:00
criss b51dc963d5 Backed out changeset 99d1caaa88e2 (bug 1776592) for causing reftest failures on outline-auto-002.html. CLOSED TREE 2022-07-20 02:08:55 +03:00
Emilio Cobos Álvarez 63f146831e Bug 1776592 - Make auto outline draw two differently-colored strokes instead of one. r=mstange
Behind a pref, just in case.

Differential Revision: https://phabricator.services.mozilla.com/D150466
2022-07-19 21:53:45 +00:00
Emilio Cobos Álvarez 582414f8e7 Bug 1776858 - Cleanup and add some missing unit conversion methods. r=gfx-reviewers,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D150465
2022-06-28 18:52:19 +00:00
smolnar 4a5728f275 Backed out changeset d1e0b50deab6 (bug 1776858) for causing crashtest assertion failures in nsAlgorithm CLOSED TREE 2022-06-28 18:57:04 +03:00
Emilio Cobos Álvarez 7c1b8169a2 Bug 1776858 - Cleanup and add some missing unit conversion methods. r=gfx-reviewers,jrmuizel
This also makes stuff like `CSSPixel::ToAppUnits(<integer>)` not do
floating point math, which should be slightly faster.

Differential Revision: https://phabricator.services.mozilla.com/D150465
2022-06-28 13:26:02 +00:00