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

16872 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 530681a3d5 Bug 1708291 - Enable accent color in some tests. r=aryx
Tests switched to run with activated, Nightly-only preference.

Differential Revision: https://phabricator.services.mozilla.com/D114071
2021-05-03 13:47:16 +00:00
Xidorn Quan 083983b7f0 Bug 1708897 - Remove layout.css.ruby.position-alternate.enabled pref. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D114044
2021-05-02 03:27:50 +00:00
Csoregi Natalia a76b78d543 Backed out changeset e01ec8694924 (bug 1700957) as requested. CLOSED TREE 2021-04-28 18:09:01 +03:00
imoraru 29587fe8d1 Backed out changeset d3056dc50fe3 (bug 1707614) for causing devtools failures at browser_rules_colorpicker-release-outside-frame.js . CLOSED TREE 2021-04-28 16:08:31 +03:00
Emilio Cobos Álvarez 175fe1b124 Bug 1707614 - Don't use -moz-devtools-highlighted for background contrast checks in the accessibility inspector. r=nchevobbe
It's the wrong pseudo-class name! Plus, it's not really needed, just
override the page styles temporarily.

Remove the pseudo-class, since it's its only remaining usage.

Differential Revision: https://phabricator.services.mozilla.com/D113374
2021-04-28 10:01:23 +00:00
Emma Malysz ce84c86379 Bug 1700957, graduate browser.proton.doorhangers.enabled pref to main proton pref r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D110135
2021-04-28 03:17:56 +00:00
Emilio Cobos Álvarez 9402e09c63 Bug 1707895 - Make the -moz-toolbar-prefers-color-scheme a tri-state. r=mstriemer
This will allow detecting the system theme, which allows fixing some of
the blocked bugs.

Note that when using the system theme we will still match light or dark
appropriately, so this shouldn't change behavior just yet.

Differential Revision: https://phabricator.services.mozilla.com/D113516
2021-04-27 16:20:35 +00:00
Emilio Cobos Álvarez 34a9a0f457 Bug 1705605 - Implement accent-color in nsNativeBasicTheme. r=mstange
This is a new addition for CSS UI Level 4:

  https://drafts.csswg.org/css-ui-4/#widget-accent

I want to provide feedback on some spec issues, and thought it was a
kinda neat thing to prototype (it also makes testing contrast and such
with random GTK themes easier).

For now enable for Nightly only.

Differential Revision: https://phabricator.services.mozilla.com/D112312
2021-04-27 10:41:00 +00:00
Emilio Cobos Álvarez 38251f50b8 Bug 1707070 - Tweak text/number/search control anonymous tree DOM / paint order. r=dholbert
So that we hit-test the spinners even if they overlap with the editor
root's padding.

Differential Revision: https://phabricator.services.mozilla.com/D113251
2021-04-26 16:55:32 +00:00
Joel Maher 78eb68ea37 Bug 1703894 - s/requestIdleCallback/setTimeout/ for frequent OSX timeouts. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D112984
2021-04-21 19:50:34 +00:00
Emilio Cobos Álvarez 8e47e5abc2 Bug 1705877 - image-set() should influence intrinsic size of the image. r=dholbert,layout-reviewers
https://drafts.csswg.org/css-images-4/#image-set-notation has:

> [...] it also specifies the image’s natural resolution, overriding any other
> source of data that might supply a natural resolution.

Astounding that there was literally no WPT for this at all. I added three: one
for backgrounds, one for list-style-image, and one for `content`. Cursor is not
handled on this patch because that one requires a fair amount of extra work.

Differential Revision: https://phabricator.services.mozilla.com/D112474
2021-04-19 19:55:27 +00:00
Mark Striemer 209f987106 Bug 1701691 - -moz-toolbar-prefers-color-scheme for dark theme detection r=desktop-theme-reviewers,emilio,harry
This adds a new @media query -moz-toolbar-prefers-color-scheme which works like
prefers-color-scheme but is set based on the browser theme rather than the OS
theme. The background colour of the toolbar is used to determine the theme
dark/light preference. This will be used for in-content common.css pages and
other UI elements that include that stylesheet in the browser-chrome through
shadow DOM.

The end result is that about: pages, infobars, and modals will now "match" the
browser theme (just light/dark mode, not LWT theming support).

Differential Revision: https://phabricator.services.mozilla.com/D111486
2021-04-18 22:22:49 +00:00
Tom Schuster 0b5bbb2cf5 Bug 1695404 - follow-up: More tiny cleanup. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D112491
2021-04-18 19:30:26 +00:00
Emilio Cobos Álvarez dffb321319 Bug 1695404 - follow-up: Avoid redundant string copy in Gecko_IsSupportedImageMimeType. r=tnikkel
There's no reason to require a null-terminated string in imgLoader.

Differential Revision: https://phabricator.services.mozilla.com/D112478
2021-04-17 22:21:19 +00:00
Pierre TALLOTTE 6a6e08264c Bug 1695404 - Support the type() function in image-set. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D109201
2021-04-16 20:58:59 +00:00
Noemi Erli f90389736b Backed out changeset 1c9943dacbdb (bug 1701691) for causing failures in browser_toolbar_prefers_color_scheme.js CLOSED TREE 2021-04-16 05:29:10 +03:00
Emilio Cobos Álvarez b42ccb7de0 Bug 1705509 - Hide -moz-outline-radius behind a pref. r=mstange
This property does nothing since bug 315209 got implemented.

Every single user that I checked was doing the same math by hand, so
hooray for good defaults :-)

Differential Revision: https://phabricator.services.mozilla.com/D112253
2021-04-16 01:01:45 +00:00
Mark Striemer 53099a968e Bug 1701691 - -moz-toolbar-prefers-color-scheme for dark theme detection r=desktop-theme-reviewers,emilio,harry
This adds a new @media query -moz-toolbar-prefers-color-scheme which works like
prefers-color-scheme but is set based on the browser theme rather than the OS
theme. The background colour of the toolbar is used to determine the theme
dark/light preference. This will be used for in-content common.css pages and
other UI elements that include that stylesheet in the browser-chrome through
shadow DOM.

The end result is that about: pages, infobars, and modals will now "match" the
browser theme (just light/dark mode, not LWT theming support).

Differential Revision: https://phabricator.services.mozilla.com/D111486
2021-04-16 00:43:46 +00:00
Csoregi Natalia 5cfbff72cd Backed out changeset 79c1392f7c43 (bug 1701691) for failures on browser_toolbar_prefers_color_scheme.js. CLOSED TREE 2021-04-15 22:18:09 +03:00
Mark Striemer 67dde35bda Bug 1701691 - -moz-toolbar-prefers-color-scheme for dark theme detection r=desktop-theme-reviewers,emilio,harry
This adds a new @media query -moz-toolbar-prefers-color-scheme which works like
prefers-color-scheme but is set based on the browser theme rather than the OS
theme. The background colour of the toolbar is used to determine the theme
dark/light preference. This will be used for in-content common.css pages and
other UI elements that include that stylesheet in the browser-chrome through
shadow DOM.

The end result is that about: pages, infobars, and modals will now "match" the
browser theme (just light/dark mode, not LWT theming support).

Differential Revision: https://phabricator.services.mozilla.com/D111486
2021-04-15 18:17:07 +00:00
Emilio Cobos Álvarez 2bf7e6cfc9 Bug 1704179 - Add a CSS error to the console when using non-featureless :host selectors. r=boris
(which would never match by definition).

Differential Revision: https://phabricator.services.mozilla.com/D111610
2021-04-15 09:33:58 +00:00
Morgan Reschenberg 26ebc62e3a Bug 1705168: Enable forced-colors in UA and chrome always r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D112069
2021-04-14 21:33:11 +00:00
Emilio Cobos Álvarez 2d921c7e9c Bug 1704551 - Make nsMappedAttributes more similar to AttrArray. r=smaug
I need to use these from Rust to insert mapped attribute names in the
bloom filter, and this would save me handrolling even more bindings :)

