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

1276 Коммитов

Автор SHA1 Сообщение Дата
Bastien Orivel e20d4dc52f Bug 1580908 - Part 11: Fix test_size_of_rule_node. r=emilio
Apparently I made SourcePropertyDeclaration 8 bytes shorter by updating
arrayvec. (see
b56c3b78d0
and
29012231a8
for details)

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

--HG--
extra : moz-landing-system : lando
2019-09-12 22:22:50 +00:00
Bastien Orivel c98f904a4d Bug 1580908 - Part 2: Update env_logger to 0.6. r=froydnj
This is one less dependency on regex 0.2

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

--HG--
extra : moz-landing-system : lando
2019-09-12 21:46:02 +00:00
Emilio Cobos Álvarez 0140a5576c Bug 1577439 - Shutdown Servo's thread-pool in leak-checking builds, leak the atom table elsewhere. r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D44217

--HG--
extra : moz-landing-system : lando
2019-09-09 22:39:46 +00:00
Cameron McCormack 7052f624b5 Bug 1578147 - Align the Rust and C++ representations of WritingMode. r=emilio,jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D44412

--HG--
extra : moz-landing-system : lando
2019-09-09 04:49:55 +00:00
Gurzau Raul 9470d77271 Backed out changeset a396ec8f44fd (bug 1577439) for failing valgrind-test on a CLOSED TREE. 2019-09-07 19:03:27 +03:00
Emilio Cobos Álvarez d748b6062a Bug 1577439 - Shutdown Servo's thread-pool in leak-checking builds, leak the atom table elsewhere. r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D44217

--HG--
extra : moz-landing-system : lando
2019-09-05 19:18:27 +00:00
Emilio Cobos Álvarez d5bc03b6f0 Bug 1578295 - Use cbindgen for counters. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D44403

--HG--
extra : moz-landing-system : lando
2019-09-02 23:11:26 +00:00
Razvan Maries 80cfb7b1f5 Backed out changeset 42ebd8a50978 (bug 1577439) for causing perma leakcheck | tab process: negative leaks caught. 2019-09-01 03:41:33 +03:00
Emilio Cobos Álvarez 5ba33267fa Bug 1577439 - Shutdown Servo's thread-pool in leak-checking builds, leak the atom table elsewhere. r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D44217

--HG--
extra : moz-landing-system : lando
2019-08-31 23:28:26 +00:00
Boris Chiou c8dba8c886 Bug 1575062 - Support css use counters for unimplemented properties. r=emilio
For developing properties, we will handle them in an other bug.

Besides, I use an iframe for the test because we create a use counter in
the constructor of Document, which use the prefs to decide what kind of
properties we want to record. So, in the test, we have to reload iframe
to make sure we re-create the document, so does the use counter, to make
sure the prefs work properly.

The two prefs affect the css use counters:
1. layout.css.use-counters.enabled: Allocate use counters, and record
   non-custom properties.
2. layout.css.use-counters-unimplemented.enabled: Record all unimplmented
   properties into the use counters.

If we disable layout.css.use-counters.enblaed, we don't create use counters
object, so layout.css.use-counters-unimplemented.enabled doesn't work,
either.

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

--HG--
extra : moz-landing-system : lando
2019-08-29 23:40:13 +00:00
Emilio Cobos Álvarez c17fdaaa27 Bug 1576703 - Update cbindgen. r=boris
This cleans up the pattern of "Use a private dtor so that the helper functions
do the right thing" by enabling it everywhere using:

  https://github.com/eqrion/cbindgen/pull/377

It also caught some uninitialized value issues.

I think they're mostly harmless since we zero-initialize our structs:

https://searchfox.org/mozilla-central/rev/325c1a707819602feff736f129cb36055ba6d94f/servo/components/style/properties/gecko.mako.rs#632

And since we override the clip rect, which is the other bit of code that was
failing to build with this change.

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

--HG--
extra : moz-landing-system : lando
2019-08-26 23:18:46 +00:00
Emilio Cobos Álvarez 7cc40cf7ef Bug 1576666 - Use cbindgen for clip / -moz-image-region. r=boris
This also fixes some of the issues with -moz-image-region, where we just minted
an auto out of the blue.

Depends on D43472

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

--HG--
extra : moz-landing-system : lando
2019-08-26 23:09:47 +00:00
Emilio Cobos Álvarez f93d4c2566 Bug 1576587 - Rustfmt declaration_block.rs and glue.rs
Differential Revision: https://phabricator.services.mozilla.com/D43400

