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

13092 Коммитов

Автор SHA1 Сообщение Дата
Tim Nguyen 5f5b496d2d Bug 1614648 - Make GradientItem and ColorStop support angular color stops. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D62544

--HG--
extra : moz-landing-system : lando
2020-02-12 18:22:51 +00:00
Dorel Luca 5e422ce68b Backed out changeset 7e16a18f0f94 (bug 1614648) for build bustages in layout/painting/nsCSSRenderingGradients. CLOSED TREE 2020-02-12 14:33:04 +02:00
Tim Nguyen b4bc3c844a Bug 1614648 - Make GradientItem and ColorStop support angular color stops. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D62544

--HG--
extra : moz-landing-system : lando
2020-02-12 11:47:42 +00:00
Emilio Cobos Álvarez daccffdb9f Bug 1614348 - Make font-family serialization algorithm a bit more conservative. r=xidorn
So as to avoid serializing as identifiers font-families with spaces as part of
the identifier. This avoids serializing confusing escaped sequences if the
beginning of the stuff after the space happens to not be a valid ident start.

This is an slightly more restrictive version of the existing logic, which
happens to also match other browsers in my testing.

Differential Revision: https://phabricator.services.mozilla.com/D62376

--HG--
extra : moz-landing-system : lando
2020-02-12 11:32:47 +00:00
Boris Chiou 9198a9a26e Bug 1614407 - Drop fallback attribute from animate and distance. r=emilio
Still keep the discriminant checks to avoid generating terrible code.

Differential Revision: https://phabricator.services.mozilla.com/D62329

--HG--
extra : moz-landing-system : lando
2020-02-11 01:12:00 +00:00
Emilio Cobos Álvarez bfcb8d06e9 Bug 1614510 - Split clip-path and shape-outside values. r=boris
We don't actually share _that_ much code across them. This makes callers clearer
and code less confusing, IMHO.

This also has the benefit of not autocompleting path from devtools for
shape-outside.

Differential Revision: https://phabricator.services.mozilla.com/D62373

--HG--
extra : moz-landing-system : lando
2020-02-11 23:34:53 +00:00
Emilio Cobos Álvarez 628f21dc90 Bug 1614510 - Use cbindgen for shape-outside and clip-path. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D62372

--HG--
extra : moz-landing-system : lando
2020-02-11 22:03:53 +00:00
Emilio Cobos Álvarez 006e5cca66 Bug 1614198 - Use cbindgen instead of nsStyleImage. r=aosmond
The trickier part is that we represent -moz-image-rect as a Rect() type instead
of image with non-null clip-rect. So we need to add a bit of code to
distinguish "image request types" from other types of images.

But it's not too annoying, and we need to do the same for fancier images like
image-set and such whenever we implement it, so seems nice to get rid of
most explicit usages of nsStyleImage::GetType().

Differential Revision: https://phabricator.services.mozilla.com/D62164

--HG--
extra : moz-landing-system : lando
2020-02-11 20:56:20 +00:00
Emilio Cobos Álvarez 21f524eca1 Bug 1614198 - Some preparation to start using cbindgen for shape-outside and clip-path. r=boris
Tweak the ShapeSourceRepresentation so that it doesn't store Option<>s.

Some renames so that GeometryBox doesn't conflict with the Gecko type, and some
other usual bits / re-exports to deal with cbindgen and generics.

Also, drive-by derive parsing of GeometryBox as it's trivial.

Doing this unfortunately is not possible without removing nsStyleImage first, so
let's do that before.

This makes us serialize in the shortest form for shape-outside, but that's what
we should do anyway.

(aside: the shapes code is a bit too generic, maybe we should unify
ClippingShape and FloatAreaShape...)

Differential Revision: https://phabricator.services.mozilla.com/D62163

--HG--
extra : moz-landing-system : lando
2020-02-11 20:56:13 +00:00
Emilio Cobos Álvarez d7841a5f17 Bug 1614208 - Remove some include dependencies in nsStyleConsts.h. r=jfkthame,jgilbert
We include it everywhere because it's included from gfxTypes.h.

This should avoid including all the generated bindings _everywhere_.

Differential Revision: https://phabricator.services.mozilla.com/D62174

--HG--
extra : moz-landing-system : lando
2020-02-11 01:23:37 +00:00
Emilio Cobos Álvarez 52d630ef26 Bug 1614198 - Remove trait bound and comment that snuck from a previous patch accidentally in a CLOSED TREE
MANUAL PUSH: Fixing accidental Lando-relanding of previous version of the patch.
2020-02-10 21:17:59 +01:00
Emilio Cobos Álvarez d6aacafdfd Bug 1614198 - Merge ImageLayer and Image. r=heycam
ImageLayer is almost the only usage of Image, so keeping them in the same enum
makes the resulting C++ struct smaller, and makes it map more cleanly to
nsStyleImage.

