Commit Graph

8775 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
3685cf25a7 Bug 1505489 - Add code to make part rules affect the style of the elements. r=heycam
I still haven't implemented each_part(), so this will do nothing yet.

The cascade order stuff is fishy, I know, and I'll fix in a followup if it's
fine with you. I moved the sorting of the rules to rule_collector, since it
seemed to me it was better that way that duplicating the code, and those
SelectorMap functions only have a single caller anyway.

Depends on D32646

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

--HG--
extra : moz-landing-system : lando
2019-06-11 17:42:41 +00:00
Emilio Cobos Álvarez
838e209b31 Bug 1505489 - Collect ::part() rules during CascadeData rebuilds. r=heycam
Unlike for :host() or ::slotted(), or regular rules, we don't need a whole
SelectorMap<>, so gotta make the code a bit more generic.

Depends on D32645

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

--HG--
extra : moz-landing-system : lando
2019-06-11 17:42:32 +00:00
Emilio Cobos Álvarez
b2875e0362 Bug 1505489 - Add an extra flag to flag ::part() to selectors. r=heycam
This grows the selector struct, but only in 32-bit, since in 64-bit we take
space from the alignment padding that we're paying due to having the size of the
slice as a word.

Depends on D32644

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

--HG--
extra : moz-landing-system : lando
2019-06-11 17:42:23 +00:00
Emilio Cobos Álvarez
0d984c302b Bug 1505489 - Don't go through all the part names if not there. r=jwatt
This uses the bit added for tracking part attributes in order to avoid doing
wasted work.

Depends on D32643

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

--HG--
extra : moz-landing-system : lando
2019-06-11 17:42:09 +00:00
Emilio Cobos Álvarez
103cf22ede Bug 1505489 - Add plumbing code to invalidate shadow parts. r=heycam
Still does nothing, since we still do not collect part rules, but this is all
the plumbing that should allow us to invalidate parts when attributes or state
change on their ancestors.

Depends on D32641

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

--HG--
extra : moz-landing-system : lando
2019-06-11 17:41:51 +00:00
Emilio Cobos Álvarez
67c30d05d2 Bug 1557212 - Use cbindgen for gradients. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D33901

--HG--
extra : moz-landing-system : lando
2019-06-07 14:13:17 +00:00
Daniel Varga
fe7dbedf22 Merge mozilla-inbound to mozilla-central. a=merge 2019-06-07 12:50:35 +03:00
Emilio Cobos Álvarez
e2fcdb0253 Bug 1557403 - Handle default angle in radians. r=me
We were not copying the angle in this case for some reason, and I overlooked
this.
2019-06-06 19:30:03 -04:00
Charlie Marlow
29aa4dbb9a Bug 1555863 added text-decoration-width support to style system including mochitests and web platform tests r=emilio
from-font support will be added later

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

--HG--
extra : moz-landing-system : lando
2019-06-06 17:12:22 +00:00
Emilio Cobos Álvarez
3df59a0cfa Bug 1557110 - Cleanup gradient parsing by removing the simple-moz-gradient parsing pref. r=dholbert
It looks like bug 1547939 will stick, given how fast the other regressions came
in for bug 1337655.

We haven't seen any regression from this, and it seems unlikely that we'd want
this code back.

This blocks further improvements to the style system. Simplifying this code
allows me to remove all the conversion code for gradients.

Let me know if you think it's premature and I'm happy to wait, but I really want
to see this code gone :)

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

--HG--
extra : moz-landing-system : lando
2019-06-06 04:08:52 +00:00
Daniel Holbert
d9ebfdd4d2 Bug 1556855 part 4: Remove support for the layout.css.prefixes.webkit pref. r=mats
From this point on, the webkit-prefixed CSS features that were previously
protected by this pref will now be unconditionally enabled.

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

--HG--
extra : moz-landing-system : lando
2019-06-05 18:23:02 +00:00
Charlie Marlow
da73c04156 Bug 1555150: adding support for CSS text underline offset to the style system r=emilio
support  for from-font listed in the CSS spec will be implemented in a later bug

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

--HG--
extra : moz-landing-system : lando
2019-06-04 22:04:14 +00:00
Coroiu Cristina
b2c75da135 Backed out changeset ba1f75c56457 (bug 1555150) for xpcshell failures at devtools/shared/tests/unit/test_css-properties-db.js 2019-06-04 07:52:50 +03:00
Charlie Marlow
a2861fd11e Bug 1555150: adding support for CSS text underline offset to the style system r=emilio
support  for from-font listed in the CSS spec will be implemented in a later bug

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

--HG--
extra : moz-landing-system : lando
2019-06-03 19:43:08 +00:00
Emilio Cobos Álvarez
749db71829 Bug 1554150 - Hide some appearance values from content. r=mats
They're not used internally either, so remove all ability to address them.

I haven't removed the implementation yet, as some of them are quite complex, and
I don't have a mac / windows build. We should do that when this hits release
though.

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

--HG--
extra : moz-landing-system : lando
2019-06-03 17:32:48 +00:00
Emilio Cobos Álvarez
e088b3760a Bug 1555867 - Report heap size of rule tree heap allocations as well. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D33353

--HG--
extra : moz-landing-system : lando
2019-06-03 16:37:53 +00:00
Emilio Cobos Álvarez
afb4bcad28 Bug 1555867 - Inline one child in the rule tree. r=heycam
It is indeed the most common case according to a bit of measurement.

A non-atypical example from GitHub for example:

> Rule tree stats:
>  0 - 340
>  1 - 1403
>  2 - 28
>  3 - 8
>  4 - 2
>  6 - 1
>  7 - 3
>  8 - 2
>  12 - 2
>  14 - 1
>  41 - 1
>  45 - 1
>  67 - 1
>  68 - 1

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

--HG--
extra : moz-landing-system : lando
2019-06-03 16:37:45 +00:00
Emilio Cobos Álvarez
d34afb7b9d Bug 1555867 - Add some very basic rule tree stats that can be enabled with trace-level logging. r=heycam
This is useful to analyze the shape of the rule tree at a glance.

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

--HG--
extra : moz-landing-system : lando
2019-06-03 16:37:34 +00:00
Evgeniy Reizner
8e33a62cdd Bug 1556388 - Do not use borrowed types in the selectors::Element trait. r=emilio
This cherry-picks https://github.com/servo/servo/pull/23463 with a few fixes for
the Gecko build.
2019-06-03 09:12:17 -04:00
Emilio Cobos Álvarez
b58cd8f644 Bug 1556388 - Fix Servo build. 2019-06-03 09:12:15 -04:00
Emilio Cobos Álvarez
63da4ebdab Bug 1556388 - Appease tidy. 2019-06-03 09:12:13 -04:00
Emilio Cobos Álvarez
66b65a1241 Bug 1556388 - Rustfmt recent changes. 2019-06-03 09:12:12 -04:00
Cosmin Sabou
bb748896e1 Backed out changeset 118a2ee53436 (bug 1555150) for xpcshell failures on /test_css-properties-db.js. CLOSED TREE 2019-06-01 02:27:33 +03:00
Charlie Marlow
aa48f14906 Bug 1555150: adding support for CSS text underline offset to the style system r=emilio
support  for from-font listed in the CSS spec will be implemented in a later bug

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

