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

13829 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 597b7bc37d Bug 1729330 - Add a simple CSSLayerRule implementation. r=smaug
The specifics of how this is going to work are still getting spec'd /
discussed in https://github.com/w3c/csswg-drafts/issues/6576, but this
allows DevTools to work fine and the feature to be complete enough for
Nightly experimentation (with the other in-flight patches).

Otherwise devtools crashes when trying to inspect pages that use them.

Differential Revision: https://phabricator.services.mozilla.com/D124656
2021-09-08 11:18:32 +00:00
Emilio Cobos Álvarez 1fc2475b41 Bug 1729289 - Fix layer statement with nested layer names. r=boris
When we had:

  @layer A.B;

We were registering "A" and "B", not "A" and "A.B", which was the intention.

Fix is trivial.

Depends on D124620

Differential Revision: https://phabricator.services.mozilla.com/D124621
2021-09-08 11:17:04 +00:00
Emilio Cobos Álvarez f4095b3242 Bug 1729289 - Fix out of order child layer registration, and enable the tests. r=boris
This makes layer order use a fixed set of bits per nesting level, to "reserve"
bits for children before they are registered.

See the comment in LayerOrder for the implementation limits it imposes, and
potential alternatives if these limits are not enough (but I think they should
be).

Enable the tests, as they mostly pass now (commit incoming to fix the remaining
ones).

Differential Revision: https://phabricator.services.mozilla.com/D124620
2021-09-08 11:17:04 +00:00
Jonathan Kew 6dbef6ba5d Bug 1729147 - Fix the serialization order for the text-decoration shorthand to match the canonical order in the spec. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D124536
2021-09-06 18:22:37 +00:00
Emilio Cobos Álvarez 9309bf97fc Bug 1699217 - Implement @import layer|layer(<name>). r=boris
This works modulo the existing nested layer order bug. Will be covered
by WPT /css/css-cascade/layer-import.html once the feature is enabled (I
can probably enable it right away for those tests, but I'd rather fix
the obvious bugs first).

Differential Revision: https://phabricator.services.mozilla.com/D124538
2021-09-06 16:43:04 +00:00
Sandor Molnar b2955e8a9d Backed out changeset 34c1b1078f03 (bug 1699217) for causing wpt failures in /css/css-cascade/layer-import. CLOSED TREE 2021-09-06 19:32:53 +03:00
Emilio Cobos Álvarez 1bd2094286 Bug 1699217 - Implement @import layer|layer(<name>). r=boris
This works modulo the existing nested layer order bug. Will be covered
by WPT /css/css-cascade/layer-import.html once the feature is enabled (I
can probably enable it right away for those tests, but I'd rather fix
the obvious bugs first).

