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

13182 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 551edfd98f Bug 1618303 - Add an inherited style bit to know whether an element is in an opacity: 0 subtree. r=hiro
I think this should work for the animation throttling stuff.

Opacity works on the element tree, so I think this is sound.

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

--HG--
extra : moz-landing-system : lando
2020-02-27 02:26:39 +00:00
Emilio Cobos Álvarez 279cb1fda5 Bug 1618601 - Add non-const accessors to StyleRect. r=hiro
Just minor convenience. Though I don't love the code duplication, oh well.

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

--HG--
extra : moz-landing-system : lando
2020-02-27 20:58:00 +00:00
Emilio Cobos Álvarez 0fd680394f Bug 1617746 - Minor cleanup of ServoStyleSet. r=nordzilla
Removing unused arguments and so on.

The origin can always be inferred from the stylesheet so it wasn't being used.

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

--HG--
extra : moz-landing-system : lando
2020-02-27 01:46:10 +00:00
Cosmin Sabou 3497aa8314 Backed out 2 changesets (bug 1617746) assertion failures on ShadowRoot.cpp.
CLOSED TREE
Backed out changeset 6cb30e866b95 (bug 1617746)
Backed out changeset 3543162b815b (bug 1617746)
2020-02-27 01:12:46 +02:00
Emilio Cobos Álvarez 28effe5605 Bug 1617746 - Minor cleanup of ServoStyleSet. r=nordzilla
Removing unused arguments and so on.

The origin can always be inferred from the stylesheet so it wasn't being used.

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

--HG--
extra : moz-landing-system : lando
2020-02-26 21:20:38 +00:00
Emilio Cobos Álvarez 5824297570 Bug 1617600 - Remove no-longer-used argument to pseudo-class-list-macro. r=firefox-style-system-reviewers,jwatt
This used to be needed for Gecko interop, but now all this is in the Rust side
so we no longer need it.

Depends on D63861

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

--HG--
extra : moz-landing-system : lando
2020-02-26 14:16:27 +00:00
Emilio Cobos Álvarez de54b68ce7 Bug 1617600 - Prototype :focus-visible behind a flag. r=smaug
The heuristic is that we show focus outlines for unknown or key focus, and not
for mouse / touch.

This is probably not the final heuristic we take, but this allows people to play
with it and file bugs.

Once this is mature enough we should remove :-moz-focusring in favor of
:focus-visible.

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

--HG--
extra : moz-landing-system : lando
2020-02-26 14:16:20 +00:00
Noemi Erli 4fb19079c8 Backed out 3 changesets (bug 1617600) for causing wpt failures in focus-visible-009.html CLOSED TREE
Backed out changeset 73d1a5e10337 (bug 1617600)
Backed out changeset b722714830cd (bug 1617600)
Backed out changeset 45464d926bf0 (bug 1617600)
2020-02-26 01:46:31 +02:00
Emilio Cobos Álvarez 95765901de Bug 1617600 - Remove no-longer-used argument to pseudo-class-list-macro. r=firefox-style-system-reviewers,jwatt
This used to be needed for Gecko interop, but now all this is in the Rust side
so we no longer need it.

Depends on D63861

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

--HG--
extra : moz-landing-system : lando
2020-02-25 12:33:33 +00:00
Emilio Cobos Álvarez 490c70ecc0 Bug 1617600 - Prototype :focus-visible behind a flag. r=smaug
The heuristic is that we show focus outlines for unknown or key focus, and not
for mouse / touch.

This is probably not the final heuristic we take, but this allows people to play
with it and file bugs.

Once this is mature enough we should remove :-moz-focusring in favor of
:focus-visible.

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

--HG--
extra : moz-landing-system : lando
2020-02-25 17:58:28 +00:00
Emilio Cobos Álvarez 5e65211744 Bug 1617472 - Use enums for text-align / text-align-last. r=jfkthame
This also fixes some backwards logic in nsBlockFrame::ReflowDirtyLines, and adds
some static assertions to nsGenericHTMLElement that almost cause a very subtle
bug.