Differential Revision: https://phabricator.services.mozilla.com/D111731
2021-04-13 10:53:40 +00:00
Mats Palmgren 2b3dbc5dc2 Bug 1696712 - [css-pseudo] Use 'white-space: pre' by default in ::marker. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D107359
2021-04-11 20:42:30 +00:00
Emilio Cobos Álvarez a4272ff381 Bug 1704332 - Move moz-control-character-visibility out of mako, and remove support for gecko_pref_controlled_initial_value. r=xidorn
No behavior change, just cleanup. Actually seem this technically _adds_ some code even
though it's a cleanup, but that's mostly because of the wrapping of the
derive list.  The resulting code is simpler (more in-line with our usual
things, so I think it's an improvement).

Differential Revision: https://phabricator.services.mozilla.com/D111551
2021-04-11 17:39:12 +00:00
Emilio Cobos Álvarez 97ec9ca623 Bug 1704332 - Remove various image-orientation related prefs. r=tnikkel
These shipped in 77.

Differential Revision: https://phabricator.services.mozilla.com/D111550
2021-04-11 17:39:12 +00:00
Mark Striemer fa48ebee58 Bug 1702330 - Remove -moz-proton-infobars media query support r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D110963
2021-04-11 17:28:02 +00:00
Emilio Cobos Álvarez 30483671c1 Bug 1703984 - Clean up text-justify, and make distribute a parse-time alias. r=xidorn
Since it's simpler, as discussed in the CSSWG issue.

Differential Revision: https://phabricator.services.mozilla.com/D111346
2021-04-10 03:45:51 +00:00
Marco Bonardo 2c982d3c01 Bug 1703274 - Enable Proton Urlbar. r=jaws,extension-reviewers,zombie,rpl
Differential Revision: https://phabricator.services.mozilla.com/D110998
2021-04-09 18:20:21 +00:00
Dorel Luca 7c6d9844e5 Backed out 8 changesets (bug 1702330)for Browser-chrome failures in est/popups/browser_popup_blocker.js. CLOSED TREE
Backed out changeset b81511f8e157 (bug 1702330)
Backed out changeset 15f60f1d3f14 (bug 1702330)
Backed out changeset 809af1f94b4b (bug 1702330)
Backed out changeset 63cec3eadb4f (bug 1702330)
Backed out changeset b9964fb4dd70 (bug 1702330)
Backed out changeset 1e5ccb47056e (bug 1702330)
Backed out changeset 65faaeeb2339 (bug 1702330)
Backed out changeset e72fb8b52609 (bug 1702330)
2021-04-09 20:21:35 +03:00
Mark Striemer 7f49e59cfb Bug 1702330 - Remove -moz-proton-infobars media query support r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D110963
2021-04-09 15:26:25 +00:00
Cosmin Sabou 13826a4c50 Backed out changeset bd396182f84a (bug 1703274) for causing wpt failures on shape-outside-shape-arguments-000.html. CLOSED TREE 2021-04-09 17:51:48 +03:00
Marco Bonardo af19ef5dc4 Bug 1703274 - Enable Proton Urlbar. r=jaws,extension-reviewers,zombie,rpl
Differential Revision: https://phabricator.services.mozilla.com/D110998
2021-04-09 11:05:17 +00:00
Alexandru Michis b40e464292 Backed out 5 changesets (bug 1702330) for causing failures in browser_aboutNewTab_defaultBrowserNotification.js
CLOSED TREE

Backed out changeset 365fd1bb6dde (bug 1702330)
Backed out changeset eba73c72be18 (bug 1702330)
Backed out changeset e1277c21543f (bug 1702330)
Backed out changeset 907e4fcda266 (bug 1702330)
Backed out changeset eb2a8569ed02 (bug 1702330)
2021-04-09 03:34:23 +03:00
Mark Striemer 77be5a8d55 Bug 1702330 - Remove -moz-proton-infobars media query support r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D110963
2021-04-08 22:25:05 +00:00
Hiroyuki Ikezoe b22b1a8297 Bug 1703420 - Use SpecialPowers.spawnChrome to query the top level content document's location to run the test on Fission+XOrig. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D111026
2021-04-07 01:27:29 +00:00
Hubert Boma Manilla 7f97d78756 Bug 1638259 - Notify devtools when style resources blocked on CSP r=necko-reviewers,valentin,emilio
Differential Revision: https://phabricator.services.mozilla.com/D102599
2021-04-06 22:40:26 +00:00
Jonathan Kew 87da9bf675 Bug 1694123 - Pass userfont source index to font loader and decoder tasks, to avoid potential race with the field in the gfxUserFontEntry being reset on the main thread. r=layout-reviewers,emilio
This is a preliminary step that is needed in order for the following patch to be safe. (It's
mostly just plumbing, although the patch looks big because we need to pass the index through
so many functions.)

The issue is that loading a font resource involves a couple of tasks that happen asynchronously -
fetching the data from the network, and decoding/sanitizing the font data. We have an implicit
assumption that once a font load has been initiated, the state of the associated gfxUserFontEntry
will not change; in particular, we depend on mSrcIndex remaining constant, because we may use it
to index into the mSrcList array and access the gfxFontFaceSrc record again in the various
completion tasks that are executed after the async steps finish.

But the following patch breaks this assumption, because it may reset mSrcIndex at arbitrary times
when we discover that we need to re-resolve the @font-face to potentially recognize a src:local()
resource that was earlier in the list, but was previously unavailable. If this happens while
a font-load is doing its off-main-thread work, then when it completes, it will end up accessing
the wrong gfxFontFaceSrc record, which would result at least in incorrect behavior, but can also
result in a crash (e.g. if the record is of the wrong type altogether, such as trying to use the
principal or URI fields from a record of type src:local).

To avoid this problem, we should pass the source index at the time the font load is initiated
through to the OMT tasks and back to their main-thread completion routines, so that we do not
depend on the field in the gfxUserFontEntry remaining frozen. This makes the loading process
safe even if the source index in the entry gets reset while loading tasks are in progress.

Differential Revision: https://phabricator.services.mozilla.com/D110911
2021-04-06 16:23:17 +00:00
Emilio Cobos Álvarez 41920e2eaf Bug 1703018 - Remove now unused variable which causes gcc to complain.
MANUAL PUSH: Base toolchains bustage CLOSED TREE
2021-04-06 14:01:39 +02:00
Emilio Cobos Álvarez 7a2c22ce65 Bug 1703018 - Reduce boilerplate needed to add system-metric media features. r=boris
There's no reason we can't just query LookAndFeel and we need to use
sSystemMetrics. In the past, LookAndFeel queries were not cached, but
this is no longer the case, so perf wise should be pretty equivalent.

Note that we don't need the NS_SUCCEEDED checks because the default
value from GetInt if the platform doesn't support it is 0 anyways.

Differential Revision: https://phabricator.services.mozilla.com/D110805
2021-04-06 09:55:01 +00:00
Emilio Cobos Álvarez 5ddee7313f Bug 1698132 - Convert proton pref checks from @supports rules to media features. r=Gijs
This means that dynamic changes will be handled correctly, we can use
StaticPrefs, etc.

Differential Revision: https://phabricator.services.mozilla.com/D110816
2021-04-05 20:48:05 +00:00
Timothy Nikkel 6420ad52a1 Bug 1700535. Make textareas inline block by default. r=emilio
This matches Chrome and Safari, as well as what we do for all other <input>s.

<input>s were changed to inline block in 1539469 with a couple of font inflation reftests marked as failing to follow up on. https://hg.mozilla.org/mozilla-central/rev/a1201db1b8cc is the follow up which made inputs not be font inflation containers. The same change for textarea fixes similar reftest failures for textarea. I read through the commit message for the change and doing the same for textareas seems to make sense but I don't understand it in detail.

Differential Revision: https://phabricator.services.mozilla.com/D109603
2021-04-02 23:34:47 +00:00
Emilio Cobos Álvarez ad97f9755b Bug 1702676 - Fix PreferenceSheet colors, which I forgot to push phab.
MANUAL PUSH: Orange CLOSED TREE
2021-04-02 17:23:12 +02:00
Emilio Cobos Álvarez 390c6943fe Bug 1702676 - Change public LookAndFeel API to accept a color scheme. r=mstange
This shouldn't change behavior, but is the biggest cross-platform part
of the change so I'd like to get it landed sooner rather than later.

The two calls like:

  GetColor(ColorID::TextSelectBackground, color);
  if (color == 0x000000) {
    mColorTextSelectForeground = NS_RGB(0xff, 0xff, 0xff);
  } else {
    mColorTextSelectForeground = NS_DONT_CHANGE_COLOR;
  }

that I'm removing are just broken. They were calling the version of
GetColor the function that took a default value when the color wasn't
available, not the version of the color with the outparam.

To prevent such mistakes, add two signatures, GetColor(), returning a
Maybe<nscolor> and Color(), returning a color with a fallback.

Differential Revision: https://phabricator.services.mozilla.com/D110651
2021-04-02 12:22:14 +00:00
Narcis Beleuzu e9fb777466 Backed out changeset 597b9606c3ca (bug 1702676) for reftest failures on mq_prefers_reduced_motion_reduce.html CLOSED TREE 2021-04-02 09:34:53 +03:00
Emilio Cobos Álvarez f7f84a3c53 Bug 1702676 - Change public LookAndFeel API to accept a color scheme. r=mstange
This shouldn't change behavior, but is the biggest cross-platform part
of the change so I'd like to get it landed sooner rather than later.

The two calls like:

  GetColor(ColorID::TextSelectBackground, color);
  if (color == 0x000000) {
    mColorTextSelectForeground = NS_RGB(0xff, 0xff, 0xff);
  } else {
    mColorTextSelectForeground = NS_DONT_CHANGE_COLOR;
  }

that I'm removing are just broken. They were calling the version of
GetColor the function that took a default value when the color wasn't
available, not the version of the color with the outparam.

To prevent such mistakes, add two signatures, GetColor(), returning a
Maybe<nscolor> and Color(), returning a color with a fallback.

Differential Revision: https://phabricator.services.mozilla.com/D110651
2021-04-02 00:21:37 +00:00
Daniel Holbert 0414682ea1 Bug 1701510: Zero out the 'body' margin for all ImageDocuments (including iframes and printed images). r=emilio
This makes us match Blink and WebKit on how to render an iframe whose src
attribute is an image URL.  They seem to have always used 0 margin in this
case, and this seems preferable from an author's perspective (since the
standard HTML-body margin feels kind of arbitrary, when viewing an image).

Note that this change does also mean that images will be slightly closer to the
upper-left of the page, if they're viewed directly and then printed.  This
shouldn't cause them to be clipped or cause other issues; they'll still be
offset from the page edge by the printed-page margins, as well as any
unprintable areas that we get from the printer.

Differential Revision: https://phabricator.services.mozilla.com/D110294
2021-04-01 00:24:10 +00:00
Neil Deakin f625b71d78 Bug 1700148, add an appearance type that forces a dropshadow on menus on Windows, and uses SetWindowRgn to clip the popup to the border radius, r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D109833
2021-04-01 00:13:09 +00:00
Darryl Pogue 42ac005810 Bug 1350237 - Make dialog display:block r=sefeng
Differential Revision: https://phabricator.services.mozilla.com/D110359
2021-03-31 16:12:31 +00:00
Emilio Cobos Álvarez 35b619041a Bug 1701792 - Also use standins for graytext with the non-native theme, as it's used for disabled controls. r=mstange
Also remove a fixed FIXME comment, while I was going through the select code to
fix browser_selectpopup_colors.

Differential Revision: https://phabricator.services.mozilla.com/D110154
2021-03-30 04:24:40 +00:00
Brindusan Cristian 4f9ae2ef76 Backed out changeset d73cfa170fae (bug 1701792) for bc failures in browser_selectpopup_colors.js. CLOSED TREE 2021-03-30 01:17:10 +03:00
Jonathan Kew 39edce2d71 Bug 1698495 - Implement size-adjust font scaling in gfx/thebes font code. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D110024
2021-03-29 21:14:44 +00:00
Jonathan Kew 34a857b6a8 Bug 1698495 - Add webidl support for size-adjust. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D110023
2021-03-29 21:14:43 +00:00
Jonathan Kew 5357cb0d41 Bug 1698495 - Add the size-adjust descriptor to the style system. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D110022
2021-03-29 21:14:43 +00:00
Emilio Cobos Álvarez 151f69c371 Bug 1701792 - Also use standins for graytext with the non-native theme, as it's used for disabled controls. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D110154
2021-03-29 21:07:09 +00:00
Mark Striemer 81479b1262 Bug 1699250 - Use proton dark theme in-content r=jaws
This also fixes up various about pages.

Differential Revision: https://phabricator.services.mozilla.com/D108800
2021-03-28 18:33:05 +00:00
Butkovits Atila 71d46d5a75 Backed out 2 changesets (bug 1690333, bug 1699250) for causing failures on test_bug509732.xhtml. CLOSED TREE
Backed out changeset dcba2814dbc4 (bug 1690333)
Backed out changeset ae3a0e6dde00 (bug 1699250)
2021-03-28 21:16:58 +03:00
Mark Striemer 5c54a9a003 Bug 1699250 - Use proton dark theme in-content r=jaws
This also fixes up various about pages.

Differential Revision: https://phabricator.services.mozilla.com/D108800
2021-03-28 17:02:20 +00:00
Bogdan Tara 3b463ca0d1 Backed out changeset 421e6e333309 (bug 1699250) for browser_html_discover_view_clientid.js mochitest failures
DONTBUILD
2021-03-28 02:37:33 +02:00
Mark Striemer 3d91b0c5fb Bug 1699250 - Use proton dark theme in-content r=jaws
This also fixes up various about pages.

Differential Revision: https://phabricator.services.mozilla.com/D108800
2021-03-27 23:31:07 +00:00
Cosmin Sabou 4618d0a607 Backed out 2 changesets (bug 1690333, bug 1699250) for mochitest failures on test_notificationbox.xhtml.
Backed out changeset d6780d34ca05 (bug 1690333)
Backed out changeset 50cc5db86f1e (bug 1699250)
2021-03-27 23:58:04 +02:00
Mark Striemer d4b82a8583 Bug 1699250 - Use proton dark theme in-content r=jaws
This also fixes up various about pages.

Differential Revision: https://phabricator.services.mozilla.com/D108800
2021-03-27 21:02:50 +00:00
Simon Giesecke 760cc7e936 Bug 1679522 - Fix include directives and forward declarations. r=andi,necko-reviewers,jgilbert
- Add missing include directives and forward declarations.
- Remove some extra include directives.
- Add missing namespace qualifications.
- Move include directives out of namespace in toolkit/xre/GlobalSemaphore.h

Differential Revision: https://phabricator.services.mozilla.com/D98894
2021-03-25 10:19:44 +00:00
Emilio Cobos Álvarez f91affad79 Bug 1699088 - Use a single system font definition rather than two. r=cmartin
Follow the pattern we use for system colors.