--HG--
extra : moz-landing-system : lando
2019-05-31 21:09:11 +00:00
Emilio Cobos Álvarez
80e62fe4db Bug 1555944 - Make nsIContent::GetBindingParent return an element. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D33308
2019-05-31 23:31:59 +02:00
Emilio Cobos Álvarez
19258bfbb4 Bug 1554716 - Remove nsStyleColor moving the color property to nsStyleText. r=jfkthame
I think this is a good change regardless of other discussion in bug 1552587. If
we decide to move `mColor` to the top-level of the struct that can be done
separately.

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

--HG--
extra : moz-landing-system : lando
2019-05-31 14:48:22 +00:00
Emilio Cobos Álvarez
41399e03a6 Bug 1493420 - Use a RwLock'd HashMap instead of a lock-free linked list for rule node children. r=heycam
I need to profile this a bit more, but talos was pretty happy about this, and it
solves the known performance issues here such as the test-case from bug 1483963
for example. This also gets rid of a bunch of unsafe code which is nice.

This still keeps the same GC scheme, removing the key from the hashmap when
needed. I kept those as release assertions, but should probably be turned into
debug-only assertions.

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

--HG--
extra : moz-landing-system : lando
2019-05-29 23:41:01 +00:00
Emilio Cobos Álvarez
058ea528a4 Bug 1552080 - Rejigger a bit rust features so that rusttests still link. r=froydnj
We cannot compile with just feature(gecko + debug_assertions), since that's how
debug rusttests get compiled and they don't have the refcount logging stuff.

We were getting away with it for the pre-existing usage of the style crate,
because it wasn't used during any test and presumably the linker didn't
complain. But servo_arc is definitely used in tests.

Differential Revision: https://phabricator.services.mozilla.com/D32691
2019-05-29 21:30:52 +02:00
Emilio Cobos Álvarez
bce5af1e30 Bug 1552080 - Add refcount logging to servo_arc. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D32173
2019-05-29 21:30:23 +02:00
Emilio Cobos Álvarez
fce57b44fd Bug 1552878 - Use cbindgen for filters. r=jwatt
Had to implement some OwnedSlice bits that the canvas code used.

Differential Revision: https://phabricator.services.mozilla.com/D31799
2019-05-29 21:22:07 +02:00
Emilio Cobos Álvarez
a384dedd93 Bug 1552708 - Use cbindgen for URIs. r=heycam
This doesn't clean up as much as a whole, but it's a step in the right
direction. In particular, it allows us to start using simple bindings for:

 * Filters
 * Shapes and images, almost. Need to:
   * Get rid of the complex -moz- gradient parsing (let
     layout.css.simple-moz-gradient.enabled get to release).
 * Counters, almost. Need to:
   * Share the Attr representation with Gecko, by not using Option<>.
     * Just another variant should be enough (ContentItem::{Attr,Prefixedattr},
       maybe).

Which in turn allows us to remove a whole lot of bindings in followups to this.

The setup changes a bit. This also removes the double pointer I complained about
while reviewing the shared UA sheet patches. The old setup is:

```
SpecifiedUrl
 * CssUrl
   * Arc<CssUrlData>
     * String
     * UrlExtraData
 * UrlValueSource
   * Arc<CssUrlData>
   * load id
   * resolved uri
   * CORS mode.
   * ...
```

The new one removes the double reference to the url data via URLValue, and looks
like:

```
SpecifiedUrl
 * CssUrl
   * Arc<CssUrlData>
     * String
     * UrlExtraData
     * CorsMode
     * LoadData
       * load id
       * resolved URI
```

The LoadData is the only mutable bit that C++ can change, and is not used from
Rust. Ideally, in the future, we could just use rust-url to resolve the URL
after parsing or something, and make it all immutable. Maybe.

I've verified that this approach still works with the UA sheet patches (via the
LoadDataSource::Lazy).

The reordering of mWillChange is to avoid nsStyleDisplay from going over the
size limit. We want to split it up anyway in bug 1552587, but mBinding gains a
tag member, which means that we were having a bit of extra padding.

One thing I want to explore is to see if we can abuse rustc's non-zero
optimizations to predict the layout from C++, but that's something to explore at
some other point in time and with a lot of care and help from Michael (who sits
next to me and works on rustc ;)).

Differential Revision: https://phabricator.services.mozilla.com/D31742
2019-05-29 21:22:04 +02:00
Boris Chiou
a194573277 Bug 1429303 - Animate offset-rotate. r=birtles
Differential Revision: https://phabricator.services.mozilla.com/D32237

--HG--
extra : moz-landing-system : lando
2019-05-28 18:31:48 +00:00
Emilio Cobos Álvarez
dc948a87d9 Bug 1554433 - Hide -moz-gtk-buttonactivetext from content. r=stransky
This prevents exposing the value to web content.

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

--HG--
extra : moz-landing-system : lando
2019-05-27 20:25:31 +00:00
Bogdan Tara
30515e505f Backed out changeset 8855dd7a2aa8 (bug 1554433) for browser_parsable_css.js failures CLOSED TREE
--HG--
extra : histedit_source : b19cc175e04aa20eb80e13ded4b36704923849a3
2019-05-27 22:30:32 +03:00
Brindusan Cristian
40a5b04ab5 Backed out 3 changesets (bug 1552708, bug 1552878) for build bustages and compiler issues. CLOSED TREE
Backed out changeset 9d4f178bfcbd (bug 1552878)
Backed out changeset 80db9f845237 (bug 1552708)
Backed out changeset 1bdbfbb5b342 (bug 1552708)
2019-05-27 17:00:03 +03:00
Emilio Cobos Álvarez
a6bdf94e22 Bug 1552878 - Use cbindgen for filters. r=jwatt
Had to implement some OwnedSlice bits that the canvas code used.

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

--HG--
extra : moz-landing-system : lando
2019-05-27 12:37:37 +00:00
Emilio Cobos Álvarez
c2d1e98f4c Bug 1552708 - Tweak rust tests to account for more compact URL representation. r=bustage
CLOSED TREE
2019-05-27 14:21:17 +02:00
Emilio Cobos Álvarez
f2190857bb Bug 1552708 - Use cbindgen for URIs. r=heycam
This doesn't clean up as much as a whole, but it's a step in the right
direction. In particular, it allows us to start using simple bindings for:

 * Filters
 * Shapes and images, almost. Need to:
   * Get rid of the complex -moz- gradient parsing (let
     layout.css.simple-moz-gradient.enabled get to release).
 * Counters, almost. Need to:
   * Share the Attr representation with Gecko, by not using Option<>.
     * Just another variant should be enough (ContentItem::{Attr,Prefixedattr},
       maybe).

Which in turn allows us to remove a whole lot of bindings in followups to this.

The setup changes a bit. This also removes the double pointer I complained about
while reviewing the shared UA sheet patches. The old setup is:

```
SpecifiedUrl
 * CssUrl
   * Arc<CssUrlData>
     * String
     * UrlExtraData
 * UrlValueSource
   * Arc<CssUrlData>
   * load id
   * resolved uri
   * CORS mode.
   * ...
```

The new one removes the double reference to the url data via URLValue, and looks
like:

```
SpecifiedUrl
 * CssUrl
   * Arc<CssUrlData>
     * String
     * UrlExtraData
     * CorsMode
     * LoadData
       * load id
       * resolved URI
```

The LoadData is the only mutable bit that C++ can change, and is not used from
Rust. Ideally, in the future, we could just use rust-url to resolve the URL
after parsing or something, and make it all immutable. Maybe.

I've verified that this approach still works with the UA sheet patches (via the
LoadDataSource::Lazy).

The reordering of mWillChange is to avoid nsStyleDisplay from going over the
size limit. We want to split it up anyway in bug 1552587, but mBinding gains a
tag member, which means that we were having a bit of extra padding.

One thing I want to explore is to see if we can abuse rustc's non-zero
optimizations to predict the layout from C++, but that's something to explore at
some other point in time and with a lot of care and help from Michael (who sits
next to me and works on rustc ;)).

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

--HG--
extra : moz-landing-system : lando
2019-05-27 11:45:12 +00:00
Emilio Cobos Álvarez
998419a429 Bug 1554433 - Hide -moz-gtk-buttonactivetext from content. r=stransky
This prevents exposing the value to web content.

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

--HG--
extra : moz-landing-system : lando
2019-05-27 11:25:02 +00:00
Emilio Cobos Álvarez
810916db16 Bug 1554433 - Move system colors to values::specified::color. r=xidorn
This should be an idempotent patch. The way to come up with this patch has been:

 * Run the first script attached to the bug and pipe it to xclip, then paste it
   in color.rs
 * Add the relevant #[derive] annotations and remove the color.mako.rs
   definition.
 * Reorder the values to match the ColorID definition, on which some widget
   prefs and caching stuff relies on.
 * Manually port some documentation from nsLookAndFeel.h
 * Run `rg 'eColorID_' | cut -d : -f 1 | sort | uniq >files`
 * Run the second script attached to the bug.
 * Manually fix usage of `LAST_COLOR` (adding the `End` variant), and adding
   casts to integer as needed.
 * Add an static assert so that people remember to update the prefs, rather than
   a comment on the definition :)

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

--HG--
extra : moz-landing-system : lando
2019-05-26 13:10:00 +00:00
Emilio Cobos Álvarez
7f9009b15b Bug 1554347 - Fix servo build. 2019-05-25 04:14:38 +02:00
Emilio Cobos Álvarez
104f06a08e Bug 1554347 - Revert a change that ended up not being needed and busts the servo build. 2019-05-25 04:14:36 +02:00
Emilio Cobos Álvarez
393e8c0703 Bug 1554347 - Appease tidy. 2019-05-25 04:14:33 +02:00
Emilio Cobos Álvarez
344f076c16 Bug 1554347 - Reformat recent style system changes. 2019-05-25 04:14:30 +02:00
Jan Andre Ikenmeyer
410911152d Bug 1554347 - Update MPL license to https. r=emilio 2019-05-25 04:14:28 +02:00
Emilio Cobos Álvarez
fc06d4485e Bug 1554347 - Sort derive list to keep tidy shut. 2019-05-25 04:14:25 +02:00
Bastien Orivel
2a7eee8242 Bug 1554347 - Update xml5ever and html5ever. r=npotb 2019-05-25 04:14:23 +02:00
Bastien Orivel
337837b0ce Bug 1554347 - Update darling to 0.9. r=emilio 2019-05-25 04:14:18 +02:00
Martin Stransky
ba6373e9aa Bug 1531338 - [Linux/Gtk] Get and use Gtk theme text color for active/pressed button, r=dao,emilio
- Follow Gtk and get theme button text color directly from "button" CSS node instead of "button label"
- Provide new -moz-gtk-buttonactivetext color for active/pressed button text color
- Replace ButtonText color with -moz-gtk-buttonactivetext when it's appropriate

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

--HG--
extra : moz-landing-system : lando
2019-05-24 08:51:48 +00:00
violet
91d759f562 Bug 1553252 - Use cbindgen for text-overflow r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D32285

--HG--
extra : moz-landing-system : lando
2019-05-24 04:48:46 +00:00
Boris Chiou
3b51b642f3 Bug 1429301 - Implement offset-rotate. r=emilio
This includes style system and layout update. I add 3 extra reftests
because the original tests use ray() function as the offset-path, but we
don't support it. It'd be better to add tests using a different type of
offset-path.

The spec issue about the serialization:
https://github.com/w3c/fxtf-drafts/issues/340

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

--HG--
extra : moz-landing-system : lando
2019-05-24 03:42:03 +00:00
Emilio Cobos Álvarez
980074a5b2 Bug 1544242 - Cleanup selector-matching for nested pseudo-elements, match ::slotted correctly when there's no selector before it, and add tests. r=heycam,mats
D29542 fixed the bogus checks that was making nested pseudo-elements match
author rules. This adds tests and ends up being just a cleanup, though as it
turns out we it also fixes an issue with ::slotted() matched from
Element.matches.

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

--HG--
extra : moz-landing-system : lando
2019-05-24 01:09:15 +00:00
Dzmitry Malyshau
d3f4d3cc1c Bug 1552549 - Update rand dependency to 0.6 r=kats,froydnj,nika,jkt,jcj
Update rand version in u2fhid and xpcom

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

--HG--
rename : third_party/rust/scopeguard/.cargo-checksum.json => third_party/rust/scopeguard-0.3.2/.cargo-checksum.json
rename : third_party/rust/scopeguard/Cargo.toml => third_party/rust/scopeguard-0.3.2/Cargo.toml
rename : third_party/rust/scopeguard/README.rst => third_party/rust/scopeguard-0.3.2/README.rst
rename : third_party/rust/scopeguard/examples/readme.rs => third_party/rust/scopeguard-0.3.2/examples/readme.rs
rename : third_party/rust/scopeguard/src/lib.rs => third_party/rust/scopeguard-0.3.2/src/lib.rs
extra : moz-landing-system : lando
2019-05-23 19:54:25 +00:00
Oana Pop Rus
d020804eba Backed out changeset 3304277f5bde (bug 1553252) for build bustages on Windows on a CLOSED TREE 2019-05-23 17:52:21 +03:00
violet
4ab5380719 Bug 1553252 - Use cbindgen for text-overflow r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D32285

--HG--
extra : moz-landing-system : lando
2019-05-23 14:02:17 +00:00
Emilio Cobos Álvarez
f4714d88a1 Bug 1548342 - Fix nested-pseudo-elements matching author rules better. r=heycam
This makes *|*::marker do the intended thing in UA sheets, so I think it's
better, and it's a bit less special-casey.

We may want to re-introduce the changes for pseudo-elements at some point,
depending on the WG decision, but this patch makes each_non_document_style_data
consistent with the rule collector.