Depends on D63792

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

--HG--
extra : moz-landing-system : lando
2020-02-24 13:32:57 +00:00
Emilio Cobos Álvarez 9de9318c48 Bug 1617069 - Minor LengthPercentage improvements. r=heycam
* Use debug_unreachable for really unreachable code (having a release
   unreachable!() there gives us little to no benefit, as a borked union can
   already confuse us into reading an arbitrary pointer as a CalcPercentage).

 * Avoid a clone of the calc variant when clamping. We only need to mutate the
   clamping mode. This was the only clamp_to_non_negative function that didn't
   consume the value.

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

--HG--
extra : moz-landing-system : lando
2020-02-23 22:27:13 +00:00
Emilio Cobos Álvarez f1e371b6fb Bug 1617425 - Minor cleanup of gecko.mako.rs. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D63779

--HG--
extra : moz-landing-system : lando
2020-02-23 15:43:21 +00:00
Emilio Cobos Álvarez 71cc1a2c62 Bug 1617425 - Use cbindgen for SVG lengths. r=jwatt
Depends on D63777

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

--HG--
extra : moz-landing-system : lando
2020-02-23 15:43:03 +00:00
Emilio Cobos Álvarez fff63130d9 Bug 1617421 - Use cbindgen for cursors. r=jwatt
Pretty straight-forward.

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

--HG--
extra : moz-landing-system : lando
2020-02-23 13:07:30 +00:00
Emilio Cobos Álvarez e96098ff1b Bug 1616691 - Properly reject numbers as part of <length-percentage>. r=heycam
We never fast-reject numbers (because they could be part of a product). Without
this refactoring we'd accept stuff like calc(10) and crash during the evaluation
for obvious reasons.

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

--HG--
extra : moz-landing-system : lando
2020-02-21 00:47:02 +00:00
Emilio Cobos Álvarez 7d8ecd8ab1 Bug 1616691 - Fix one minor serialization issue which was causing test failures. r=heycam
We were serializing calc(10% + 4px) as calc(10% + calc(4px)).

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

--HG--
extra : moz-landing-system : lando
2020-02-21 00:47:00 +00:00
Emilio Cobos Álvarez 4e5b75c288 Bug 1616691 - Simplify math function resolution. r=heycam
So as to avoid allocating an intermediate tree in Rust to resolve
`<length-percentage>` values.

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

--HG--
extra : moz-landing-system : lando
2020-02-21 00:46:53 +00:00
Emilio Cobos Álvarez 1c8cc0fccb Bug 1616691 - Fix C++ side of <length-percentage> values. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D63398

--HG--
extra : moz-landing-system : lando
2020-02-21 00:46:50 +00:00
Emilio Cobos Álvarez 9776b78db8 Bug 1616691 - Make CalcNode the specified representation of <length> and <length-percentage> values. r=heycam
This is the meat of the patch. There are a couple improvements done in a couple
later patches which should hopefully be straight-forward.

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

--HG--
extra : moz-landing-system : lando
2020-02-21 00:46:41 +00:00
Emilio Cobos Álvarez 559a1c5c17 Bug 1616691 - Move the guts of calc nodes into a generic enum. r=heycam
We'll have different leaf nodes as we progress in the value computation stage.

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

--HG--
extra : moz-landing-system : lando
2020-02-21 00:46:33 +00:00
Emilio Cobos Álvarez 49fd79bb94 Bug 1616691 - Implement ToCss for CalcNode. r=heycam
We'll use `CalcNode` as the specified value representation for <length> and
<length-percentage> values, so they'll have to implement ToCss.

There's one minor issue (two calls to to_css() instead of to_css_impl() which
are addressed later in the series).

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

--HG--
extra : moz-landing-system : lando
2020-02-21 00:46:26 +00:00
Emilio Cobos Álvarez af44ad742c Bug 1607553 - Remove an invalid assert. r=heycam
This assert was wrong. The assert may fire if we resurrect the node from a
different thread and insert a kid fast enough.

We allow resurrecting nodes (bumping the nodes from zero to one) to avoid
allocation churn.

