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

13355 Коммитов

Автор SHA1 Сообщение Дата
Simon Giesecke ddfa9fe2d2 Bug 1633719 - Make NotNull move its member pointer where possible. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D72827
2020-05-05 09:09:01 +00:00
Boris Chiou 3ceed5d372 Bug 1633486 - Add ::marker when checking may_have_animations() during traversal. r=emilio
When unhidding a ::marker element, we construct its generated item, and
then call StyleNewSubtree() on this generated item. During traversal, we
may update any animation related values in Gecko_UpdateAnimations(), which
may update the base styles for animation properties.

The test case is an animation segment from "null" to "inital" value. We
replace the "null" value with the base style value for the specific animation
property, so we can do interpolation properly.
(e.g. opacity: "null => initial" becomes "1.0 => initial")
If we don't update the animation related values in
Gecko_UpdateAnimations after generating ::marker, we may do
interpolation from "null" to "initial", which causes a panic.

Differential Revision: https://phabricator.services.mozilla.com/D73408
2020-05-04 19:15:43 +00:00
Philipp Zech e7364f83d0 Bug 1625745 - Convert counter-system #defines to enum classes. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D72554
2020-05-03 14:36:55 +00:00
Emilio Cobos Álvarez b14f021e00 Bug 1632102 - Only override to default color in high-contrast / forced-colors mode if inheriting from transparent. r=morgan
That way elements inside links, form controls, etc have the right
contrast, even if the page overrides the color.

We can't do it when inheriting from transparent because we've already
forgotten about the "right" color to inherit, so the default color makes
sense. But that is a pretty unlikely edge case.

Differential Revision: https://phabricator.services.mozilla.com/D73069
2020-04-30 00:09:19 +00:00
Mats Palmgren 12bca02735 Bug 1607954 part 1 - [css-grid][css-align] Implement style system support for Masonry layout. r=emilio
This implements support for this CSS Masonry layout proposal:
https://github.com/w3c/csswg-drafts/issues/4650

I've intentionally left out a shorthand (place-tracks?) for now until
we have a draft CSS spec for this.

Differential Revision: https://phabricator.services.mozilla.com/D67061
2020-04-28 01:18:44 +00:00
Emilio Cobos Álvarez b8fbb6ead5 Bug 1509418 - Collect ancestor hashes from single-length :is and :where selector lists. r=heycam,boris
We can only collect hashes from single-length selectors, as described in
the comment.

Differential Revision: https://phabricator.services.mozilla.com/D71458
2020-04-23 19:20:35 +00:00
Emilio Cobos Álvarez f92b952261 Bug 1509418 - Handle disjoint selectors in the selector map. r=heycam,boris
This way, something like:

  *:where(.foo, .bar)

Will end up twice on the selector map, just as if you would've written
.foo, .bar.

But we're a bit careful to not be wasteful, so:

  .foo:where(div, span)

Will still end up using the .foo bucket.

It needs a bit of borrow-checker gymnastics to avoid cloning the entry
in the common path. It's a bit gross but not too terrible I think.

Differential Revision: https://phabricator.services.mozilla.com/D71457
2020-04-23 19:20:27 +00:00
Emilio Cobos Álvarez 7ff7bc8cc2 Bug 1509418 - Optimize invalidation by scanning the rightmost compound inside :where() and :is() with the outer visitor. r=heycam,boris
See the comment about why this is valuable. For a selector like:

    .foo:is(.bar) > .baz

Before this patch we'd generate an Dependency for .bar like this:

    Dependency {
        selector: .bar,
        offset: 0,
        parent: Some(Dependency {
            selector: .foo:is(.bar) > .baz,
            offset: 1, // Pointing to the `>` combinator.
            parent: None,
        }),
    }

After this patch we'd generate just:

    Dependency {
        selector: .foo:is(.bar) > .baz,
        offset: 1, // Pointing to the `>` combinator.
        parent: None,
    }

This is not only less memory but also less work. The reason for that is that,
before this patch, when .bar changes, we'd look the dependency, and see there's
a parent, and then scan that, so we'd match `.bar` two times, one for the
initial dependency, and one for .foo:is(.bar).

Instead, with this we'd only check `.foo:is(.bar)` once.

Differential Revision: https://phabricator.services.mozilla.com/D71423
2020-04-23 19:20:17 +00:00
Emilio Cobos Álvarez 2975274c6b Bug 1509418 - Make Invalidation work in terms of a dependency, not a selector. r=heycam,boris
That way we can look at the parent dependency as described in the previous
patch. An alternative would be to add a:

    parent_dependency: Option<&'a Dependency>

on construction to `Invalidation`, but this way seems slightly better to avoid
growing the struct. It's not even one more indirection because the selector is
contained directly in the Dependency struct.