The changes of each_non_document_style_data on their own should fix some bugs,
but it doesn't because:

 * This is only hit for pseudos that allow user-action-state pseudo-classes.
 * The containing shadow check worked for them anyway.
 * We don't allow any pseudo after ::slotted() or that isn't tree-abiding per
   the CSS specs (we should maybe enable one of the moz-range stuff to be
   tree-abiding).

So ::placeholder is the only one that right now fits the bill to trigger the
bugs this would fix, but it doesn't since I couldn't make ::placeholder match
:hover / :active / :focus anyhow (inside or outside a shadow tree).

I've left the ProbeMarkerPseudoStyle changes for now since they are technically
a bit more consistent than what was there before, but we could revert those if
they cause trouble, we could rely on the UA rule matching, but we would need to
change that if we allow the ::foo::before and such to match.

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

--HG--
extra : moz-landing-system : lando
2019-05-22 13:28:01 +00:00
Emilio Cobos Álvarez
7874fd4a2d Bug 1552636 - Remove eStyleImageType_URL. r=TYLin
It was introduced in bug 1352096 to reduce complexity with Stylo (apparently).

Right now it doesn't look like it reduces any complexity, and it's a bit
annoying with some of the patches that I'm writing at the moment.

So unless there's any objection I think it should go away.

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

--HG--
extra : moz-landing-system : lando
2019-05-22 11:34:23 +00:00
Emilio Cobos Álvarez
ca59532ce8 Bug 1553227 - Remove old CSS scroll snap implementation. r=hiro
This will save us some time from figuring out what's the best thing to do in
bug 1552587, so that other patches I have in flight (mainly bug 1552708) can
land, since we cannot add a single byte to nsStyleDisplay right now otherwise.

The code removed here is well isolated and not that complicated, so it seems to
me that should be easy to bring back should we have an emergency (and I commit
to doing that while preserving the nsStyleDisplay size limit if we need to :)).

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

--HG--
extra : moz-landing-system : lando
2019-05-21 22:51:54 +00:00
Cosmin Sabou
bdf1d2a559 Backed out changeset a10cdf32fb5a (bug 1552549) for causing a spike in xpcshell failures. CLOSED TREE 2019-05-22 02:05:22 +03:00
Emilio Cobos Álvarez
8f8161be87 Bug 1553245 - Use cbindgen for border-image-width. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D32032

--HG--
extra : moz-landing-system : lando
2019-05-21 21:07:55 +00:00
Dzmitry Malyshau
1298c14a90 Bug 1552549 - Update rand dependency to 0.6 r=kats,froydnj,nika,jkt,jcj
Update rand version in u2fhid and xpcom

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

--HG--
rename : third_party/rust/scopeguard/.cargo-checksum.json => third_party/rust/scopeguard-0.3.2/.cargo-checksum.json
rename : third_party/rust/scopeguard/Cargo.toml => third_party/rust/scopeguard-0.3.2/Cargo.toml
rename : third_party/rust/scopeguard/README.rst => third_party/rust/scopeguard-0.3.2/README.rst
rename : third_party/rust/scopeguard/examples/readme.rs => third_party/rust/scopeguard-0.3.2/examples/readme.rs
rename : third_party/rust/scopeguard/src/lib.rs => third_party/rust/scopeguard-0.3.2/src/lib.rs
extra : moz-landing-system : lando
2019-05-21 19:36:56 +00:00
violet
6dd273cc7e Bug 1550432 - Do not report error for unknown property if its known moz prefixed version is specified. r=emilio
Suppose that `prop` is a property that we haven't supported yet, while its `-moz-prop`
version is already supported.

If an author specifies in a declaration block this property in its standard form
as well as multiple verdor specific forms, as long as `-moz-prop` is specified, we
shouldn't report error for unknown property `prop`. Because that's just noise.

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

--HG--
extra : moz-landing-system : lando
2019-05-21 15:35:41 +00:00
violet
30fa1da169 Bug 1383650 - Add SVG geometry property support in CSS r=emilio
This patch adds SVG geometry properties to CSS, it doesn't deal with
how SVG handles them.

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

--HG--
extra : moz-landing-system : lando
2019-05-16 13:21:19 +00:00
violet
a052d53ee2 Bug 1383650 - Support AllowQuirks::Always option in helpers.mako.rs r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D29936

--HG--
extra : moz-landing-system : lando
2019-05-16 13:21:18 +00:00
Boris Chiou
6f268e4980 Bug 1429299 - Part 4: Make offset-distance animatable. r=hiro
Use ComputedValue to animate offset-distance.

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

--HG--
extra : moz-landing-system : lando
2019-05-20 23:42:56 +00:00
Boris Chiou
ce15d305e2 Bug 1429299 - Part 2: Implement offset-distance. r=emilio
Define the offset-distance property in style system.

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

--HG--
extra : moz-landing-system : lando
2019-05-20 23:42:52 +00:00
Boris Chiou
718aaf17f9 Bug 1429299 - Part 1: Unpack StyleMotion and use cbindgen for OffsetPath. r=emilio
Unpack StyleMotion and move its members into nsStyleDisplay, use
cbindgen to generate StyleOffsetPath.

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

--HG--
extra : moz-landing-system : lando
2019-05-20 23:42:50 +00:00
Jonathan Kew
837368bc29 Bug 1011369 - Add parsing of the loose|normal|strict values of the CSS line-break property. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D30785

--HG--
extra : moz-landing-system : lando
2019-05-20 20:46:28 +00:00
Jonathan Kew
eb2e0187f1 Bug 1531715 - Implement the CSS line-break property, with values "auto | anywhere". r=emilio
Note that the "loose | normal | strict" values are not yet parsed/implemented.

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

--HG--
extra : moz-landing-system : lando
2019-05-20 20:46:07 +00:00
Emilio Cobos Álvarez
c1954c0d3a Bug 1492739 - Unprefix user-select. r=mats
The CSSWG decided that our behavior regarding inheritance is what we want,
see [1].

[1]: https://github.com/w3c/csswg-drafts/issues/3344

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

--HG--
extra : moz-landing-system : lando
2019-05-17 02:43:59 +00:00
Brian Birtles
2f6180dd9e Bug 1253476 - Use update() to update declarations from Servo_DeclarationBlock_SetPropertyToAnimationValue; r=emilio
This method is used when updating the SMIL override style and from Web
Animations' Animation.commitStyles method. By using update we accurately return
false when no change is made to a declaration block.

For SMIL this simply acts as an optimization, meaning we can avoid updating the
SMIL override style ub some cases.

For Animation.commitStyles, however, this allows us to avoid generating
a mutation record. Normally making a redundant change to an attribute *does*
generate a mutation record but the style attribute is different. All browsers
avoid generating a mutation record for a redundant change to inline style.
This is specified in the behavior for setProperty[1] which does not update the
style attribute if updated is false.

[1] https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-setproperty

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

--HG--
extra : moz-landing-system : lando
2019-05-20 05:22:39 +00:00
Brian Birtles
65f06d35fe Bug 1253476 - Implement Animation.commitStyles; r=boris,emilio,bzbarsky,smaug
Differential Revision: https://phabricator.services.mozilla.com/D30327