Differential Revision: https://phabricator.services.mozilla.com/D62161

--HG--
extra : moz-landing-system : lando
2020-02-10 20:02:31 +00:00
Mihai Alexandru Michis a53731fa59 Backed out changeset a3695dec8b66 (bug 1614198) for causing bustages in ImageLayer
CLOSED TREE
2020-02-10 21:48:26 +02:00
Emilio Cobos Álvarez 0ca6f95831 Bug 1614198 - Merge ImageLayer and Image. r=heycam
ImageLayer is almost the only usage of Image, so keeping them in the same enum
makes the resulting C++ struct smaller, and makes it map more cleanly to
nsStyleImage.

Differential Revision: https://phabricator.services.mozilla.com/D62161

--HG--
extra : moz-landing-system : lando
2020-02-10 19:25:40 +00:00
Emilio Cobos Álvarez ec32f37af9 Bug 1614394 - Cherry-pick some more formatting changes.
Differential Revision: https://phabricator.services.mozilla.com/D62317

--HG--
extra : moz-landing-system : lando
2020-02-10 18:18:27 +00:00
Emilio Cobos Álvarez 888338d969 Bug 1614394 - Cherry-pick a selectors version bump.
Differential Revision: https://phabricator.services.mozilla.com/D62309

--HG--
extra : moz-landing-system : lando
2020-02-10 17:32:37 +00:00
Emilio Cobos Álvarez 89edad17e0 Bug 1614394 - Remove now unused dependency from the style system.
Differential Revision: https://phabricator.services.mozilla.com/D62308

--HG--
extra : moz-landing-system : lando
2020-02-10 17:32:35 +00:00
Emilio Cobos Álvarez 93611990a4 Bug 1614394 - Rustfmt recent changes.
Differential Revision: https://phabricator.services.mozilla.com/D62307

--HG--
extra : moz-landing-system : lando
2020-02-10 17:32:27 +00:00
Emilio Cobos Álvarez f811ee2f3b Bug 1614394 - Fix Servo build.
Differential Revision: https://phabricator.services.mozilla.com/D62306

--HG--
extra : moz-landing-system : lando
2020-02-10 17:32:25 +00:00
Emilio Cobos Álvarez 217f3f86df Bug 1614394 - Cherry-pick some servo-2020 changes to the style system.
Differential Revision: https://phabricator.services.mozilla.com/D62305

--HG--
extra : moz-landing-system : lando
2020-02-10 17:32:18 +00:00
Patrick Shaughnessy 00d66a376a Bug 1614394 - Cherry-pick Servo changes for :defined support.
Differential Revision: https://phabricator.services.mozilla.com/D62304

--HG--
extra : moz-landing-system : lando
2020-02-10 17:32:15 +00:00
Emilio Cobos Álvarez 9ec744b313 Bug 1614394 - Implement num_traits::Zero for CSSPixelLength.
Differential Revision: https://phabricator.services.mozilla.com/D62303

--HG--
extra : moz-landing-system : lando
2020-02-10 17:32:13 +00:00
Simon Sapin 583c7b9d38 Bug 1614394 - Move `OpaqueNode` to `style_traits`.
Differential Revision: https://phabricator.services.mozilla.com/D62302

--HG--
extra : moz-landing-system : lando
2020-02-10 17:32:11 +00:00
Emilio Cobos Álvarez 741ec04a23 Bug 1614394 - Cherry-pick some servo-only changes to malloc_size_of.
Differential Revision: https://phabricator.services.mozilla.com/D62301

--HG--
extra : moz-landing-system : lando
2020-02-10 17:32:09 +00:00
Simon Sapin dd3ef574ef Bug 1614394 - Parse `-moz-image-rect()` and `-moz-element()` only in Gecko.
Differential Revision: https://phabricator.services.mozilla.com/D62300

--HG--
extra : moz-landing-system : lando
2020-02-10 17:32:07 +00:00
Emilio Cobos Álvarez 44abf87d9d Bug 1612301 - Fix LengthPercentage on big-endian machines. r=jfkthame
Always store the pointer in little-endian order so that the tag trick works.

Differential Revision: https://phabricator.services.mozilla.com/D61386

--HG--
extra : moz-landing-system : lando
2020-02-10 17:12:44 +00:00
Emilio Cobos Álvarez 4103cf7f51 Bug 1613491 - Make rust generate better code for some of the functions introduced here. r=heycam
See https://github.com/rust-lang/rust/issues/68867.

Differential Revision: https://phabricator.services.mozilla.com/D61760