Differential Revision: https://phabricator.services.mozilla.com/D108822
2021-03-24 22:57:37 +00:00
Simon Giesecke cc730d05dd Bug 1184468 - Use nsTHashtable::Keys where possible. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D108588
2021-03-24 17:56:50 +00:00
Simon Giesecke 613e20d136 Bug 1184468 - Use nsBaseHashtable::Values. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D108587
2021-03-24 17:56:49 +00:00
Simon Giesecke 628cc55f22 Bug 708901 - Migrate to nsTHashSet in layout. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D108597
2021-03-24 17:56:46 +00:00
Simon Giesecke 4803e61816 Bug 708901 - Migrate to nsTHashSet in dom/base. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D108593
2021-03-24 17:56:46 +00:00
Csoregi Natalia f54ee076ae Backed out 13 changesets (bug 708901, bug 1184468) for causing build bustage on GeckoViewHistory.cpp. CLOSED TREE
Backed out changeset b1e4c01e63b8 (bug 708901)
Backed out changeset 37b52cce83c0 (bug 708901)
Backed out changeset eee75f33f060 (bug 708901)
Backed out changeset 479bf64c7986 (bug 708901)
Backed out changeset 15a8fb94d15d (bug 708901)
Backed out changeset be31ccd9a61d (bug 708901)
Backed out changeset fc54f4eaedd5 (bug 708901)
Backed out changeset 03c3a56c3d13 (bug 708901)
Backed out changeset 73f11d3c1298 (bug 708901)
Backed out changeset aed22fd80893 (bug 708901)
Backed out changeset 74d8249fbe7e (bug 708901)
Backed out changeset acb725eb3c1d (bug 1184468)
Backed out changeset 70f3ea6efec4 (bug 1184468)
2021-03-24 19:26:20 +02:00
Simon Giesecke c73f87b72b Bug 708901 - Migrate to nsTHashSet in layout. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D108597
2021-03-24 16:58:58 +00:00
Simon Giesecke 82e566bfca Bug 708901 - Migrate to nsTHashSet in dom/base. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D108593
2021-03-24 16:58:58 +00:00
Emilio Cobos Álvarez 8b97179d90 Bug 1700472 - Remove -moz-scrolled-page-sequence. r=dholbert
This is needed for bug 1700379, because otherwise we create a reference
frame with the root's scrolled content (the
::-moz-scrolled-page-sequence), and that breaks some display list
invariants.

Always create a canvas frame instead, (doesn't matter when printing
since we print off the page sequence frame directly), and create a
single ::-moz-page-sequence box.

We have to add width: 100% to the UA sheet because we don't get it
automatically set to the scrollport size to by the scrollport anymore.
Otherwise this would regress vertical writing-modes.

Differential Revision: https://phabricator.services.mozilla.com/D109512
2021-03-24 11:21:14 +00:00
Butkovits Atila 6cc3507063 Backed out 3 changesets (bug 1700472) for causing reftest failures.
Backed out changeset df4d74e9669f (bug 1700472)
Backed out changeset ec476bf43984 (bug 1700472)
Backed out changeset 168b31448423 (bug 1700472)
2021-03-24 03:12:44 +02:00
Emilio Cobos Álvarez 966d0f4dfc Bug 1700472 - Remove -moz-scrolled-page-sequence. r=dholbert
This is needed for bug 1700379, because otherwise we create a reference
frame with the root's scrolled content (the
::-moz-scrolled-page-sequence), and that breaks some display list
invariants.

Always create a canvas frame instead, (doesn't matter when printing
since we print off the page sequence frame directly), and create a
single ::-moz-page-sequence box.

Differential Revision: https://phabricator.services.mozilla.com/D109512
2021-03-23 22:31:08 +00:00
Jonathan Kew 6aa01e5aa4 Bug 1681691 - Add support for metrics overrides to gfxUserFontEntry, dom::FontFace, etc r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D109289
2021-03-23 17:10:24 +00:00
Jonathan Kew fc722045b9 Bug 1681691 - Add metrics override descriptors to webidl. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D109288
2021-03-23 17:10:23 +00:00
Jonathan Kew 8b75657e88 Bug 1681691 - Add ascent-, descent- and line-gap-override descriptors to the style system. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D109287
2021-03-23 17:10:22 +00:00
Simon Giesecke e5674e128d Bug 708901 - Add nsTHashSet. r=xpcom-reviewers,nika
Depends on D109276

Differential Revision: https://phabricator.services.mozilla.com/D107684
2021-03-23 10:36:31 +00:00
smolnar 03eae2c9a5 Backed out 8 changesets (bug 1681691) for causing wpt failures in idlharness.https.html. CLOSED TREE
Backed out changeset dda736a69ceb (bug 1681691)
Backed out changeset 64edecd0df6f (bug 1681691)
Backed out changeset a19844063d00 (bug 1681691)
Backed out changeset 5dd06c73f703 (bug 1681691)
Backed out changeset 1bc4081f95e4 (bug 1681691)
Backed out changeset e7887dc9a3c6 (bug 1681691)
Backed out changeset d9b488c09c23 (bug 1681691)
Backed out changeset b45b607fee4d (bug 1681691)
2021-03-23 12:00:39 +02:00
Jonathan Kew 31e403716c Bug 1681691 - Add support for metrics overrides to gfxUserFontEntry, dom::FontFace, etc r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D109289
2021-03-23 08:37:07 +00:00
Jonathan Kew a7442dc478 Bug 1681691 - Add metrics override descriptors to webidl. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D109288
2021-03-23 08:37:07 +00:00
Jonathan Kew 9c70dc7340 Bug 1681691 - Add ascent-, descent- and line-gap-override descriptors to the style system. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D109287
2021-03-23 08:37:06 +00:00
Kagami Sascha Rosylight dc1c69954e Bug 1697829 - Part 2: Make sure mRelevantGlobal exists for constructed stylesheets r=emilio
Depends on D108873

Differential Revision: https://phabricator.services.mozilla.com/D109398
2021-03-22 21:15:34 +00:00
Kagami Sascha Rosylight ae57171286 Bug 1697829 - Part 1: Get relevant global for disassociated CSS rule objects r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D108873
2021-03-22 21:15:34 +00:00
Emily McDonough 44fd9a31e7 Bug 1647845 Part 2 - Add page-size attribute to nsStyleStruct and property parsing r=emilio
This parsing is hidden behind the pref layout.css.page-size.enabled.

It isn't ideal that we parse this as a property, but we can't treat it as a
descriptor because of compatibility issues with other browsers. There are also
outstanding spec issues related to how descriptors like page-size are cascaded,
and whether the !important specifier is valid or not.

Differential Revision: https://phabricator.services.mozilla.com/D103958
2021-03-22 19:08:59 +00:00
Emily McDonough 2af314b97a Bug 1647845 Part 1 - Ignore any properties which aren't valid for a style rule when generating CSS2Properties and testing properties r=emilio
To know the valid rules for each property, we need to put this information
into the Servo prop list and add an appropriate getter to Longhand/Shorthand.

Differential Revision: https://phabricator.services.mozilla.com/D105825
2021-03-22 19:08:59 +00:00
Cosmin Sabou 193a73a5ea Backed out 10 changesets (bug 1681691) for wpt failures on fontface-override-descriptor-getter-setter.sub.html and idlharness.https.html. CLOSED TREE
Backed out changeset e43fba82fb31 (bug 1681691)
Backed out changeset 104675869016 (bug 1681691)
Backed out changeset 536bbc4b9ecd (bug 1681691)
Backed out changeset bb53155c3dd0 (bug 1681691)
Backed out changeset 9f9c3c13801a (bug 1681691)
Backed out changeset af79bc7f7919 (bug 1681691)
Backed out changeset e86d980f511e (bug 1681691)
Backed out changeset 12418707741d (bug 1681691)
Backed out changeset 8d5c2106a2b4 (bug 1681691)
Backed out changeset 4805e23e62d2 (bug 1681691)
2021-03-22 20:37:38 +02:00
Florian Quèze 8ad1e5d0aa Bug 1699742 - Remove MOZ_GECKO_PROFILER ifdefs that are no longer needed, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D109078
2021-03-22 16:29:52 +00:00
Jonathan Kew 9c404e3453 Bug 1681691 - Add support for metrics overrides to gfxUserFontEntry, dom::FontFace, etc r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D109289
2021-03-22 15:40:54 +00:00
Jonathan Kew c7f2ecd67e Bug 1681691 - Add metrics override descriptors to webidl. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D109288
2021-03-22 15:40:53 +00:00
Jonathan Kew cd80bce521 Bug 1681691 - Add ascent-, descent- and line-gap-override descriptors to the style system. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D109287
2021-03-22 15:40:52 +00:00
Butkovits Atila cfce9044e0 Backed out 2 changesets (bug 1647845) for causing build bustages. CLOSED TREE
Backed out changeset 8822a2e578f2 (bug 1647845)
Backed out changeset 5a44095128e0 (bug 1647845)
2021-03-19 01:07:18 +02:00
Emily McDonough d75c4dc4be Bug 1647845 Part 2 - Add page-size attribute to nsStyleStruct and property parsing r=emilio
This parsing is hidden behind the pref layout.css.page-size.enabled.

It isn't ideal that we parse this as a property, but we can't treat it as a
descriptor because of compatibility issues with other browsers. There are also
outstanding spec issues related to how descriptors like page-size are cascaded,
and whether the !important specifier is valid or not.

Differential Revision: https://phabricator.services.mozilla.com/D103958
2021-03-18 22:26:24 +00:00
Emily McDonough ceb69cd8fa Bug 1647845 Part 1 - Ignore any properties which aren't valid for a style rule when generating CSS2Properties and testing properties r=emilio
To know the valid rules for each property, we need to put this information
into the Servo prop list and add an appropriate getter to Longhand/Shorthand.

Differential Revision: https://phabricator.services.mozilla.com/D105825
2021-03-18 22:26:24 +00:00
Nika Layzell c733984c4b Bug 1675820 - Part 6: Make DocGroup cycle-collected, r=farre,smaug
Previously, the DocGroup type was not cycle-collected, as it needed to have
references from other threads for Quantum DOM. Nowadays the only off-main-thread
use of DocGroup is for dispatching runnables to the main thread which should be
tracked using a performance counter for about:performance. This means we can
remove the DocGroup references from these dispatching callsites, only storing
the Performance Counter we're interested in, and simplify make DocGroup be
cycle-collected itself.

This fixes a leak caused by adding the WindowGlobalChild getter to
WindowContext, by allowing cycles between the document and its BrowsingContext
to be broken by the cycle-collector.

Differential Revision: https://phabricator.services.mozilla.com/D108865
2021-03-18 19:24:50 +00:00
Markus Stange e3927f3261 Bug 1697338 - Remove unused -moz-default-appearance values -moz-mac-vibrancy-light/dark, and the system colors of the same name. r=emilio
Starting with macOS 10.14, the generic light/dark vibrancy is deprecated, and semantic vibrancy names are preferred.
If we ever need more vibrancy, we can add new values with semantic names.

Depends on D107910

Differential Revision: https://phabricator.services.mozilla.com/D108152
2021-03-17 16:50:08 +00:00
Daniel Holbert fcfcc2e0e2 Bug 1699031: Switch to use wrapper-API GetCrossDocParentFrameInProcess() in ImageLoader.cpp. r=tnikkel
This patch doesn't change behavior; it's just switching us between two
functions that do the same thing. (One is literally a trivial wrapper for the
other.)

We're using the new "InProcess" version of this API as a way of annotating
callsites that have been vetted as behaving properly in out-of-process iframes.

The code here, InvalidateImages, is walking up an invalidated image's
ancestor-chain, to invalidate any rendering observers of those ancestors. It's
OK that this walk will stop at the process boundary, because we don't support
rendering observers for cross-origin out-of-process content anyway.

Differential Revision: https://phabricator.services.mozilla.com/D108739
2021-03-17 16:11:17 +00:00
Simon Giesecke 6f936dd483 Bug 1695162 - Use ConstIter instead of Iter where possible. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D106643
2021-03-17 15:49:46 +00:00
Simon Giesecke b9621d6376 Bug 1695162 - Use range-based for instead of custom hashtable iterators. r=xpcom-reviewers,kmag
Differential Revision: https://phabricator.services.mozilla.com/D108585
2021-03-17 15:49:46 +00:00
Emilio Cobos Álvarez 76502ee6b0 Bug 1698477 - Prevent spin buttons from creating overflow. r=dholbert
This matches pre-existing behavior.