--HG--
extra : moz-landing-system : lando
2019-05-20 06:04:23 +00:00
violet
94b46be68b Bug 1520020 - Accept empty argument for some filters r=emilio
Filters blur(), invert(), etc. can omit argument.

Computed/specified style serialization is a little tricky w.r.t the shortest
serialization principle. Ideally we should serialize `invert(1)` to `invert()`,
but that will be a breaking change, so we always serialize them with an
argument.

Note, Blink/WetKit treat specified (but not computed) style serialization
differently when the specified one is originally without argument. Our
current behavior is the same as pre-Chromium Edge.

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

--HG--
extra : moz-landing-system : lando
2019-05-20 07:01:29 +00:00
Emilio Cobos Álvarez
16524e64f1 Bug 1552625 - Remove some more individual-transform dead code. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D31705

--HG--
extra : moz-landing-system : lando
2019-05-18 04:48:16 +00:00
Emilio Cobos Álvarez
98282c37a5 Bug 1551991 - Remove nsCSSValue bindings. r=jwatt
Depends on D31320

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

--HG--
extra : moz-landing-system : lando
2019-05-16 23:06:17 +00:00
Emilio Cobos Álvarez
c8338578d2 Bug 1551991 - Cleanup a bit the counter style code. r=jwatt
Use more compact types, and remove some manual implementations that can be
derived.

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

--HG--
extra : moz-landing-system : lando
2019-05-16 23:05:00 +00:00
Emilio Cobos Álvarez
835de4b08d Bug 1529002 - Use cbindgen to back CSS transforms. r=boris
This avoids the expensive conversion, and cleans up a bunch.

Further cleanup is possible, just not done yet to avoid growing the patch even
more.

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

--HG--
extra : moz-landing-system : lando
2019-05-16 23:25:10 +00:00
Emilio Cobos Álvarez
0b89333979 Bug 1550554 - Use OwnedSlice for will-change. r=heycam
We could use ArcSlice if wanted I guess, your call. Though will change is not
supposed to be used very frequently.

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

--HG--
extra : moz-landing-system : lando
2019-05-16 23:23:28 +00:00
Emilio Cobos Álvarez
987519e4da Bug 1550554 - Add bindings for box shadows, and remove nsCSSShadowArray and friends. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D30547

--HG--
extra : moz-landing-system : lando
2019-05-16 23:04:32 +00:00
Emilio Cobos Álvarez
a4ef6a3540 Bug 1550554 - Use ArcSlice for quotes. r=heycam
This saves the intermediate allocation.

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

--HG--
extra : moz-landing-system : lando
2019-05-16 23:04:31 +00:00
Emilio Cobos Álvarez
5859e667fb Bug 1550554 - Share computed and specified value representation of -moz-context-properties. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D30545

--HG--
extra : moz-landing-system : lando
2019-05-16 23:03:29 +00:00
Emilio Cobos Álvarez
4cc6d90c5f Bug 1550554 - Use an ArcSlice as the computed value representation of inherited list properties. r=heycam
This adds a bit of complexity, which I think will pay off in the end. Removals
incoming.

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

--HG--
extra : moz-landing-system : lando
2019-05-16 23:03:27 +00:00
Emilio Cobos Álvarez
9ed0e9ec6e Bug 1550554 - Implement ArcSlice::default(). r=heycam
Share a singleton to avoid allocating for empty lists.

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

--HG--
extra : moz-landing-system : lando
2019-05-16 23:22:04 +00:00
Emilio Cobos Álvarez
a109b9a835 Bug 1549593 - Use OwnedSlice in the specified and computed values of most vector properties. r=heycam
This is just a refactor in the right direction. Eventual goal is:

 * All inherited properties use ArcSlice<>.
 * All reset properties use OwnedSlice<> (or ThinVec<>).

No conversion happens at all, so we can remove all that glue, and also
compute_iter and co.

Of course there's work to do, but this is a step towards that.

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

--HG--
extra : moz-landing-system : lando
2019-05-16 23:21:37 +00:00
Ciure Andrei
00a73f5055 Backed out 17 changesets (bug 1550554, bug 1549593, bug 1551991, bug 1529002) for failing multiple Android tests and Windows 2012 bustages CLOSED TREE
Backed out changeset 3bb3fafa62e2 (bug 1551991)
Backed out changeset e12a979de502 (bug 1551991)
Backed out changeset d81e4aa6bf0c (bug 1551991)
Backed out changeset c354e61f2a34 (bug 1551991)
Backed out changeset 37fd602bebc2 (bug 1551991)
Backed out changeset 6c1f00cc30ca (bug 1551991)
Backed out changeset 8a7a0329bdc3 (bug 1551991)
Backed out changeset 86159475ddd3 (bug 1551991)
Backed out changeset 35f91a9ea82a (bug 1529002)
Backed out changeset 6798155e71dc (bug 1529002)
Backed out changeset b90c2cf5b8c5 (bug 1550554)
Backed out changeset 882ab9868c95 (bug 1550554)
Backed out changeset b28a48e2ed21 (bug 1550554)
Backed out changeset 2c31fe18eefd (bug 1550554)
Backed out changeset 57f2362aa538 (bug 1550554)
Backed out changeset 45f171b26e95 (bug 1550554)
Backed out changeset 2e4b263c9410 (bug 1549593)
2019-05-16 13:17:10 +03:00
Emilio Cobos Álvarez
ccf63230f7 Bug 1551991 - Remove nsCSSValue bindings. r=jwatt
Depends on D31320

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

--HG--
extra : moz-landing-system : lando
2019-05-16 14:31:52 +00:00
Emilio Cobos Álvarez
f7cde97a0b Bug 1551991 - Cleanup a bit the counter style code. r=jwatt
Use more compact types, and remove some manual implementations that can be
derived.

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

--HG--
extra : moz-landing-system : lando
2019-05-16 14:30:57 +00:00
Emilio Cobos Álvarez
5804e8efae Bug 1529002 - Use cbindgen to back CSS transforms. r=boris
This avoids the expensive conversion, and cleans up a bunch.

Further cleanup is possible, just not done yet to avoid growing the patch even
more.

Differential Revision: https://phabricator.services.mozilla.com/D30748
2019-05-16 16:24:38 +02:00
Emilio Cobos Álvarez
6634361c43 Bug 1550554 - Use OwnedSlice for will-change. r=heycam
We could use ArcSlice if wanted I guess, your call. Though will change is not
supposed to be used very frequently.

Differential Revision: https://phabricator.services.mozilla.com/D30548
2019-05-16 16:24:31 +02:00
Emilio Cobos Álvarez
0fe081bb39 Bug 1550554 - Add bindings for box shadows, and remove nsCSSShadowArray and friends. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D30547
2019-05-16 16:24:28 +02:00
Emilio Cobos Álvarez
49f795fd83 Bug 1550554 - Use ArcSlice for quotes. r=heycam
This saves the intermediate allocation.