--HG--
extra : moz-landing-system : lando
2019-08-26 09:58:53 +00:00
Emilio Cobos Álvarez ba5c709666 Bug 1575608 - Simplify -x-span property. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D42914

--HG--
extra : moz-landing-system : lando
2019-08-21 20:02:13 +00:00
Emilio Cobos Álvarez 346d47d739 Bug 1575608 - Avoid manual paint-order glue code. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D42913

--HG--
extra : moz-landing-system : lando
2019-08-21 19:47:53 +00:00
Emilio Cobos Álvarez f11bf00012 Bug 1575559 - Make font-variant-alternates use cbindgen. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D42859

--HG--
extra : moz-landing-system : lando
2019-08-21 22:45:26 +00:00
Emilio Cobos Álvarez 110fe36713 Bug 1575559 - Fix rebase messup that makes a constructor public which shouldn't be. r=boris
I just drive-by noticed this, but I think it's worth fixing.

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

--HG--
extra : moz-landing-system : lando
2019-08-21 18:28:23 +00:00
Dzmitry Malyshau 9875e48074 Bug 1575008 - Update parking_lot dependency to 0.9.0 r=aosmond
Updating parking_lot would allow us to avoid dependency duplication when WebGPU tree is vendored.

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

--HG--
rename : third_party/rust/parking_lot_core/src/thread_parker/wasm.rs => third_party/rust/parking_lot_core/src/thread_parker/wasm_atomic.rs
extra : moz-landing-system : lando
2019-08-19 21:28:51 +00:00
Emilio Cobos Álvarez a03875ef63 Bug 1568536 - Simplify some style system APIs. r=heycam
Return a raw pointer instead of a strong reference to a ComputedStyle, and
handle the case of the style not being present by returning null rather than
requiring an extra function to check it and crashing if the precondition is not
met.

Also, name them so that it's clear they just return outdated styles and don't
make any extra effort.

This is just cleanup that makes the next patch easier / more obvious.

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

--HG--
extra : moz-landing-system : lando
2019-08-16 05:59:03 +00:00
Mats Palmgren 6b3058eeb5 Bug 1038294 part 12 - Implement multi-keyword 'display' values for Gecko. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D39764

--HG--
extra : moz-landing-system : lando
2019-08-14 14:34:37 +00:00
Charlie Marlow 693746ef3d Bug 1558929: adding from-font support to text-underline-offset and text-decoration-thickness r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D41476

--HG--
extra : moz-landing-system : lando
2019-08-13 17:43:25 +00:00
Emilio Cobos Álvarez 6068035edc Bug 1572805 - Use cbindgen for text-emphasis-style. r=boris
I sent https://github.com/eqrion/cbindgen/pull/377 since I got sick of
copy-pasting the private default constructor stuff :)

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

--HG--
extra : moz-landing-system : lando
2019-08-10 18:11:31 +00:00
Daniel Varga 3430859a68 Backed out 2 changesets (bug 1572805) for build-rusttests failure. On a CLOSED TREE
Backed out changeset 849ca4b3f9de (bug 1572805)
Backed out changeset 81b56d76505a (bug 1572805)
2019-08-10 21:07:03 +03:00
Emilio Cobos Álvarez ccd8c3bedc Bug 1572805 - Use cbindgen for text-emphasis-style. r=boris
I sent https://github.com/eqrion/cbindgen/pull/377 since I got sick of
copy-pasting the private default constructor stuff :)

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

--HG--
extra : moz-landing-system : lando
2019-08-10 16:21:15 +00:00
Emilio Cobos Álvarez 56df9575bc Bug 1499000 - Don't do CORS checks on CSS images with the resource:// scheme. r=bzbarsky
CORS only works on http channels, so anything else that tries to do a
CORS-enabled request fails catastrophically.

resource:// images are useful for extension developers, so don't perform CORS
checks on them. We may want to also do file:// and fix bug 1565509, while at it,
if we consider it's causing developer pain.

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

--HG--
extra : moz-landing-system : lando
2019-08-09 18:09:55 +00:00
Boris Chiou e158ad1169 Bug 1339672 - Support multiple track sizes for grid-auto-{columns|rows}. r=emilio,mats
Support `<track-size>+` on the implicit track sizing properties,
grid-auto-columns and grid-auto-rows.

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

--HG--
extra : moz-landing-system : lando
2019-08-06 18:32:16 +00:00
Emilio Cobos Álvarez 1f3d6c04f2 Bug 1519958 - Refactor grid types to preserve repeat() at computed value time and use cbindgen. r=mats,boris
I'm _really_ sorry for the size of the patch. I tried to do this in two steps
but it was a lot of work and pretty ugly.