Differential Revision: https://phabricator.services.mozilla.com/D108608
2021-03-16 22:08:48 +00:00
Noemi Erli b4700b1965 Backed out 2 changesets (bug 1647845) for causing assertions in nsStyleStruct.cpp CLOSED TREE
Backed out changeset 1564d93002de (bug 1647845)
Backed out changeset bc1815fb4405 (bug 1647845)
2021-03-16 23:01:50 +02:00
Emily McDonough 626bdb9278 Bug 1647845 Part 2 - Add page-size attribute to nsStyleStruct and property parsing r=emilio
This parsing is hidden behind the pref layout.css.page-size.enabled.

It isn't ideal that we parse this as a property, but we can't treat it as a
descriptor because of compatibility issues with other browsers. There are also
outstanding spec issues related to how descriptors like page-size are cascaded,
and whether the !important specifier is valid or not.

Differential Revision: https://phabricator.services.mozilla.com/D103958
2021-03-16 19:54:27 +00:00
Emily McDonough 6f8201b62d Bug 1647845 Part 1 - Ignore any properties which aren't valid for a style rule when generating CSS2Properties and testing properties r=emilio
To know the valid rules for each property, we need to put this information
into the Servo prop list and add an appropriate getter to Longhand/Shorthand.

Differential Revision: https://phabricator.services.mozilla.com/D105825
2021-03-16 19:54:27 +00:00
Emilio Cobos Alvarez ab368a8926 Bug 1698284 - Make the non-native theme not use system colors if we're not overriding the pages' colors. r=morgan
This prevents contrast issues with high contrast themes when the page only
specifies some of the colors (which is an issue which we have historically
had on GTK with dark themes for a long time).

Feel free to push back on this if you prefer this, as on GTK we force a light
theme on content anyways, but this is a problem on windows for users that use a
high contrast theme but allow pages to override colors.

Differential Revision: https://phabricator.services.mozilla.com/D108324
2021-03-16 16:46:05 +00:00
Simon Giesecke 6d20ce283e Bug 1698752 - Fix binding generation for hashtables after hashtable refactoring. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D108583
2021-03-16 10:15:32 +00:00
Chris Peterson 684432f301 Bug 1571631 - Replace MOZ_MUST_USE with [[nodiscard]] in layout/style/SharedStyleSheetCache.h. r=emilio
MOZ_MUST_USE was replaced with [[nodiscard]] in layout in bug 1625855, but some new uses of MOZ_MUST_USE instead of [[nodiscard]] have crept back in.

Differential Revision: https://phabricator.services.mozilla.com/D108342
2021-03-16 04:36:45 +00:00
Emilio Cobos Álvarez 5e0e37888a Bug 1698318 - Restrict a CSS hack to the windows native theme. r=mstange
Noticed this while working on bug 1698043.

Differential Revision: https://phabricator.services.mozilla.com/D108339
2021-03-15 21:05:50 +00:00
Emilio Cobos Álvarez 678b10493d Bug 1698315 - Manage placeholder and autofill preview visibility using CSS rather than custom code. r=masayuki
Should be much simpler and doesn't need to deal with the different
stuff. We already have pseudo-classes for this, :autofill and
:placeholder-shown.

I initially wrote this because this is the only limitation that forces
us to have the placeholder text as a direct child of the text control
frame. In the end I kept that as-is, but this simplification is still
worth it.

We remove dom.placeholder.show_on_focus because it doesn't behave
correctly (it doesn't match the :placeholder-shown pseudo-class and it
should). It was introduced in bug 807613 and never turned to false by
default. I suspect nobody will miss this, but if somebody complains
about it we can reintroduce it properly (handling the pref in DOM
instead, changing the right state bits).

Differential Revision: https://phabricator.services.mozilla.com/D108304
2021-03-15 08:52:43 +00:00
Emilio Cobos Álvarez 9cec29125b Bug 1698043 - Simplify <input type=number/search> layout to fix this bug and make ::-moz-complex-control-wrapper unnecessary. r=dholbert
This should be a simpler setup. We keep every element being a direct
anon child of the text control, and special case the reflow of the
spinners / clear button, to subtract that size from the other elements.

This fixes the bug by ensuring that the editor and placeholder are sized
and positioned in exactly the same way.

Differential Revision: https://phabricator.services.mozilla.com/D108305
2021-03-14 07:53:13 +00:00
Butkovits Atila f564d3679e Backed out changeset 2bc9ef937528 (bug 1698043) for causing failures on search-with-value.html. CLOSED TREE 2021-03-14 06:42:25 +02:00
Emilio Cobos Álvarez ceed5b80ff Bug 1698043 - Simplify <input type=number/search> layout to fix this bug and make ::-moz-complex-control-wrapper unnecessary. r=dholbert
This should be a simpler setup. We keep every element being a direct
anon child of the text control, and special case the reflow of the
spinners / clear button, to subtract that size from the other elements.

This fixes the bug by ensuring that the editor and placeholder are sized
and positioned in exactly the same way.

Differential Revision: https://phabricator.services.mozilla.com/D108305
2021-03-14 02:35:49 +00:00
Emilio Cobos Álvarez 874e31c45f Bug 1697467 - Fix a typo, I don't know how to boolean.
MANUAL PUSH: Orange in a CLOSED TREE.
2021-03-12 17:25:24 +01:00
Emilio Cobos Álvarez d3efd5b95c Bug 1697467 - Don't use standins for non native theme when the document uses high contrast. r=mstange
As in that case we will actually use system colors.

Depends on D107863

Differential Revision: https://phabricator.services.mozilla.com/D107864
2021-03-12 14:44:13 +00:00
Agi Sferro c72e62a54d Bug 1694481 - Don't use androidBridge to determine if we're on Android. r=whimboo,hiro
androidBridge is an implementation detail that we want to eventually remove.

Differential Revision: https://phabricator.services.mozilla.com/D106175
2021-03-10 22:43:05 +00:00
Emilio Cobos Álvarez a3e653759b Bug 1696447 - Share CascadeData instances across ShadowRoots. r=boris
This should be both a memory and speed win for pages using a lot of
Shadow DOM.

In order to make the cache properly work we need to start keying media query
results on the actual StyleSheetContents, as that's what we share on Gecko, but
that should all be fine.

Differential Revision: https://phabricator.services.mozilla.com/D107266
2021-03-10 12:34:09 +00:00
Simon Giesecke ad01a10a3b Bug 1634281 - Use nsTHashMap instead of nsDataHashtable. r=xpcom-reviewers,necko-reviewers,jgilbert,nika,valentin
Note that this patch only transforms the use of the nsDataHashtable type alias
to a directly equivalent use of nsTHashMap. It does not change the specification
of the hash key type to make use of the key class deduction that nsTHashMap
allows for in some cases. That can be done in a separate step, but requires more
attention.

Differential Revision: https://phabricator.services.mozilla.com/D106008
2021-03-10 10:47:47 +00:00
Xidorn Quan 943f2f5041 Bug 1694748 part 3 - Enable ruby-position: alternate by default. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D107384
2021-03-10 10:46:15 +00:00
Xidorn Quan 7427d420ad Bug 1694748 part 1 - Support parsing ruby-position: alternate. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D107382
2021-03-10 10:46:14 +00:00
Morgan Reschenberg e0b192a05f Bug 1694717: Add probes to log foreground and background colors when HCM is on r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D107563
2021-03-09 22:31:32 +00:00
Micah Tigley 1fd9e9b229 Bug 1695403 - Support image-set in the content property. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D107397
2021-03-08 23:27:49 +00:00
Emilio Cobos Álvarez 15ccc7ae4e Bug 1696434 - Address spec changes re. color-mix. r=boris,desktop-theme-reviewers
It was clarified that the percentages are weights, and two weights are
now allowed. Missing percentages are computed as 100% - the other or
50%. Other than that, commas are required etc, which is good since
that's how I implemented it originally.

Differential Revision: https://phabricator.services.mozilla.com/D107295
2021-03-05 02:30:23 +00:00
Kagami Sascha Rosylight a9417a719e Bug 1360715 - Part 2: Modify instanceofs in tests to non-cross-context r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D106662
2021-03-04 22:03:57 +00:00
Brindusan Cristian b926d96be6 Backed out 3 changesets (bug 1360715) for mochitest failures at test_WebCrypto.html. CLOSED TREE
Backed out changeset b4a14c42313d (bug 1360715)
Backed out changeset 0e4b1b65fcbe (bug 1360715)
Backed out changeset fb8b9841d82b (bug 1360715)
2021-03-04 21:15:16 +02:00
Kagami Sascha Rosylight 73ec445d30 Bug 1360715 - Part 2: Modify instanceofs in tests to non-cross-context r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D106662
2021-03-04 15:05:26 +00:00
Micah Tigley 99ac1f352b Bug 1695402 - Support image-set() on the cursor property. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D106745
2021-03-03 18:34:46 +00:00
Csoregi Natalia de702c9eb1 Backed out changeset 78567f53575e (bug 1695402) for failures on test_css-properties-db.js. CLOSED TREE 2021-03-03 19:54:08 +02:00
Micah Tigley dee15c3162 Bug 1695402 - Support image-set() on the cursor property. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D106745
2021-03-03 16:34:39 +00:00
Simon Giesecke b5855b89fc Bug 1634281 - Remove unused nsDataHashtable.h includes. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D106007
2021-03-03 08:58:52 +00:00
Emilio Cobos Álvarez c17b1c2e53 Bug 1695390 - Move extremum lengths to the individual Size / MaxSize types. r=boris
This will prevent growing them when introducing fit-content(<length>).

This can _almost_ be derived, if it wasn't because of the quirky stuff.
I think the macro is probably good enough for now but let me know if you
disagree.

Differential Revision: https://phabricator.services.mozilla.com/D106713
2021-03-02 12:11:35 +00:00
Brindusan Cristian 82efbb80e1 Backed out changeset be6d9849825d (bug 1695390) for wr failures in col-definite-max-size-001.html. CLOSED TREE 2021-03-02 13:41:40 +02:00
Emilio Cobos Álvarez b5686164be Bug 1695390 - Move extremum lengths to the individual Size / MaxSize types. r=boris
This will prevent growing them when introducing fit-content(<length>).

This can _almost_ be derived, if it wasn't because of the quirky stuff.
I think the macro is probably good enough for now but let me know if you
disagree.

Differential Revision: https://phabricator.services.mozilla.com/D106713
2021-03-02 10:34:39 +00:00
Mats Palmgren d1b89f4cb3 Bug 1485917 - Make <fieldset> with 'display:inline' support CSSOM width/height. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D106728
2021-03-01 16:14:33 +00:00
Emilio Cobos Álvarez f482ffa15d Bug 1695369 - Simplify StyleColor representation. r=jwatt
There's no need for CurrentColor / Numeric variants when we can
represent them with the complex form.

Differential Revision: https://phabricator.services.mozilla.com/D106690
2021-03-01 16:05:14 +00:00
Simon Giesecke 8ecfb38a41 Bug 1691913 - Remove uses of nsDataHashtable::GetValue. r=xpcom-reviewers,necko-reviewers,dragana,nika
GetValue is going to be removed in a subsequent patch. It is no longer needed,
because it can be replaced by functions already provided by nsBaseHashtable,
in particular Lookup and Contains.

Also, its name was confusing, since it specifically returns a pointer that
allows and is intended for modifying the entry within the hashtable, rather
than returning by-value. According to the naming rules to be set on
nsBaseHashtable, it would also needed to be renamed to "Lookup*. Removing
its uses saves this effort.