Differential Revision: https://phabricator.services.mozilla.com/D71422
2020-04-23 19:20:10 +00:00
Emilio Cobos Álvarez 40a0b1a6d6 Bug 1509418 - Keep track of nested dependencies for :where() and :is(). r=heycam,boris
The tricky part of :is() and :where() is that they can have combinators inside,
so something like this is valid:

  foo:is(#bar > .baz) ~ taz

The current invalidation logic is based on the assumption that you can
represent a combinator as a (selector, offset) tuple, which are stored in the
Dependency struct. This assumption breaks with :is() and :where(), so we need
to make them be able to represent a combinator in an "inner" selector.

For this purpose, we add a `parent` dependency. With it, when invalidating
inside the `:is()` we can represent combinators inside as a stack.

The basic idea is that, for the example above, when an id of "bar" is added or
removed, we'd find a dependency like:

    Dependency {
        selector: #bar > .baz,
        offset: 1, // pointing to the `>` combinator
        parent: Some(Dependency {
            selector: foo:is(#bar > .baz) > taz,
            offset: 1, // Pointing to the `~` combinator.
            parent: None,
        })
    }

That way, we'd start matching at the element that changed, towards the right,
and if we find an element that matches .baz, instead of invalidating that
element, we'd look at the parent dependency, then double-check that the whole
left-hand-side of the selector (foo:is(#bar > .baz)) actually changed, and then
keep invalidating to the right using the parent dependency as usual.

This patch only builds the data structure and keeps the code compiling, the
actual invalidation work will come in a following patch.

Differential Revision: https://phabricator.services.mozilla.com/D71421
2020-04-23 19:20:03 +00:00
Cosmin Sabou dacaa0fa0b Backed out 6 changesets (bug 1509418) for causing dt failures on several files. CLOSED TREE
Backed out changeset 0de514478e3c (bug 1509418)
Backed out changeset 859910d9fee2 (bug 1509418)
Backed out changeset 0abf5d38ab61 (bug 1509418)
Backed out changeset f572e241c626 (bug 1509418)
Backed out changeset 6398c8f1b4d4 (bug 1509418)
Backed out changeset ebef9346b5b1 (bug 1509418)
2020-04-24 08:38:05 +03:00
Emilio Cobos Álvarez 8165749eb7 Bug 1509418 - Collect ancestor hashes from single-length :is and :where selector lists. r=heycam,boris
We can only collect hashes from single-length selectors, as described in
the comment.

Differential Revision: https://phabricator.services.mozilla.com/D71458
2020-04-23 19:20:35 +00:00
Emilio Cobos Álvarez bfd3683e13 Bug 1509418 - Handle disjoint selectors in the selector map. r=heycam,boris
This way, something like:

  *:where(.foo, .bar)

Will end up twice on the selector map, just as if you would've written
.foo, .bar.

But we're a bit careful to not be wasteful, so:

  .foo:where(div, span)

Will still end up using the .foo bucket.

It needs a bit of borrow-checker gymnastics to avoid cloning the entry
in the common path. It's a bit gross but not too terrible I think.

Differential Revision: https://phabricator.services.mozilla.com/D71457
2020-04-23 19:20:27 +00:00
Emilio Cobos Álvarez 31dc1cb456 Bug 1509418 - Optimize invalidation by scanning the rightmost compound inside :where() and :is() with the outer visitor. r=heycam,boris
See the comment about why this is valuable. For a selector like:

    .foo:is(.bar) > .baz

Before this patch we'd generate an Dependency for .bar like this:

    Dependency {
        selector: .bar,
        offset: 0,
        parent: Some(Dependency {
            selector: .foo:is(.bar) > .baz,
            offset: 1, // Pointing to the `>` combinator.
            parent: None,
        }),
    }

After this patch we'd generate just:

    Dependency {
        selector: .foo:is(.bar) > .baz,
        offset: 1, // Pointing to the `>` combinator.
        parent: None,
    }

This is not only less memory but also less work. The reason for that is that,
before this patch, when .bar changes, we'd look the dependency, and see there's
a parent, and then scan that, so we'd match `.bar` two times, one for the
initial dependency, and one for .foo:is(.bar).

Instead, with this we'd only check `.foo:is(.bar)` once.

Differential Revision: https://phabricator.services.mozilla.com/D71423
2020-04-23 19:20:17 +00:00
Emilio Cobos Álvarez 9c9a799887 Bug 1509418 - Make Invalidation work in terms of a dependency, not a selector. r=heycam,boris
That way we can look at the parent dependency as described in the previous
patch. An alternative would be to add a:

    parent_dependency: Option<&'a Dependency>

on construction to `Invalidation`, but this way seems slightly better to avoid
growing the struct. It's not even one more indirection because the selector is
contained directly in the Dependency struct.

Differential Revision: https://phabricator.services.mozilla.com/D71422
2020-04-23 19:20:10 +00:00
Emilio Cobos Álvarez 9a6a14fb98 Bug 1509418 - Keep track of nested dependencies for :where() and :is(). r=heycam,boris
The tricky part of :is() and :where() is that they can have combinators inside,
so something like this is valid:

  foo:is(#bar > .baz) ~ taz

The current invalidation logic is based on the assumption that you can
represent a combinator as a (selector, offset) tuple, which are stored in the
Dependency struct. This assumption breaks with :is() and :where(), so we need
to make them be able to represent a combinator in an "inner" selector.

For this purpose, we add a `parent` dependency. With it, when invalidating
inside the `:is()` we can represent combinators inside as a stack.

The basic idea is that, for the example above, when an id of "bar" is added or
removed, we'd find a dependency like:

    Dependency {
        selector: #bar > .baz,
        offset: 1, // pointing to the `>` combinator
        parent: Some(Dependency {
            selector: foo:is(#bar > .baz) > taz,
            offset: 1, // Pointing to the `~` combinator.
            parent: None,
        })
    }

That way, we'd start matching at the element that changed, towards the right,
and if we find an element that matches .baz, instead of invalidating that
element, we'd look at the parent dependency, then double-check that the whole
left-hand-side of the selector (foo:is(#bar > .baz)) actually changed, and then
keep invalidating to the right using the parent dependency as usual.

This patch only builds the data structure and keeps the code compiling, the
actual invalidation work will come in a following patch.

Differential Revision: https://phabricator.services.mozilla.com/D71421
2020-04-23 19:20:03 +00:00
Daniel Holbert 4adb473174 Bug 1626458 part 1: Remove pref for CSS Containment (layout.css.contain.enabled) r=AlaskanEmily
(Since we've been shipping with it default-enabled for a while now.)

See https://bugzilla.mozilla.org/show_bug.cgi?id=1466008#c9 through #c13 for
notes on the reftest.list change.

Differential Revision: https://phabricator.services.mozilla.com/D71861
2020-04-23 05:01:07 +00:00
Simon Sapin 5af9f4fc2a Bug 1631721 - Remove hashglobe r=manishearth
Differential Revision: https://phabricator.services.mozilla.com/D71743
2020-04-23 00:19:51 +00:00
Simon Sapin 08ac9e2e6c Bug 1631721 - Use std::alloc instead of hashbrown::alloc in fallible r=manishearth
This works even if the Rust standard library’s allocator is not `libc::malloc`,
so we can remove the `known_system_malloc `feature flag
and make the `fallible` crate unconditional.

Differential Revision: https://phabricator.services.mozilla.com/D71742
2020-04-23 00:19:51 +00:00
Simon Sapin 67ea7f6752 Bug 1631721 - Use hashbrown instead of hashglobe r=manishearth
Differential Revision: https://phabricator.services.mozilla.com/D71741
2020-04-23 00:19:51 +00:00
Simon Sapin cbe24024bb Bug 1631721 - Vendor the hashbrown crate r=manishearth
This is the hash map implementation now used in the Rust standard library:

* https://blog.rust-lang.org/2019/07/04/Rust-1.36.0.html#a-new-hashmapk-v-implementation
* https://github.com/rust-lang/rust/pull/58623
* https://crates.io/crates/hashbrown

Differential Revision: https://phabricator.services.mozilla.com/D71740
2020-04-23 00:19:50 +00:00
Emilio Cobos Álvarez 6341ebf29a Bug 1632363 - Fix some warnings introduced by the previous patches.
MANUAL PUSH: Avoid reviewer information from previous patches from
getting lost.
2020-04-23 05:11:04 +02:00
Martin Robinson 2561f2d680 Bug 1632363 - Add support for canceling CSS transitions. r=emilio
This change adds support for canceling CSS transitions when a property
is no longer transitionable or when an element becomes styled with
display:none. Support for canceling and replacing CSS transitions when
the end value changes is still pending. This change also takes advantage
of updating the constellation message to fix a bug where transition
events could be sent for closed pipelines.

Cherry-picked from https://github.com/servo/servo/pull/26244
(though this is not part of the Gecko build).
2020-04-23 05:10:23 +02:00
Martin Robinson 34bc586539 Bug 1632363 - Eliminate `AnimationFrame`. r=emilio
This intermediate data structure doesn't really buy us anything and is a
bit confusing.

Cherry-picked from https://github.com/servo/servo/pull/26214
(though this is not part of the Gecko build).
2020-04-23 05:10:21 +02:00
Anthony Ramine 9c1d8b545f Bug 1632363 - Make the rule tree actually threadsafe. r=emilio
RuleTree::gc is now a safe method that any thread can call
at any time, and StrongRuleNode values can all be dropped
whenever their owner want to, on any thread.

Cherry-picked from https://github.com/servo/servo/pull/26227
2020-04-23 05:10:20 +02:00
Anthony Ramine 7b4fc703a7 Bug 1632363 - Change Map::get_or_insert_with to Map::entry. r=emilio
Cherry-picked from https://github.com/servo/servo/pull/26227
2020-04-23 05:10:18 +02:00
Emilio Cobos Álvarez 2550d855b2 Bug 1631232 - Ensure that we hold an actual reference to the root, not to a field of a node we can just GC below. r=nox
Differential Revision: https://phabricator.services.mozilla.com/D71542
2020-04-20 11:07:22 +00:00
Anthony Ramine cf2f0bb18e Bug 1631232 - Always upgrade existing weak child references in the rule tree. r=emilio
Just because we didn't find a child when read-locking a node children list
doesn't mean it still won't exist while we wait to upgrade the read lock
into a write lock to create the child.

This cherry-picks https://github.com/servo/servo/pull/26220

MANUAL PUSH: So that I can preserve reviewer information.
2020-04-19 12:25:55 +02:00
Emilio Cobos Álvarez c1c10e4f44 Bug 1631154 - Fix a size test that was trying to test a now-private type.
MANUAL PUSH: bustage on a CLOSED TREE
2020-04-18 04:33:40 +02:00
Emilio Cobos Álvarez 57516a9b50 Bug 1631154 - Rustfmt and fix Servo build.
MANUAL PUSH: Review information would be lost.
2020-04-18 04:04:24 +02:00
Emilio Cobos Álvarez 73ce034b20 Bug 1631154 - Fix some rebase messups. 2020-04-18 04:04:24 +02:00
Martin Robinson 08a4e2cbc2 Bug 1631154 - Add an iterator for transition properties. r=emilio
This simplifies the code a bit and also will allow us to more easily
make improvements to servo's animation implementation in the future.
2020-04-18 04:04:24 +02:00
Anthony Ramine 54e5523868 Bug 1631154 - Introduce a new type UnsafeBox<T> in the rule tree. r=emilio
This lets us rely less on raw pointers, thus better tracking the lifetime
of the rule node values while dropping strong references etc.
2020-04-18 04:04:24 +02:00
Anthony Ramine 06ea2dd325 Bug 1631154 - Make StrongRuleNode::downgrade be unsafe. r=emilio 2020-04-18 04:04:24 +02:00
Anthony Ramine 49a6858e5c Bug 1631154 - Make StrongRuleNode::ensure_child take a StrongRuleNode for the root. r=emilio 2020-04-18 04:04:24 +02:00
Anthony Ramine a8dec99fc8 Bug 1631154 - Remove WeakRuleNode::clone. r=emilio
MallocSizeOf for RuleTree should not keep around weak references in
case someone runs a GC meanwhile.
2020-04-18 04:04:24 +02:00
Anthony Ramine f71e5d7ef4 Bug 1631154 - Make WeakRuleNode::from_ptr be unsafe. r=emilio 2020-04-18 04:04:24 +02:00
Anthony Ramine 47d8182814 Bug 1631154 - Make StrongRuleNode::from_ptr be unsafe. r=emilio 2020-04-18 04:04:24 +02:00
Anthony Ramine 2d243f239d Bug 1631154 - Move the meat of the rule tree to a submodule "core". r=emilio 2020-04-18 04:04:24 +02:00
Anthony Ramine 971b28fce9 Bug 1631154 - Move CascadeLevel to its own rule_tree submodule. r=emilio 2020-04-18 04:04:24 +02:00
Anthony Ramine ebdcec89d4 Bug 1631154 - Refactor rule tree children. r=emilio
We move the data structure to its own module for better
encapsulation of unsafe code.
2020-04-18 04:04:24 +02:00
Emilio Cobos Álvarez 2769a14cc2 Bug 1629735 - Implement parsing / selector-matching for :is() and :where(). r=heycam
This implements the easy / straight-forward parts of the :where / :is
selectors.

The biggest missing piece is to handle properly invalidation when there
are combinators present inside the :where. That's the hard part of this,
actually.

But this is probably worth landing in the interim. This fixes some of
the visitors that were easy to fix.

Differential Revision: https://phabricator.services.mozilla.com/D70788
2020-04-17 13:37:59 +00:00
Emilio Cobos Álvarez b69a3cb639 Bug 1630676 - Fix two regressions from the previous patches.
MANUAL PUSH: Review information for upstream patches would get lost otherwise.
2020-04-16 21:17:50 +02:00
Emilio Cobos Álvarez 2be2ef7470 Bug 1630676 - Reformat recent changes, various build fixes, and tidy fixes. 2020-04-16 21:17:50 +02:00
Josh Matthews 1f61fd94da Bug 1630676 - Refactor some Servo-only animations code. 2020-04-16 21:17:44 +02:00
Anthony Ramine e0efb285ff Bug 1630676 - Rearrange FontLanguageOverride. r=emilio
Creating one from a u32 should be unsafe because we rely on the fact that the
value is a valid &str.
2020-04-16 21:17:43 +02:00
Anthony Ramine cd9ba34b12 Bug 1630676 - Replace ScopedTLS::unsafe_get by ScopedTLS::into_slots. r=emilio
We only ever look at the slots after we are done with the thread pool,
so we don't need to expose any unsafety to inspect the slots.
2020-04-16 21:17:42 +02:00
Anthony Ramine 26b6ee1d3a Bug 1630676 - Don't use transmute to create PaintOrder values. r=emilio
I checked that rustc optimises the code just as well as with the transmute.

https://rust.godbolt.org/z/w6UJN4
2020-04-16 21:17:41 +02:00
Anthony Ramine 40593d91fb Bug 1630676 - Don't expose any AtomicRefCell directly from style traits.
This lets us experiment with how we store this data on the DOM side.
2020-04-16 21:17:41 +02:00
Tipowol 538f9d20c8 Bug 1630676 - Update Servo's attribute length parsing code to match spec. 2020-04-16 21:17:40 +02:00
Martin Robinson 51ad515388 Bug 1630676 - Cherry-pick some layout-2020 changes. 2020-04-16 21:17:39 +02:00
Josh Matthews 785ded933e Bug 1630676 - Update ipc-channel and crossbeam-channel in Servo. 2020-04-16 21:17:39 +02:00
Simon Sapin 0158f5c65e Bug 1630676 - Fix some errors and formatting changes when updating rustc to 1.43.0-nightly (5d04ce67f 2020-02-13). 2020-04-16 21:17:38 +02:00
Ciure Andrei aec781a233 Backed out 11 changesets (bug 1630676) for causing multiple failures CLOSED TREE
Backed out changeset c1fbe364b76c (bug 1630676)
Backed out changeset 629970c8f0b7 (bug 1630676)
Backed out changeset 1530f4a9aef2 (bug 1630676)
Backed out changeset a5b60fb5a0e1 (bug 1630676)
Backed out changeset a6e1a31c3e0d (bug 1630676)
Backed out changeset 4df9717e28f0 (bug 1630676)
Backed out changeset c76b0b0e503b (bug 1630676)
Backed out changeset 3c89aec57d0a (bug 1630676)
Backed out changeset 369cf504584d (bug 1630676)
Backed out changeset d7eff4acb616 (bug 1630676)
Backed out changeset 1d47c9354eeb (bug 1630676)
2020-04-16 21:45:51 +03:00
Emilio Cobos Álvarez a891140d96 Bug 1630676 - Fix a typo introduced earlier in this bug.
MANUAL PUSH: orange

CLOSED TREE
2020-04-16 19:25:26 +02:00
Emilio Cobos Álvarez 694173c605 Bug 1630676 - Reformat recent changes, various build fixes, and tidy fixes.
MANUAL PUSH: Review information for upstream patches would get lost otherwise.
2020-04-16 18:38:02 +02:00
Josh Matthews 0bff3e6dfd Bug 1630676 - Refactor some Servo-only animations code. 2020-04-16 18:37:52 +02:00
Anthony Ramine 878b6338d1 Bug 1630676 - Rearrange FontLanguageOverride. r=emilio
Creating one from a u32 should be unsafe because we rely on the fact that the
value is a valid &str.
2020-04-16 18:37:51 +02:00
Anthony Ramine 0f5b32207e Bug 1630676 - Replace ScopedTLS::unsafe_get by ScopedTLS::into_slots. r=emilio
We only ever look at the slots after we are done with the thread pool,
so we don't need to expose any unsafety to inspect the slots.
2020-04-16 18:37:50 +02:00
Anthony Ramine 265f2e8a89 Bug 1630676 - Don't use transmute to create PaintOrder values. r=emilio
I checked that rustc optimises the code just as well as with the transmute.

https://rust.godbolt.org/z/w6UJN4
2020-04-16 18:37:50 +02:00
Anthony Ramine 451e932aaa Bug 1630676 - Don't expose any AtomicRefCell directly from style traits.
This lets us experiment with how we store this data on the DOM side.
2020-04-16 18:37:49 +02:00
Tipowol 2eb18c48ed Bug 1630676 - Update Servo's attribute length parsing code to match spec. 2020-04-16 18:37:48 +02:00
Martin Robinson 42629831e6 Bug 1630676 - Cherry-pick some layout-2020 changes. 2020-04-16 18:37:47 +02:00
Josh Matthews 6d4054a3d3 Bug 1630676 - Update ipc-channel and crossbeam-channel in Servo. 2020-04-16 18:37:45 +02:00
Simon Sapin 7c7a9cf472 Bug 1630676 - Fix some errors and formatting changes when updating rustc to 1.43.0-nightly (5d04ce67f 2020-02-13). 2020-04-16 18:37:44 +02:00
Dzmitry Malyshau 540f1bea3f Bug 1629359 - Update parking_lot to 0.10 r=kats
Differential Revision: https://phabricator.services.mozilla.com/D70646

--HG--
rename : third_party/rust/parking_lot/src/mutex.rs => third_party/rust/parking_lot/src/fair_mutex.rs
extra : moz-landing-system : lando
2020-04-12 19:14:43 +00:00
Stefan Hindli a8922cc7ff Backed out changeset 01cb2f16985e (bug 1629359) for linux x64 qr webgpu bustage
--HG--
extra : rebase_source : 29e879b00d66376a0508bc2df060fcf3f6028590
2020-04-12 22:09:15 +03:00
Dzmitry Malyshau 80f2377b05 Bug 1629359 - Update parking_lot to 0.10 r=kats
Differential Revision: https://phabricator.services.mozilla.com/D70646

--HG--
rename : third_party/rust/parking_lot/src/mutex.rs => third_party/rust/parking_lot/src/fair_mutex.rs
extra : moz-landing-system : lando
2020-04-12 16:25:25 +00:00
Mike Hommey b7f3977978 Bug 1629310 - Build mako-generated stylo rust sources deterministically. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D70633

--HG--
extra : moz-landing-system : lando
2020-04-12 01:25:21 +00:00
Bastien Orivel 9c5bd43624 Bug 1581062 - Part 2: Remove the unicode feature from a few crates. r=froydnj,emilio,jgraham,webdriver-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D65863

--HG--
extra : moz-landing-system : lando
2020-04-11 08:55:12 +00:00
Emilio Cobos Álvarez aa270ab824 Bug 1628976 - Update mako in the style system. r=SimonSapin
This uses Mako-1.1.2 wheel format, rather than zip, and works with py3 and py2.

It'd be great to make mako more like other third party python dependencies but
this allows me to build central again.

This is downloaded from:

  f6ade1e18aadce2fcbc7b31be5f615/Mako-1.1.2-py2.py3-none-any.whl

Via pip-download.

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

--HG--
extra : histedit_source : 1129829891d5afd7dcaa913d0ddfb5b0d69b0fc9
2020-04-10 09:29:53 +00:00
Mike Hommey 070b148444 Bug 1621447 - Convert GenerateServoCSSPropList.py to py3. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D70308

--HG--
extra : moz-landing-system : lando
2020-04-09 11:03:02 +00:00
Erik Nordin 8dfda8ef7c Bug 1621849 - Add CSS Error for DisallowedImportRule r=emilio
- Add new CSS Error
- Add new test case for error
- Ensure that test cases use `replace()` and `replaceSync()`

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

--HG--
extra : moz-landing-system : lando
2020-04-08 22:45:24 +00:00
Cameron McCormack 7c920706b1 Bug 1623819 - Part 2: Assert that initial values in style structs match those in property definitions. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D67930

--HG--
extra : moz-landing-system : lando
2020-04-08 05:31:26 +00:00
Cameron McCormack 2034bef4c6 Bug 1623819 - Part 1: Fix a few initial values in Rust property definitions. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D67929

--HG--
extra : moz-landing-system : lando
2020-04-08 05:31:19 +00:00
Chris Peterson 32270107d9 Bug 1625855 - Replace MOZ_MUST_USE with [[nodiscard]] in some Servo Rust code. r=emilio
Are there any Rust crates outside mozilla-central that include or emit Mozilla C++ code that should be updated to use [[nodiscard]] instead of MOZ_MUST_USE?

Depends on D68751

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

--HG--
extra : moz-landing-system : lando
2020-04-02 08:27:59 +00:00
Emilio Cobos Álvarez fd00ba62b7 Bug 1624968 - Make :host::part work in the same shadow tree as the part. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D68249

--HG--
extra : moz-landing-system : lando
2020-04-06 10:25:08 +00:00
Cameron McCormack c2bc259414 Bug 1623820 - Part 2: Make image-orientation initial value change be Nightly only. r=emilio
We'll let this ride the trains once Chrome 81 is set to be released.

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

--HG--
extra : moz-landing-system : lando
2020-04-05 03:21:24 +00:00
Cameron McCormack 74726cada1 Bug 1623820 - Part 1: Add support for pref-controlled initial values. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D67931

--HG--
extra : moz-landing-system : lando
2020-04-05 03:21:16 +00:00
Emilio Cobos Álvarez cce6ca63f5 Bug 1625036 - Tweak background: transparent handling so that color: transparent doesn't override UA sheet backgrounds. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D68408

--HG--
extra : moz-landing-system : lando
2020-03-30 15:09:33 +00:00
Philipp Zech 53a8327ecd Bug 1625699 - Convert control-character-visibility #defines to an enum class. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D68705

--HG--
extra : moz-landing-system : lando
2020-03-28 22:17:50 +00:00
Tim Nguyen 19ca5d7afa Bug 1618997 - Omit center positions in conic/radial gradient serialization. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D67461

--HG--
extra : moz-landing-system : lando
2020-03-27 22:52:32 +00:00
Ciure Andrei 9298499b4d Backed out changeset 9bbf5c41c5ce (bug 1618997) for causing for causing mochitest and wpt failures CLOSED TREE 2020-03-28 00:14:32 +02:00
Tim Nguyen 6f962cb12a Bug 1618997 - Omit center positions in conic/radial gradient serialization. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D67461

--HG--
extra : moz-landing-system : lando
2020-03-27 21:17:02 +00:00
Ciure Andrei 28d3eea9d2 Backed out changeset 507a811671f8 (bug 1618997) for causing bustages CLOSED TREE 2020-03-27 21:50:25 +02:00
Tim Nguyen 98b143f22c Bug 1618997 - Omit center positions in conic/radial gradient serialization. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D67461

--HG--
extra : moz-landing-system : lando
2020-03-27 19:36:18 +00:00
Emilio Cobos Álvarez a214514a58 Bug 1624080 - Simplify the implementation of HasAuthorSpecifiedRules. r=heycam
This patch computes the author-specified properties during the CSS cascade, and
removes the complex rule-tree-based implementation that tries to do the cascade
again.

This changes behavior in two ways, one of them which is not observable to
content, I believe:

 * revert now re-enables the native styling. This was brought up in
   https://github.com/w3c/csswg-drafts/issues/4777 and I think it is a bug-fix.

   This is observable to content, and I'm adding a test for it.

 * We don't look at inherited styles from our ancestors when `inherit` is
   specified in a non-author stylesheet. This was introduced for bug 452969 but
   we don't seem to inherit background anymore for file controls or such. It
   seems back then file controls used to have a text-field.

   I audited forms.css and ua.css and we don't explicitly inherit
   padding / border / background-color into any nested form control.

We keep the distinction between border/background and padding, because the later
has some callers. I think we should try to align with Chromium in the long run
and remove the padding bit.

We need to give an appearance to the range-thumb and such so that we can assert
that we don't call HasAuthorSpecifiedRules on non-themed stuff. I used a new
internal value for that.

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

--HG--
extra : moz-landing-system : lando
2020-03-26 16:48:01 +00:00
Razvan Maries 7155f2665a Backed out changeset ac0d06c0ca93 (bug 1624080) for assertion failures. CLOSED TREE 2020-03-26 16:52:18 +02:00
Emilio Cobos Álvarez c556351cd0 Bug 1624080 - Simplify the implementation of HasAuthorSpecifiedRules. r=heycam
This patch computes the author-specified properties during the CSS cascade, and
removes the complex rule-tree-based implementation that tries to do the cascade
again.

This changes behavior in two ways, one of them which is not observable to
content, I believe:

 * revert now re-enables the native styling. This was brought up in
   https://github.com/w3c/csswg-drafts/issues/4777 and I think it is a bug-fix.

   This is observable to content, and I'm adding a test for it.

 * We don't look at inherited styles from our ancestors when `inherit` is
   specified in a non-author stylesheet. This was introduced for bug 452969 but
   we don't seem to inherit background anymore for file controls or such. It
   seems back then file controls used to have a text-field.

   I audited forms.css and ua.css and we don't explicitly inherit
   padding / border / background-color into any nested form control.

We keep the distinction between border/background and padding, because the later
has some callers. I think we should try to align with Chromium in the long run
and remove the padding bit.

We need to give an appearance to the range-thumb and such so that we can assert
that we don't call HasAuthorSpecifiedRules on non-themed stuff. I used a new
internal value for that.

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

--HG--
extra : moz-landing-system : lando
2020-03-26 13:23:42 +00:00
Emilio Cobos Álvarez 96a8c38b0f Bug 1624298 - Ensure that derived types are right for optimized-away implementations. r=heycam
We have this optimization where, for non-generic structs, we generate just a
clone / move as the ToComputedValue / ToResolvedValue implementation.

This moves the optimization a bit further down, and refines it so that we still
generate all the relevant where clauses that make it sound, that is, that all
the ToComputedValue implementations of the fields return the same type.

Otherwise this wouldn't be sound and the type would need to become generic.

We add an escape hatch (no_field_bound) for fields that need to be cloned but
which don't implement the trait. This is right now only for the RefPtr<> in the
shared font-family list, and a piece of code in PaintWorklet which looks kinda
fishy, and probably should be fixed (but we don't ship it in Firefox and there's
a pre-existing FIXME for servo, so I punted on it for now).

The other thing this patch does is adding a bunch of ToComputedValue /
ToResolvedValue implementations that are trivial and were missing.

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

--HG--
extra : moz-landing-system : lando
2020-03-26 13:04:20 +00:00
Emilio Cobos Álvarez 7c8f8dec97 Bug 1546375 - Don't append the default namespace for featureless host selectors. r=heycam
Per the spec it shouldn't match, and the front-end has been bitten by this
multiple times.

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

--HG--
extra : moz-landing-system : lando
2020-03-26 11:44:01 +00:00
Emilio Cobos Álvarez dd88708d1c Bug 1623396 - Custom properties with invalid variable references should be unset, not invalid. r=heycam
See https://github.com/w3c/csswg-drafts/issues/4075.

There are tests that will get updated and this will make pass in bug 1623347.

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

--HG--
extra : moz-landing-system : lando
2020-03-26 11:34:12 +00:00
Dorel Luca fa0a3dc9d7 Backed out 2 changesets (bug 1581062) for Toolchain failures. CLOSED TREE
Backed out changeset c333f6f9d1bd (bug 1581062)
Backed out changeset 485c738acdb1 (bug 1581062)
2020-03-25 22:23:26 +02:00
Bastien Orivel 1f0110b95e Bug 1581062 - Part 2: Remove the unicode feature from a few crates. r=froydnj,emilio,jgraham,webdriver-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D65863

--HG--
extra : moz-landing-system : lando
2020-03-25 10:28:00 +00:00
Emily McDonough d3cac52f73 Bug 1341507 part 6 - Enable multiple grid repeat values in Servo r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D60931

--HG--
extra : moz-landing-system : lando
2020-03-19 22:11:48 +00:00
Emily McDonough e2096a565d Bug 1341507 part 4 - Add auto-fill length field to line name lists returned from Servo. r=mats,emilio
Rename fill_idx to fill_start, to indicate it is not a single value but a
range. Also change a numeric_limits<>::max() involving the fill_start to use
decltype() to ensure its type matches that of the auto-generated structure's
field, while we're touching that code.

The test to ensure only a single repeat value is allowed will be removed by a
later commit.

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

--HG--
extra : moz-landing-system : lando
2020-03-19 22:11:43 +00:00
Philipp Zech 8b9b6fdab2 Bug 1623410 - Convert mask-composite #defines to an enum class. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D67394

--HG--
extra : moz-landing-system : lando
2020-03-19 13:48:57 +00:00
Stefan Hindli f3854a78ed Backed out 7 changesets (bug 1341507) for mochitest failures in dom/grid/test/chrome/test_grid_repeat_auto_fill.html CLOSED TREE
Backed out changeset e4e968fabe2b (bug 1341507)
Backed out changeset 6cafdef7eb79 (bug 1341507)
Backed out changeset eff4ad47440c (bug 1341507)
Backed out changeset 55432ee0cd4b (bug 1341507)
Backed out changeset e798ebf91eca (bug 1341507)
Backed out changeset 08d38f05b160 (bug 1341507)
Backed out changeset 6b35af9ecb38 (bug 1341507)
2020-03-19 02:49:17 +02:00
Emily McDonough 8cc2cae246 Bug 1341507 part 6 - Enable multiple grid repeat values in Servo r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D60931

--HG--
extra : moz-landing-system : lando
2020-03-18 22:44:41 +00:00
Emily McDonough 3496717c21 Bug 1341507 part 4 - Add auto-fill length field to line name lists returned from Servo. r=mats,emilio
Rename fill_idx to fill_start, to indicate it is not a single value but a
range. Also change a numeric_limits<>::max() involving the fill_start to use
decltype() to ensure its type matches that of the auto-generated structure's
field, while we're touching that code.

The test to ensure only a single repeat value is allowed will be removed by a
later commit.

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

--HG--
extra : moz-landing-system : lando
2020-03-18 22:44:36 +00:00
Emilio Cobos Álvarez 664a546418 Bug 1618260 - Fix number input so that it honors overflow-clip-box-block. r=mats
This never worked, but it's more visible with the new form controls which have
more padding.

Make the anonymous div and co a pseudo-element, so that they inherit from the
<input> properly in all cases. This works for non-number inputs because the
editor root is a direct child of the <input>, but it doesn't for number inputs
because there's a flex wrapper in between.

This way overflow-clip-box: inherit does what we want. Reset the padding in the
inline direction, as the padding for <input type=number> applies to the arrow
boxes as well, and thus we'd double-apply it.

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

--HG--
extra : moz-landing-system : lando
2020-03-18 09:21:44 +00:00
Emilio Cobos Álvarez 25104b198d Bug 1623178 - Change the parsing order of border shorthands. r=mats
It's not ambiguous, and <width> <style> <color> seems like a more common order.

This is just a minor perf tweak, as the CSS parser token cache will most often
kick in to avoid re-tokenizing values.

Also remove a redundant continue statement.

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

--HG--
extra : moz-landing-system : lando
2020-03-17 21:48:33 +00:00
Sam Mauldin 9f2ec488bb Bug 1590894: Unprefix existing CSS4 system colors r=emilio
Expect forced-colors-mode-backplate tests to fail because they were passing for the wrong reason,
and the backplate is now properly applied, causing them to fail.

Remove tests for field and fieldtext from color-valid.html because they are tested again
in system-color-valid.html.

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

--HG--
extra : moz-landing-system : lando
2020-03-17 16:08:19 +00:00
Emilio Cobos Álvarez 9b76d28bff Bug 1622058 - Cleanup CSS error reporting a bit. r=nordzilla
Differential Revision: https://phabricator.services.mozilla.com/D66642

--HG--
extra : moz-landing-system : lando
2020-03-16 20:50:21 +00:00
Daniel Varga 2ef4614ee8 Backed out changeset a2030f611422 (bug 1590894) for causing mochitest failure at layout/style/test/test_value_computation.html 2020-03-15 23:09:42 +02:00
Sam Mauldin 2c684678d4 Bug 1590894: Unprefix existing CSS4 system colors r=emilio
Expect forced-colors-mode-backplate tests to fail because they were passing for the wrong reason,
and the backplate is now properly applied, causing them to fail.

Remove tests for field and fieldtext from color-valid.html because they are tested again
in system-color-valid.html.

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

--HG--
extra : moz-landing-system : lando
2020-03-15 19:45:27 +00:00
Philipp Zech 3db72bdd4b Bug 1622332 - Convert style-blend #defines to an enum class. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D66867

--HG--
extra : moz-landing-system : lando
2020-03-14 21:24:11 +00:00
Erik Nordin 17dbae2125 Bug 1613511 - Disallow @import rules for all Constructable StyleSheets functions r=emilio
- Add enum AllowImportRules to CSS parsing.
- `replaceSync()` will skip over @import rules and continue parsing.
- `replace()` will skip over @import rules and continue parsing.
- `insertRule()` will throw a syntax error on @import rules.
- Modify WPT test cases to reflect these changes.

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

--HG--
extra : moz-landing-system : lando
2020-03-12 18:11:09 +00:00
Philipp Zech 0e22ff2b24 Bug 1621706 - Convert backface-visibility #defines to an enum class. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D66487

--HG--
extra : moz-landing-system : lando
2020-03-11 20:58:23 +00:00
Emilio Cobos Álvarez 6ef2792e0e Bug 1621044 - Update in-tree consumers of bindgen. r=keeler,rhunt
Differential Revision: https://phabricator.services.mozilla.com/D66281

--HG--
extra : moz-landing-system : lando
2020-03-10 21:07:34 +00:00
Emilio Cobos Álvarez 2a451d978e Bug 1618509 - Allow to export a shadow part under multiple names. r=jwatt
Other browsers allow this and the spec doesn't really disallow it, so fix it,
add a test and carry on.

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

--HG--
extra : moz-landing-system : lando
2020-03-09 13:04:21 +00:00
Emilio Cobos Álvarez 3d29b274ae Bug 1620359 - Don't clear the "uses viewport units" bit when a font that doesn't cause a style change loads. r=jfkthame
This is probably an old-ish bug made more frequent by the font loading
optimizations.

PostRebuildAllStyleData is a bit of a misnomer, but was always calling
ClearCachedData() on the style set, even if we weren't guaranteed to restyle
every element.

This means both wasted work and correctness issues (as the "uses <rare-feature>"
bits are cleared during this call, on the assumption that we'll then visit all
elements and that'd recompute it properly).

For now, unify a bit the different code paths and only clear these bits if we're
guaranteed to restyle all elements.

I should rename this to something better in a follow-up, and ideally also
decouple the ClearCachedData() calls a bit...

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

--HG--
extra : moz-landing-system : lando
2020-03-06 20:11:51 +00:00
Philipp Zech 75033d421b Bug 1620034 - Convert vector-effect #defines to an enum class. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D65718

--HG--
extra : moz-landing-system : lando
2020-03-06 14:40:50 +00:00
Emilio Cobos Álvarez 5bba05d7c8 Bug 1620307 - Rename -moz-menulist-button to -moz-menulist-arrow-button. r=spohl
This should be less confusing. This is not supported outside of chrome:// or
user-agent stylesheets so we can name this however we want.

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

--HG--
extra : moz-landing-system : lando
2020-03-05 21:13:46 +00:00
Emilio Cobos Álvarez 1febc27ba3 Bug 1619701 - Respect the cascade properly when in high-contrast mode. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D65345

--HG--
extra : moz-landing-system : lando
2020-03-04 21:25:24 +00:00
Makoto Kato 5e7416a046 Bug 1503656 - Part 5. Get safe area insets from Gecko. r=emilio
Add binding to get safe area insets from Gecko.

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

--HG--
extra : moz-landing-system : lando
2020-03-04 08:15:17 +00:00
Csoregi Natalia aa5b814fee Backed out 6 changesets (bug 1503656) as per request. CLOSED TREE
Backed out changeset 27faa3b167a9 (bug 1503656)
Backed out changeset 7111f9b5ad06 (bug 1503656)
Backed out changeset 43fdc889beac (bug 1503656)
Backed out changeset 332ceea26151 (bug 1503656)
Backed out changeset f31efa4ea2ec (bug 1503656)
Backed out changeset 91b847efe591 (bug 1503656)
2020-03-04 10:07:42 +02:00
Makoto Kato e4d96be526 Bug 1503656 - Part 5. Get safe area insets from Gecko. r=emilio
Add binding to get safe area insets from Gecko.

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

--HG--
extra : moz-landing-system : lando
2020-03-04 07:26:42 +00:00
Morgan Reschenberg c1431063a6 Bug 1617678: Modify background image styling to only apply URL-sourced images when backplate is enabled. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D64200

--HG--
extra : moz-landing-system : lando
2020-03-04 01:19:41 +00:00
Hiroyuki Ikezoe f0b17ecc30 Bug 1510120 - Block running background-color animation on the compositor if there is any current-color keyframe. r=boris,flod
Differential Revision: https://phabricator.services.mozilla.com/D63629

--HG--
extra : moz-landing-system : lando
2020-03-03 21:48:01 +00:00
Razvan Maries 0b474b2251 Backed out changeset dc3ad7ffa787 (bug 1617678) for perma failures on bg-image-div-001.html. CLOSED TREE 2020-03-03 23:16:37 +02:00
Morgan Reschenberg 11e8355a59 Bug 1617678: Modify background image styling to only apply URL-sourced images when backplate is enabled. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D64200

--HG--
extra : moz-landing-system : lando
2020-03-03 19:16:30 +00:00
Philipp Zech 05f68040bd Bug 1617644 - Convert color-interpolation #defines to an enum class. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D64813

--HG--
extra : moz-landing-system : lando
2020-02-29 15:41:13 +00:00
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