This patch makes us use cbindgen for grid-template-{rows,columns}, in order to:

 * Make us preserve repeat() at computed-value time. This is per spec since
   interpolation needs to know about repeat(). Except for subgrid, which did the
   repeat expansion at parse-time and was a bit more annoying (plus it doesn't
   really animate yet so we don't need it to comply with the spec).

 * Tweaks the WPT tests for interpolation to adopt the resolution at:
   https://github.com/w3c/csswg-drafts/issues/3503.

Trade-off here, as this patch stands, is that this change makes us use less
long-living memory, since we expand repeat() during layout, but at the cost of a
bit of CPU time during layout (conditional on the property applying though,
which wasn't the case before). It should be very easy to store a cached version
of the template, should this be too hot (I expect it isn't), or to change the
representation in other ways to optimize grid layout code if it's worth it.

Another trade-off: I've used SmallPointerArray to handle line-name merging,
pointing to the individual arrays in the style data, rather than actually
heap-allocating the merged lists. This would also be pretty easy to change
should we measure and see that it's not worth it.

This patch also opens the gate to potentially improving memory usage in some
other ways, by reference-counting line-name lists for example, though I don't
have data that suggests it is worth it.

In general, this patch makes much easier to tweak the internal representation of
the grid style data structures. Overall, I think it's a win, the amount of magic
going on in that mako code was a bit huge; it took a bit to wrap my head around
it.

This patch comments out the style struct size assertions. They will be
uncommented in a follow-up patch which contains some improvements for this type,
which are worth getting reviewed separately.

Also, this patch doesn't remove as much code as I would've hoped for because of
I tried not to change most of the dom/grid code for inspector, but I think a
fair bit of the nsGridContainerFrame.cpp code that collects information for it
can be simplified / de-copy-pasted to some extent. But that was a pre-existing
problem and this patch is already quite massive.

Differential Revision: https://phabricator.services.mozilla.com/D36598
2019-08-05 22:13:21 +02:00
Emilio Cobos Álvarez 0f118f30e5 Bug 1404140 - Remove the GetCSNeedsLayoutFlush flag, as it is unneeded now. r=heycam
MANUAL PUSH: Would need to reorder the stack manually (https://bugzilla.mozilla.org/show_bug.cgi?id=1481539)

Differential Revision: https://phabricator.services.mozilla.com/D40300
2019-08-03 04:10:55 +02:00
Emilio Cobos Álvarez b38e7248ab Bug 1404140 - Don't flush layout for layout-dependent properties if we know that it won't affect the result. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D40299
2019-08-03 04:09:13 +02:00
Boris Chiou b91b90c199 Bug 1559231 - Support offset-anchor. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D39432

--HG--
extra : moz-landing-system : lando
2019-08-02 20:12:38 +00:00
Brindusan Cristian 0b3e26149c Backed out 2 changesets (bug 1559231) for rusttests build bustages. CLOSED TREE
Backed out changeset d47d9f4bf9a9 (bug 1559231)
Backed out changeset 50f92d01c47a (bug 1559231)
2019-08-02 21:55:37 +03:00
Boris Chiou 9463547bb3 Bug 1559231 - Support offset-anchor. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D39432

--HG--
extra : moz-landing-system : lando
2019-08-02 00:43:11 +00:00
Emilio Cobos Álvarez 2c808051d3 Bug 1567333 - Remove the ability to build Gecko without the bindgen feature. r=heycam
This is not used for anything, as far as I can tell.

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

--HG--
extra : moz-landing-system : lando
2019-07-18 23:39:14 +00:00
Cameron McCormack 1fdc57a4a9 Bug 1564597 - Ignore pref-controlled properties in cached scrollbar style assertions. r=emilio
Now if you add a new inherited, pref-controlled property, you must
declare whether it can have an effect on scrollbar styles.  If no,
then the property will be skipped in the assertions that check
whether our cached styles are equal to those we would compute.

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

--HG--
extra : moz-landing-system : lando
2019-07-10 22:43:24 +00:00
Jonathan Kew 7ae68c458b Bug 1421938 - Add an 'auto' value for the CSS 'quotes' property, and make it use language-dependent quote marks. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D36429

--HG--
extra : moz-landing-system : lando
2019-07-09 08:59:27 +00:00
shindli f5dea34efe Backed out 5 changesets (bug 1421938) for bustages in /builds/worker/workspace/build/src/layout/base/nsQuoteList.cpp CLOSED TREE
Backed out changeset 4e25a6db1f5b (bug 1421938)
Backed out changeset 11a8f9bc0418 (bug 1421938)
Backed out changeset f27980997dc5 (bug 1421938)
Backed out changeset adb2e2714c14 (bug 1421938)
Backed out changeset 33e38a62b400 (bug 1421938)
2019-07-09 02:52:38 +03:00
Jonathan Kew 6bea7b3966 Bug 1421938 - Add an 'auto' value for the CSS 'quotes' property, and make it use language-dependent quote marks. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D36429

--HG--
extra : moz-landing-system : lando
2019-07-08 20:16:19 +00:00
shindli 2c12986a7f Backed out 5 changesets (bug 1421938) for causing a bustage in /builds/worker/workspace/build/src/intl/locale/cldr-quotes.inc:21:448 CLOSED TREE
Backed out changeset 3958f2af0e34 (bug 1421938)
Backed out changeset 89a0866d1aa0 (bug 1421938)
Backed out changeset f150702af11f (bug 1421938)
Backed out changeset b8ebd4d241e0 (bug 1421938)
Backed out changeset 1d38eb5eff6e (bug 1421938)
2019-07-08 23:09:34 +03:00
Jonathan Kew e5f479f588 Bug 1421938 - Add an 'auto' value for the CSS 'quotes' property, and make it use language-dependent quote marks. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D36429

--HG--
extra : moz-landing-system : lando
2019-07-08 12:13:28 +00:00
Emilio Cobos Álvarez 117f562dcb Bug 1563315 - Use cbindgen for fill and stroke r=boris
Differential Revision: https://phabricator.services.mozilla.com/D36807

--HG--
extra : moz-landing-system : lando
2019-07-06 08:31:02 +00:00
Emilio Cobos Álvarez b1ca51fe1e Bug 1561738 - Remove nsStyleCoord. r=boris
And move the useful bits of it somewhere else (ServoStyleConstInlines.h for the
inline function definitions, and nsFrame.cpp for the static assertions).

Differential Revision: https://phabricator.services.mozilla.com/D36120
2019-06-28 12:44:44 +02:00
Emilio Cobos Álvarez 0a4d4343b9 Bug 1561738 - Use cbindgen for grid track sizing. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D36118
2019-06-28 12:44:43 +02:00
Cosmin Sabou 2fa2a56685 Backed out 3 changesets (bug 1561738) for causing build bustages on nsGridContainerFrame.cpp CLOSED TREE
Backed out changeset 98f100abc2ba (bug 1561738)
Backed out changeset 9ed20d0fb9ba (bug 1561738)
Backed out changeset 483b1e134ace (bug 1561738)
2019-06-28 13:27:09 +03:00
Emilio Cobos Álvarez e023916761 Bug 1561738 - Remove nsStyleCoord. r=boris
And move the useful bits of it somewhere else (ServoStyleConstInlines.h for the
inline function definitions, and nsFrame.cpp for the static assertions).

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

--HG--
extra : moz-landing-system : lando
2019-06-28 09:46:26 +00:00
Emilio Cobos Álvarez 9d92ed9a07 Bug 1561738 - Use cbindgen for grid track sizing. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D36118

--HG--
extra : moz-landing-system : lando
2019-06-28 09:46:02 +00:00
Charlie Marlow 8d6b1bcaa4 Bug 1561131: Adding parsing support for text-decoration-skip-ink r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D35831

--HG--
extra : moz-landing-system : lando
2019-06-27 21:34:33 +00:00
Andreea Pavel ea400c1438 Backed out changeset 21d365e43fec (bug 1561131) for failing test_bug1112014.html on a CLOSED TREE 2019-06-28 00:12:41 +03:00
Charlie Marlow 3f0f7ff856 Bug 1561131: Adding parsing support for text-decoration-skip-ink r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D35831

--HG--
extra : moz-landing-system : lando
2019-06-27 18:09:10 +00:00
Cameron McCormack 9bbe5b00a3 Bug 1554571 - Part 3: Cache computed styles of scrollbar part anonymous content. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D33123

--HG--
extra : moz-landing-system : lando
2019-06-27 07:22:22 +00:00
Cameron McCormack 5bf528676e Bug 1554571 - Part 1: Remove unused argument from Servo_ResolveStyle. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D33121

--HG--
extra : moz-landing-system : lando
2019-06-27 07:22:13 +00:00
Mihai Alexandru Michis b485399185 Backed out 4 changesets (bug 1554571) for causing failures in minimal-xul.css
Backed out changeset 1cc4e6374b8a (bug 1554571)
Backed out changeset 30728685499e (bug 1554571)
Backed out changeset c14e9c381345 (bug 1554571)
Backed out changeset a2143551d7bc (bug 1554571)

--HG--
extra : rebase_source : 4b4442d96eb40e57b0a9834b4048b11f9be1a964
2019-06-27 07:09:55 +03:00
Cameron McCormack 8538a62557 Bug 1554571 - Part 3: Cache computed styles of scrollbar part anonymous content. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D33123

--HG--
extra : moz-landing-system : lando
2019-06-27 00:25:03 +00:00
Cameron McCormack 60ac348ac5 Bug 1554571 - Part 1: Remove unused argument from Servo_ResolveStyle. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D33121

--HG--
extra : moz-landing-system : lando
2019-06-27 00:24:54 +00:00
Emilio Cobos Álvarez 3ff14f467f Bug 1547231 - Add an internal aspect-ratio CSS property. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D29037

--HG--
extra : moz-landing-system : lando
2019-06-26 22:10:04 +00:00
Emilio Cobos Álvarez e86340308c Bug 1559814 - Use the cbindgen representation for grid line properties. r=mats
We clamp earlier (parse time rather than computed value time), but that's the
only behavior change, which I think doesn't really matter.

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

--HG--
extra : moz-landing-system : lando
2019-06-26 21:21:38 +00:00
Emilio Cobos Álvarez 914637451c Bug 1559814 - Generate top-level function and constant declarations for the style crate. r=heycam
This needs https://github.com/eqrion/cbindgen/pull/362, but I expect it to be
uncontroversial. I'll add a patch to this bug when it's merged to update it.

cbindgen historically didn't include these, but it turns out to be pretty useful
to generate constants for the style crate (since the binding crate is
`servo/ports/geckolib`).

An alternative is to get a completely different cbindgen-generated header for
these, but that seems a bit wasteful. This generates the constants with the
Style prefix (so we'll get `StyleMAX_GRID_LINE` for example), which is very
ugly. But we probably want to eventually stop using the Style prefix and use a
namespace instead, plus it's trivial to do `auto kMaxLine = StyleMAX_GRID_LINE`,
for example, so it's probably not a huge deal.

Another alternative would be to use associated consts, which _are_ generated by
cbindgen. Something like:

```
struct GridConstants([u8; 0]);
impl GridConstants {
    const MAX_GRID_LINE: i32 = 10000;
}
```

Which would yield something like:

```
static const int32 StyleGridConstants_MAX_GRID_LINE = 10000;
```

I'm not sure if you find it preferrable, but I'm also happy to change it in a
follow-up to use this.

We need to fix a few manual C++ function signature definitions to match the C++
declaration.

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

--HG--
extra : moz-landing-system : lando
2019-06-26 21:21:28 +00:00
Mihai Alexandru Michis 0f86a6b30b Backed out 4 changesets (bug 1559814) for causing bustages. CLOSED TREE
Backed out changeset 11ec9de59076 (bug 1559814)
Backed out changeset fec03c5d3661 (bug 1559814)
Backed out changeset 62f9d89fb827 (bug 1559814)
Backed out changeset 362d9435ca4e (bug 1559814)
2019-06-27 00:04:50 +03:00
Emilio Cobos Álvarez f792986565 Bug 1559814 - Use the cbindgen representation for grid line properties. r=mats
We clamp earlier (parse time rather than computed value time), but that's the
only behavior change, which I think doesn't really matter.

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

--HG--
extra : moz-landing-system : lando
2019-06-26 20:33:23 +00:00
Emilio Cobos Álvarez 48ab92e23c Bug 1559814 - Generate top-level function and constant declarations for the style crate. r=heycam
This needs https://github.com/eqrion/cbindgen/pull/362, but I expect it to be
uncontroversial. I'll add a patch to this bug when it's merged to update it.

cbindgen historically didn't include these, but it turns out to be pretty useful
to generate constants for the style crate (since the binding crate is
`servo/ports/geckolib`).

An alternative is to get a completely different cbindgen-generated header for
these, but that seems a bit wasteful. This generates the constants with the
Style prefix (so we'll get `StyleMAX_GRID_LINE` for example), which is very
ugly. But we probably want to eventually stop using the Style prefix and use a
namespace instead, plus it's trivial to do `auto kMaxLine = StyleMAX_GRID_LINE`,
for example, so it's probably not a huge deal.

Another alternative would be to use associated consts, which _are_ generated by
cbindgen. Something like:

```
struct GridConstants([u8; 0]);
impl GridConstants {
    const MAX_GRID_LINE: i32 = 10000;
}
```

Which would yield something like:

```
static const int32 StyleGridConstants_MAX_GRID_LINE = 10000;
```

I'm not sure if you find it preferrable, but I'm also happy to change it in a
follow-up to use this.

We need to fix a few manual C++ function signature definitions to match the C++
declaration.

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

--HG--
extra : moz-landing-system : lando
2019-06-26 20:33:14 +00:00
Emilio Cobos Álvarez 3a16c93150 Bug 1556602 - Fix various warnings with rust 1.37 nightly. r=froydnj
In particular:

 * trait objects without an explicit `dyn` are deprecated
 * `...` range patterns are deprecated

I think these shouldn't really warn by default and should be clippy / opt-in
lints, but anyway, doesn't hurt.

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

--HG--
extra : moz-landing-system : lando
2019-06-18 21:32:16 +00:00
Emilio Cobos Álvarez 6ed8680108 Bug 1559546 - Use atoms for grid line names. r=mats
The style system already atomizes all CustomIdent values, which means that we're
just wasting memory and CPU by doing string copies all over the place.

This patch fixes it. This also simplifies further changes to use as much of the
rust data structures as possible.

I had to switch from nsTHashtable to mozilla::HashTable because the former
doesn't handle well non-default-constructible structs (like NamedLine, which
now has a StyleAtom, which is not default-constructible).

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

--HG--
extra : moz-landing-system : lando
2019-06-19 05:58:11 +00:00
Emilio Cobos Álvarez 5a2717a028 Bug 1559546 - Allow to construct StyleAtom objects from C++. r=heycam
I'm going to need it in an upcoming patch.

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

--HG--
extra : moz-landing-system : lando
2019-06-19 05:58:01 +00:00
Emilio Cobos Álvarez 841d3eea32 Bug 1559545 - Use servo for the representation of grid template areas. r=mats
Right now we do a lot of useless string copying. In order to avoid transcoding
to utf-16 during layout, make sure to use nsCString at a few related places.

I may revisit this since we're storing other line names as atoms in some places.
So it may be better to just use atoms everywhere.

But that'd be a different patch either way.

Depends on D35116

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

--HG--
extra : moz-landing-system : lando
2019-06-18 22:29:58 +00:00
Boris Chiou d6e5792aff Bug 1542064 - Add MOZ_DBG support for AnimationValue. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D33357

--HG--
extra : moz-landing-system : lando
2019-06-12 18:14:18 +00:00
Emilio Cobos Álvarez 351d40e7c3 Bug 1557430 - Add memory reporters for SVG mapped attribute declarations. r=njn,heycam
These are owned by the element and not referenced from the stylesheets.

They're referenced from the rule tree, but the rule nodes don't measure their
style source (since they're non-owning).

So unconditionally reporting them even though it's a refcounted object is ok.

While at it, remove some other fields from the old style system that are no
longer used.

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

--HG--
extra : moz-landing-system : lando
2019-06-08 18:58:57 +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
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 b58cd8f644 Bug 1556388 - Fix Servo build. 2019-06-03 09:12:15 -04: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 0bdeae4db0 Bug 1493420 - followup: Bump max allowed stack size of RuleNode. irc-r=heycam 2019-05-30 02:27:59 +02: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 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
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 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
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
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
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 00adbe98b0 Bug 1383650 - Add geometry property support for Servo glue r=emilio
These functions are useful to directly pass already parsed SVG
geometry property to CSS side.

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

--HG--
extra : moz-landing-system : lando
2019-05-16 13:21:21 +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 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
Nathan Froyd 33f7f47bf3 Bug 1552919 - remove unneeded AnimationValueMap uses; r=emilio
Nightly Rust complains thusly:

```
error: the item `AnimationValueMap` is imported redundantly
   --> servo/ports/geckolib/glue.rs:629:9
    |
104 | use style::properties::animated_properties::{AnimationValue, AnimationValueMap};
    |                                                              ----------------- the item `AnimationValueMap` is already imported here
...
629 |     use style::properties::animated_properties::AnimationValueMap;
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `-D unused-imports` implied by `-D warnings`
```

Remove the local imports to make it happy.

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

--HG--
extra : moz-landing-system : lando
2019-05-20 18:29:41 +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
Emilio Cobos Álvarez 659be28594 Bug 1551991 - followup: Give up on passing CounterSpeakAs by value since the previous patch busted non-Windows platforms.
CLOSED TREE
2019-05-17 07:01:26 +02:00
Emilio Cobos Álvarez ce94f581e0 Bug 1551991 - followup: Don't derive the destructor of CounterSpeakAs so that we can return it safely by value in Win32. r=me 2019-05-17 05:25:14 +02: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 90292a352d Bug 1551991 - Remove usage of nsCSSValue for SpeakAs. r=jwatt
Depends on D31319

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

--HG--
extra : moz-landing-system : lando
2019-05-16 23:06:06 +00:00
Emilio Cobos Álvarez 80c89fdda8 Bug 1551991 - Remove nsCSSValue usage of GetSymbols() GetAdditiveSymbols(). r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D31319

--HG--
extra : moz-landing-system : lando
2019-05-16 23:05:54 +00:00
Emilio Cobos Álvarez 88428d31cd Bug 1551991 - Remove nsCSSValue usage for range checks in CounterStyleRule. r=jwatt
Depends on D31317

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

--HG--
extra : moz-landing-system : lando
2019-05-16 23:05:38 +00:00
Emilio Cobos Álvarez 7e0fc30e7d Bug 1551991 - Remove nsCSSValue usage for negative / suffix / prefix. r=jwatt
Depends on D31316

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

--HG--
extra : moz-landing-system : lando
2019-05-16 23:05:25 +00:00
Emilio Cobos Álvarez 854582f70f Bug 1551991 - Remove nsCSSValue usage from GetPad. r=jwatt
Depends on D31315

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

--HG--
extra : moz-landing-system : lando
2019-05-16 23:05:10 +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 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 5f06ce58b8 Bug 1551991 - Remove usage of nsCSSValue for SpeakAs. r=jwatt
Depends on D31319

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

--HG--
extra : moz-landing-system : lando
2019-05-16 14:31:50 +00:00
Emilio Cobos Álvarez 0bb1b519c6 Bug 1551991 - Remove nsCSSValue usage of GetSymbols() GetAdditiveSymbols(). r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D31319

--HG--
extra : moz-landing-system : lando
2019-05-16 14:31:42 +00:00
Emilio Cobos Álvarez a3587f05d7 Bug 1551991 - Remove nsCSSValue usage for range checks in CounterStyleRule. r=jwatt
Depends on D31317

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

--HG--
extra : moz-landing-system : lando
2019-05-16 14:31:34 +00:00
Emilio Cobos Álvarez f9dfb61dac Bug 1551991 - Remove nsCSSValue usage for negative / suffix / prefix. r=jwatt
Depends on D31316

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

--HG--
extra : moz-landing-system : lando
2019-05-16 14:31:22 +00:00
Emilio Cobos Álvarez 9968de9376 Bug 1551991 - Remove nsCSSValue usage from GetPad. r=jwatt
Depends on D31315

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

--HG--
extra : moz-landing-system : lando
2019-05-16 14:31:15 +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 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 b17e156100 Bug 1383650 - Add geometry property support for Servo glue r=emilio
These functions are useful to directly pass already parsed SVG
geometry property to CSS side.

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

--HG--
extra : moz-landing-system : lando
2019-05-16 00:51:04 +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 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 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
Jonathan Kew c8c951fbbe Bug 1545177 - If descriptors of a FontFace are modified after creation, update the associated font entry so that face selection will respect the new values, and mark font sets as dirty. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D27980

--HG--
extra : moz-landing-system : lando
2019-05-09 09:43:42 +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
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 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
Jonathan Kew 504abab69a Bug 1541959 - Allow full-width and/or full-size-kana values of text-transform to be combined with a case transformation. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D27402

--HG--
extra : moz-landing-system : lando
2019-04-14 11:06:41 +00:00
Hiroyuki Ikezoe eab764a7ae Bug 1312163 - Switch to the new scroll-snap-type syntax for the old scroll snap implementation and drop the scroll-snap-type-{x,y} longhands. r=emilio
Now scroll-snap-type is a longhand property.

Depends on D21621

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

--HG--
extra : moz-landing-system : lando
2019-04-11 06:19:31 +00:00
Hiroyuki Ikezoe 19102cb3b9 Bug 1312163 - Rename ScrollSnapType to ScrollSnapStrictness. r=emilio
The scroll snap strictness is defined in the new spec [1], and the structure
is the exactly same as the old scroll snap type structure.

[1] https://drafts.csswg.org/css-scroll-snap-1/#snap-strictness

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

--HG--
extra : moz-landing-system : lando
2019-04-11 06:19:13 +00:00
Emilio Cobos Álvarez bb47a90d4f Bug 1543401 - Use rust lengths for row-gap / column-gap. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D26915

--HG--
extra : moz-landing-system : lando
2019-04-10 16:00:03 +00:00
Mats Palmgren f7b17e74b4 Bug 1542594 - Apply counter-set after counter-increment, not before. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D26439

--HG--
extra : rebase_source : 5e95ba52fda0b4b30865d7e98b9f49178f620cd6
2019-04-07 13:45:57 +02:00
Emilio Cobos Álvarez 7980a72d0a Bug 760345 - Remove the last usage of lossy currentcolor. r=heycam
We don't have lossy currentcolor in the style system anymore, except for a
single property -moz-font-smoothing-background-color.

I could've converted it into a proper StyleColor and thread down all the
necessary information to the font metrics code.

But it doesn't really seem worth it given it's not exposed to the web, so I just
did the simplest thing, which is making currentcolor compute to transparent to
that specific property.

This patch also removes the stores_complex_colors_lossily code and related,
since now we always can cache computed colors.

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

--HG--
extra : moz-landing-system : lando
2019-04-06 17:47:58 +00:00
Brindusan Cristian c298fe167e Backed out changeset 1ea4b3582033 (bug 760345) for build bustages at ia2AccessibleComponent.cpp. 2019-04-05 07:49:09 +03:00
Emilio Cobos Álvarez 993731e44b Bug 760345 - Remove the last usage of lossy currentcolor. r=heycam
We don't have lossy currentcolor in the style system anymore, except for a
single property -moz-font-smoothing-background-color.

I could've converted it into a proper StyleColor and thread down all the
necessary information to the font metrics code.

But it doesn't really seem worth it given it's not exposed to the web, so I just
did the simplest thing, which is making currentcolor compute to transparent to
that specific property.

This patch also removes the stores_complex_colors_lossily code and related,
since now we always can cache computed colors.

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

--HG--
extra : moz-landing-system : lando
2019-04-04 22:06:03 +00:00
Emilio Cobos Álvarez c028706efc Bug 1541913 - Use Servo lengths for column-width. r=boris
Depends on D26154

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

--HG--
extra : moz-landing-system : lando
2019-04-04 18:29:57 +00:00
Emilio Cobos Álvarez 68aa7a9c80 Bug 1541546 - Use only the new name for StyleColor. r=heycam
That is, change all uses of StyleComplexColor to just StyleColor.

Differential Revision: https://phabricator.services.mozilla.com/D25977
2019-04-04 14:53:47 +02:00
Emilio Cobos Álvarez 3a1e1a41c4 Bug 1541546 - Use the rust color representation. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D25976
2019-04-04 14:53:44 +02:00
Emilio Cobos Álvarez 06e8936b5d Bug 1541546 - Expose colors via cbindgen. r=heycam
Also s/Foreground/CurrentColor.

Differential Revision: https://phabricator.services.mozilla.com/D25975
2019-04-04 14:53:41 +02:00
Cosmin Sabou 8731816b89 Backed out 3 changesets (bug 1541546) for causing build bustages. CLOSED TREE
Backed out changeset 895863144707 (bug 1541546)
Backed out changeset 4da6fb98e8f9 (bug 1541546)
Backed out changeset ba71816514eb (bug 1541546)

--HG--
rename : layout/style/StyleColor.cpp => layout/style/StyleComplexColor.cpp
rename : layout/style/StyleColorInlines.h => layout/style/StyleComplexColor.h
2019-04-04 15:04:25 +03:00
Emilio Cobos Álvarez 271376a85f Bug 1541546 - Use only the new name for StyleColor. r=heycam
That is, change all uses of StyleComplexColor to just StyleColor.

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

--HG--
rename : layout/style/StyleComplexColor.cpp => layout/style/StyleColor.cpp
rename : layout/style/StyleComplexColor.h => layout/style/StyleColorInlines.h
extra : moz-landing-system : lando
2019-04-04 11:35:33 +00:00
Emilio Cobos Álvarez bc41ea853c Bug 1541546 - Use the rust color representation. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D25976

--HG--
extra : moz-landing-system : lando
2019-04-04 11:35:16 +00:00
Emilio Cobos Álvarez ea38007b46 Bug 1541546 - Expose colors via cbindgen. r=heycam
Also s/Foreground/CurrentColor.

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

--HG--
extra : moz-landing-system : lando
2019-04-04 11:34:56 +00:00
Ciure Andrei 58c8915ecd Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-04-04 00:57:38 +03:00
Emilio Cobos Álvarez 302f589417 No bug - Remove some redundant use statements. 2019-04-03 12:08:44 +02:00