Differential Revision: https://phabricator.services.mozilla.com/D30546
2019-05-16 16:24:24 +02:00
Emilio Cobos Álvarez
8c06775ab0 Bug 1550554 - Share computed and specified value representation of -moz-context-properties. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D30545
2019-05-16 16:24:20 +02:00
Emilio Cobos Álvarez
2ae3a428ec Bug 1550554 - Use an ArcSlice as the computed value representation of inherited list properties. r=heycam
This adds a bit of complexity, which I think will pay off in the end. Removals
incoming.

Differential Revision: https://phabricator.services.mozilla.com/D30544
2019-05-16 16:24:16 +02:00
Emilio Cobos Álvarez
00b4378adb Bug 1550554 - Implement ArcSlice::default(). r=heycam
Share a singleton to avoid allocating for empty lists.

Differential Revision: https://phabricator.services.mozilla.com/D30543
2019-05-16 16:24:13 +02:00
Emilio Cobos Álvarez
6d9623f982 Bug 1549593 - Use OwnedSlice in the specified and computed values of most vector properties. r=heycam
This is just a refactor in the right direction. Eventual goal is:

 * All inherited properties use ArcSlice<>.
 * All reset properties use OwnedSlice<> (or ThinVec<>).

No conversion happens at all, so we can remove all that glue, and also
compute_iter and co.

Of course there's work to do, but this is a step towards that.

Differential Revision: https://phabricator.services.mozilla.com/D30127
2019-05-16 16:24:09 +02:00
Coroiu Cristina
b4731ed54d Backed out 12 changesets (bug 1383650) for landing in the soft-freeze period
Backed out changeset 4316d55f87be (bug 1383650)
Backed out changeset 0118148f1534 (bug 1383650)
Backed out changeset 447c9248342b (bug 1383650)
Backed out changeset 6730776560c0 (bug 1383650)
Backed out changeset a7b8e6460fb8 (bug 1383650)
Backed out changeset e864696f6cf8 (bug 1383650)
Backed out changeset 2b003d678c58 (bug 1383650)
Backed out changeset 7bc3bff991c4 (bug 1383650)
Backed out changeset f1f7b4ad9547 (bug 1383650)
Backed out changeset 18b030b31660 (bug 1383650)
Backed out changeset 70e74dd6b45d (bug 1383650)
Backed out changeset 55a283e793df (bug 1383650)
2019-05-16 04:47:58 +03:00
violet
2dad80d965 Bug 1383650 - Add SVG geometry property support in CSS r=emilio
This patch adds SVG geometry properties to CSS, it doesn't deal with
how SVG handles them.

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

--HG--
extra : moz-landing-system : lando
2019-05-16 00:47:20 +00:00
violet
19283c2c6c Bug 1383650 - Support AllowQuirks::Always option in helpers.mako.rs r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D29936

--HG--
extra : moz-landing-system : lando
2019-05-16 00:44:51 +00:00
Emilio Cobos Álvarez
0869b9bd67 Bug 1550377 - Use ManuallyDrop for style structs. r=jwatt
We destroy them manually, so it's the right thing to do.

