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

8670 Коммитов

Автор SHA1 Сообщение Дата
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