Differential Revision: https://phabricator.services.mozilla.com/D105476
2021-03-01 09:59:30 +00:00
Simon Giesecke 0b443059fd Bug 1693306 - Simplify some uses of LookupOrInsertWith by GetOrInsertNew. r=xpcom-reviewers,necko-reviewers,dragana,nika
Differential Revision: https://phabricator.services.mozilla.com/D105479
2021-02-26 09:22:54 +00:00
Simon Giesecke 9af107a839 Bug 1691913 - Rename nsBaseHashtable::Put to InsertOrUpdate. r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
This makes the naming more consistent with other functions called
Insert and/or Update. Also, it removes the ambiguity whether
Put expects that an entry already exists or not, in particular because
it differed from nsTHashtable::PutEntry in that regard.

Differential Revision: https://phabricator.services.mozilla.com/D105473
2021-02-26 09:11:46 +00:00
Simon Giesecke 4f75368dcb Bug 1691913 - Rename nsBaseHashtable::GetOrInsert(With) to LookupOrInsert(With). r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
The functions should be called "Lookup" rather than "Get" because they return
a DataType& (rather than UserDataType).

Differential Revision: https://phabricator.services.mozilla.com/D105472
2021-02-26 09:11:45 +00:00
Emilio Cobos Álvarez 18f0466bc6 Bug 1694864 - Remove prefers-contrast: forced as per CSSWG resolution. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D106485
2021-02-25 18:05:08 +00:00
Boris Chiou 3bb28a3f45 Bug 1670155 - Implement Animate trait and ComputeSquaredDistance trait for <ratio>. r=emilio
I also update the wpt becasue it seems the original one lets <ratio>
support the addition. However, the spec says "Addition of <ratio>s is not
possible".

Differential Revision: https://phabricator.services.mozilla.com/D106219
2021-02-25 01:50:55 +00:00
Miko Mynttinen 87ae7c68c4 Bug 1526970 - Part 2: Convert nsIFrame::mDisplayItemData to frame property r=mattwoodrow
Depends on D104059

Differential Revision: https://phabricator.services.mozilla.com/D106164
2021-02-24 22:22:18 +00:00
Emilio Cobos Álvarez 9882821e73 Bug 1692684 - Don't create transitions for invalid ::marker properties. r=hiro
The test-case in the bug does something interesting, where it causes a
transition on the parent by removing a CSS rule, and that causes us to
transition text-underline-offset on our ::marker, via the magic of
font-size-relative properties.

text-underline-offset, while it gets inherited from ::marker, is not a
valid CSS property to specify on marker per spec, so we trim it here:

  https://searchfox.org/mozilla-central/rev/899bbd9e5a0d6de9bb9f068c48b1445c7905d9cf/servo/ports/geckolib/glue.rs#5709-5712

And that causes us to create a transition with an empty effect and
everything goes downhill from here.

For now, just bail out in a nicer way than we were doing. I still need
to look into whether we should handle inherited transitions differently
from non-inherited one in this case...

I think our behavior after this patch would be correct for the test-case
(because text-underline-offset would transition on the parent and
::marker would inherit it). If you specify transition only on the marker
we'd refuse to transition (which I guess it is somewhat of a sensible
behavior).

Differential Revision: https://phabricator.services.mozilla.com/D105124
2021-02-24 16:35:17 +00:00
Emilio Cobos Álvarez 643d8c9b88 Bug 1693969 - Remove default styling for :-moz-ui-{valid,invalid} pseudo-classes. r=xidorn
Other browsers don't have this UI, and there's no way to know whether
the form will actually be validated, so it can cause false-positives.

Depends on D105968

Differential Revision: https://phabricator.services.mozilla.com/D105969
2021-02-23 11:26:17 +00:00
Simon Giesecke 7c931c97c4 Bug 1689218 - Rename nsBaseHashtable::GetAndRemove to Extract. r=necko-reviewers,dragana
First, it should be called "Lookup" rather than "Get" because it returns
DataType (rather than UserDataType), but that would still be confusing,
since as opposed to other Lookup* methods, it does not return a DataType&
(and obviously, it can't). So "Extract" seems to be a better name, cf.
mozilla::Maybe::extract.

Differential Revision: https://phabricator.services.mozilla.com/D105471
2021-02-22 12:07:48 +00:00
Simon Giesecke d2caea36fa Bug 1691894 - Simplify uses of WithEntryHandle that only use OrInsert(With) by using GetOrInsertWith. r=xpcom-reviewers,necko-reviewers,jgilbert,nika
Differential Revision: https://phabricator.services.mozilla.com/D104676
2021-02-22 12:07:46 +00:00
Alexis Beingessner 07f2f659c6 Bug 1686616 - make StringBundle use Components instead of Services. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D105531
2021-02-18 13:26:32 +00:00
Ting-Yu Lin 1e1db8c9d9 Bug 1674302 Part 3 - Fix flex base size resolution and main/cross size override for table flex items. r=dholbert
This is the main patch of this bug.

When a flex container provides size overrides for a table flex item,
there are two use cases.

(1) When resolving flex base size, we want to use `flex-basis` to
replace the preferred main size on the *inner table frame* directly.
This is how `height` works on a table element. That is, it sets the
height of the inner table frame, not the table wrapper. This patch
invents `mApplyOverridesVerbatim` flag to tell table wrapper frame don't
do any modification.

(2) When overriding main-size/cross-size for a table flex item, the size
is for *table wrapper frame*. To apply the size to inner table frame,
the table wrapper frame needs adjust the size by subtracting the area
occupied by caption, border, and padding (depending on the box-sizing).

This patch fixes the flex base resolution, and implements the logic for
(2).

We use nsLayoutUtils::GetStyleFrame() to dig into inner table's sizing
properties when resolving flex base size, so we can stop inheriting flex
properties to table wrapper frame in ua.css.

We also need to check style frame's StylePosition() in IsCrossSizeAuto()
so that non-'auto' sizes can prevent tables from being stretched in the
cross axis, just as happens with other flex items. Otherwise with this
patch, the table flex item with fixed height in
dom/flex/test/chrome/test_flex_item_rect.html will be wrongly stretched.

Differential Revision: https://phabricator.services.mozilla.com/D103437
2021-02-18 05:45:25 +00:00
Markus Stange 3c57a55638 Bug 1693196 - Remove -moz-mac-fullscreen-button value. r=emilio
Depends on D105379

Differential Revision: https://phabricator.services.mozilla.com/D105380
2021-02-17 01:40:04 +00:00
Emilio Cobos Álvarez 465532beab Bug 1693061 - Don't make -moz-user-input differences rebuild frames. r=layout-reviewers,mats
We don't use it for anything resembling frame construction, so this
should be safe.

This goes back to bug 78695.

Differential Revision: https://phabricator.services.mozilla.com/D105353
2021-02-16 20:00:15 +00:00
Simon Giesecke 661e25bf09 Bug 1692880 - Make Put accept DataType instead of wrapping UserDataType. r=xpcom-reviewers,necko-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D104850
2021-02-16 15:53:33 +00:00
Simon Giesecke 9ab4b4f5d3 Bug 1693001 - Remove redundant nullptr checks of return value of infallible new in layout/. r=emilio
Depends on D105289

Differential Revision: https://phabricator.services.mozilla.com/D105290
2021-02-16 15:52:09 +00:00
Gerald Squelart 2416d881e2 Bug 1691589 - Reduce reliance on GeckoProfiler.h when only labels (and maybe markers) are needed - r=necko-reviewers,geckoview-reviewers,sg,agi,florian
There are no code changes, only #include changes.
It was a fairly mechanical process: Search for all "AUTO_PROFILER_LABEL", and in each file, if only labels are used, convert "GeckoProfiler.h" into "ProfilerLabels.h" (or just add that last one where needed).
In some files, there were also some marker calls but no other profiler-related calls, in these cases "GeckoProfiler.h" was replaced with both "ProfilerLabels.h" and "ProfilerMarkers.h", which still helps in reducing the use of the all-encompassing "GeckoProfiler.h".

Differential Revision: https://phabricator.services.mozilla.com/D104588
2021-02-16 04:44:19 +00:00
Emilio Cobos Álvarez 5dfa54e505 Bug 1691256 - Don't reflow for background/border changes on xul appearance values. r=jfkthame
This is an optimization, but also papers about XUL widgets not dealing
particularly well with it.

Differential Revision: https://phabricator.services.mozilla.com/D105169
2021-02-15 13:19:32 +00:00
smolnar 1afbbe67e1 Backed out 5 changesets (bug 1691894) for causing hazard failures in nsXULPrototypeCache. CLOSED TREE
Backed out changeset 22dc870ee609 (bug 1691894)
Backed out changeset 58c31e9d6ae3 (bug 1691894)
Backed out changeset 7483e84149d8 (bug 1691894)
Backed out changeset f977d6cfa973 (bug 1691894)
Backed out changeset db4503476f34 (bug 1691894)
2021-02-15 16:43:23 +02:00
Simon Giesecke 3c29a68440 Bug 1691894 - Make Put accept DataType instead of wrapping UserDataType. r=xpcom-reviewers,necko-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D104850
2021-02-15 10:04:46 +00:00
Sylvestre Ledru b4f9be25d4 Bug 1519636 - Reformat recent changes to the Google coding style r=andi,necko-reviewers
Updated with clang-format version 11.0.1 (taskcluster-B6bdwSKDRF-luRQWXBuzpA)

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D105158
2021-02-15 08:49:20 +00:00
Pierre TALLOTTE cc28f15d09 Bug 1688695 - Hide non-standard values of caption-side. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D104321
2021-02-12 15:45:48 +00:00
Emilio Cobos Álvarez 5a6d8228c8 Bug 1691858 - Minor cleanup of our @page rule setup. r=AlaskanEmily
Actually, there's not so much we can improve right now, in the sense
that:

 * We need the ::-moz-page-content pseudo-element to be able to set
 `display` on the page, since that's a style rule rather than a @page
 rule. We could get away without it.

 * Keeping the current code-path (slightly cleaned up) is less code, for
 now at least. We can have a separate code-path or what not that
 actually performs the @page rule selector-matching and what not if
 needed when we get to named pages or other page selectors. Selectors
 like :first should be pretty trivial to implement, actually.

We make some paged mode anon boxes non-inheriting anon boxes. This
allows us to share the styles and is generally nicer. They don't need to
inherit from anywhere.

We could remove the origin handling and don't look at UA rules or what
not, but it seems pretty harmless to do that.

We also fix the name of the pseudo-elements to match the capitalization.

Differential Revision: https://phabricator.services.mozilla.com/D104772
2021-02-12 15:42:38 +00:00
Simon Giesecke f701c44a5c Bug 1691894 - Fix EntryHandle to only work with DataType rather than wrapping UserDataType. r=xpcom-reviewers,necko-reviewers,nika,jonco,valentin
Differential Revision: https://phabricator.services.mozilla.com/D104810
2021-02-12 15:25:40 +00:00
Emilio Cobos Álvarez 5035989860 Bug 1692224 - Remove ui.use_native_colors. r=spohl
It's not set to false anywhere and the browser would be quite broken
with it set to false.

Differential Revision: https://phabricator.services.mozilla.com/D104906
2021-02-12 01:01:32 +00:00
Emilio Cobos Álvarez 7345d01ad7 Bug 1692224 - Use standins for system colors pairs that paint over non-native theme widgets to guarantee contrast. r=spohl
Nothing like having the code already written for you :-)