In particular, while the thread dropping the node gets to read the children (so
after the fetch_sub from the refcount, but before the read() of the children),
another thread could plausibly bumped the refcount back, and added a children.

This is a very big edge case of course, but I'm kinda sad I hadn't realized
before.

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

--HG--
extra : moz-landing-system : lando
2020-02-20 08:43:08 +00:00
Jonathan Kew 4f84a1029c Bug 1611965 - Add support for the 'all' value of text-decoration-skip-ink. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D61184

--HG--
extra : moz-landing-system : lando
2020-02-19 20:04:36 +00:00
Tim Nguyen 91e68d88c0 Bug 1614202 - Implement parsing for CSS conic-gradient syntax. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D62148

--HG--
extra : moz-landing-system : lando
2020-02-19 17:43:04 +00:00
Emilio Cobos Álvarez f63532cf6d Bug 1615056 - Remove layout.css.webkit-appearance.enabled. r=jwatt
I don't think we want to keep the ugly widget hacks forever. Let me know if
you'd rather keep the property behind a pref but I don't think there's a point
in doing that.

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

--HG--
extra : moz-landing-system : lando
2020-02-19 14:48:43 +00:00
Ciure Andrei 28fcfbb1ca Backed out changeset 912204a32651 (bug 1614202) for causing xpcshell and mochitests failures CLOSED TREE 2020-02-19 17:21:54 +02:00
Bogdan Tara d9d7ba1ba9 Backed out changeset 222723ab0b5b (bug 1615056) for bustages complaining about nsNativeThemeWin.cpp CLOSED TREE 2020-02-19 16:10:56 +02:00
Tim Nguyen a7a60ebe29 Bug 1614202 - Implement parsing for CSS conic-gradient syntax. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D62148

--HG--
extra : moz-landing-system : lando
2020-02-19 13:55:36 +00:00
Emilio Cobos Álvarez 4675433ccc Bug 1615056 - Remove layout.css.webkit-appearance.enabled. r=jwatt
I don't think we want to keep the ugly widget hacks forever. Let me know if
you'd rather keep the property behind a pref but I don't think there's a point
in doing that.

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

--HG--
extra : moz-landing-system : lando
2020-02-19 11:27:27 +00:00
Cameron McCormack ad66f7561b Bug 1607667 - Change initial value of image-orientation to from-image. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D62826

--HG--
extra : moz-landing-system : lando
2020-02-14 11:11:27 +00:00
Emilio Cobos Álvarez e02bf215b7 Bug 1615876 - Minor gradient parsing cleanup. r=ntim
I suggested the compat_mode bit in D62923 but it was somehow only applied to one
of the branches.

Also rustfmt the code for consistency, and add a local alias.

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

--HG--
extra : moz-landing-system : lando
2020-02-16 11:00:45 +00:00
Tim Nguyen c15714cbeb Bug 1615489 - Refactor GenericGradient for conic-gradient support. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D62923

--HG--
extra : moz-landing-system : lando
2020-02-15 22:04:35 +00:00
Arthur Iakab 8fc81437b1 Backed out changeset 0721d0777474 (bug 1615489) for multiple build bustages.
DONTBUILD
CLOSED TREE
2020-02-15 21:50:33 +02:00
Tim Nguyen cc1ec3b906 Bug 1615489 - Refactor GenericGradient for conic-gradient support. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D62923

--HG--
extra : moz-landing-system : lando
2020-02-15 19:07:54 +00:00
shindli ef9b6edae2 Backed out changeset 07fc980b7ed8 (bug 1615489) for causing linux build bustages 2020-02-15 15:41:45 +02:00
Tim Nguyen dc4ed94109 Bug 1615489 - Refactor GenericGradient for conic-gradient support. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D62923

--HG--
extra : moz-landing-system : lando
2020-02-15 13:16:36 +00:00
Tim Nguyen a2e4d99a50 Bug 1610597 - Re-introduce display: -moz-stack; as <legacy-stack>. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D62758