--HG--
extra : moz-landing-system : lando
2020-02-10 14:09:38 +00:00
Emilio Cobos Álvarez 7e238a47ba Bug 1613491 - Add some calc infrastructure to deal with simplification / sorting / etc. r=heycam
For now, we still bail out at the stage of getting the calc node into a
CalcLengthPercentage if we couldn't simplify the min() / max() / clamps()
involved.

After this plan is to use just CalcNode everywhere instead of
specified::CalcLengthPercentage, and then modify the computed
CalcLengthPercentage, which would look slightly different as we know all the sum
terms for those are a struct like { Length, Percentage, bool has_percentage } or
such, so all the simplification code for that becomes much simpler, ideally.

Or we could turn CalcNode generic otherwise, if it's too much code... We'll see.

Differential Revision: https://phabricator.services.mozilla.com/D61739

--HG--
extra : moz-landing-system : lando
2020-02-10 14:09:27 +00:00
Emilio Cobos Álvarez f98a6411b1 Bug 1613517 - Make rust generate better code for derive(Animate) and derive(ComputeSquaredDistance). r=heycam
See https://github.com/rust-lang/rust/issues/68867.

This technically changes the semantics of #[animate(fallback)] and such when
combined with #[animate(error)]. But no such combination exists and the new
semantics are perfectly reasonable as well, IMHO.

Differential Revision: https://phabricator.services.mozilla.com/D61761

--HG--
extra : moz-landing-system : lando
2020-02-10 13:51:49 +00:00
Emilio Cobos Álvarez 451b254453 Bug 1612291 - Fix two issues with themed widgets in high contrast mode. r=heycam
There were two issues with the existing code that we use to determine whether a
widget is styled or not.

First, it was using `color == Color::transparent()` instead of
`color.is_transparent()` to check for transparent backgrounds. That is not sound
as `Color::transparent()` is the literal value `rgba(0, 0, 0, 0)`, not the
`transparent` keyword, so the equality check would fail.

The other issue is that this function was early-returning false if that check
was returning false. It is a bug for this function to early-return false, as it
makes the result of the function dependent of the order of the declarations.

Differential Revision: https://phabricator.services.mozilla.com/D62060

--HG--
extra : moz-landing-system : lando
2020-02-10 00:37:36 +00:00
Tim Nguyen 3459492b2f Bug 1614160 - Add AngleOrPercentage to style system. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D62158

--HG--
extra : moz-landing-system : lando
2020-02-09 15:11:43 +00:00
Emilio Cobos Álvarez 374cabd6e7 Bug 1606628 - Remove nsStyleImageRequest. r=tnikkel,heycam
This removes nsStyleImageRequest by moving the load state to LoadData instead
(where other lazy state like the resolved URL and load id lives).

That way we can use cbindgen for more stuff (there's no blocker for using it for
all images now), and we can undo the image tracking shenanigans that I had to do
in bug 1605803 in nsImageFrame.

This removes the mDocGroup member because well, there's no real upside of that
now that quantum DOM is not a thing.

It also removes the static clones of the image requests, and the need for each
computed value instance to have its own request. These were needed because we
needed the image loader for the particular document to observe the image
changes. But we were also tracking the request -> loader for other purposes.
Instead, Now all the images get loaded with GlobalImageObserver as a listener,
which looks in the image map and forwards the notification to all the interested
loaders instead dynamically.

The style value is only responsible to load the image, and no longer tracks /
locks it. Instead, the loader does so, via the image tracker.

Differential Revision: https://phabricator.services.mozilla.com/D58519

--HG--
extra : moz-landing-system : lando
2020-02-07 20:36:34 +00:00
Thomas Dolezal 062c15357a Bug 1611733 - Bug 1611633 - convert ns style position defines to enum class. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D61958

--HG--
extra : moz-landing-system : lando
2020-02-07 12:35:30 +00:00
Emilio Cobos Álvarez af73640f4e Bug 1613010 - Don't use a binary tree representation for calc() sums / products. r=heycam
Keep a flat list of sum members. Simpify product and division ASAP.

I want to preserve the tree for a bit longer to implement min / max / clamp.
This doesn't do anything for it that we weren't doing already, but it helps to
eventually keep this specified representation and the equivalent computed
representation for <length-percentage> values.

Enable the tests for the comparison functions too, to prevent regressions.

Differential Revision: https://phabricator.services.mozilla.com/D61514

--HG--
extra : moz-landing-system : lando
2020-02-07 00:40:55 +00:00
Mihai Alexandru Michis 823e8c21f1 Backed out changeset c9f4dd3ed78b (bug 1606628) for causing failures in ImageLoader.cpp
CLOSED TREE
2020-02-06 23:19:55 +02:00
Emilio Cobos Álvarez 77c6b3e983 Bug 1606628 - Remove nsStyleImageRequest. r=tnikkel,heycam
This removes nsStyleImageRequest by moving the load state to LoadData instead
(where other lazy state like the resolved URL and load id lives).