Differential Revision: https://phabricator.services.mozilla.com/D104905
2021-02-12 01:01:31 +00:00
Butkovits Atila 2ec7c8684f Backed out changeset 80d28bc966b1 (bug 1691858) for causing failures on nsIFrame.cpp. CLOSED TREE 2021-02-12 00:10:31 +02:00
Emilio Cobos Álvarez 216b9a6afb Bug 1691858 - Minor cleanup of our @page rule setup. r=AlaskanEmily
Actually, there's not so much we can improve right now, in the sense
that:

 * We need the ::-moz-page-content pseudo-element to be able to set
 `display` on the page, since that's a style rule rather than a @page
 rule. We could get away without it.

 * Keeping the current code-path (slightly cleaned up) is less code, for
 now at least. We can have a separate code-path or what not that
 actually performs the @page rule selector-matching and what not if
 needed when we get to named pages or other page selectors. Selectors
 like :first should be pretty trivial to implement, actually.

We make some paged mode anon boxes non-inheriting anon boxes. This
allows us to share the styles and is generally nicer. They don't need to
inherit from anywhere.

We could remove the origin handling and don't look at UA rules or what
not, but it seems pretty harmless to do that.

We also fix the name of the pseudo-elements to match the capitalization.

Differential Revision: https://phabricator.services.mozilla.com/D104772
2021-02-11 20:52:25 +00:00
Yura Zenevich 3557877c1e Bug 1691793 - set prefers-contrast to more when accessibilityDisplayShouldIncreaseContrast setting is set to true. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D104562
2021-02-10 17:52:56 +00:00
Mihai Alexandru Michis f1bbc50fbf Backed out 5 changesets (bug 1689761, bug 1691793) for causing bustages in nsLookAndFeel.mm
CLOSED TREE

Backed out changeset 8c53818717a1 (bug 1689761)
Backed out changeset 232a4e735cdc (bug 1689761)
Backed out changeset e63c5a6932e3 (bug 1689761)
Backed out changeset 14b61d763ae5 (bug 1691793)
Backed out changeset 2c88585f0fe4 (bug 1689761)
2021-02-10 17:38:26 +02:00
Emilio Cobos Álvarez fd47e3b3f3 Bug 1691652 - Normalize NaN to zero as a result of calc(). r=layout-reviewers,jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D104563
2021-02-10 15:30:40 +00:00
Yura Zenevich 8eb52b667b Bug 1691793 - set prefers-contrast to more when accessibilityDisplayShouldIncreaseContrast setting is set to true. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D104562
2021-02-10 15:21:04 +00:00
Simon Giesecke 40403773d0 Bug 1688833 - Migrate LookupForAdd to WithEntryHandle in layout. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D104202
2021-02-09 18:19:39 +00:00
Emilio Cobos Álvarez a615cf4719 Bug 315209 - Add a pref to make non-auto outline follow border radius. r=mstange
This makes -moz-outline-radius a no-op, but keep it for now.

If/when we make this the default in release, we can remove it.

Differential Revision: https://phabricator.services.mozilla.com/D104324
2021-02-08 17:19:56 +00:00
Emilio Cobos Álvarez bebec20c7a Bug 1690706 - Move caption-side outside of mako. r=TYLin
Make it an enum class, etc.

Differential Revision: https://phabricator.services.mozilla.com/D103978
2021-02-07 12:33:45 +00:00
Emilio Cobos Álvarez c045cd7489 Bug 1686220 - Invalidate paint on image load, not on size available. r=tnikkel
Invalidating paint on size available is too soon (we can't decode the
image anyways). Bullet frames didn't use to do this and just reflowed.

Scheduling a paint causes us to do layout way too soon when there's more
important stuff to do for the load of the page.

This is a big improvement on load times and visual metrics in a variety
of websites:

  https://treeherder.mozilla.org/perfherder/compare?originalProject=try&originalRevision=3e012dad47b7f4b22741faa46153e940d079a260&newProject=try&newRevision=ce14456c07318eb3fc8d94d9cff9f41d9d122752&framework=13

Differential Revision: https://phabricator.services.mozilla.com/D104065
2021-02-04 22:20:15 +00:00
Emilio Cobos Álvarez 6937065186 Bug 1687183 - Fix dark background detection in nsNativeTheme when only root has a background. r=mstange
If we hit the canvas frame, and the root has a background but the body
doesn't, previously we were using the body style. Then
FindNonTransparentBackgroundFrame would return the document element
frame (with the right background), but FindBackgroundFor that failed.

Differential Revision: https://phabricator.services.mozilla.com/D103975
2021-02-04 16:54:48 +00:00
Emilio Cobos Álvarez 4dc74de41d Bug 1302991 - Do not try to resolve empty CSS url values. r=dholbert
So as to not try to load the same document as a subresource.

Differential Revision: https://phabricator.services.mozilla.com/D103717
2021-02-04 14:56:46 +00:00
Emilio Cobos Álvarez 66ffbf833a Bug 1302991 - Move the check to prevent loading internal resources as images. r=dholbert
No behavior change, but the new place seems more appropriate.
StyleComputedUrl::ResolveImage is the only caller of ImageLoader::LoadImage,
and it calls it unconditionally modulo an special-case for documents.

Differential Revision: https://phabricator.services.mozilla.com/D103716
2021-02-04 07:16:05 +00:00
Butkovits Atila d8adfd3bef Backed out 2 changesets (bug 1302991) for causing failures on empty.html. CLOSED TREE
Backed out changeset e4734e2b38b6 (bug 1302991)
Backed out changeset fd4ba1eeec00 (bug 1302991)
2021-02-04 09:11:58 +02:00
Emilio Cobos Álvarez 4aa434f694 Bug 1302991 - Do not try to resolve empty CSS url values. r=dholbert
So as to not try to load the same document as a subresource.

Differential Revision: https://phabricator.services.mozilla.com/D103717
2021-02-04 04:10:10 +00:00
Emilio Cobos Álvarez c033869dbf Bug 1302991 - Move the check to prevent loading internal resources as images. r=dholbert
No behavior change, but the new place seems more appropriate.
StyleComputedUrl::ResolveImage is the only caller of ImageLoader::LoadImage,
and it calls it unconditionally modulo an special-case for documents.

Differential Revision: https://phabricator.services.mozilla.com/D103716
2021-02-04 04:10:08 +00:00
Emilio Cobos Álvarez 063f86bbb1 Bug 1591120 - Fix ESLint / clang-format nits.
MANUAL PUSH: Orange fix on a CLOSED TREE
2021-02-03 12:08:25 +01:00
Emilio Cobos Álvarez bfe77f303a Bug 1591120 - Move print and color-scheme simulation to browsingContext. r=ochameau,nika,devtools-backward-compat-reviewers
We keep mMedium in nsPresContext rather than just looking it up in the
browsing context because that's used quite more frequently.

Differential Revision: https://phabricator.services.mozilla.com/D103782
2021-02-03 10:38:09 +00:00
Emilio Cobos Álvarez 4b58806ec7 Bug 1690225 - Unify focus-visible rules in ua.css. r=edgar
We had different rules with the same declarations for all namespaces, so
simplify that setup by having a single rule.