This allows us to not run destructors of any members of nsStyle*, which in turn allows us to:

 * Remove the hack that replaced all nsStrings for nsStringReprs.
 * Remove ns{,C}StringRepr (followup)
 * Add members with destructors to the style structs (you see where I'm going :)).

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

--HG--
extra : moz-landing-system : lando
2019-05-15 08:57:36 +00:00
Brindusan Cristian
b766f8ce38 Backed out changeset 2d0e8bded97a (bug 1550377) for build bustages on self.gecko. CLOSED TREE 2019-05-15 04:35:01 +03:00
Emilio Cobos Álvarez
6770308eb7 Bug 1550377 - Use ManuallyDrop for style structs. r=jwatt
We destroy them manually, so it's the right thing to do.

This allows us to not run destructors of any members of nsStyle*, which in turn allows us to:

 * Remove the hack that replaced all nsStrings for nsStringReprs.
 * Remove ns{,C}StringRepr (followup)
 * Add members with destructors to the style structs (you see where I'm going :)).

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

--HG--
extra : moz-landing-system : lando
2019-05-14 22:44:40 +00:00
Cameron McCormack
4b20fc81c7 Bug 1505908 - Add Gecko profiler labels for when the style threads are doing work. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D30869

--HG--
extra : moz-landing-system : lando
2019-05-14 05:00:45 +00:00
Emilio Cobos Álvarez
7b4c4a4912 No bug - rustfmt recent style system changes. 2019-05-09 20:18:08 +02:00
Emilio Cobos Álvarez
647b7c7078 No bug - Fix Servo build. 2019-05-09 20:18:05 +02:00
Emilio Cobos Álvarez
f65bcfba56 Bug 1549559 - Add bindings for ArcSlice and ThinArc, and use them to reduce copies of SVG path data. r=heycam
As I said over bug 1549593, the eventual goal is to use ArcSlice in all
inherited properties. But this seemed like a good first candidate that doesn't
require me to move around a lot more code, since we were already using cbindgen
for the path commands.

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

--HG--
extra : moz-landing-system : lando
2019-05-09 12:43:19 +00:00
Emilio Cobos Álvarez
f59bb7ae91 Bug 1549559 - Introduce ArcSlice, a small wrapper over ThinArc but without an explicit header. r=heycam
We could make the header PhantomData or something, but then we wouldn't be able
to bind to C++, since C++ doesn't have ZSTs. So add a canary instead to add a
runtime check of stuff being sane.

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

--HG--
extra : moz-landing-system : lando
2019-05-09 10:53:50 +00:00
Emilio Cobos Álvarez
1de789c618 Bug 1549593 - Move OwnedSlice to style_traits. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D30126

--HG--
rename : servo/components/style/owned_slice.rs => servo/components/style_traits/owned_slice.rs
extra : moz-landing-system : lando
2019-05-09 10:49:50 +00:00
Emilio Cobos Álvarez
38065025d9 Bug 1548691 - Use the owned slice type for basic shape polygon coordinates. r=TYLin,heycam
This enables destructors for tagged unions in cbindgen, implemented in:

 * https://github.com/eqrion/cbindgen/pull/333

Which allow us to properly generate a destructor for the cbindgen-generated
StyleBasicShape (which now contains an OwnedSlice).

For now, we still use the glue code to go from Box<BasicShape> to
UniquePtr<BasicShape>. But that will change in the future when we generate even
more stuff and remove all the glue.

I could add support for copy-constructor generation to cbindgen for tagged
enums, but I'm not sure if it'll end up being needed, and copy-constructing
unions in C++ is always very tricky.

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

--HG--
extra : moz-landing-system : lando
2019-05-09 11:24:57 +00:00
Emilio Cobos Álvarez
7d9dca2244 Bug 1548691 - Add an owned slice type which cbindgen can understand. r=heycam
Passing these by value won't be ok of course, but that's fine.

I plan to combine this with https://github.com/eqrion/cbindgen/pull/333 to
actually be able to share representation for ~all the things, this is just the
first bit.

Box<T>, Atom and Arc<T> will be much easier since cbindgen can understand them
without issues.

It's boxed slices the only ones I should need something like this. I could avoid
it if I rely on Rust's internal representation, which we can per [1], but then I
need to teach cbindgen all about slices, which is generally hard, I think.

[1]: https://github.com/rust-lang/unsafe-code-guidelines/blob/master/reference/src/layout/pointers.md

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

--HG--
extra : moz-landing-system : lando
2019-05-09 10:49:22 +00:00
Emilio Cobos Álvarez
936ebd1f3a Bug 1550389 - Remove unnecessary mut usage. 2019-05-09 05:45:10 +02:00
Cameron McCormack
f5b7d1380b Bug 866102 - Implement -webkit-line-clamp. r=mats,emilio,dholbert
Differential Revision: https://phabricator.services.mozilla.com/D20115

--HG--
extra : moz-landing-system : lando
2019-05-09 02:32:30 +00:00
Emilio Cobos Álvarez
e3b9d16857 Bug 1549969 - Fix an assertion that doesn't account for alignment padding. r=bholley
I'm hitting this when trying to add bindings for box shadows, which are 32-bit
aligned.

Depends on D30352

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

--HG--
extra : moz-landing-system : lando
2019-05-08 18:03:37 +00:00
Emilio Cobos Álvarez
fcca6294b1 Bug 1549969 - Don't panic when creating empty ThinArcs. r=bholley
The change from [T; 1] to [T; 0] shouldn't change behavior since they have the
right alignment and we never poke at that particular array, but feels more
correct to avoid creating types that point to uninitialized data or outside of
their allocation, now that we allow empty slices.

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

--HG--
extra : moz-landing-system : lando
2019-05-08 17:54:25 +00:00
Emilio Cobos Álvarez
17b3f8d8e7 Bug 1538101 - Don't report errors for properties for which we've parsed another value in the same declaration block. r=jdm
I thought a bit about how to test it and it's not particularly great.
test_css_parse_error_smoketest.html is great to assert that something _gets_
reported, but not that it doesn't :)

Differential Revision: https://phabricator.services.mozilla.com/D30201
2019-05-08 18:14:18 +02:00
Dorel Luca
6d69b04fd4 Backed out changeset eee17e1b0435 (bug 1538101) for Browser-chrome and DT failures. CLOSED TREE 2019-05-08 18:21:30 +03:00
Emilio Cobos Álvarez
1b7101750d Bug 1538101 - Don't report errors for properties for which we've parsed another value in the same declaration block. r=jdm
I thought a bit about how to test it and it's not particularly great.
test_css_parse_error_smoketest.html is great to assert that something _gets_
reported, but not that it doesn't :)

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

--HG--
extra : moz-landing-system : lando
2019-05-08 12:44:46 +00:00
Emilio Cobos Álvarez
c8d19bedcd Bug 1538101 - Centralize a bit invalid value error reporting. r=jdm
Also, buffer the errors, since we're going to want to look at the whole
declaration block to skip reporting them.

This shouldn't change behavior, just moves some work to the caller, and defers a
bit the work so that it happens only when error reporting is enabled.

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

--HG--
extra : moz-landing-system : lando
2019-05-08 12:44:36 +00:00
Emilio Cobos Álvarez
259aa236fd Bug 1549596 - Use PhantomData<T> in servo_arc. r=bholley
See https://github.com/rust-lang/rust/pull/60594#issuecomment-489966933

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

--HG--
extra : moz-landing-system : lando
2019-05-08 08:01:01 +00:00
Emilio Cobos Álvarez
0789d1d403 Bug 1549596 - ThinArc should use NonNull. r=bholley
If only for parallelism with Arc<>.

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

--HG--
extra : moz-landing-system : lando
2019-05-07 03:16:21 +00:00
Emilio Cobos Álvarez
e736bff42d No bug - Cherry-pick some Servo removals from malloc_size_of. r=npotb 2019-05-07 12:59:40 +02:00
Oana Pop Rus
251b4874dc Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-05-07 01:33:06 +03:00
Oana Pop Rus
65399363fb Merge inbound to mozilla-central. a=merge 2019-05-07 00:45:24 +03:00
Emilio Cobos Álvarez
ab4877cc37 Bug 1549589 - scroll-snap-coordinate shouldn't use NotInitial. r=hiro
The initial value for this is indeed `none` (and thus empty). The Rust code was
confused.

This property is disabled by default these days, and I think the
get_initial_value() function, which is what could get confused, is not called
for this property, so I think this shouldn't be observable.

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

--HG--
extra : moz-landing-system : lando
2019-05-06 21:31:16 +00:00
Emilio Cobos Álvarez
656a46330b Bug 1549301 - Fix Servo build. 2019-05-06 10:37:55 +02:00
Emilio Cobos Álvarez
94cde8dcec Bug 1549301 - Rustfmt recent style system changes. 2019-05-06 10:37:53 +02:00
Emilio Cobos Álvarez
c78d89f5d6 Bug 1549301 - Import style system changes for Servo's Shadow DOM support. 2019-05-06 10:37:52 +02:00
Emilio Cobos Álvarez
959628ed83 Bug 1549301 - Fix some warnings. 2019-05-06 10:37:50 +02:00
Ian Moody
a465f73789 Bug 1549301 - Remove :-servo-case-sensitive-type-attr().
No longer needed now that the case-sensitive flag for attributes selectors is
supported.
Update user-agent CSS sheet to use the standard flag.

Fixes #23227

This cherry-picks https://github.com/servo/servo/pull/23228.
2019-05-06 10:37:45 +02:00
Jeremy Ir
79895773c2 Bug 1548341 - Convert NS_STYLE_BORDER to an enum class in nsStyleConsts.h. r=dholbert
Converting the NS_STYLE_BORDER definitions in to enumerated classes as
per bug 1277133.

The original constants broke the convention used by the rest of the
definitions as the CSS property being described is `border-collapse`,
so corrections were made with the migration to the enumerated class.

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

--HG--
extra : moz-landing-system : lando
2019-05-05 23:39:27 +00:00
Mats Palmgren
af98466fc0 Bug 1549223 - [css-grid-2] Remove single keyword 'subgrid' as a valid value for the 'grid' and 'grid-template' shorthands. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D29974

--HG--
extra : rebase_source : 4f76c70ab6335cd41e23bd692c0a4ea432b525e9
2019-05-06 02:43:50 +02:00
Masayuki Nakano
8a9d031686 Bug 253889 - part 3: Move all remaining members of nsIPresShell to mozilla::PresShell r=emilio
Additionally, this sorts out the order of member variables for minimizing the
instance size.

And also this changes `enum RenderFlags` to `enum class RenderingStateFlags`.

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

--HG--
extra : moz-landing-system : lando
2019-05-01 02:28:25 +00:00
Noemi Erli
f1ef21cbc7 Backed out changeset 8c89fd37b79d (bug 1544242) for failures in browser_rules_shadowdom_slot_rules.js CLOSED TREE 2019-05-01 22:03:06 +03:00
Emilio Cobos Álvarez
27fc6a03c9 Bug 1545430 - Implement selector-matching for ::part(). r=heycam
Also fairly straight-forward. This may get more complicated when we do part
forwarding, if any.

I've opened https://github.com/w3c/csswg-drafts/issues/3841 in what I think
would be a cleaner model for forwarding.

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

--HG--
extra : moz-landing-system : lando
2019-05-01 17:28:23 +00:00
Emilio Cobos Álvarez
f7fc67efda Bug 1545425 - Add parsing support for ::part(). r=heycam
Disabled for now of course. This should be pretty uncontroversial I'd think.

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

--HG--
extra : moz-landing-system : lando
2019-05-01 17:25:13 +00:00
Emilio Cobos Álvarez
fb5b637f4f Bug 1544242 - Fix selector-matching for nested pseudo-elements. r=heycam,mats
We always include the combinator for pseudo-elements now (not including it was
just an optimization) in order to not match when nested pseudo-elements are
involved.

We could add a more generic check in `matches_simple_selector` like:

```
if element.is_pseudo_element() {
    match *selector {
        Component::PseudoElement(..) |
        Component::NonTSPseudoClass(..) => {},
        _ => return false,
    }
}
```

But even that wouldn't be enough to make selectors like `:hover::marker` not
match on the `::before::marker` pseudo-element, plus that code is really hot.

So for now do the check on the `next_element_for_combinator` function. It's a
bit hacky but it's the best I could came up with...

While at it, simplify some checks to use is_pseudo_element() instead of
implemented_pseudo_element() directly.

Only the Rust patch as-is would make markers for ::before and ::after on list
items not show up, so we also need to switch ::marker to use ProbeMarkerStyle()
rather than ProbePseudoElementStyle(), since the marker should exist even if it
matches no rules.

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

--HG--
extra : moz-landing-system : lando
2019-05-01 17:19:08 +00:00
Emilio Cobos Álvarez
1dc4cd8f3c Bug 1544242 - Check iterator length in SelectorIter::is_featureless_host_selector. r=heycam
I'm going to unconditionally generate the PseudoElement combinator, and this
causes issues since we'll put the raw `::pseudo` selectors in the host bucket,
which is obviously wrong.

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

--HG--
extra : moz-landing-system : lando
2019-04-29 05:58:56 +00:00
Emilio Cobos Álvarez
edde08a7cb Bug 1547985 - Use rust types for vertical-align. r=mats
The previous commit removed the dependence on the discriminant value, so we
don't need to keep discriminants different from text-align anymore.

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

--HG--
extra : moz-landing-system : lando
2019-05-01 13:08:34 +00:00
Emilio Cobos Álvarez
0593b77cc0 Bug 1547674 - Use rust types for gradient stops. r=boris
This doesn't clean up all that much, yet, but it's a step in the right
direction.

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

--HG--
extra : moz-landing-system : lando
2019-04-30 20:37:54 +00:00
Emilio Cobos Álvarez
ab81a99c80 Bug 1547939 - Add a pref for a simpler -moz- gradient parsing. r=dholbert
This won't reintroduce any of the regressions that were triggered by our
previous attempts to turn off -moz prefixed gradients, and lets us massively
simplify the gradient code, if it sticks.

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

--HG--
extra : moz-landing-system : lando
2019-04-30 19:48:27 +00:00
Emilio Cobos Álvarez
a6845a59a2 Bug 1547619 - Fix :-moz-svg-use-shadow-tree-root pseudo-class. r=violet
Turns out removing the pseudo-class and such ends up not being quite as trivial
as I initially thought, or possible at all, since the fact that the <symbol> is
a <symbol> is observable via selectors, added a test for that.

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

--HG--
extra : moz-landing-system : lando
2019-04-29 08:04:22 +00:00
Brian Birtles
46c5c2141a Bug 1536688 - Allow animating the 'all' property from Web Animations; r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D28763

--HG--
extra : moz-landing-system : lando
2019-04-26 00:47:40 +00:00
Emilio Cobos Álvarez
88a1b27597 Bug 1546046 - Remove support for XBL resources. r=TYLin
So much unsound code going away :-)

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

--HG--
extra : moz-landing-system : lando
2019-04-23 16:43:15 +00:00
Emilio Cobos Álvarez
73c98adccf Bug 1544886 - Allow CSS wide-keywords in custom property fallback. r=SimonSapin
Differential Revision: https://phabricator.services.mozilla.com/D28349

--HG--
extra : moz-landing-system : lando
2019-04-23 13:13:11 +00:00
Bogdan Tara
ec489aa170 Backed out changeset e85cb54e5944 (bug 1546046) complementary backout after 1470880 was backed out CLOSED TREE 2019-04-23 06:55:29 +03:00
Emilio Cobos Álvarez
daef6a8b67 Bug 1546046 - Remove support for XBL resources. r=TYLin
So much unsound code going away :-)

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