--HG--
extra : moz-landing-system : lando
2020-02-14 16:32:38 +00:00
Martin McNickle 30c6161dca Bug 1615380 - Part 2 - Use the cbindgen output for GridAutoFlow directly in gecko. r=emilio
Depends on D62787

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

--HG--
extra : moz-landing-system : lando
2020-02-14 15:48:10 +00:00
Martin McNickle 338ba52025 Bug 1615380 - Part 1 - Replace existing GridAutoFlow struct with a `bitflags!` backed one. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D62787

--HG--
extra : moz-landing-system : lando
2020-02-14 15:48:01 +00:00
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
Jonathan Kew fe46c531b3 Bug 1612399 - Don't apply text-combine-upright in sideways-* writing modes. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D61326

--HG--
extra : moz-landing-system : lando
2020-01-31 10:11:19 +00:00
Thomas Dolezal 28e6a65cfb Bug 1612143 - Replacing table-layout defines with an enum r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D61260

--HG--
extra : moz-landing-system : lando
2020-01-31 01:23:23 +00:00
Emilio Cobos Álvarez 4812f9408a Bug 1611583 - Use cbindgen for css-align types. r=dholbert
This provides stronger typing and removes a bunch of subtle constants matching.

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

--HG--
extra : moz-landing-system : lando
2020-01-31 00:56:49 +00:00
Thomas Dolezal a63c10f0de Bug 1611041 - Convert image-rendering #defines to an enum class. r=emilio
MANUAL PUSH: Contributor didn't use Phabricator and I don't want patch to rot
2020-01-30 04:50:24 +01:00
Martin McNickle 9f727fc9c5 Bug 1611829 - Convert scroll-behavior #defines to an enum class. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D61164

--HG--
extra : moz-landing-system : lando
2020-01-28 09:12:29 +00:00
Martin McNickle 0c665c265e Bug 1611043 - Convert mask-type #defines to an enum class. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D60987

--HG--
extra : moz-landing-system : lando
2020-01-27 14:59:41 +00:00
Emilio Cobos Álvarez f97d7df528 Bug 1610085 - Tweak background-color and color handling in ignored-colors mode. r=jwatt
We're resetting `color` to the default color when there's a declaration that
applies in order to make stuff like this:

<div style="color: transparent">
  <div style="color: red">
    Red
  </div>
</div>

To not show transparent. But the behavior we want is more like "override with
default color iff there's no other declaration that would set the color from an
user or UA sheet".

This implements that behavior, plus avoids it if we're not inheriting
from transparent, so that stuff like this preserves the behavior from before bug
844349:

<a href="foo">
  <span style="color: red">Should be the red color</span>
</a>

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

--HG--
extra : moz-landing-system : lando
2020-01-26 22:57:21 +00:00
Csoregi Natalia 3a270b7de3 Backed out changeset 239f7622187e (bug 1610085) for background color failures on test_dont_use_document_colors.html. CLOSED TREE 2020-01-26 23:14:39 +02:00
Emilio Cobos Álvarez 6bfbf10f25 Bug 1611711 - Remove kCursorKTable. r=jwatt
(And while at it, format the end of the other keyword tables so that
cleanup_ktables.py works).

It seems `Window.setCursor` is only used once in our code, maybe
we should remove it...

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

--HG--
extra : moz-landing-system : lando
2020-01-26 20:17:41 +00:00
Emilio Cobos Álvarez 64099dcf90 Bug 1610085 - Tweak background-color and color handling in ignored-colors mode. r=jwatt
We're resetting `color` to the default color when there's a declaration that
applies in order to make stuff like this:

<div style="color: transparent">
  <div style="color: red">
    Red
  </div>
</div>

To not show transparent. But the behavior we want is more like "override with
default color iff there's no other declaration that would set the color from an
user or UA sheet".

This implements that behavior, plus avoids it if we're not inheriting
from transparent, so that stuff like this preserves the behavior from before bug
844349:

<a href="foo">
  <span style="color: red">Should be the red color</span>
</a>

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

--HG--
extra : moz-landing-system : lando
2020-01-26 20:16:47 +00:00