Remove redundant *|* from selectors while at it (there's no default
namespace in ua.css, so there's no need to do that).

Differential Revision: https://phabricator.services.mozilla.com/D103753
2021-02-03 10:25:21 +00:00
Emilio Cobos Álvarez 217ddbe75f Bug 1690225 - Remove focus-visible feature flag. r=edgar
This shipped in 85, we can remove the feature flag now. Keep
:-moz-focusring as an alias to :focus-visible at parse time.

Differential Revision: https://phabricator.services.mozilla.com/D103752
2021-02-02 23:45:25 +00:00
Mihai Alexandru Michis ac5549ffd4 Backed out 2 changesets (bug 1690225) for causing multiple bc failures.
CLOSED TREE

Backed out changeset 381ee01f5034 (bug 1690225)
Backed out changeset cde1d10aae1c (bug 1690225)
2021-02-03 01:42:37 +02:00
Emilio Cobos Álvarez 63fd5123dd Bug 1690225 - Unify focus-visible rules in ua.css. r=edgar
We had different rules with the same declarations for all namespaces, so
simplify that setup by having a single rule.

Remove redundant *|* from selectors while at it (there's no default
namespace in ua.css, so there's no need to do that).

Depends on D103752

Differential Revision: https://phabricator.services.mozilla.com/D103753
2021-02-02 22:32:14 +00:00
Emilio Cobos Álvarez df079e8f9d Bug 1690225 - Remove focus-visible feature flag. r=edgar
This shipped in 85, we can remove the feature flag now. Keep
:-moz-focusring as an alias to :focus-visible at parse time.

Differential Revision: https://phabricator.services.mozilla.com/D103752
2021-02-02 22:28:40 +00:00
Cameron McCormack eb3c56f619 Bug 1619580 - Remove shared memory UA style sheet telemetry. r=emilio
No longer needed.

Differential Revision: https://phabricator.services.mozilla.com/D103739
2021-02-02 10:45:00 +00:00
Emilio Cobos Álvarez fe36177806 Bug 1637651 - Assume non-quirks mode for style Link header preloads. r=smaug
This is an issue I found while going through this code and
writing/debugging a test for the bug at hand. Without this, the test in
the actual fix for this bug will fail to actually reuse the preloaded
stylesheet.

It seems reasonable to assume that the intersection of quirks mode
documents using link preload headers is small (and in that case we'd
parse the sheet twice, but oh well).

Differential Revision: https://phabricator.services.mozilla.com/D103567
2021-02-01 23:23:50 +00:00
Emilio Cobos Álvarez 10d7e8d01b Bug 1456052 - Change overflow-clip-box of textarea to be consistent with text inputs and match other browsers. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D38794
2021-02-01 00:36:18 +00:00
Emilio Cobos Álvarez 1cc19dee6a Bug 1689477 - Remove number-input padding special-case so that we size them the same way as text controls. r=spohl
This means that the number input by default shows some white space to
the right of the spinners. I think it's probably not the end of the
world, and depending on the different trade-offs we might want to do
this instead of fixing the test.

Depends on D103270

Differential Revision: https://phabricator.services.mozilla.com/D103271
2021-01-28 23:22:51 +00:00
Mats Palmgren f6ef0ea044 Bug 1683748 - Support Grid/Flex/Table/Column layout for the rendered legend of a fieldset. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D101555
2021-01-30 13:47:10 +00:00
Dorel Luca 689a7c82d0 Backed out changeset 2d16e9e90401 (bug 1683748) for WPT failures in html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-grid-flex-multicol.html. CLOSED TREE 2021-01-29 22:07:09 +02:00
Mats Palmgren ca5460eda2 Bug 1683748 - Support Grid/Flex/Table/Column layout for the rendered legend of a fieldset. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D101555
2021-01-29 15:45:42 +00:00
Emilio Cobos Álvarez a1bf2a82af Bug 1560824 - Move combobox select padding to the select rule rather than the combobox frame. r=dholbert
This doesn't change behavior by default but allows authors to remove the
padding if they wish to.

I thought this was going to be problematic because of the windows
arrowbutton, but that doesn't respect select padding so we're good.

Differential Revision: https://phabricator.services.mozilla.com/D103245
2021-01-28 07:09:23 +00:00
Emilio Cobos Álvarez 49e1237f27 Bug 1689098 - Make inputs, selects, and button actually have the same block-axis padding as claimed by our forms.css comments. r=dholbert
Combobox select has the block-axis padding in the comboboxcontrol frame.
Moving it fixes bug 1560824 and should be better, so will do that there.

1px block axis padding on buttons matches Chrome too, so shouldn't be a
problem compat-wise.

Differential Revision: https://phabricator.services.mozilla.com/D103244
2021-01-28 07:08:34 +00:00
Emilio Cobos Álvarez 99a6a0db4f Bug 1687538 - Make HTMLLinkElement not inherit from Link. r=smaug
As per https://github.com/whatwg/html/pull/6269

Differential Revision: https://phabricator.services.mozilla.com/D103088
2021-01-28 05:35:05 +00:00
Butkovits Atila 66d2fa9c1e Backed out changeset 0927366150b7 (bug 1687538) for failures on link.html. CLOSED TREE 2021-01-28 07:01:27 +02:00
Emilio Cobos Álvarez a6e6a48057 Bug 1689044 - Remove redundant background-color: ButtonFace for buttons from forms.css. r=dholbert
This is the color that buttons have already, so this is just redundant.

Differential Revision: https://phabricator.services.mozilla.com/D103238
2021-01-27 23:32:43 +00:00
Emilio Cobos Álvarez db72ef806e Bug 1689044 - Stop messing with button padding on :hover:active buttons by default. r=dholbert
This is not particularly efficient, and our non-native theme has
different paddings by default which causes test failures.

We could fix this with a bunch of other media queries, but it doesn't
seem worth it, other browsers don't do this, and we were already working
around it on mac anyways.

While at it, turn the border declaration into just `border-style`, which is
the only thing it's needed to override the `:hover:active` rule above. That
shouldn't have any behavior change.

Differential Revision: https://phabricator.services.mozilla.com/D103143
2021-01-27 23:32:07 +00:00
Emilio Cobos Álvarez 45e159fc05 Bug 1687538 - Make HTMLLinkElement not inherit from Link. r=smaug
As per https://github.com/whatwg/html/pull/6269

Differential Revision: https://phabricator.services.mozilla.com/D103088
2021-01-26 23:47:56 +00:00
Emilio Cobos Álvarez 96c2fa531f Bug 1687177 - <input type=date> and <input type=time> shouldn't have different padding from other inputs. r=spohl
It was in fact an odd special-case which caused trouble on some tests as
well.

Differential Revision: https://phabricator.services.mozilla.com/D103142
2021-01-27 16:01:11 +00:00
Emilio Cobos Álvarez dda71411f4 Bug 787521 - Improve tests for chrome-only media queries. r=dholbert
So as to test that they are in fact not parseable by content.

Keep a centralized list of these rather than duplicating tests.

Differential Revision: https://phabricator.services.mozilla.com/D102966
2021-01-26 22:56:03 +00:00
Ting-Yu Lin 1f2fae1af3 Bug 1686603 Part 8 - Update test expectations. r=dholbert
See bug 1688115 for the description of an existing bug.

Skip bug 1383981's crashtests on AddressSanitizer. They were enabled in
https://hg.mozilla.org/mozilla-central/rev/bf11f56d91cb7cf31564095d6e4467beeb8a4687,
but they start to overflow the stack again because of this patch stack.

Differential Revision: https://phabricator.services.mozilla.com/D102663
2021-01-26 06:28:07 +00:00
Steven MacLeod 410472f20a Bug 1656107 - remove FindContentForSubDocument use from nsComputedDOMStyle. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D98620
2021-01-21 00:45:00 +00:00
Emilio Cobos Álvarez 09c872c3ef Bug 1688325 - Make textarea default padding 2px on all platforms. r=dholbert,jdescottes
This matches other browsers, and the default themed textareas on Windows
too.

To be landed after the soft freeze, just in case, of course.

Differential Revision: https://phabricator.services.mozilla.com/D102843
2021-01-25 12:33:28 +00:00
Mats Palmgren b80f010fb4 Bug 1687239 part 3 - Remove the PluginProblem UA Widget and related CSS pseudos. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D102901
2021-01-25 11:53:57 +00:00
Butkovits Atila 0fe67c0899 Backed out changeset 64682b454ac6 (bug 1688325) for causing failures on browser_inplace-editor_maxwidth.js. CLOSED TREE 2021-01-25 13:47:02 +02:00
Emilio Cobos Álvarez 3fad455482 Bug 1688325 - Make textarea default padding 2px on all platforms. r=dholbert
This matches other browsers, and the default themed textareas on Windows
too.

To be landed after the soft freeze, just in case, of course.

Differential Revision: https://phabricator.services.mozilla.com/D102843
2021-01-24 06:03:57 +00:00
Emilio Cobos Álvarez b3eef044a7 Bug 1687127 - Remove dom.expose-incomplete-stylesheets. r=boris
Shipped in 84 (bug 1673885).

Differential Revision: https://phabricator.services.mozilla.com/D102090
2021-01-19 22:21:09 +00:00
Emilio Cobos Álvarez e2e871521d Bug 1686613 - Port non-native theme paddings to forms.css. r=mstange
The only change I've made intentionally is the change to the textarea /
input padding. Now that the focus outline doesn't cover the padding
area, this preserves the same visual effect, plus the 2px inline padding
values now match Chrome, which means that even affecting appearance:
none controls, this is probably compatible.

Depends on D102458

Differential Revision: https://phabricator.services.mozilla.com/D102459
2021-01-21 21:38:33 +00:00
Emilio Cobos Álvarez e3b4492853 Bug 1686613 - Add a non-native-theme media query. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D102457
2021-01-21 06:14:16 +00:00
Emilio Cobos Álvarez 1fb51cfb6d Bug 1686613 - Use a consistent style for attribute selectors in forms.css. r=spohl
Depends on D102457

Differential Revision: https://phabricator.services.mozilla.com/D102458
2021-01-21 00:48:58 +00:00
longsonr dd9e8bf312 Bug 1687136 - remove svg.transform-box.enabled pref r=emilio
It's been default true since Firefox 55 via bug 1208550

Differential Revision: https://phabricator.services.mozilla.com/D102093
2021-01-18 08:11:05 +00:00
Emilio Cobos Álvarez 562c44a853 Bug 1551040 - Add dark mode to plaintext.css, and a document rule to target plaintext documents. r=boris
We add two @-moz-document functions: `plain-text-document()`, matching the
obvious, and `unobservable-document()`, which matches a top-level document with
no opener. This is the equivalent check we do for automatic darkening of
`about:blank` here:

    https://searchfox.org/mozilla-central/rev/014fe72eaba26dcf6082fb9bbaf208f97a38594e/layout/base/PresShell.cpp#5282

The former we don't need to use, but it's nice to let user stylesheets target
plaintext documents properly (rather than relying on extensions or what not).

Note that these are not content-observable.

Add two tests: One showing that we produce different rendering when on dark
mode, and one showing that we produce the same one from an iframe, regardless
of dark mode.

Depends on D101517

Differential Revision: https://phabricator.services.mozilla.com/D101518
2021-01-17 14:44:41 +00:00
Emilio Cobos Álvarez 1ff0ef892e Bug 1551040 - Allow resource:// stylesheets to use chrome-only rules. r=boris
We'll use it to use @-moz-document from plaintext.css.

Differential Revision: https://phabricator.services.mozilla.com/D101516
2021-01-17 15:07:49 +00:00
Dorel Luca dac45cc702 Backed out 3 changesets (bug 1551040) for Browser-chrome failures in browser/base/content/test/static/browser_parsable_css.js
Backed out changeset f48f479bcacd (bug 1551040)
Backed out changeset a6cd4b393999 (bug 1551040)
Backed out changeset 252cbf40efcb (bug 1551040)
2021-01-17 16:38:39 +02:00
Emilio Cobos Álvarez 71b5ff7515 Bug 1551040 - Add dark mode to plaintext.css, and a document rule to target plaintext documents. r=boris
We add two @-moz-document functions: `plain-text-document()`, matching the
obvious, and `unobservable-document()`, which matches a top-level document with
no opener. This is the equivalent check we do for automatic darkening of
`about:blank` here:

    https://searchfox.org/mozilla-central/rev/014fe72eaba26dcf6082fb9bbaf208f97a38594e/layout/base/PresShell.cpp#5282

The former we don't need to use, but it's nice to let user stylesheets target
plaintext documents properly (rather than relying on extensions or what not).

Note that these are not content-observable.

Add two tests: One showing that we produce different rendering when on dark
mode, and one showing that we produce the same one from an iframe, regardless
of dark mode.

Depends on D101517

Differential Revision: https://phabricator.services.mozilla.com/D101518
2021-01-16 19:15:59 +00:00
Emilio Cobos Álvarez ad1d2a73aa Bug 1551040 - Allow resource:// stylesheets to use chrome-only rules. r=boris
We'll use it to use @-moz-document from plaintext.css.

Differential Revision: https://phabricator.services.mozilla.com/D101516
2021-01-16 18:58:27 +00:00
Bogdan Tara c88a628881 Backed out 3 changesets (bug 1551040) for stylesheets related bustage CLOSED TREE
Backed out changeset 3822fe3e163d (bug 1551040)
Backed out changeset 032025f28d8f (bug 1551040)
Backed out changeset 1aeb38c2dce3 (bug 1551040)
2021-01-16 20:53:31 +02:00
Emilio Cobos Álvarez fcace619be Bug 1551040 - Add dark mode to plaintext.css, and a document rule to target plaintext documents. r=boris
We add two @-moz-document functions: `plain-text-document()`, matching the
obvious, and `unobservable-document()`, which matches a top-level document with
no opener. This is the equivalent check we do for automatic darkening of
`about:blank` here:

    https://searchfox.org/mozilla-central/rev/014fe72eaba26dcf6082fb9bbaf208f97a38594e/layout/base/PresShell.cpp#5282

The former we don't need to use, but it's nice to let user stylesheets target
plaintext documents properly (rather than relying on extensions or what not).

Note that these are not content-observable.

Add two tests: One showing that we produce different rendering when on dark
mode, and one showing that we produce the same one from an iframe, regardless
of dark mode.

Depends on D101517

Differential Revision: https://phabricator.services.mozilla.com/D101518
2021-01-16 10:53:09 +00:00
Emilio Cobos Álvarez 2e092ef47c Bug 1551040 - Allow resource:// stylesheets to use chrome-only rules. r=boris
We'll use it to use @-moz-document from plaintext.css.

Differential Revision: https://phabricator.services.mozilla.com/D101516
2021-01-16 18:26:52 +00:00
Mihai Alexandru Michis f1247be876 Backed out 4 changesets (bug 1551040) for causing mochitest failures.
CLOSED TREE

Backed out changeset 06c07b144db8 (bug 1551040)
Backed out changeset a6ebb45be432 (bug 1551040)
Backed out changeset 38f1416a92c3 (bug 1551040)
Backed out changeset 6c80881c8844 (bug 1551040)
2021-01-16 12:47:04 +02:00
Emilio Cobos Álvarez 08ce37b5ed Bug 1551040 - Add dark mode to plaintext.css, and a document rule to target plaintext documents. r=boris
We add two @-moz-document functions: `plain-text-document()`, matching the
obvious, and `unobservable-document()`, which matches a top-level document with
no opener. This is the equivalent check we do for automatic darkening of
`about:blank` here:

    https://searchfox.org/mozilla-central/rev/014fe72eaba26dcf6082fb9bbaf208f97a38594e/layout/base/PresShell.cpp#5282

The former we don't need to use, but it's nice to let user stylesheets target
plaintext documents properly (rather than relying on extensions or what not).

Note that these are not content-observable.

Add two tests: One showing that we produce different rendering when on dark
mode, and one showing that we produce the same one from an iframe, regardless
of dark mode.

Depends on D101517

Differential Revision: https://phabricator.services.mozilla.com/D101518
2021-01-16 03:19:38 +00:00
Emilio Cobos Álvarez 8798b5286b Bug 1551040 - Allow resource:// stylesheets to use chrome-only rules. r=boris
We'll use it to use @-moz-document from plaintext.css.

Differential Revision: https://phabricator.services.mozilla.com/D101516
2021-01-15 21:26:57 +00:00
Jonathan Kew 2c4aba0023 Bug 1686106 - Allow the character map record created for unicode-range to be shared among FontFaces with the same descriptor. r=heycam
This will reduce memory footprint when there are multiple @font-face rules with the same unicode-range descriptor,
which is common when, for example, a site loads several styles of a family, all with the same character repertoire.

Differential Revision: https://phabricator.services.mozilla.com/D101411
2021-01-12 22:07:10 +00:00
Emilio Cobos Álvarez f70b32956b Bug 1685796 - Return BAD_IMAGE when sync-decoding an incomplete, errored image. r=tnikkel
The only way that this can happen is if we get through the
ShouldTreatAsCompleteDueToSyncDecode check returning true in the case of
the image being errored.

https://hg.mozilla.org/integration/autoland/rev/645a4d6461ca was
supposed to deal with this, but my guess is that there is a slight race
condition in which the error status isn't there at the beginning, but is
there after the StartDecoding call.

It seems returning BAD_IMAGE rather than painting transparent if we hit
a broken image is a better thing to do than what we're doing now, and
should fix the intermittent issue.

Differential Revision: https://phabricator.services.mozilla.com/D101361
2021-01-12 02:28:00 +00:00
Emilio Cobos Álvarez 45a39146ea Bug 1684909 - Add and adjust image-set tests / test expectations. r=dholbert
The tests uncover two things:

 * cursor: image-set() doesn't work, because there's no <image> in the
   spec: https://drafts.csswg.org/css-ui-4/#cursor

 * content: image-set() similarly doesn't work. Though in this case the
   spec does call for it to work.

The later doesn't work because we don't support the whole <image> syntax
in `content` (so, we don't support `content: linear-gradient` or so on).
That seems like a separate issue to fix (WebKit does support this).

The former should probably also work (though WebKit only supports URLs
and not other images like gradients... will file a spec issue).

It also caught a bug with first-contentful-paint which I fixed drive-by:
image-set(url(..)) should be considered contentful, just like url(..) is.

The test changes are mostly straight-forward, but two changes are worth
mentioning:

 * I moved one subtest that tested content: image-set() from
   image-set-rendering.html to its own test, so that we can annotate the test
   as passing and ensure it doesn't regress (there's no way to annotate a
   reftest as "partially passing").

 * I changed a test that was testing image-set('/images/red.png') as invalid
   incorrectly (resolution is optional per spec and behaves like 1x).

Differential Revision: https://phabricator.services.mozilla.com/D100701
2021-01-11 18:04:34 +00:00
Emilio Cobos Álvarez 076de04bde Bug 1685917 - Remove layout.css.file-selector-button.enabled pref. r=heycam
On by default since bug 1662478 (Firefox 82)

Depends on D101289

Differential Revision: https://phabricator.services.mozilla.com/D101290
2021-01-11 01:55:50 +00:00
Emilio Cobos Álvarez 2b7ccb7ce1 Bug 1685917 - Remove the moz-focus-outer code. r=heycam
This pseudo does nothing and we successfully removed it in bug 1655859
(firefox 81).

Differential Revision: https://phabricator.services.mozilla.com/D101289
2021-01-11 01:57:17 +00:00
Emilio Cobos Álvarez ff64e2ac94 Bug 1684909 - Make rendering aware of image-set(). r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D100700
2021-01-11 01:23:07 +00:00
Tim Nguyen baecc7fa42 Bug 1685621 - Add more :not() serialization tests. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D101097
2021-01-08 08:07:26 +00:00
Emilio Cobos Álvarez c93246dbbb Bug 1685078 - Add a flag to reflow when the size is available, and use it for bullets. r=TYLin
Without blocking onload (which preserves behavior before this patch
series) or requiring a decode for stuff like invisible bullets.

Differential Revision: https://phabricator.services.mozilla.com/D101072
2021-01-08 09:44:58 +00:00
Emilio Cobos Álvarez 7bcee83034 Bug 1685078 - Refactor some ImageLoader code for legibility / code reuse. r=TYLin
These will make the following patch clearer.

Differential Revision: https://phabricator.services.mozilla.com/D101071
2021-01-08 09:44:55 +00:00
Emilio Cobos Álvarez dbf895e4c3 Bug 1685078 - Use enum classes and more explicit names for ImageLoader flags. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D101070
2021-01-08 09:44:47 +00:00
Emilio Cobos Álvarez e907c1f711 Bug 1685078 - Remove some useless includes from ImageLoader.h. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D101069
2021-01-08 09:44:40 +00:00
Emilio Cobos Álvarez c2f1413e6b Bug 1685078 - Support full <image> syntax in list-style-image as per spec. r=jrmuizel,TYLin
This allows supporting image-set(), etc, and simplifies the bullet frame
code significantly, too thanks to two changes:

  * Instead of manually managing the image request, use the CSS image
    loader, with the `REQUEST_REQUIRES_REFLOW` flag, to handle image
    loads correctly. This didn't exist when this code was initially
    implemented, but we can nicely use it now.

  * Instead of re-implementing another WebRender command-builder thing,
    we can just reuse the nsImageRenderer code.

Differential Revision: https://phabricator.services.mozilla.com/D100774
2021-01-08 09:44:24 +00:00
Masatoshi Kimura 3f402bfcc4 Bug 1683464 - Reduce nsContentPolicyType usage. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D100181
2021-01-07 15:18:52 +00:00
Dorel Luca 7d7078d54e Backed out changeset 47c73e5e08a4 (bug 1685078) for multiple failures related to CSS. CLOSED TREE 2021-01-07 10:44:10 +02:00
Emilio Cobos Álvarez 3bc6746c91 Bug 1684770 - Implement parsing and serialization for most of image-set(). r=boris
This implements the basic image-set notation without the format()
function (for simplicity).

There's a remaining serialization issue (we should probably skip 1x
resolutions), but that's fine for now, I'll address this in a follow-up
when the feature is testable.

The intention is to do the image selection at computed value time
(keeping a selected index or such), but same, follow-up.

This also fixes an issue where the cors-mode for -moz-image-rect and
cross-fade() was getting ignored when parsing.

Differential Revision: https://phabricator.services.mozilla.com/D100640
2021-01-07 04:15:29 +00:00
Emilio Cobos Álvarez 9fbf3695e7 Bug 1685078 - Support full <image> syntax in list-style-image as per spec. r=jrmuizel,TYLin
This allows supporting image-set(), etc, and simplifies the bullet frame
code significantly, too thanks to two changes:

  * Instead of manually managing the image request, use the CSS image
    loader, with the `REQUEST_REQUIRES_REFLOW` flag, to handle image
    loads correctly. This didn't exist when this code was initially
    implemented, but we can nicely use it now.

  * Instead of re-implementing another WebRender command-builder thing,
    we can just reuse the nsImageRenderer code.

Differential Revision: https://phabricator.services.mozilla.com/D100774
2021-01-07 04:15:01 +00:00
Razvan Maries 6a4eb25b10 Backed out 4 changesets (bug 1683464) for multiple perma failures. CLOSED TREE
Backed out changeset a5d315c017d0 (bug 1683464)
Backed out changeset 5f91001e4923 (bug 1683464)
Backed out changeset 1b7fe904e8af (bug 1683464)
Backed out changeset eb1c479fddca (bug 1683464)
2021-01-05 16:47:22 +02:00
Masatoshi Kimura dfb97ca7cf Bug 1683464 - Reduce nsContentPolicyType usage. r=ckerschb
Depends on D100180

Differential Revision: https://phabricator.services.mozilla.com/D100181
2021-01-05 12:21:46 +00:00
longsonr 9b4eed42cb Bug 1684214 - Change GetComputedStyleNoFlush to take a const element parameter r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D100463
2020-12-25 13:26:37 +00:00
Boris Chiou 361f923f82 Bug 1683424 - Add UseBoxSizing for AspectRatio class, and fix non-replaced element usage. r=TYLin
Based on the spec, if the aspect-ratio property value is:
1) auto: we should always use content-box dimensions.
2) <ratio>: the aspect-ratio works with box sizing dimensions.
3) auto && <ratio>: we use content-box dimensions in all cases.