That way we can use cbindgen for more stuff (there's no blocker for using it for
all images now), and we can undo the image tracking shenanigans that I had to do
in bug 1605803 in nsImageFrame.

This removes the mDocGroup member because well, there's no real upside of that
now that quantum DOM is not a thing.

It also removes the static clones of the image requests, and the need for each
computed value instance to have its own request. These were needed because we
needed the image loader for the particular document to observe the image
changes. But we were also tracking the request -> loader for other purposes.
Instead, Now all the images get loaded with GlobalImageObserver as a listener,
which looks in the image map and forwards the notification to all the interested
loaders instead dynamically.

The style value is only responsible to load the image, and no longer tracks /
locks it. Instead, the loader does so, via the image tracker.

Differential Revision: https://phabricator.services.mozilla.com/D58519

--HG--
extra : moz-landing-system : lando
2020-02-06 20:32:59 +00:00
Emilio Cobos Álvarez 836a705c56 Bug 1607553 - Try to collect some more crash information so that we can diagnose this better. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D59704

--HG--
extra : moz-landing-system : lando
2020-01-22 00:06:35 +00:00
Jonathan Kew 4a153d86a2 Bug 1607308 - Move the from-font value from text-underline-offset to text-underline-position, as per recent spec changes, and fix interaction between position and offset. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D59778

--HG--
extra : moz-landing-system : lando
2020-02-03 14:38:28 +00:00
Jonathan Kew aa8ee28de1 Bug 1607534 - Support percentage values for the CSS text-decoration-thickness and text-underline-offset properties. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D59777

--HG--
extra : moz-landing-system : lando
2020-02-03 14:21:32 +00:00
Ciure Andrei 141db422c6 Backed out 2 changesets (bug 1607308, bug 1607534) for causing text-decoration-underline-position-vertical-ja.html to permafail CLOSED TREE
Backed out changeset e55052ed4064 (bug 1607308)
Backed out changeset 280bd106d48a (bug 1607534)
2020-02-03 16:17:02 +02:00
Emilio Cobos Álvarez ca641d574f Bug 1612114 - Invalidate shadow root style data on insertion if needed. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D61293

--HG--
extra : moz-landing-system : lando
2020-02-03 12:40:36 +00:00
Jonathan Kew 8b019300fc Bug 1607308 - Move the from-font value from text-underline-offset to text-underline-position, as per recent spec changes, and fix interaction between position and offset. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D59778

--HG--
extra : moz-landing-system : lando
2020-02-03 11:12:16 +00:00
Jonathan Kew 1ee6b76d7d Bug 1607534 - Support percentage values for the CSS text-decoration-thickness and text-underline-offset properties. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D59777

--HG--
extra : moz-landing-system : lando
2020-02-03 11:11:52 +00:00
Tim Nguyen 3b6875eeb1 Bug 1610404 - Remove nsGroupBoxFrame (display: -moz-groupbox). r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D61422

--HG--
extra : moz-landing-system : lando
2020-02-03 09:55:51 +00:00
Thomas Dolezal bfd4477a13 Bug 1612146 - Converting empty-cells defines into enum class. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D61398

--HG--
extra : moz-landing-system : lando
2020-02-01 21:43:31 +00:00
Thomas Dolezal 2770364f87 Bug 1612148 - Replace transform style defines to an enum class. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D61388

--HG--
extra : moz-landing-system : lando
2020-02-01 20:23:26 +00:00
Narcis Beleuzu 585bab844e Backed out 2 changesets (bug 1612148) for reftest failures. CLOSED TREE
Backed out changeset e1432ef26779 (bug 1612148)
Backed out changeset 0c1831f15450 (bug 1612148)
2020-02-01 19:23:06 +02:00
Emilio Cobos Álvarez c84fe1b982 Bug 1612148 - followup: Remove unused include.
MANUAL PUSH: Patch from contributor was missing this, causing bustage.

CLOSED TREE

--HG--
extra : amend_source : ebf9505656921c452d3b2abac2f5a88f1b99db15
2020-02-01 17:08:09 +01:00
Thomas Dolezal 523017b0f6 Bug 1612148 - Replace transform style defines to an enum class. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D61388

--HG--
extra : moz-landing-system : lando
2020-02-01 15:50:04 +00:00
Emilio Cobos Álvarez 1fdf0e61d3 Bug 1611912 - Add a style flag for the root element style. r=heycam
This is needed to make the root element not a containing block in presence of
filters or what not.

Differential Revision: https://phabricator.services.mozilla.com/D61167

--HG--
extra : moz-landing-system : lando
2020-01-31 14:51:06 +00:00