Differential Revision: https://phabricator.services.mozilla.com/D124538
2021-09-06 11:15:57 +00:00
Emilio Cobos Álvarez d71b30b35d Bug 1728754 - Plumb layer order through ApplicableDeclarationBlock, and make it have an effect. r=boris
Same, I want to land this separately to see if it affects
micro-benchmarks. If so, we might want to pack the layer order
_somewhere_ (though in this case I'm not sure where, tbh).

With this, layer rules should have an effect on the page. There are
a few things missing before being able to enable them:

 * Fix nested layer order in some cases (when parent layers are declared
   out of order, see the previous commit mentioning this).
 * Some kind of OM representation, perhaps.
 * Tests of course, which are coming in bug 1728722 and bug 1727276.

But this should be enough to allow playing with them.

Depends on D124337

Differential Revision: https://phabricator.services.mozilla.com/D124338
2021-09-06 10:02:07 +00:00
Emilio Cobos Álvarez 13245e72d6 Bug 1728754 - Add layer_order to rules. r=boris
I want to land this separately because we might want to get smarter with
the size of the Rule struct (maybe restricting layer order to a u8 per
scope and packing it with the source order, since 255 layers seem
plenty), but I'd rather do the obvious thing for now.

Depends on D124336

Differential Revision: https://phabricator.services.mozilla.com/D124337
2021-09-06 09:54:02 +00:00
Emilio Cobos Álvarez 56d7403b70 Bug 1728754 - Tweak recursion in add_rule to only cause a function call per recursion level. r=boris
This code is really hot, and we've had perf regressions in the past for
introducing function calls in the hot path.

After the previous patch, add_rule is recursive and thus it can't be
inlined, causing a function call for each CSS rule.

This reduces the overhead by making the function take a rule list
instead, causing a function call per rule _list_, which should be
unnoticeable in practice.

Depends on D124335

Differential Revision: https://phabricator.services.mozilla.com/D124336
2021-09-04 07:42:46 +00:00
Emilio Cobos Álvarez bb807d90de Bug 1728754 - Compute layer order during CascadeData rebuild. r=boris
For that, deal with children in add_rule recursively, to keep the
current layer name up-to-date in block layer rules.

This is not the final version of this code, as right now something like
this:

  @layer A {
    ...
  }

  @layer B {
    ...
  }

  @layer A.A {
    ...
  }

Would give A.A more priority over B, which is not correct. There are
tests for this incoming in wpt sync and such, but that can be tweaked
later.

Differential Revision: https://phabricator.services.mozilla.com/D124335
2021-09-04 07:42:46 +00:00
Emilio Cobos Álvarez 367ee8048d Bug 1728754 - Factor out adding a rule in CascadeData::add_rule. r=boris
This shouldn't have any behavior change, but is necessary because for
cascade layers we are going to need to handle the child rules / sheets
ourselves, in order to handle nested layers properly.

Differential Revision: https://phabricator.services.mozilla.com/D124334
2021-09-04 07:42:45 +00:00
Emilio Cobos Álvarez 7bd3a20ff4 Bug 1728851 - Add attributes to the rule hash. r=boris
See the discussion here: https://twitter.com/Rich_Harris/status/1433153204678799365

This should make attribute selectors roughly as fast as class selectors.

I think it's worth trying and see if perf bots complain on
micro-benchmarks and stylebench and such.

I made attributes more specific than local names, but less specific than
classes, which I think makes sense. When doing something like
foo[data-bar], filtering by data-bar seems likely to yield less elements
than filtering by foo.

While at it, remove the bloom filter pref since we shipped it in
bug 1704551 for 87 and we haven't heard complaints.

Differential Revision: https://phabricator.services.mozilla.com/D124383
2021-09-03 15:57:30 +00:00
Emilio Cobos Álvarez c112357ea9 Bug 1728633 - Hook up basic @layer rule parsing. r=boris
Disabled, and of course doing nothing for now still, but this is another
piece that is useful to get reviewed separately.

Don't allow layers to be interleaved with @import / @namespace rules as
per https://github.com/w3c/csswg-drafts/issues/6522.

Differential Revision: https://phabricator.services.mozilla.com/D124229
2021-09-03 09:28:08 +00:00
Emilio Cobos Álvarez 4b3dc20891 Bug 1728617 - Tweak at-rule parsing APIs to support cascade layers. r=boris
This needs https://github.com/servo/rust-cssparser/pull/287 and a
cssparser update.

Differential Revision: https://phabricator.services.mozilla.com/D124216
2021-09-03 09:26:10 +00:00
Emilio Cobos Álvarez fdb57614e0 Bug 1728348 - Restore an #[allow] that will otherwise cause warnings.
MANUAL PUSH: Trivial no-behavior-change CLOSED TREE
2021-09-03 11:20:25 +02:00
Emilio Cobos Álvarez 0f945d081b Bug 1728348 - Add some scaffolding for @layer rules. r=boris
Not hooked anywhere yet, so this doesn't change behavior, but adds the
basic data model etc.

Adding parsing support requires some changes to cssparser to allow the
same at rule to be block and statement-like at the same time, so better
done separately.

Differential Revision: https://phabricator.services.mozilla.com/D124079
2021-09-03 09:12:43 +00:00
criss c6ef85e3b3 Backed out changeset 876e53ec90c4 (bug 1728851) as requested by Emilio. CLOSED TREE 2021-09-03 12:13:11 +03:00
Emilio Cobos Álvarez f28b5935c0 Bug 1728851 - Add attributes to the rule hash. r=boris
See the discussion here: https://twitter.com/Rich_Harris/status/1433153204678799365

This should make attribute selectors roughly as fast as class selectors.

I think it's worth trying and see if perf bots complain on
micro-benchmarks and stylebench and such.

I made attributes more specific than local names, but less specific than
classes, which I think makes sense. When doing something like
foo[data-bar], filtering by data-bar seems likely to yield less elements
than filtering by foo.

While at it, remove the bloom filter pref since we shipped it in
bug 1704551 for 87 and we haven't heard complaints.

Differential Revision: https://phabricator.services.mozilla.com/D124383
2021-09-03 08:58:20 +00:00
Emilio Cobos Álvarez 70f53c85d4 Bug 856337 - Implement image-rendering: smooth and image-rendering: pixelated. r=jrmuizel,dholbert,longsonr
Also, more directly go from StyleImageRendering to wr::ImageRendering.

 * image-rendering: smooth the non-deprecated version of
   OptimizeQuality, which maps to SamplingFilter::LINEAR /
   wr::ImageRendering::Auto (which uses gl::LINEAR).

 * image-rendering: pixelated maps to wr::ImageRendering::Pixelated /
   SamplingFilter::POINT which is the same crisp-edges does.

Note that this uncovers that we were mapping image-rendering:
crisp-edges to wr::ImageRendering::Pixelated.

I'm going to preserve behavior on this patch but we should consider
switching that to map to wr::ImageRendering::CrispEdges on a
follow-up (filed bug 1728831 for this).

Differential Revision: https://phabricator.services.mozilla.com/D124378
2021-09-03 08:56:43 +00:00
Emilio Cobos Álvarez 58c214fd32 Bug 856337 - Move image-rendering out of mako. r=dholbert
It's easier to touch in the future that way, even though the derive list is
massive.

Differential Revision: https://phabricator.services.mozilla.com/D124377
2021-09-03 08:56:42 +00:00
Noemi Erli f3a236c514 Backed out 2 changesets (bug 856337) for causing xpcshell failures in test_css-properties-db.js CLOSED TREE
Backed out changeset 7070c7cea8ec (bug 856337)
Backed out changeset edc12b36439f (bug 856337)
2021-09-03 01:36:17 +03:00
Emilio Cobos Álvarez 1602724fa9 Bug 856337 - Implement image-rendering: smooth and image-rendering: pixelated. r=jrmuizel,dholbert,longsonr
Also, more directly go from StyleImageRendering to wr::ImageRendering.

 * image-rendering: smooth the non-deprecated version of
   OptimizeQuality, which maps to SamplingFilter::LINEAR /
   wr::ImageRendering::Auto (which uses gl::LINEAR).

 * image-rendering: pixelated maps to wr::ImageRendering::Pixelated /
   SamplingFilter::POINT which is the same crisp-edges does.

Note that this uncovers that we were mapping image-rendering:
crisp-edges to wr::ImageRendering::Pixelated.

I'm going to preserve behavior on this patch but we should consider
switching that to map to wr::ImageRendering::CrispEdges on a
follow-up (filed bug 1728831 for this).

Differential Revision: https://phabricator.services.mozilla.com/D124378
2021-09-02 20:28:39 +00:00
Emilio Cobos Álvarez a10cd487f5 Bug 856337 - Move image-rendering out of mako. r=dholbert
It's easier to touch in the future that way, even though the derive list is
massive.

Differential Revision: https://phabricator.services.mozilla.com/D124377
2021-09-02 20:28:39 +00:00
Emilio Cobos Álvarez 3d1e69b292 Bug 1693222 - Fix selecteditem color on macOS.
This is an oversight. I made selecteditem be -moz-html-cellhighlight,
but that's for inactive cells.

Use the inactive cell color everywhere (though android doesn't
differentiate). This matches other browsers and what was reviewed on
this bug.

MANUAL PUSH: The semi-transparent text-selection-disabled color caused
one test failure CLOSED TREE.
2021-09-02 17:27:30 +02:00
Emilio Cobos Álvarez 8b10d3a89d Bug 1693222 - Implement SelectedItem and SelectedItemText system colors. r=mstange
Since Highlight / HighlightText are now equivalent to the text selection
ones, remove those too.

Differential Revision: https://phabricator.services.mozilla.com/D123964
2021-09-02 11:38:01 +00:00
Narcis Beleuzu 92fc260af2 Backed out changeset 28a0487d0291 (bug 1693222) for reftest failure on themed-widget.html. CLOSED TREE 2021-09-02 02:26:12 +03:00
Dzmitry Malyshau c196398803 Bug 1726628 - Switch cargo resolver to 2 r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D123157
2021-09-01 21:11:33 +00:00
Emilio Cobos Álvarez c3eb845bbf Bug 1693222 - Implement SelectedItem and SelectedItemText system colors. r=mstange
Since Highlight / HighlightText are now equivalent to the text selection
ones, remove those too.

Differential Revision: https://phabricator.services.mozilla.com/D123964
2021-09-01 18:21:57 +00:00
Emilio Cobos Álvarez 01aa139f4a Bug 1727537 - Remove layout.css.is-and-where-better-error-recovery.enabled. r=hiro
We shipped this in 84

Differential Revision: https://phabricator.services.mozilla.com/D123623
2021-08-30 11:08:40 +00:00
Emilio Cobos Álvarez 254911cf84 Bug 1727536 - Avoid some clone()s in selector parsing now that lifetimes are non-lexical. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D123622
2021-08-30 11:08:23 +00:00
Emilio Cobos Álvarez 380d55802a Bug 1725207 - Implement transform: perspective(none). r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D123350
2021-08-24 00:32:24 +00:00
Emilio Cobos Álvarez dcedd925dc Bug 1726515 - Workaround GCC-calling-into-LLVM ABI issue by making GenericFontFamily larger. r=hiro
This enum being a bit larger doesn't cause many common data structures
to grow, so this should be fine.

Differential Revision: https://phabricator.services.mozilla.com/D123146
2021-08-23 09:18:49 +00:00
Matt Woodrow fea5444468 Bug 1723266 - Return an infinite perspective in TransformOperation::Perspective::to_animated_zero. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D122919
2021-08-22 20:46:47 +00:00
Cosmin Sabou b8da11ef50 Backed out changeset 21e4ad4c8599 (bug 1723266) for causing mochitest plain failures on test_distance_of_transform.html. CLOSED TREE 2021-08-20 02:39:15 +03:00
Matt Woodrow 0c573563cc Bug 1723266 - Return an infinite perspective in TransformOperation::Perspective::to_animated_zero. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D122919
2021-08-19 21:47:54 +00:00
Emilio Cobos Álvarez 1c4e04a80e Bug 1105364 - Respect transparent and system color border colors in forced-colors mode. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D123111
2021-08-19 17:46:54 +00:00
Emilio Cobos Álvarez c41f086b94 Bug 1726182 - Add a use counter for content-visibility. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D122873
2021-08-17 18:25:11 +00:00
Mats Palmgren 14c9063444 Bug 1706080 - [css-fonts] Implement 'font-synthesis: small-caps'. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D114313
2021-08-09 21:41:34 +00:00
Sebastian Hengst c136a57852 Merge mozilla-central to autoland. CLOSED TREE 2021-08-09 19:13:59 +02:00
Barret Rennie 247bd59b37 Bug 1703356 - Support color-mix() in non-sRGB color spaces r=emilio
Out of gamut colours are currently clipped into sRGB.

Differential Revision: https://phabricator.services.mozilla.com/D120561
2021-08-09 16:16:40 +00:00
Ryan VanderMeulen dd07f3dbc0 Backed out changeset 4b53d6459297 (bug 1719963) for causing topcrash bug 1722150. 2021-08-09 08:52:56 -04:00
mbrubeck@limpet.net 3c9cf910ab Bug 1723791 - Upgrade to uluru 1.1.1. r=emilio
MANUAL PUSH: Patch wasn't pushed via phabricator.
2021-08-04 10:07:56 +02:00
Emilio Cobos Álvarez a4e7c9e510 Bug 1722945 - Support break-inside: avoid-{page,column}. r=TYLin
break-before/after: page|column seem harder because you need to deal
with nested breaks, I think, but this should be straight-forward.

Differential Revision: https://phabricator.services.mozilla.com/D121206
2021-08-03 17:56:58 +00:00
Noemi Erli 89a565ea85 Backed out changeset 67c33ba5566e (bug 1722945) for causing bustage in nsContainerFrame.cpp 2021-08-03 20:35:10 +03:00
Emilio Cobos Álvarez 3d1b4f252f Bug 1722945 - Support break-inside: avoid-{page,column}. r=TYLin
break-before/after: page|column seem harder because you need to deal
with nested breaks, I think, but this should be straight-forward.

Differential Revision: https://phabricator.services.mozilla.com/D121206
2021-08-03 13:59:47 +00:00
Emilio Cobos Álvarez bbca45e817 Bug 1722488 - Don't alias -apple-system to system-ui for now, to keep /css/css-fonts/animations/system-fonts.html happy.
We probably want to do this when they do something different, but for
now behavior should be the same and it causes some subtests to fail
because `getComputedStyle(..).fontFamily` for system fonts seems to
return -apple-system, but `.style.fontFamily = "-apple-system"` returns
`system-ui`.

MANUAL PUSH: Orange fix on a CLOSED TREE
2021-08-02 01:10:13 +02:00
Nazım Can Altınova 6788f940ac Bug 1652560 - Remove the unused "gecko_profiler" feature from servo r=emilio
This was being used when we had special code for gecko profiler in the servo
codebase but we just removed the last one. This is safe to remove now. The
"enabled" feature in the gecko-profiler crate is being controlled by
gkrust-shared directly now.

Differential Revision: https://phabricator.services.mozilla.com/D120796
2021-07-30 21:49:23 +00:00
Nazım Can Altınova ef8cd9ad96 Bug 1652560 - Remove the old profiler label frames code in the servo codebase and replace it with the new API r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D120795
2021-07-30 21:49:22 +00:00
Mike Hommey 4dce5725b3 Bug 1722652 - Setup bindgen flags for servo similarly to cranelift and neqo. r=emilio
While the use of toml allows the flags to be separated, the split is
done via some shell shenanigans anyways, and servo's build.rs can
handle the same just fine.

Differential Revision: https://phabricator.services.mozilla.com/D121042
2021-07-28 20:37:48 +00:00