So we need an extra flag to address that we should use box-sizing or
always use content-box dimensions while computing the size in
ratio-dependent axis.

This also updates some wpts for non-replaced elements because we should
use content-box if aspect-ratio is 'auto && <ratio>'.

Differential Revision: https://phabricator.services.mozilla.com/D100072
2020-12-23 22:42:55 +00:00
Jonathan Kew e5218225b0 Bug 1683669 - patch 1 - Compact the gfxSparseBitSet created for a unicode-range descriptor, to reduce memory footprint. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D100335
2020-12-22 15:49:14 +00:00
Kartik Gautam 5d5093a494 Bug 1679452 - Replace :not(X):not(Y) with :not(X, Y) r=ntim
Differential Revision: https://phabricator.services.mozilla.com/D100147
2020-12-19 11:24:13 +00:00
Ting-Yu Lin 2d7c294f61 Bug 1585485 Part 1 - Remove StyleSize, StyleMaxSize, and StyleFlexBasis typedefs in classes. r=dholbert
It is not worth having typedefs that are unused or used only once.

Differential Revision: https://phabricator.services.mozilla.com/D99950
2020-12-16 23:44:06 +00:00
Bogdan Tara 0e0311351e Backed out 9 changesets (bug 1656107) for frequent assertion failures on layout/style/nsComputedDOMStyle.cpp CLOSED TREE
Backed out changeset 2d9843871809 (bug 1656107)
Backed out changeset 87031ccf6c8e (bug 1656107)
Backed out changeset 1e06017a213c (bug 1656107)
Backed out changeset b51bae240379 (bug 1656107)
Backed out changeset 8d98b76de39a (bug 1656107)
Backed out changeset 0f4ea8cdd34a (bug 1656107)
Backed out changeset 95eeff5318e5 (bug 1656107)
Backed out changeset 469fa7a429c2 (bug 1656107)
Backed out changeset ec3d7e825bc9 (bug 1656107)
2020-12-17 22:19:09 +02:00
Steven MacLeod ff1446fec3 Bug 1656107 - remove FindContentForSubDocument use from nsComputedDOMStyle. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D98620
2020-12-16 01:06:49 +00:00
Emilio Cobos Álvarez 039592f4d8 Bug 1682003 - Avoid UTF-8 -> UTF-16 conversion during CSSOM serialization. r=heycam
This lifts a bunch of string conversions higher up the stack, but allows
us to make the servo code use utf-8 unconditionally, and seemed faster
in my benchmarking (see comment 0).

It should also make a bunch of attribute setters faster too (like
setting .cssText), now that we use UTF8String for them (we couldn't
because we couldn't specify different string types for the getter and
setters).

Differential Revision: https://phabricator.services.mozilla.com/D99590
2020-12-17 14:04:35 +00:00
Emilio Cobos Álvarez 076ee57756 Bug 1682174 - Remove layout.css.moz-any-is-is.enabled. r=boris
We shipped this, let's remove the MozAny code.

Differential Revision: https://phabricator.services.mozilla.com/D99607
2020-12-16 20:24:03 +00:00
Emilio Cobos Álvarez 816e05c71f Bug 1475316 - Expose :autofill behind a pref to content, and add :-webkit-autofill as a compat alias. r=nordzilla
Nightly only until we get resolutions on the relevant spec issues.

Differential Revision: https://phabricator.services.mozilla.com/D99296
2020-12-16 08:16:16 +00:00
Emilio Cobos Álvarez 9715d1f96c Bug 1475316 - Rename -moz-autofill to just autofill. r=geckoview-reviewers,esawin,boris
No compat impact, as this remains an internal pseudo-class for the time
being.

Differential Revision: https://phabricator.services.mozilla.com/D99295
2020-12-16 08:16:08 +00:00