--HG--
extra : moz-landing-system : lando
2019-04-22 21:57:22 +00:00
Emilio Cobos Álvarez
f2b53c1479 Bug 1545979 - Drop unused user-agent cascade datas when not holding the cache lock. r=bholley
We want to drop the cascade data memory as soon as possible, so bug 1544546
introduced an UpdateStylistIfNeeded call from ShellDetachedFromDocument.

Unfortunately, this call can reenter into the global user-agent cascade data if
some of the CSS values kept alive by the cascade data keep alive an SVG
document, see the stack on this bug for an example. Make sure to drop the
user-agent cascade datas when not holding the cache lock to avoid this
situation.

Before bug 1535788, we just destroyed the stylist, so we kept holding a
reference from the cache, and that reference will be dropped sometime later when
other document updated their user-agent stylesheets (if they happened not to
match the cache of course).

Seems to me this doesn't ended up happening in our automation, but it could
happen in the wild, in theory at least.

It's nice that Rust made this a safe deadlock caught by our tests rather than a
very subtle and infrequent memory corruption.

The relevant SVG documents are probably the <input type=number> rules:

https://searchfox.org/mozilla-central/rev/d80f0a570736dce76a2eb184fb65517462089e8a/layout/style/res/forms.css#1050

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

--HG--
extra : moz-landing-system : lando
2019-04-22 19:45:06 +00:00
Emilio Cobos Álvarez
824fde5850 Bug 1545440 - Don't allow to parse XUL tree pseudo-elements with a single colon. r=mats
Now that they're not exposed to the web we can remove this special case.

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

--HG--
extra : moz-landing-system : lando
2019-04-19 04:41:17 +00:00
Emilio Cobos Álvarez
d3f8a1f5a6 Bug 1544535 - Bug 1542263 - Don't keep two list of stylesheets in ServoStyleSet. r=firefox-style-system-reviewers,jwatt
Just one set of stylesheets is enough. While at it, unify SheetType and Origin.

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

--HG--
extra : moz-landing-system : lando
2019-04-19 04:20:31 +00:00
Razvan Maries
74e5a11e50 Backed out changeset 24d0d307385d (bug 1545440) for perma failures on browser_parsable_css.js. CLOSED TREE 2019-04-19 02:06:41 +03:00
Andreea Pavel
eb0b5758ea Merge mozilla-central to autoland. on a CLOSED TREE 2019-04-19 00:48:30 +03:00