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

1276 Коммитов

Автор SHA1 Сообщение Дата
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
Emilio Cobos Álvarez d8e2990d8a Bug 1535788 - Make the Document own the StyleSet. r=heycam
This is the last step to be able to call matchMedia on display: none iframes.

This is green, except for some startup preference query tests that I'm going to
address in a blocking bug (making LangGroupFontPrefs global, basically).

The setup is similar to the ShadowRoot one, except we don't eagerly keep the
StyleSet around up-to-date, we only fill it if it ever had a pres context.

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

--HG--
extra : moz-landing-system : lando
2019-04-03 07:02:00 +00:00
Emilio Cobos Álvarez 19c116ce06 Bug 1537575 - Cleanup generic font-family handling. r=jfkthame
To be more similar between Rust and C++. This introduces GenericFontFamily and
exposes that plus FontFamilyNameSyntax to C++, using that where appropriate
instead of plain uint8_t as we were doing.

As a follow-up, as discussed on IRC with Jonathan, we can remove the -moz-fixed
family, and turn it just into an alias of Monospace.

The only non-trivial change is the MatchType changes, but they're ok I think.
The code already assumed at most one CSS generic, and the struct still takes 8
bits. I've verified that the relevant tests are passing (though try is closed).

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

--HG--
extra : moz-landing-system : lando
2019-04-01 21:47:59 +00:00
arthur.iakab cd473e09f4 Backed out 3 changesets (bug 1537594, bug 1537575) for causing build bustages on mathml/nsMathMLChar.cpp CLOSED TREE
Backed out changeset 7375a830b5ef (bug 1537594)
Backed out changeset 0cd1411e2fb3 (bug 1537575)
Backed out changeset c7565f50239a (bug 1537575)
2019-04-01 23:41:04 +03:00
Emilio Cobos Álvarez 2188b25101 Bug 1537575 - Cleanup generic font-family handling. r=jfkthame
To be more similar between Rust and C++. This introduces GenericFontFamily and
exposes that plus FontFamilyNameSyntax to C++, using that where appropriate
instead of plain uint8_t as we were doing.

As a follow-up, as discussed on IRC with Jonathan, we can remove the -moz-fixed
family, and turn it just into an alias of Monospace.

The only non-trivial change is the MatchType changes, but they're ok I think.
The code already assumed at most one CSS generic, and the struct still takes 8
bits. I've verified that the relevant tests are passing (though try is closed).

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

--HG--
extra : moz-landing-system : lando
2019-04-01 18:48:10 +00:00
Emilio Cobos Álvarez 7d6f6c28d7 Bug 1536582 - Autogenerate Servo_ binding functions with cbindgen. r=boris
This depends on https://github.com/eqrion/cbindgen/pull/308. Other than that,
this should be ready to go.

There's still a bit more magic than what I'd like to eventually. I should be
able to make cbindgen not rename types if it doesn't know about them, or
something.

But this removes most of the manual binding function implementations (all but
the ones that are declared via macros, which cbindgen doesn't see across).

I need to give up on the _Drop functions taking an Owned<T> because of
instantiation order fiasco. In order to define DefaultDelete I need Owned to be
complete, but I cannot do it after including the generated file since some
declarations already instantiate the specialization. Oh well.

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

--HG--
rename : servo/components/style/cbindgen.toml => servo/ports/geckolib/cbindgen.toml
extra : moz-landing-system : lando
2019-03-30 20:18:33 +00:00
Cameron McCormack 12c03087aa Bug 1474793 - Part 12: Add FFI API to create a StyleSheet backed by shared data. r=emilio
Depends on D17198

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

--HG--
extra : moz-landing-system : lando
2019-03-30 00:16:29 +00:00
Cameron McCormack 3a08c03925 Bug 1474793 - Part 11: Add FFI API to use SharedMemoryBuilder. r=emilio
Depends on D17197

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

--HG--
extra : moz-landing-system : lando
2019-03-30 00:16:27 +00:00
Cameron McCormack 4651cebae2 Bug 1474793 - Part 4: Allow C++ URLValue objects to be lazily created from Rust SpecifiedUrls. r=emilio
This avoids having to support storing refcounted URLValue objects in shared memory,
which would be tricky.

Depends on D17183

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

--HG--
extra : moz-landing-system : lando
2019-03-30 00:15:53 +00:00
Cameron McCormack 7bc808faa6 Bug 1474793 - Part 3: Allow references to static, single-generic C++ SharedFontList objects from Rust FontFamilyList. r=emilio
UA style sheets only ever specify a single generic font family in font-family
properties, so we pre-create a unique, static SharedFontList for each generic
and change the representation of FontFamilyList to be able to refer to them
by their generic ID.  This avoids having to share refcounted SharedFontList
objects across processes.

Depends on D17182

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

--HG--
extra : moz-landing-system : lando
2019-03-30 00:15:51 +00:00
Cameron McCormack 7649df02be Bug 1474793 - Part 2: Allow references to static C++ URLExtraData objects from Rust UrlExtraData. r=emilio
Each user agent style sheet has a unique URLExtraData object containing
its URL, but since they are refcounted objects, we can't share them
easily across processes.  Rather than adding support for copying them
into a shared memory buffer like we will do with the Rust objects, here
we just set up a static array of URLExtraData objects per UA style
sheet.  The array will be filled in in a later patch.

Rust UrlExtraData objects, once they are transformed into their
sharable form and copied into the shared memory buffer, will reference
them by an index.

Depends on D17181

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

--HG--
extra : moz-landing-system : lando
2019-03-30 00:15:43 +00:00
Julian Descottes 04ab3b18ed Bug 1537876 - Augment CSS errors with the CSS selector r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D24894

--HG--
extra : moz-landing-system : lando
2019-03-27 12:12:55 +00:00
Emilio Cobos Álvarez b3c3646515 Bug 1538694 - Cleanup refcounted types. r=boris
And make the handling of ComputedStyle more similar to these.

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

--HG--
extra : moz-landing-system : lando
2019-03-26 18:16:01 +00:00
Emilio Cobos Álvarez 72c43d2bf2 Bug 1538661 - Simplify Owned FFI types. r=boris
And make them actually sound. We're defining functions on Rust-land that get
structs as arguments, but declaring them in C++ as getting pointers.

This is another step in order to be able to autogenerate ServoBindings.h and
remove bindings.rs altogether.

We remove FooOwned in favor of Owned<Foo>, which is generated via cbindgen.

It'd be good to actually mark Owned and such as MOZ_MUST_USE_TYPE, so I sent
https://github.com/eqrion/cbindgen/pull/307 for that.

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

--HG--
extra : moz-landing-system : lando
2019-03-26 18:15:59 +00:00
Bogdan Tara b68e341245 Backed out 4 changesets (bug 1536584, bug 1538661, bug 1538694) for causing build bustages CLOSED TREE
Backed out changeset 563e8fb1be5d (bug 1538694)
Backed out changeset 7bd834c5800c (bug 1536584)
Backed out changeset f1eec8f7a3f8 (bug 1538694)
Backed out changeset 73a48619739e (bug 1538661)
2019-03-26 16:40:20 +02:00
Emilio Cobos Álvarez 45bc2e8f6c Bug 1538694 - Cleanup refcounted types. r=boris
And make the handling of ComputedStyle more similar to these.

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

--HG--
extra : moz-landing-system : lando
2019-03-26 13:26:33 +00:00
Emilio Cobos Álvarez 16705172ca Bug 1538661 - Simplify Owned FFI types. r=boris
And make them actually sound. We're defining functions on Rust-land that get
structs as arguments, but declaring them in C++ as getting pointers.

This is another step in order to be able to autogenerate ServoBindings.h and
remove bindings.rs altogether.

We remove FooOwned in favor of Owned<Foo>, which is generated via cbindgen.

It'd be good to actually mark Owned and such as MOZ_MUST_USE_TYPE, so I sent
https://github.com/eqrion/cbindgen/pull/307 for that.

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

--HG--
extra : moz-landing-system : lando
2019-03-26 13:25:42 +00:00
Mats Palmgren c750eaac07 Bug 288704 part 2 - [css-lists] Implement display:list-item counters using a built-in 'list-item' CSS counter. r=emilio 2019-03-24 23:13:52 +01:00
Emilio Cobos Álvarez 022828031e Bug 1536586 - followup of the followup: Remove unused #[macro_use] in 32-bit builds.
CLOSED TREE
2019-03-22 00:09:22 +01:00
Emilio Cobos Álvarez 718605a203 Bug 1536586 - followup: Remove unused #[macro_use]s.
CLOSED TREE
2019-03-21 23:43:13 +01:00
Emilio Cobos Álvarez ad066f1df7 Bug 1536586 - Simplify a bit our generated bindings by getting rid of FooBorrowed and FooBorrowedMut. r=heycam
This reduces a lot the boilerplate that's needed in order to add simple binding
functions.

This starts using &Foo and Option<&Foo> instead, and as a result we need to
remove the servo_function_signatures test, which is a bit unfortunate.

I think it's worth though, this causes problems on some platforms (see bug
1534844), and messing up the functions signature is not something that I've ever
seen (other than bug 1308234, which already had all the FooBorrowed mess which
I'm removing).

Also, cbindgen understands references and Option<&Foo>, so it will be the way to
go in the future.

After this patch we can also remove HasSimpleFFI, but I've kept it for now since
I still use it in a few places, and this patch is quite big on its own.

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

--HG--
extra : moz-landing-system : lando
2019-03-21 17:00:27 +00:00
Emilio Cobos Álvarez fcc161a573 Bug 1516780 - Remove ComputedStyle::mBits. r=jfkthame,heycam
Use the Servo flags instead.

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

--HG--
extra : moz-landing-system : lando
2019-03-19 21:10:30 +00:00
Boris Chiou 92fcc151e4 Bug 1425837 - Part 4: Implement compositor animations on translate/rotate/scale. r=hiro,birtles
On the sender side of transactions, we have to convert the individual transforms
to the proper types in layers::Animations, and this includes SetAnimatable and
the definition in LayersMessages.

On the compositor side (i.e. received side of transactions). Basically, we
convert the list of layers::Animation into a list of `PropertyAnimationGroup`,
which is an intermediate value. And then use this list to do interpolation for
each property in `SampleAnimationForEachNode`, which will return a list of
`RefPtr<RawServoAnimationValue>`.

Depends on D23062

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

--HG--
extra : moz-landing-system : lando
2019-03-18 18:04:50 +00:00
Emilio Cobos Álvarez 70e3f8ffcd Bug 1535165 - Use cbindgen for touch-action. r=dholbert
And rename the constants to not be prefixed by TOUCH_ACTION_, since that's part
of the type name anyway.

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

--HG--
extra : moz-landing-system : lando
2019-03-18 18:01:55 +00:00
Emilio Cobos Álvarez e66fb8488c Bug 1535165 - Use cbindgen for text-decoration-line. r=dholbert,boris
Differential Revision: https://phabricator.services.mozilla.com/D23412

--HG--
extra : moz-landing-system : lando
2019-03-18 17:58:16 +00:00
Emilio Cobos Álvarez 09763b1ac3 Bug 1533201 - Make cssPropertySupportsType take an enum. r=heycam,rcaliman
Differential Revision: https://phabricator.services.mozilla.com/D22427

--HG--
extra : moz-landing-system : lando
2019-03-18 16:38:48 +00:00
Emilio Cobos Álvarez 5aa8533517 Bug 1533963 - Use a single RestyleHint representation. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D22828

--HG--
extra : moz-landing-system : lando
2019-03-14 11:47:50 +00:00
Emilio Cobos Álvarez 2028cb1479 Bug 1530751 - Make the pres context optional in the style system. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D21239

--HG--
extra : moz-landing-system : lando
2019-03-06 21:36:12 +00:00
Emilio Cobos Álvarez b7bb398730 Bug 1516454 - Use rust lengths for border corners. r=boris
The test in https://github.com/web-platform-tests/wpt/pull/15423 hasn't been
synced over yet, but it passes with this patch of course.

Differential Revision: https://phabricator.services.mozilla.com/D20960
2019-02-26 06:01:34 -08:00
Cosmin Sabou a499294d09 Backed out 4 changesets (bug 1516454, bug 1530247) for multiple failures on Linux x64 asan. CLOSED TREE
Backed out changeset 180c7672c57c (bug 1516454)
Backed out changeset a460a4d0a66c (bug 1516454)
Backed out changeset c6ab8d3dd19a (bug 1530247)
Backed out changeset 43862dc87e0b (bug 1516454)
2019-02-26 00:49:27 +02:00
Emilio Cobos Álvarez b411b3894d Bug 1516454 - Use rust lengths for border corners. r=boris
The test in https://github.com/web-platform-tests/wpt/pull/15423 hasn't been
synced over yet, but it passes with this patch of course.

Differential Revision: https://phabricator.services.mozilla.com/D20960
2019-02-25 12:42:31 -08:00
Boris Chiou 542cdbc4f0 Bug 1529422 - Part 2: Let GetScaleValue support individual transforms. r=hiro,emilio
So we can let KeyframeEffect::ContainsAnimatedScale check individual
transforms, which is used by ActiveLayerTracker.

Depends on D19631

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

--HG--
extra : moz-landing-system : lando
2019-02-24 03:27:51 +00:00
Emilio Cobos Álvarez dad3a20b22 Bug 1525955 - Include anon boxes in CSSPseudoElementType, to remove ComputedStyle::mPseudoTag. r=heycam
This is more consistent with what the Rust bits of the style system do, and
removes a pointer from ComputedStyle which is always nice.

This also aligns the Rust bits with the C++ bits re. not treating xul pseudos as
anonymous boxes. See the comment in nsTreeStyleCache.cpp regarding those.

Can't wait for XUL trees to die.

Depends on D19001

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

--HG--
extra : moz-landing-system : lando
2019-02-19 13:44:33 +00:00
Emilio Cobos Álvarez dc933f3117 Bug 1526736 - Rename MozLength to Size, and MaxLength to MaxSize. r=heycam
MozLength is not a very descriptive name. If we're going to use it in both Gecko
and Servo we may as well name it something more accurate.

I would've chosen `ContentSize` per CSS2[1][2] if it wasn't a lie in presence
of box-sizing. I don't have better ideas than `Size`, given that.

[1]: https://drafts.csswg.org/css2/visudet.html#propdef-width
[2]: https://drafts.csswg.org/css2/box.html#content-width

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

--HG--
extra : moz-landing-system : lando
2019-02-11 10:59:49 +00:00
Emilio Cobos Álvarez 29b0cd4d4c Bug 1523140 - Derive more length stuff, and shrink MaxLength / MozLength's repr(C) representation. r=boris
This patch:

 * Makes LengthPercentageOrAuto generic, and removes a bunch of code fo
   LengthPercentageOrNone, which was used only for servo and now can use the
   normal MaxLength (with a cfg() guard for the ExtremumLength variant).

 * Shrinks MaxLength / MozLength's repr(C) reperesentation by reducing enum
   nesting. The shrinking is in preparation for using them from C++ too, though
   that'd be a different bug.

 * Moves NonNegative usage to the proper places so that stuff for them can be
   derived.

I did this on top of bug 1523071 to prove both that it could be possible and
that stuff wasn't too messy. It got a bit messy, but just because of a bug I
had fixed in bindgen long time ago already, so this updates bindgen's patch
version to grab a fix instead of ugly workarounds :)

Differential Revision: https://phabricator.services.mozilla.com/D17762
2019-02-10 06:51:00 +01:00
Emilio Cobos Álvarez 8101ae2ea8 Bug 1523071 - Use Rust lengths for margin / padding / inset. r=jwatt
Also for the intersection observer root margin, since it was easier to fix it
up and clean it up than not doing it.

This is the first big step to get rid of nscoord. It duplicates a bit of logic
in nsLayoutUtils since for now max/min-width/height are still represented with
nsStyleCoord, but I think I prefer to land this incrementally.

I didn't add helpers for the physical accessors of the style rect sides that
nsStyleSides has (top/bottom/left/right) since I think we generally should
encourage the logical versions, but let me know if you want me to do that.

Differential Revision: https://phabricator.services.mozilla.com/D17739
2019-02-10 04:11:58 +01:00
Emilio Cobos Álvarez a820ea341b Bug 1525371 - followup: fix rusttests to reopen the CLOSED TREE. 2019-02-07 11:38:57 +01:00
Emilio Cobos Álvarez 7c36c5a9ae Bug 1523142 - Simplify some conversion code used for mapped attributes. r=firefox-style-system-reviewers,boris
These days for the types we share computed value representation we don't really
need any special code.

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

--HG--
extra : moz-landing-system : lando
2019-01-28 00:04:06 +00:00
Cameron McCormack 6898c96479 Bug 1521652 - Run rustfmt on servo/ports/geckolib/. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D17177

--HG--
extra : moz-landing-system : lando
2019-01-22 01:59:21 +00:00
Mats Palmgren 663f6ee46c Bug 1519944 - [css-logical] Implement the margin-block/inline shorthands. r=emilio 2019-01-15 02:27:44 +01:00
Cameron McCormack 7fc8e05804 Bug 1519296 - Part 4: Remove ServoStyleSet::PrependStyleSheet r=emilio
Depends on D16283

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

--HG--
extra : moz-landing-system : lando
2019-01-12 06:45:45 +00:00
Shanavas M 03d98acfa8 Bug 1519269 - Remove OrderedMap in favor of IndexMap. r=emilio
This cherry-picks https://github.com/servo/servo/pull/22656.
2019-01-11 01:02:54 +01:00
Emilio Cobos Álvarez 6eacde7b60 Bug 1518098 - Manually rename some variables. r=jwatt#style
lop is not an acceptable variable name for LengthPercentage.

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

--HG--
extra : moz-landing-system : lando
2019-01-07 12:42:40 +00:00
Emilio Cobos Álvarez b78489b8af Bug 1518098 - Rename LengthOrPercentage to LengthPercentage. r=jwatt#style
It does not represent `<length> | <percentage>`, but `<length-percentage>`, so
`LengthOrPercentage` is not the right name.

This patch is totally autogenerated using:

rg 'LengthOrPercentage' servo | cut -d : -f 1 | sort | uniq > files
for file in $(cat files); do sed -i "s#LengthOrPercentage#LengthPercentage#g" $file; done

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

--HG--
extra : moz-landing-system : lando
2019-01-07 12:42:42 +00:00
Emilio Cobos Álvarez 83fed3d31d Bug 1517511 - Simplify computed::LengthOrPercentage and friends. r=heycam
This is a first step to share LengthOrPercentage representation between Rust and
Gecko.

We need to preserve whether the value came from a calc() expression, for now at
least, since we do different things depending on whether we're calc or not right
now. See https://github.com/w3c/csswg-drafts/issues/3482 and dependent bugs for
example.

That means that the gecko conversion code needs to handle calc() in a bit of an
awkward way until I change it to not be needed (patches for that incoming in the
next few weeks I hope).

I need to add a hack to exclude other things from the PartialEq implementation
because the new conversion code is less lossy than the old one, and we relied on
the lousiness in AnimationValue comparison (in order to start transitions and
such, in [1] for example).

I expect to remove that manual PartialEq implementation as soon as I'm done with
the conversion.

The less lossy conversion does fix a few serialization bugs for animation values
though, like not loosing 0% values in calc() when interpolating lengths and
percentages, see the two modified tests:

 * property-types.js
 * test_animation_properties.html

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

--HG--
extra : moz-landing-system : lando
2019-01-07 11:00:27 +00:00
Emilio Cobos Álvarez 1834c20f36 Bug 1518045 - Make Servo use a single thread-pool for layout-related tasks per-process. r=jdm
Instead of per-document. This also allows to reuse this thread-pool if needed
for other stuff, like parallel CSS parsing (#22478), and to share more code with
Gecko, which is always nice.

This cherry-picks https://github.com/servo/servo/pull/22487, with a few minor
fixes to the build that are landing as part of the sync associated to this bug,
and an lsan exception tweak to point to the right module since it's moving.
2019-01-07 00:53:04 +01:00
bitnotri 542ea80ecd Bug 1461737 - Move nsstring-rs to a better location, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D15743

--HG--
rename : servo/support/gecko/nsstring/Cargo.toml => xpcom/rust/nsstring/Cargo.toml
rename : servo/support/gecko/nsstring/src/conversions.rs => xpcom/rust/nsstring/src/conversions.rs
rename : servo/support/gecko/nsstring/src/lib.rs => xpcom/rust/nsstring/src/lib.rs
extra : moz-landing-system : lando
2019-01-04 22:03:56 +00:00
Emilio Cobos Álvarez d2ed260822 Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.

Overall it's not a very interesting patch I think.

nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.

I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.

While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
2019-01-03 17:48:33 +01:00
Emilio Cobos Álvarez d6f2d4bb73 Bug 1516365 - Update the Rust target version for bindgen. r=xidorn
This brings us alignas support and also associated constants for bitfield enums.

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

--HG--
extra : moz-landing-system : lando
2018-12-25 23:09:29 +00:00
Emilio Cobos Álvarez 63179c8b0f Bug 1514449 - Use NonNegative more in the border code. r=boris,#style
This ended up not being so small of a patch as I'd have thought, since it
propagated a bit. But most of it is mechanical. Interesting part is
NonNegativeNumberOrPercentage and the actual uses of the NonNegative stuff and
during parsing.

This looks like it'd fix a few correctness issues during interpolation for all
the types except for BorderRadius and co (which handled it manually).

I should write tests for those in a different patch.

Depends on D14672

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

--HG--
extra : moz-landing-system : lando
2018-12-17 21:35:14 +00:00
Emilio Cobos Álvarez 2348a061d6 Bug 1513009 - Fix a build warning in the stylo tests on linux32. 2018-12-14 23:35:44 +01:00
Emilio Cobos Álvarez 77c4b9ea02 No bug - Fix a warning in a test. 2018-12-12 20:06:00 +01:00
Emilio Cobos Álvarez 8acdef75e7 Bug 1512271 - Allow link.exe to keep linking the stylo tests after rust-lang/rust#54451. r=simonsapin 2018-12-11 15:31:17 +01:00
Cameron McCormack 4ec3ded8ab Bug 1511718 - Remove eSafeAgentSheetFeatures. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D13866

--HG--
extra : moz-landing-system : lando
2018-12-05 21:18:21 +00:00
Emilio Cobos Álvarez 1f4fecfcd2 Bug 1511811 - Use https for the MPL license URL.
Cherry-picks https://github.com/servo/servo/pull/22198
2018-12-03 08:43:48 -05:00
shindli 6c6e4a960d Backed out 13 changesets (bug 1511811) for Btup bustages
Backed out changeset d71cde918f43 (bug 1511811)
Backed out changeset 0ae2634de8e1 (bug 1511811)
Backed out changeset 53d1f5ca4099 (bug 1511811)
Backed out changeset 5a08148928ef (bug 1511811)
Backed out changeset da7816ec50ef (bug 1511811)
Backed out changeset 5fe23889cccc (bug 1511811)
Backed out changeset 800bc60c75a7 (bug 1511811)
Backed out changeset 2392d8199cd0 (bug 1511811)
Backed out changeset 7bc486fbd195 (bug 1511811)
Backed out changeset d2c997426108 (bug 1511811)
Backed out changeset ddd573878432 (bug 1511811)
Backed out changeset 29c8ec1559a4 (bug 1511811)
Backed out changeset f5851346109d (bug 1511811)

--HG--
rename : third_party/rust/darling_core/src/macros_private.rs => third_party/rust/darling_core/src/macros.rs
2018-12-03 15:39:11 +02:00
Emilio Cobos Álvarez 6359ab5223 Bug 1511811 - Use https for the MPL license URL.
Cherry-picks https://github.com/servo/servo/pull/22198
2018-12-03 08:15:21 -05:00
Hiroyuki Ikezoe 22056382c0 Bug 1504065 - Run background-color animations on the compositor. r=birtles
Changes for nsIDOMWindowUtils.getOMTAValue is in the next commit with come test
cases.

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

--HG--
extra : moz-landing-system : lando
2018-11-28 00:58:46 +00:00
Andreea Pavel f97b59258b Backed out 2 changesets (bug 1504065) for failing Win reftest at child-in-animating-element-display-none.html on a CLOSED TREE
Backed out changeset 129188370231 (bug 1504065)
Backed out changeset 359e81b35cfb (bug 1504065)
2018-11-27 15:33:29 +02:00
Hiroyuki Ikezoe 212fa4884a Bug 1504065 - Run background-color animations on the compositor. r=birtles
Changes for nsIDOMWindowUtils.getOMTAValue is in the next commit with come test
cases.

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

--HG--
extra : moz-landing-system : lando
2018-11-27 09:26:51 +00:00
Cameron McCormack 9c372819c4 Bug 1508013 - Run rustfmt on servo/ports/geckolib/ r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D12206

--HG--
extra : moz-landing-system : lando
2018-11-20 04:37:53 +00:00
Emilio Cobos Álvarez f3bce5b4dd Bug 1507305 - Add a mechanism to serialize shorthands for getComputedStyle(). r=heycam
This implements the mechanism reusing the animation machinery for now, so it
asserts in a few cases that this wouldn't handle correctly.

For shorthands that have colors and other bits we'd need a more sophisticated
mechanism with a bit more code (that resolves colors and such), but it'd look
something like this regardless, and we should have this in any case.

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

--HG--
extra : moz-landing-system : lando
2018-11-15 08:25:13 +00:00
Cameron McCormack 3f7283c980 Bug 1504034 - Followup to address review comments. r=emilio 2018-11-07 00:12:07 +01:00
Cameron McCormack 17ce17ad00 Bug 1504034 - Part 3: Store the Rust QuotePair slice as the computed quotes value in Gecko style structs r=emilio
Depends on D10651

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

--HG--
extra : moz-landing-system : lando
2018-11-06 23:03:24 +00:00
Emilio Cobos Álvarez bc8766b7fc Bug 1462233 - Implement the env() function with hardcoded zeros for safe-area-inset. r=heycam,firefox-style-system-reviewers
Intent to Implement and Ship: https://groups.google.com/d/msg/mozilla.dev.platform/EVKyR1B87T0/_l-_qK8SAAAJ

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

--HG--
extra : moz-landing-system : lando
2018-11-05 10:39:46 +00:00
Emilio Cobos Álvarez 53dca96aa3 Bug 1504536 - Remove nscsspropertyid_is_{animatable,transitionable}. r=hiro
There are better ways, plus the existing code didn't handle aliases at
all (not that it needed to, but it's better if it does).

Differential Revision: https://phabricator.services.mozilla.com/D10838
2018-11-05 10:35:44 +01:00
Emilio Cobos Álvarez ecf9afe80c Bug 1504536 - Move the keyframes property priority stuff outside of animated_properties. r=hiro
Similarly, no need to be here.

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

--HG--
extra : moz-landing-system : lando
2018-11-04 23:12:24 +00:00
Boris Chiou e3efce4cc6 Bug 1501117 - Part 2: Serialize timing function from web animation api with servo. r=emilio,birtles
It's worth to serialize the timing function from web animation api with
servo, too. However, we need an FFI to do that, so this patch also add a
new FFI.

Depends on D10443

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

--HG--
extra : moz-landing-system : lando
2018-11-01 21:33:56 +00:00
Boris Chiou 3ff7857977 Bug 1501116 - Part 4: Use alias for font related types. r=emilio
Map the following types:
1. StyleComputedFontWeightRange.
2. StyleComputedFontStretchRange.
3. StyleComputedFontStyleDescriptor.
4. StyleFontDisplay.
5. StyleFontFaceSourceListComponent
6. StyleFontLanguageOverride.

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

--HG--
extra : moz-landing-system : lando
2018-10-31 06:20:15 +00:00
Boris Chiou 04b273259e Bug 1496619 - part 6: Generate StyleTimingFunction and drop ns_timing_function.rs r=emilio,birtles
First, we generate StyleComputedTimingFunction by cbindgen from Rust, and use
it in nsTimingFunction, so we could copy it directly without handling
the different memory layout. However, we have to rewrite the
nsTimingFunction and mozilla::ComputedTimingFunction for this.

Second, the rust-bindgen seems cannot generate the correct generic members
from complex C++ templates, especially for the nested template struct,
(https://github.com/rust-lang-nursery/rust-bindgen/issues/1429)
So we have to hide StyleTimingFunction to avoid the compilation errors.

Depends on D9312

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

--HG--
extra : moz-landing-system : lando
2018-10-26 18:03:35 +00:00
Emilio Cobos Álvarez d7751dd7ee Bug 1499408 - followup test fix to the followup build fix. 2018-10-17 17:19:39 +02:00
Emilio Cobos Álvarez 81d70d88d1 Bug 1499386 - Implement @supports selector() syntax. r=heycam
This implements the selector(<complex-selector>) syntax for @supports.

See https://github.com/w3c/csswg-drafts/issues/3207 for explainer and
discussion.

Probably would should wait for that to be sorted out to land this, or maybe we
should put it behind a pref to get the code landed and change our
implementation if the discussion there leads to a change.

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

--HG--
extra : moz-landing-system : lando
2018-10-17 12:08:14 +00:00
Cameron McCormack 13feafe016 Bug 1499408 - Followup build fix.
MozReview-Commit-ID: F88mB13Mwa1
2018-10-17 06:56:00 +03:00
Cameron McCormack 16007d2b66 Bug 1495984 - Make css::URLValue::IsLocalRef call into CssUrlData::is_fragment. r=emilio
This fixes the issue that we should no longer be looking for control characters.



MozReview-Commit-ID: 8k89Aheq3NY

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

--HG--
extra : moz-landing-system : lando
2018-10-17 09:43:45 +00:00
Cameron McCormack a7510da8d0 Bug 1499408 - Part 2: Have css::URLValue get URLExtraData from its CssUrlData. r=emilio
MozReview-Commit-ID: IqZGzkHlSZD

Depends on D8874

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

--HG--
extra : moz-landing-system : lando
2018-10-17 09:43:32 +00:00
Cameron McCormack b5d216cfa1 Bug 1499408 - Part 1: Make css::URLValue hold on to a CssUrlData, not just its serialization. r=emilio
MozReview-Commit-ID: EWcbnVtDJCS

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

--HG--
extra : moz-landing-system : lando
2018-10-17 12:36:49 +00:00
Boris Chiou 8ad4fbf685 Bug 1496558 - Part 2: Move MozLength and MaxLength into generics r=emilio
Move MozLength and MaxLength into generics, and drop the manual implementation
of ToComputedValue.

Depends on D8290

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

--HG--
extra : moz-landing-system : lando
2018-10-16 01:07:41 +00:00
Cameron McCormack b43c0e36fb Bug 1498755 - Followup build fix. r=birtles 2018-10-14 21:24:00 +03:00
Cameron McCormack 8fead1bc77 Bug 1497406 - Use helper function to set length and copy into nsTArrays of PODs from Rust r=boris
Differential Revision: https://phabricator.services.mozilla.com/D8058

--HG--
extra : moz-landing-system : lando
2018-10-09 08:49:51 +00:00
Cameron McCormack 332883a726 Bug 1498755 - Part 11: Move Gecko borrowed FFI types to a separate header file r=emilio
Depends on D8652

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

--HG--
extra : moz-landing-system : lando
2018-10-14 00:06:13 +00:00
Emilio Cobos Álvarez c6c06c7f48 Bug 1496486 - Remove nsCSSValue usage from font code. r=heycam
Really sorry for the size of the patch.

Differential Revision: https://phabricator.services.mozilla.com/D7753
2018-10-09 19:07:41 +02:00
Narcis Beleuzu e7a8994c37 Backed out 5 changesets (bug 1496486) for valgrind bustages. CLOSED TREE
Backed out changeset d2f1e35ee4b7 (bug 1496486)
Backed out changeset 7f843f4ee162 (bug 1496486)
Backed out changeset 2f629a60f12c (bug 1496486)
Backed out changeset 4dd15fa31474 (bug 1496486)
Backed out changeset e8d8e2f3f00b (bug 1496486)
2018-10-09 19:44:51 +03:00
Emilio Cobos Álvarez 804148c319 Bug 1496486 - Remove nsCSSValue usage from font code. r=heycam
Really sorry for the size of the patch.

Differential Revision: https://phabricator.services.mozilla.com/D7753
2018-10-09 17:33:24 +02:00
Brindusan Cristian 3b4ca07db8 Backed out 5 changesets (bug 1496486) for build bustages on gfxUserFontSet.h. CLOSED TREE
Backed out changeset 6b740afea403 (bug 1496486)
Backed out changeset 5cf44e254ac3 (bug 1496486)
Backed out changeset 8e465202c355 (bug 1496486)
Backed out changeset 86382b2249f6 (bug 1496486)
Backed out changeset ab92ed3e0a23 (bug 1496486)
2018-10-09 16:58:38 +03:00
Emilio Cobos Álvarez d6c743191f Bug 1496486 - Remove nsCSSValue usage from font code. r=heycam
Really sorry for the size of the patch.

Differential Revision: https://phabricator.services.mozilla.com/D7753
2018-10-09 15:33:03 +02:00
Cameron McCormack 924e3d96d8 Bug 1496287 - Fix unused import warning r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D7676

--HG--
extra : moz-landing-system : lando
2018-10-04 05:45:25 +00:00
Emilio Cobos Álvarez c620c6f47a Bug 1496041 - Remove unused ImageValue constructor. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D7589

--HG--
extra : moz-landing-system : lando
2018-10-03 12:13:57 +00:00
Emilio Cobos Álvarez 82b6699841 Bug 1386907 - Stop building the style system as a static library. r=froydnj
It's linked as part of gkrust, so this is just wasted work, and compiling it as
two different target just makes rustc do more and probably not so good work.

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

--HG--
extra : moz-landing-system : lando
2018-09-21 12:37:33 +00:00
Emilio Cobos Álvarez 570e21fceb Bug 1491579 - Enable nsstring/gecko_debug in a place other than components/style. r=xidorn
That way I can unify Servo's and Gecko's Cargo.toml files.

This is the only conflict that exists since a while ago, and it causes
continuous manual merges when I sync changes around.

This moves it to ports/geckolib, which works equally well and isn't in the Servo
repo.

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

--HG--
extra : moz-landing-system : lando
2018-09-17 05:31:16 +00:00
Emilio Cobos Álvarez ab460a4f52 Bug 1425700 - Make the counters non-atomic counters and merge afterwards. r=bholley
This was consistently faster in the benchmark (even when counters were disabled,
which was slightly suspicious, but...).

Anyway, it's not really much code, most of it is FFI copy-pasta.

Differential Revision: https://phabricator.services.mozilla.com/D3874
2018-08-28 15:58:24 +02:00
Emilio Cobos Álvarez e2379f3921 Bug 1425700 - Add a test for the use counters. r=heycam
Mostly testing that they work, and that they record what we expect them to
record, that is, the actual property that was parsed, and not the properties
that it'd resolve or expand to.

That may be another tricky part for CSSOM, I think style setters would fail an
alias test if implemented with the current setup (we do the property lookup in
C++).

Differential Revision: https://phabricator.services.mozilla.com/D3829
2018-08-28 15:58:21 +02:00
Emilio Cobos Álvarez 7f1f4ab7f0 Bug 1425700 - Hook the use counters into StyleSheet parsing. r=heycam
Still not hooked into telemetry, I talked with :janerik and :gfritzsche about
that, but test incoming!

This intentionally doesn't handle CSSOM and such for now, will file followups
for those, though should be trivial.

I want to unify / clean up how we do the use counters and the error reporting
stuff for CSSOM, since the current function call still shows up in profiles,
but that should be a follow-up.

Differential Revision: https://phabricator.services.mozilla.com/D3828
2018-08-28 15:58:19 +02:00
Emilio Cobos Álvarez 26115b46cb Bug 1485044: Unbust unit test build. r=me 2018-08-22 12:00:30 +02:00
Emilio Cobos Álvarez 3ef3f33868 Bug 1485044: Remove useless StyleDisplay conversion. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D3896
2018-08-22 11:25:58 +02:00
Henri Sivonen 3edc601325 Bug 1402247 - Use encoding_rs for XPCOM string encoding conversions. r=Nika,erahm,froydnj.
Correctness improvements:

 * UTF errors are handled safely per spec instead of dangerously truncating
   strings.

 * There are fewer converter implementations.

Performance improvements:

 * The old code did exact buffer length math, which meant doing UTF math twice
   on each input string (once for length calculation and another time for
   conversion). Exact length math is more complicated when handling errors
   properly, which the old code didn't do. The new code does UTF math on the
   string content only once (when converting) but risks allocating more than
   once. There are heuristics in place to lower the probability of
   reallocation in cases where the double math avoidance isn't enough of a
   saving to absorb an allocation and memcpy.

 * Previously, in UTF-16 <-> UTF-8 conversions, an ASCII prefix was optimized
   but a single non-ASCII code point pessimized the rest of the string. The
   new code tries to get back on the fast ASCII path.

 * UTF-16 to Latin1 conversion guarantees less about handling of out-of-range
   input to eliminate an operation from the inner loop on x86/x86_64.

 * When assigning to a pre-existing string, the new code tries to reuse the
   old buffer instead of first releasing the old buffer and then allocating a
   new one.

 * When reallocating from the new code, the memcpy covers only the data that
   is part of the logical length of the old string instead of memcpying the
   whole capacity. (For old callers old excess memcpy behavior is preserved
   due to bogus callers. See bug 1472113.)

 * UTF-8 strings in XPConnect that are in the Latin1 range are passed to
   SpiderMonkey as Latin1.

New features:

 * Conversion between UTF-8 and Latin1 is added in order to enable faster
   future interop between Rust code (or otherwise UTF-8-using code) and text
   node and SpiderMonkey code that uses Latin1.

MozReview-Commit-ID: JaJuExfILM9
2018-08-14 14:43:42 +03:00
Emilio Cobos Álvarez 4d3c28d75d Bug 1481681: Sync some dependencies with servo. r=me 2018-08-08 01:39:57 +02:00
Cameron McCormack 046bd5fe7f Bug 1475197 - Part 1: Shrink selectors::Component to 24 bytes. r=emilio
This saves about 37 KiB of memory across the UA style sheets.

MozReview-Commit-ID: EoZnlmyWwxX

--HG--
extra : rebase_source : cd8ef0ba838618f9a4583b7d9896caa3a0602199
2018-07-16 12:15:47 +10:00
Emilio Cobos Álvarez 6c81e2e79c Bug 1479450: Convert GetStringValue to use Servo. r=xidorn
And remove gPropertyTable / kCSSRawProperties while at it.

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

MozReview-Commit-ID: 8U87BcBkrJF
2018-07-31 12:05:00 +02:00
Emilio Cobos Álvarez 2996813963 Bug 1479450: Implement nsCSSProps::LookupProperty using Rust. r=xidorn
Always assume allowed-for-all-content. There are a couple callers which weren't
doing that:

 * A unit test -> removed.

 * ComputeAnimationDistance: Used for testing (in transitions_per_property), and
   for the animation inspector. The animation inspector shouldn't show
   non-enabled properties. The transitions_per_property test already relies on
   getComputedStyle stuff which only uses eForAllContent.

 * GetCSSImageURLs: I added this API for the context menu page and such. It
   doesn't rely on non-enabled-everywhere properties, it was only using
   eInChrome because it was a ChromeOnly API, but it doesn't really need this.

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

MozReview-Commit-ID: 4VOi5Su3Bos
2018-07-31 12:00:15 +02:00
Bastien Orivel 29f51fc11b Bug 1477883: Update parking_lot to 0.6. r=emilio
Cherry-pick of servo/servo#21216.

MozReview-Commit-ID: 4sTKSSCbrP4
2018-07-24 04:03:18 +02:00
Xidorn Quan b787149a33 Bug 1473180 part 5 - Remove DeclarationPushMode. r=emilio
MozReview-Commit-ID: LFgYeKE1SNk

--HG--
extra : rebase_source : 45fb9604be9385734826cf998270b495f9d0088b
extra : source : 4d6292b1edd2ab39dd0002f35de46a7120283dcf
2018-07-19 10:11:04 +10:00
Xidorn Quan 34c9dd8f3f Bug 1473180 part 3 - Use the new algorithm for setting property. r=emilio
MozReview-Commit-ID: HQsVwWAGPBL

--HG--
extra : rebase_source : 7280d1a0278e698ebc2fb664874aea53a19a3d3f
extra : source : 08a40cf9746a83fceb124dd148d02ccb0d2e4864
2018-07-19 10:11:04 +10:00
Emilio Cobos Álvarez 9b504cb749 Bug 1309752: Animate logical properties. r=birtles
The setup is that AnimationValue only contains physical properties, and
we physicalize when building keyframes and transitions.

MozReview-Commit-ID: 9dI20N0LFrk
2018-07-18 12:10:16 +02:00
Emilio Cobos Álvarez adf95c2d09 Bug 1476054: Fixes and cleanups for Servo PR #21156. r=me
Similar to the previous patch, logical clear doesn't appear in computed style
objects.

MozReview-Commit-ID: FbN0hiUGzYa
2018-07-17 10:23:26 +02:00
Emilio Cobos Álvarez bbc6f5b7f2 Bug 1476054: Fixes and cleanups for Servo PR #21139. r=me
Logical floats don't appear in the computed style objects, so there's no need to
check for them.

MozReview-Commit-ID: 3ocJrRB3jeO
2018-07-17 10:15:46 +02:00
Gurzau Raul c05f725b1e Backed out 6 changesets (bug 1476054) for failing on servo/ports/geckolib/glue.rs on a CLOSED TREE
Backed out changeset f4941fe345ad (bug 1476054)
Backed out changeset cc571c618e4c (bug 1476054)
Backed out changeset 0a712d7bcb66 (bug 1476054)
Backed out changeset 62293a989ed2 (bug 1476054)
Backed out changeset ef2a43e3fc6c (bug 1476054)
Backed out changeset a2bb0089cf1d (bug 1476054)
2018-07-16 23:56:23 +03:00
Emilio Cobos Álvarez 9325870208 Bug 1476054: Fixes and cleanups for Servo PR #21156. r=me
Similar to the previous patch, logical clear doesn't appear in computed style
objects.

MozReview-Commit-ID: FbN0hiUGzYa
2018-07-16 21:38:46 +02:00
Emilio Cobos Álvarez cd116a52c4 Bug 1476054: Fixes and cleanups for Servo PR #21139. r=me
Logical floats don't appear in the computed style objects, so there's no need to
check for them.

MozReview-Commit-ID: 3ocJrRB3jeO
2018-07-16 21:38:44 +02:00
Xidorn Quan 9a1b70328e Bug 1461285 part 3 - Have the CSSOM appending behavior behind a pref and only enable it on Nightly. r=emilio
MozReview-Commit-ID: 6BzPTNjXjyA

--HG--
extra : rebase_source : a109383ea2a55949da8d2ab3346940fa1eb76055
2018-07-11 10:54:47 +10:00
Xidorn Quan c237e1be0d Bug 1461285 part 1 - Rename DeclarationSource to DeclarationPushMode. r=emilio
MozReview-Commit-ID: Iyv9JrXrpzl

--HG--
extra : rebase_source : d0fac58c300bdde21a0225d7793f554487f48791
2018-07-09 16:03:32 +10:00
Boris Chiou f0bf583292 Bug 1467277 - Bump euclid to 0.18 for style, style_traits, malloc_size_of, and tests. r=emilio
In order to drop old euclid version, we still need to bump euclid for
plane-split and gfx/*. However, it needs more update and is not related to
this bug, so let's do that in other place. Here, we bump euclid to
0.18.1, and update style/values/generics/transform.rs for it.

MozReview-Commit-ID: JfNAxkR8wgs

--HG--
rename : third_party/rust/euclid/.cargo-checksum.json => third_party/rust/euclid-0.17.3/.cargo-checksum.json
rename : third_party/rust/euclid/Cargo.toml => third_party/rust/euclid-0.17.3/Cargo.toml
rename : third_party/rust/euclid/src/homogen.rs => third_party/rust/euclid-0.17.3/src/homogen.rs
rename : third_party/rust/euclid/src/length.rs => third_party/rust/euclid-0.17.3/src/length.rs
rename : third_party/rust/euclid/src/lib.rs => third_party/rust/euclid-0.17.3/src/lib.rs
rename : third_party/rust/euclid/src/macros.rs => third_party/rust/euclid-0.17.3/src/macros.rs
rename : third_party/rust/euclid/src/point.rs => third_party/rust/euclid-0.17.3/src/point.rs
rename : third_party/rust/euclid/src/rect.rs => third_party/rust/euclid-0.17.3/src/rect.rs
rename : third_party/rust/euclid/src/rotation.rs => third_party/rust/euclid-0.17.3/src/rotation.rs
rename : third_party/rust/euclid/src/scale.rs => third_party/rust/euclid-0.17.3/src/scale.rs
rename : third_party/rust/euclid/src/side_offsets.rs => third_party/rust/euclid-0.17.3/src/side_offsets.rs
rename : third_party/rust/euclid/src/size.rs => third_party/rust/euclid-0.17.3/src/size.rs
rename : third_party/rust/euclid/src/transform2d.rs => third_party/rust/euclid-0.17.3/src/transform2d.rs
rename : third_party/rust/euclid/src/transform3d.rs => third_party/rust/euclid-0.17.3/src/transform3d.rs
rename : third_party/rust/euclid/src/trig.rs => third_party/rust/euclid-0.17.3/src/trig.rs
rename : third_party/rust/euclid/src/vector.rs => third_party/rust/euclid-0.17.3/src/vector.rs
extra : rebase_source : 0594429c74c7391f80b4e291cd7fe9cbddd72b33
2018-07-09 12:10:50 -07:00
Cameron McCormack 81599f34a7 Bug 1473735 - Add memory reporting for MediaQueryLists. r=emilio
MozReview-Commit-ID: 87rgRtQOOyG

--HG--
extra : rebase_source : a2ba4e1ed29fd7249378f9496c2059fa26316c3c
2018-07-06 11:09:12 +10:00
Emilio Cobos Álvarez 97cf1e0c02 Bug 1116638: Expose logical props in computed style. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D1862

--HG--
extra : moz-landing-system : lando
2018-06-30 13:45:43 +00:00
Xidorn Quan 46cae3d7aa Bug 1471104 followup - Upgrade cssparser and revendor.
MozReview-Commit-ID: 74rBgkJEcYd

--HG--
extra : rebase_source : a30d17b3d7e24f1a61c01d1dc442d6ce60c1dde3
extra : source : 8ff268ee87b7392391a6b6aa981f9180c45b27b6
2018-06-27 10:43:21 +10:00
Emilio Cobos Álvarez 4bdd7b8cc4 Bug 1422225: Error reporting fixes. r=xidorn
Do it so that we always try to evaluate the media expression and the modern
syntax last, so that the most specific error message comes up.

MozReview-Commit-ID: 2tqdAsWh6Kh
2018-06-25 21:19:39 +02:00
Emilio Cobos Álvarez cc409b08eb Bug 1470145: Better debugging for stylesheets and URLs. r=xidorn
MozReview-Commit-ID: FIcz2K1ZYX0
2018-06-22 02:33:07 +02:00
Emilio Cobos Álvarez 621ad1408b Bug 1469957: Move the error reporter into ParserContext. r=xidorn
Summary:
This should make it easier to report errors, and also reduce codesize.

The reason this was so generic is that error reporting was unconditionally
enabled and was super-hot, but now that's no longer the case after bug 1452143,
so we can afford the virtual call in the "error reporting enabled" case.

This opens the possibility of simplifying a lot the error setup as well, though
this patch doesn't do it.

Test Plan: No behavior change, so no new tests.

Reviewers: xidorn

Bug #: 1469957

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

MozReview-Commit-ID: F3wTdhX9MB5
2018-06-21 09:24:07 +02:00
Emilio Cobos Álvarez 8d318c9b78 Bug 1468665: Don't call the before change closure with the locked declaration block. r=xidorn
Test Plan: No behavior change.

Reviewers: xidorn

Bug #: 1468665

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

MozReview-Commit-ID: JI18xI6aHCh
2018-06-19 12:58:29 +02:00
Ciure Andrei 6eea08365e Merge inbound to mozilla-central. a=merge 2018-06-15 12:49:01 +03:00
Emilio Cobos Álvarez 1d7ab0614a Bug 1468846: Move MediaList to its own module. r=xidorn
And move the parsing from a free function to MediaList::parse.

MozReview-Commit-ID: 75ES6I2EEOE

--HG--
extra : rebase_source : acd2be1381409371bf4f151e5b21df713e5d9660
2018-06-14 13:22:07 -07:00
Emilio Cobos Álvarez a17751eb93 No bug - re-use the mode_to_origin function. r=me
MozReview-Commit-ID: AcDR6KcrbWI
2018-06-14 10:08:37 -07:00
Nazım Can Altınova 57afced2fc Bug 1451289 - Part 9: Merge ServoDocumentRule and CSSMozDocumentRule r=emilio
MozReview-Commit-ID: BkMMXBWdsfz

--HG--
extra : rebase_source : e14b5907769f45bb109ed4db08b2b3b444eb9c9f
2018-06-05 17:16:51 +02:00
Emilio Cobos Álvarez 9dbe99473f Bug 1467536: Add a Servo API to get the serialized style of a property. r=xidorn
This is intended to be used by GetComputedStyle when there's no layout
dependency.

MozReview-Commit-ID: 3GAbjo1uQ34
2018-06-10 00:38:57 +02:00
Gurzau Raul 74ffb16a12 Backed out 4 changesets (bug 1467536) for permafailing on layout/style/test/test_bug418986-2.html. a=backout
Backed out changeset 4e1cee0e0a48 (bug 1467536)
Backed out changeset 697892c54d63 (bug 1467536)
Backed out changeset 13b38c2d3251 (bug 1467536)
Backed out changeset 086eaeb69efa (bug 1467536)
2018-06-09 10:45:08 +03:00
Emilio Cobos Álvarez aaae119167 Bug 1467536: Add a Servo API to get the serialized style of a property. r=xidorn
This is intended to be used by GetComputedStyle when there's no layout
dependency.

MozReview-Commit-ID: 3GAbjo1uQ34
2018-06-08 14:17:52 +02:00
Xidorn Quan d3cefe8ea5 Bug 1466963 followup - Make RawServoUnlockedDeclarationBlock an alias to PropertyDeclarationBlock in Servo side. r=emilio
--HG--
extra : rebase_source : 93e4d83a4401cab5d010cfd3fb2494af33118ce8
extra : source : 78af6231a95c253e7087b879b901798642af81bd
2018-06-08 19:19:28 +10:00
Emilio Cobos Álvarez 0fbd75e65f Bug 1466963: Provide a before-mutation closure to C++. r=xidorn,smaug
MozReview-Commit-ID: H2jwIeZoiBZ
2018-06-07 11:22:31 +02:00
Emilio Cobos Álvarez 42599b6c43 Bug 1466963: Add a before-change callback to remove_property. r=xidorn
MozReview-Commit-ID: 4vyN9iLT7e3
2018-06-07 11:22:27 +02:00
Emilio Cobos Álvarez f46383f8bd Bug 1466656: Make ErrorReporter a smaller Rust type. r=heycam
And use the C++ ErrorReporter only to actually output errors.

ErrorReporter was so complicated because well, it was always enabled and had to
do a bunch of caching to not be (more) slow.

But since bug 1452143 it's disabled by default, so we can simplify this setup a
lot.

Also while at it make the error reporting pref a static pref so that we don't
mutate globals from CSS parsing unless we're actually reporting errors.

MozReview-Commit-ID: AuIyvJwt7AU
2018-06-05 11:09:39 +02:00
Emilio Cobos Álvarez 5c22d25db8 Bug 1466095: Make PropertyId::parse less of a footgun. r=xidorn
MozReview-Commit-ID: 2BmtSDPmHj9
2018-06-01 14:57:08 +02:00
Emilio Cobos Álvarez 3f97dd5cab Bug 1464060: Make the general setup for computed style bits nicer. r=xidorn
This patch:

 * Makes StyleStructID an enum class, and moves it to the mozilla namespaces.

 * Introduces StyleStructConstants with some constants scattered through the
   codebase.

 * Makes the computed style bits an enum class, and splits mPseudoType and mBits
   into their own members, since we were using a uint64_t when we have only a
   couple flags and CSSPseudoElementType is a byte. We statically assert that
   the number of style structs is less or equal to 32.

 * Makes mPseudoTag, mPseudoType and mBits const, since we don't want them to be
   mutated from C++, and we still need a few more refactorings (mostly getting
   rid of FinishStyle) to avoid mutating ComputedStyle instead.

MozReview-Commit-ID: 7qsTtASGcYB
2018-05-28 10:40:00 +02:00
Emilio Cobos Álvarez dc60d6f0c2 Bug 1464060: Remove a bunch of unused style bits. r=xidorn
MozReview-Commit-ID: FLACqfSHfSO
2018-05-28 10:17:11 +02:00
Xidorn Quan 28bb73ac18 Bug 1461858 part 1 - Make creating CssUrl infallible. r=emilio
There were a check in CssUrl::parse_from_string for extra data, which
was removed as part of servo/servo#16241, so it never fails now.

CssUrl::from_url_value_data doesn't seem to need Result from the very
beginning. It is unclear why it was made that way.

MozReview-Commit-ID: LXzKlZ6wPYW

--HG--
extra : rebase_source : baa4eb68b7c6b0042bd01108d3e6631c3cdf01a8
2018-05-16 12:19:31 +10:00
Emilio Cobos Álvarez 68affa51a4 Bug 1459436: Fix tidy issues. r=emilio
MozReview-Commit-ID: KXInHzAiiD8
2018-05-05 18:07:18 +02:00
Emilio Cobos Álvarez 73331875c7 Bug 1458814: followup: remove some unused imports. r=me
MozReview-Commit-ID: KMmH0ATu5Df
2018-05-05 17:55:52 +02:00
Emilio Cobos Álvarez 27ca8b58c8 Bug 1458814: Remove code that is no longer called. r=hiro
Au revoir!

MozReview-Commit-ID: DjqszUSIzXs
2018-05-05 16:31:20 +02:00
Emilio Cobos Álvarez ceca84ff64 Bug 1458814: Remove a bit of trivially dead code. r=hiro
MozReview-Commit-ID: GG41v4TejBU
2018-05-05 16:31:19 +02:00
Emilio Cobos Álvarez d7f92df0f2 Bug 1458814: Make SMIL values not roundtrip through strings. r=hiro
MozReview-Commit-ID: DpbFSutIv3t
2018-05-05 16:31:17 +02:00
Emilio Cobos Álvarez c556ec7ad0 Bug 1457920: Remove ServoStyleSheet usage. r=xidorn
MozReview-Commit-ID: LIBkovuQ6MB
2018-05-02 04:13:26 +02:00
Emilio Cobos Álvarez adc46229a3 Bug 1018269: Handle Shadow DOM in keyframes lookup. r=heycam
MozReview-Commit-ID: AeUmsOHOUYR
2018-05-01 13:01:23 +02:00
Xidorn Quan cd8a6cc5fc Bug 1434130 part 10 - Handle keywords for color values. r=emilio
MozReview-Commit-ID: 5GvIHSeQuCX

--HG--
extra : source : 524796e355b2221343b96a77c7a00abd2eb41af7
2018-04-29 09:03:31 +10:00
Xidorn Quan aa75ec745f Bug 1434130 part 2 - Add collect_values function to SpecifiedValueInfo trait for collecting possible values. r=emilio
This is the basic structure of the stuff. Following patches will fill
the gap between Gecko and Servo on value generating, and finally hook
it into InspectorUtils.

MozReview-Commit-ID: KNLAfFBiY6e

--HG--
extra : source : e9e5d72857746710ead3cd42481b805efc771389
2018-04-29 09:03:31 +10:00
sotaro 666719aa81 Bug 1456350 - Forward webrender error log to gfxCriticalNote r=bholley 2018-04-27 16:48:39 +09:00
Emilio Cobos Álvarez c5da849604 Bug 1457026: followup: Skip a rustest that depends on include order and isn't super-useful. r=bholley on a CLOSED TREE
MozReview-Commit-ID: 3lwAyl8aztW
2018-04-26 19:16:52 +02:00
Xidorn Quan cd1312cc66 Bug 1455576 part 3 - Use Servo side data to back InspectorUtils::CssPropertySupportsType. r=emilio
The only difference in the final result is "all" shorthand, for which
the original result is wrong because "all" shorthand doesn't accept any
value other than the CSS-wide keywords.

MozReview-Commit-ID: BmT7kGwC0ZQ

--HG--
extra : rebase_source : 094d764007359cb928f4c31a3818448f254a4043
extra : source : 10d25cf7b4ff2b5615a638031f98dc6163708545
2018-04-26 09:01:02 +10:00
Bobby Holley e7c9ddc0cf Bug 1455784 - Update StyleSource to use ArcUnion. r=Manishearth
MozReview-Commit-ID: AT4sud9goGV
2018-04-25 09:23:01 -07:00
Emilio Cobos Álvarez 4939ae347e Bug 1455032: Pack the shadow cascade order in ApplicableDeclarationBlock. r=heycam
I didn't bother not shifting there. We need to load the whole thing and shift
for at least one of cascade level / shadow cascade order.

Callers of level() other than for_rule_tree are non-existent in release builds,
so we'd be doing the shift anyway. I can implement the same thing for
shadow_cascade_order too, but I don't think that optimization is measurable in
any way, either, the compiler should make the decision.

And just in case, the simpler version actually generated less instructions in:

  https://play.rust-lang.org/?gist=ceadb0d3cbce4eeca76e4d9ab9a1c744&version=nightly

with the simple thing.

MozReview-Commit-ID: 8xPBJmlcyKh
2018-04-24 10:44:57 +02:00
Jonathan Watt 156c4af1ec Bug 1436048: Use user defined types for font-stretch / font-style. r=jfkthame,jwatt
Co-authored-by: Emilio Cobos Álvarez <emilio@crisal.io>

MozReview-Commit-ID: 7ONYtICeAqb
2018-04-23 18:22:05 +02:00
Emilio Cobos Álvarez e826b60e6a Bug 1455358: Use a generic type in preparation to fix animation. r=xidorn
Apart from a bit more code reuse.

MozReview-Commit-ID: 2BNOK6v30lX
2018-04-23 16:56:56 +02:00
Emilio Cobos Álvarez 5aeef4886f Bug 1455358: Update font-style to css-fonts-4. r=xidorn
This patch is meant to be squashed with the following two. This is an initial
strawman implementation that I wrote to unblock jwatt, cleanups and fixes
follow.

Note that this is style pretty much untested until jwatt's patches are ready,
since Gecko doesn't understand the angle at all, but I expect the fixes to be
minor.

MozReview-Commit-ID: 1Nq5DyCjaZe
2018-04-23 16:56:56 +02:00
Emilio Cobos Álvarez 5403bc5d9c Bug 1454883: Update font-stretch to css-fonts-4. r=xidorn
These won't "just work", pending changes from bug 1436048 to use a floating
point representation for those.

MozReview-Commit-ID: Bi5iTdFreMA
2018-04-23 16:56:55 +02:00
Emilio Cobos Álvarez 7b41eaf443 Bug 1454596: Update font-weight property and descriptor to css-fonts-4. r=xidorn
Need to change the tests still, but that should be trivial.

MozReview-Commit-ID: 27aS2UrgXjs
2018-04-19 12:49:37 +02:00
Noemi Erli 875e5ed0a1 Merge inbound to mozilla-central. a=merge 2018-04-19 12:53:30 +03:00
Bogdan Tara 6cb59b5809 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-04-19 01:46:00 +03:00
Emilio Cobos Álvarez 8754b8c870 Bug 1454162: Fix the sizeof tests since they apparently don't run by default. r=me
MozReview-Commit-ID: KhEC1CtBSdo
2018-04-18 19:21:34 +02:00
Emilio Cobos Álvarez 630760c6c7 Bug 1454162: Fix cascade order of !important in Shadow DOM. r=heycam
No cleaner ideas right now that carrying that counter around... Maybe a custom
type may be cleaner?

This makes ApplicableDeclarationBlock a bit bigger. I could probably try to make
the counter a 4 / 5-bit number or something and pack the counter there in the
SourceOrderAndCascadeLevel somehow...

But doesn't seem really worth the churn, and can be done as a followup in any
case. Let me know if you want to block on that.

MozReview-Commit-ID: 1LdW9S4xA6f
2018-04-18 18:27:03 +02:00
Bobby Holley 38a23e8931 Bug 1346988 - Parse sheets on the thread pool. r=bz,r=emilio
Note that we also drop the dead optional aReusableSheets argument from
the async parsing path, since it was always null.

MozReview-Commit-ID: KddpGFdaqEe
2018-04-18 13:52:57 -07:00
Bobby Holley 9cff749db5 Bug 1454460 - Pass a bonafide nsACString to Servo. r=bz
This will allow the Rust code hold a copy-free strong reference to the string
past callstack unwind.

MozReview-Commit-ID: HCop9h2abZU
2018-04-17 16:27:08 -07:00
Bobby Holley 0945bafb4a Bug 1454030 - Allow placeholder import sheets. r=emilio
This is necessary because we can't create GeckoStyleSheets off-main-thread,
so we need a placeholder until it can be filled in.

MozReview-Commit-ID: ssRme4fLYg
2018-04-16 15:15:45 -07:00
Kerem Kat 97ece751a4 Bug 37468 - Implement ServoStyleRule::SetSelectorText method for setting CSS rule selectorText from JS. r=xidorn
--HG--
extra : source : bd0a3fdb037c308ae7eab0be3c68d00fcb9b6056
2018-04-14 19:05:44 +03:00
Coroiu Cristina 4b2644bf85 Backed out 2 changesets (bug 37468) for linting failure at builds/worker/checkouts/gecko/tools/lint/wpt.yml
Backed out changeset 5e7a1db60298 (bug 37468)
Backed out changeset bd0a3fdb037c (bug 37468)
2018-04-15 03:23:36 +03:00
Kerem Kat f2a32c122a Bug 37468 - Implement ServoStyleRule::SetSelectorText method for setting CSS rule selectorText from JS. r=xidorn
--HG--
extra : amend_source : 2572c4d3ae52d0d4f11344b2611ddf847040da02
2018-04-14 19:05:44 +03:00
Emilio Cobos Álvarez 2bc468b78a servo: Merge #20597 - style: Implement the non-functional :host selector (from emilio:host); r=xidorn
Kinda tricky because :host only matches rules on the shadow root where the rules
come from. So we need to be careful during invalidation and style sharing.

I didn't use the non_ts_pseudo_class_list bits because as soon as we implement
the :host(..) bits we're going to need to special-case it anyway.

The general schema is the following:

 * Rightmost featureless :host selectors are handled inserting them in the
   host_rules hashmap. Note that we only insert featureless stuff there. We
   could insert all of them and just filter during matching, but that's slightly
   annoying.

 * The other selectors, like non-featureless :host or what not, are added to the
   normal cascade data. This is harmless, since the shadow host rules are never
   matched against the host, so we know they'll just never match, and avoids
   adding more special-cases.

 * Featureless :host selectors to the left of a combinator are handled during
   matching, in the special-case of next_element_for_combinator in selectors.
   This prevents this from being more invasive, and keeps the usual fast path
   slim, but it's a bit hard to match the spec and the implementation.

   We could keep a copy of the SelectorIter instead in the matching context to
   make the handling of featureless-ness explicit in match_non_ts_pseudo_class,
   but we'd still need the special-case anyway, so I'm not fond of it.

 * We take advantage of one thing that makes this sound. As you may have
   noticed, if you had `root` element which is a ShadowRoot, and you matched
   something like `div:host` against it, using a MatchingContext with
   current_host == root, we'd incorrectly report a match. But this is impossible
   due to the following constraints:

    * Shadow root rules aren't matched against the host during styling (except
      these featureless selectors).

    * DOM APIs' current_host needs to be the _containing_ host, not the element
      itself if you're a Shadow host.

Bug: 992245
Reviewed-by: xidorn
MozReview-Commit-ID: KayYNfTXb5h
Source-Repo: https://github.com/servo/servo
Source-Revision: cb754b262747e7cab794411df55588f0f0b30b5e

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 2ebbb2578ff9dbadfe905ae501cd52bd61a9fe9a
2018-04-09 06:41:59 -04:00
Xidorn Quan 2d686a4869 servo: Merge #20592 - Use Servo code to check whether a property is inherited (from upsuper:is-inherited); r=emilio
This is the Servo side change of [bug 1452534](https://bugzilla.mozilla.org/show_bug.cgi?id=1452534).

Source-Repo: https://github.com/servo/servo
Source-Revision: 0f20e82690db5e865b12eef2bed2d787d4b02280

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 536cd69f38f86c5810659a2fe5aa0c6e2ea91d8a
2018-04-09 05:19:48 -04:00
Emilio Cobos Álvarez 295a8f58b3 servo: Merge #20584 - style: Add an FFI function to see if an element is display: contents (from emilio:bye-undisplayed-maps); r=bz
Bug: 1303605
Reviewed-by: bz
Source-Repo: https://github.com/servo/servo
Source-Revision: a35c9e71a3d5d9ef87de4cfba542117a280014e1

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 226530d7f19f66bf7d5ee399fce94a29cb0fb9b9
2018-04-07 07:54:41 -04:00
Jonathan Watt 02a31f33e2 servo: Merge #20572 - Stop using NS_STYLE_FONT_WEIGHT_NORMAL and NS_STYLE_FONT_WEIGHT_BOLD (from jwatt:master); r=emilio
The Servo side of the changes for
https://bugzilla.mozilla.org/show_bug.cgi?id=1452040

- [X] `./mach build -d` does not report any errors
- [X] `./mach build-geckolib` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

- [ ] There are tests for these changes OR
- [X] These changes do not require tests because it's a trivial change to internal constants

Source-Repo: https://github.com/servo/servo
Source-Revision: a0bdba73e3f0dd52a74f75bc8191f52c3af2a62c

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 068e6ebeaa11ce792ccbb034045a008dd5df029e
2018-04-06 09:22:33 -04:00
Xidorn Quan 2120e04223 servo: Merge #20559 - Remove some unused stuff in nsCSSValue (from upsuper:cleanup-nscssvalue); r=emilio
This is the Servo side change of [bug 1448763](https://bugzilla.mozilla.org/show_bug.cgi?id=1448763).

Source-Repo: https://github.com/servo/servo
Source-Revision: 044f19d91433c706857a9ddd958425225c3a683e

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 3fb3e9f489c86a3db8e8c4caa008665657147689
2018-04-05 05:37:39 -04:00
Xidorn Quan c798790c4b servo: Merge #20541 - Use Servo data to back @counter-style rule in Gecko (from upsuper:counter-style); r=emilio
This is the Servo side changes of [bug 1449068](https://bugzilla.mozilla.org/show_bug.cgi?id=1449068).

Source-Repo: https://github.com/servo/servo
Source-Revision: 8c35be94c2910a50bbb7106449bab4e231697aea

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : f48b41f3df283812cdc926befcdb5af996e0d444
2018-04-04 19:34:06 -04:00
Xidorn Quan 3698b17162 servo: Merge #20519 - Use Servo data to back @font-face rule in Gecko (from upsuper:font-face-rule); r=emilio
This is the Servo side change of [bug 1449087](https://bugzilla.mozilla.org/show_bug.cgi?id=1449087).

Source-Repo: https://github.com/servo/servo
Source-Revision: 34b13dac66b48790003ccd069f4636f1def77e7d

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : a02d3471f240efcb43cfcbf55442da919e967983
2018-04-03 19:33:59 -04:00
Bastien Orivel 6cccb0a3eb servo: Merge #20465 - Bump env_logger to 0.5 and log to 0.4 in every servo crate (from Eijebong:log); r=SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: 12d82fe621947c2b29b12d9c9e9a81b0f4baa117

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 2700938c990b720e4f47039361e256bc239a55df
2018-03-28 15:08:52 -04:00
Xidorn Quan 6ec573da45 servo: Merge #20456 - Remove nsCSSPseudoClasses and friends (from upsuper:remove-nscsspseudoclasses); r=emilio
This is the Servo side change of [bug 1449097](https://bugzilla.mozilla.org/show_bug.cgi?id=1449097) and [bug 1449089](https://bugzilla.mozilla.org/show_bug.cgi?id=1449089).

Source-Repo: https://github.com/servo/servo
Source-Revision: 97c12bd3927c057d5610b0295f0e8320b64af5e5

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : f63d725bb89e33c3dafa18714e4b77d8958675c6
2018-03-27 18:51:48 -04:00
Emilio Cobos Álvarez 30afff82d1 servo: Merge #20386 - style: Rename StyleContext to ComputedStyle (from emilio:computed-style-rename); r=jwatt
Bug: 1447483
Reviewed-by: jwatt
MozReview-Commit-ID: KATZ6DkmpVY
Source-Repo: https://github.com/servo/servo
Source-Revision: 563f0ec8245d6ff4d7d200c30655f90f5bdfed64

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 686981ffd66ff5827b3bd09fb846cf8abbb6e403
2018-03-22 13:48:24 -04:00
Bastien Orivel 3fffb92cb4 servo: Merge #20378 - Bump parking_lot to 0.5 (from Eijebong:parking_lot); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 1c2bed5a6909268c85d61ec73b2ab63602294eb1

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 00ad02dad5a420567cd74fc2190ede9e1b056a75
2018-03-21 14:16:57 -04:00
Jonathan Watt 7a9e9059be servo: Merge #20351 - Add Servo_Property_IsShorthand to geckolib/glue.rs (from jwatt:master); r=emilio
<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 42305e3c366fb06dcf21d18f3f111eb8ee139701

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 46b036aaa53fb88efce06e2ed29d1036d35967ec
2018-03-19 12:53:48 -04:00
Emilio Cobos Álvarez ef7d849ac7 servo: Merge #20339 - style: Remove unsound Atom From implementations (from emilio:atom-from-dead-beef); r=nox
Fixes #20158

Source-Repo: https://github.com/servo/servo
Source-Revision: b47224dbcce2974e6f572b284cba1e2f5393b95d

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 68a732c7b4fa6564e34427438a019385391585b9
2018-03-19 06:11:14 -04:00
Bobby Holley 07d75a612a Bug 1451956 - Switch stylo function signature checking to use generated bindings. r=xidorn
MozReview-Commit-ID: A7sWaD2PInN
2018-04-18 17:10:35 -07:00
Matt Brubeck f0cce88058 servo: Merge #20245 - Disable logging in bindgen to reduce code size (from mbrubeck:logging); r=emilio
This disables bindgen's `logging` feature, which builds `env_logger`
with default features, including regex support.  Disabling it allows
Gecko to build `env_logger` without the `regex` crate, reducing code
size.

Part of https://bugzilla.mozilla.org/show_bug.cgi?id=1444097

---

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes do not require tests because they only change unused build config

Source-Repo: https://github.com/servo/servo
Source-Revision: 46dfc3536472c1b68be501dc5b37ff6fdd7dba35

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 202a5a3a0f0b83dab018f0f641d88e6c9ade9f22
2018-03-08 13:36:04 -05:00
Xidorn Quan 1f119c6d9c servo: Merge #20238 - Construct URLValue eagerly and share it between specified value and style structs (from upsuper:url-value); r=emilio
This is the Servo side change of [bug 1443046](https://bugzilla.mozilla.org/show_bug.cgi?id=1443046).

Source-Repo: https://github.com/servo/servo
Source-Revision: 1d122c250c906358a91b607b0fcc720546d04134

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 6c4306304c77f6feb169b335ec66f0b78b5f1763
2018-03-08 08:06:35 -05:00
Jonathan Kew 9137f16912 servo: Merge #20191 - style: Make 'font' shorthand reset 'font-variation-settings' property (from jfkthame:font-shorthand-resets-variation-settings); r=emilio
As required by the spec: https://drafts.csswg.org/css-fonts-4/#font-prop

See https://bugzilla.mozilla.org/show_bug.cgi?id=1435983

Basically, make font-variation-settings work in the same way as font-feature-settings
already does.

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

- [ ] There are tests for these changes OR
- [X] These changes do not require tests because font-variation-settings isn't supported in servo; it is implemented here for gecko/stylo, and will be tested by mozilla-central mochitests.

Source-Repo: https://github.com/servo/servo
Source-Revision: 1783e41f34c75bc7dfb158b4aa2628fd945eceb3

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : ccc26bb6fcbce339c34504dc3c493cee879970a0
2018-03-04 11:50:56 -05:00
Emilio Cobos Álvarez 0bb1806dc2 servo: Merge #20193 - style: Remove more rustc_has_pr45225 stuff (from emilio:needless-stuff-is-needless); r=nox
Also cleans up references to a fixed issue.

Source-Repo: https://github.com/servo/servo
Source-Revision: d09ea8476e68ff131d71bc78a2c6c324679b90d5

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : a065c7a872724c2802092c569b93aba720eeac32
2018-03-04 10:41:54 -05:00
Bobby Holley cfbe8920ca servo: Merge #20146 - Stylo: Pass an explicit parent SheetLoadData for child stylesheet loads (from bholley:explicit_load_data); r=bholley
https://bugzilla.mozilla.org/show_bug.cgi?id=1441896

Source-Repo: https://github.com/servo/servo
Source-Revision: e8f77861a9af8d88ba62625838a10d63c74d22ed

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 10643d7df19b8b97d27a5081dec6816b120afa1a
2018-02-28 11:32:00 -05:00
Emilio Cobos Álvarez 1319d160ae servo: Merge #20138 - style: Only expose longhands to rust via iterators (from emilio:longhand-iterator); r=nox
The key here is that we only filter longhands if the shorthand is accessible to
content and vice-versa. This prevents the bug that prevented me to land this
patch before, which was us not expanding properly chrome-only shorthands.

Source-Repo: https://github.com/servo/servo
Source-Revision: a0be3a7fae2730bfef52db94db7f3af14b60be67

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 2afb50b62cab334fcec0cdcccd793abca8fdb3ec
2018-02-28 06:28:41 -05:00
Bastien Orivel ba431a7ec0 servo: Merge #20140 - Bump euclid to 0.17 (from Eijebong:euclid); r=SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: 38298336beb4ef8873cae22919bd8bee0f6496d4

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 0fc60971a64e0c8fb9be4503a54298f9ecb8cf8b
2018-02-28 04:14:32 -05:00
Emilio Cobos Álvarez 8fff47a007 servo: Merge #20133 - style: Make Shadow DOM not use XBL anymore (from emilio:kill-xbl); r=xidorn
Bug: 1425759
Reviewed-by: xidorn
MozReview-Commit-ID: Jf2iGvLC5de
Source-Repo: https://github.com/servo/servo
Source-Revision: a7f38f0f32e2a01dfd3d415fd34d246957bede63

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 628ac3fd9871e10371a3b4c3cd432c7977af4441
2018-02-27 05:47:29 -05:00
Emilio Cobos Álvarez d178469908 servo: Merge #20082 - style: Cleanup always-false argument to Servo_ResolveStyleLazily (from emilio:ignore-existing-styles); r=bholley
I changed this setup in https://bugzilla.mozilla.org/show_bug.cgi?id=1414999,
because it was totally unsound.

Source-Repo: https://github.com/servo/servo
Source-Revision: 691f3be24a6fcc90ae7d0b9b0783abf8674e1b0f

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 9a6a2851157d91b46caf11d52b534268f3a24cba
2018-02-21 06:09:15 -05:00
Emilio Cobos Álvarez d015fb39b1 servo: Merge #20081 - style: More serialization tweaks (from emilio:more-longhand-stuff); r=nox
This still doesn't fix everything. In particular, we need to check whether the
subproperty will be enabled in Longhands and LonghandsToSerialize too.

I haven't decided yet on what's the best way to do that.

Source-Repo: https://github.com/servo/servo
Source-Revision: 2c060eb81a8eab0fdcbf13231bf7703ea96bc657

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : f69fc629a34488a51df7323b320b52ee2da65ab1
2018-02-20 23:49:19 -05:00
Xidorn Quan 666ef26b7f servo: Merge #20070 - Add sizeof for AuthorStyles (from upsuper:authorstyles-size); r=bholley,njn
This is the Servo side change for [bug 1438497](https://bugzilla.mozilla.org/show_bug.cgi?id=1438497).

Source-Repo: https://github.com/servo/servo
Source-Revision: a98da8ce939e8afe7bac737ac02e3bcb226a1ea9

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 31f23b7517b49570f311b34d4c27f8eda9f2a0c1
2018-02-18 23:13:10 -05:00
Emilio Cobos Álvarez f2afd33bae servo: Merge #20065 - style: Cleanup GeckoElement::note_explicit_hints (from emilio:note-stuff); r=nox
What it's doing is not so complicated.

Source-Repo: https://github.com/servo/servo
Source-Revision: d423e54d58d6cced950896eed1957ee2989f4eee

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 5f2eb141315f4abbc2e2340950d43679aaf79f42
2018-02-16 15:33:48 -05:00
Emilio Cobos Álvarez 946bc4825a servo: Merge #20061 - style: Make XBL / Shadow DOM use something more light-weight than a Stylist (from emilio:author-styles); r=xidorn
Introduce AuthorStyles, which is just a struct aggregating stylesheets +
CascadeData, with a quirks_mode parameter because XBL sucks so bad.

Bug: 1436059
Reviewed-by: xidorn
MozReview-Commit-ID: 7q99tSNXo0K
Source-Repo: https://github.com/servo/servo
Source-Revision: 504b901cc82db5c5e02e157cec9753f7c297ac2c

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 79252144a91938156e03e4bf1be76988a14beeed
2018-02-16 09:54:06 -05:00
Xidorn Quan 5e807fd261 servo: Merge #19925 - Use cstr macro for ffi literal strings (from upsuper:cstr); r=emilio
Use `cstr!()` macro with `CStr` to ensure that literal strings used with FFI is properly nul-terminated to avoid cases like #19915.

Source-Repo: https://github.com/servo/servo
Source-Revision: 5af219e8188f2e657c5711eb5def4c8e8065e29d

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : fb6a22714c7b8ff534181e54c265fca24da7873b
2018-02-14 06:49:38 -05:00
Xidorn Quan 742625c2c0 servo: Merge #20042 - Integrate font-variation-settings descriptor with stylo (from upsuper:font-variation-desc); r=emilio
This is the Servo side change for [bug 1435984](https://bugzilla.mozilla.org/show_bug.cgi?id=1435984).

Source-Repo: https://github.com/servo/servo
Source-Revision: 27cd4f7b5387f188570a355c58bf87b9a029d76e

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : de2178dad493accc07bda8dd4cded94a002377a8
2018-02-13 19:16:34 -05:00
Emilio Cobos Álvarez 308e8cbfd9 servo: Merge #20038 - style: Avoid an intermediate buffer in Servo_Shorthand_AnimationValues_Serialize (from emilio:no-need-for-strings); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 4c3f1756da1373e9eef33716c9a93b0bb0559241

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 5e9b4f0230a2ad74e3c9d84fb32067db8ad17c8c
2018-02-13 12:06:02 -05:00
Emilio Cobos Álvarez fbc79ce711 servo: Merge #20039 - style: Use consistent formatting for functions in the glue file (from emilio:indent); r=nox
I'm tired of only drive-by fixing them :)

Source-Repo: https://github.com/servo/servo
Source-Revision: 7e31ae35e1036467e25484ab30132f8bd49f0ee8

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 36caa8cd45913ca5b0068fef7b234a4992e03c57
2018-02-13 10:25:30 -05:00
Emilio Cobos Álvarez 4bc28644f9 servo: Merge #20018 - style: Handle quirks-mode changes correctly (from emilio:quirks-mode-flush); r=xidorn
The reason why bug 1355721 regressed this is because in non-e10s we definitely
flush before parsing the standards quirks-mode. And bug 1355721 introduced an
unconditional UpdateStylistIfNeeded, unless the counter style / font
equivalents.

That means that the stylist wouldn't remain on its initial state after the first
flush, which itself means that when the compat mode changed, the UA and user
rules were already on the stylist with the quirks mode keys. That makes
class-names be keyed in ascii lowercase.

After that no user style changed, so no rebuild happens for the cascade data in
the user origin, so we keep looking at the wrong keys indefinitely.

We should try to avoid the flush there and ensure that by the time we create a
pres shell the quirks mode is already up-to-date...

Bug: 1394233
Reviewed-by: xidorn
MozReview-Commit-ID: 25dD2bca3tN
Source-Repo: https://github.com/servo/servo
Source-Revision: 2ec0b50ebc65f04a49420e15267f564d36d5ada1

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 763cfe74f08d44b02b166be1c2077b3f4d97e8f5
2018-02-11 13:19:02 -05:00
Xidorn Quan 9f999d9c1d servo: Merge #20013 - Return whether property was removed from Servo_DeclarationBlock_RemoveProperty (from upsuper:remove-prop-bool); r=bzbarsky
This is the Servo side change of [bug 1435139](https://bugzilla.mozilla.org/show_bug.cgi?id=1435139).

Source-Repo: https://github.com/servo/servo
Source-Revision: afaa51b99387df084da421a738f204fefaebfbab

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : f0a0b143d2750de047e62ab4ee940e791c2826b1
2018-02-10 03:59:43 -05:00
Emilio Cobos Álvarez d9b65d628d servo: Merge #20004 - style: Add infrastructure to have a standalone author stylesheet collection (from emilio:author-sheet-collection); r=nox
Right now Gecko uses a whole `Stylist` for stuff like XBL / Shadow DOM.

That's not great, because it has tons of unrelated logic, and also eats up a lot of memory. Also, it prevents us to optimize style changes in shadow hosts the same way we do for the document.

These patches mostly rejigger stuff around so that you can define a `DocumentStylesheetSet` and then an `AuthorStylesheetSet`, which would contain just the Shadow DOM sheets / XBL resource sheets.

It still doesn't introduce any use for the later, but that will come later.

There's a patch in this PR that requires Gecko changes, posted in https://bugzilla.mozilla.org/show_bug.cgi?id=1436798.

Source-Repo: https://github.com/servo/servo
Source-Revision: 6b1a74672d6b9d9c55b027b147b0a6eb8f727bfd

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 35cd629f88c24439c615e283265dbb78d33279b7
2018-02-09 17:18:08 -05:00
Manish Goregaokar a17da12d3c servo: Merge #19994 - Remove traversal telemetry (from Manishearth:rm-telemetry); r=upsuper
Source-Repo: https://github.com/servo/servo
Source-Revision: e654afbc3e47d97835328e6131ef51b2e27e3409

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 9c2646dea983c0d03022566fa69a04897146cfc8
2018-02-08 08:10:09 -05:00
Emilio Cobos Álvarez b081657510 servo: Merge #19973 - style: Rework how media feature changes are handled for XBL (from emilio:media-feature-change); r=xidorn
Bug: 1435939
Reviewed-by: xidorn
Source-Repo: https://github.com/servo/servo
Source-Revision: e57319a7345eded057555f55f801e5f2c413f5b9

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 6da4b2d236318d13aad4a8f4c1211f733901fa96
2018-02-07 08:02:34 -05:00
janczer 4e2c0a5eb3 servo: Merge #19970 - Change debug assertions to specific ones (from janczer:change_debug_assertions); r=emilio
<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #19962 (github issue number if applicable).

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 5d209a70ab11cd0ce6c7e086091112570c6e259d

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : c837bee3dbbf93357f6553a2a356685a094d8e3e
2018-02-07 06:20:36 -05:00
Emilio Cobos Álvarez 6a7646bbc0 servo: Merge #19966 - style: Get rid of gecko_size_type (from emilio:bye-gecko-size); r=nox
It's a hack, should die.

Source-Repo: https://github.com/servo/servo
Source-Revision: dc446198a733cab3416aaccdd13bf6e86ffeb294

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 0cfb968e80c9f19f5c4dfad8187f597edc26e344
2018-02-06 21:15:07 -05:00
Emilio Cobos Álvarez b6862d9f18 servo: Merge #19964 - style: Don't serialize default values of the font shorthand (from emilio:font-shorthand); r=nox
This makes us consistent with the old style system and Blink / WebKit.

Not adding a test because shorthands serialization is a mess... :(

Anyway, nothing like fixing bugs by removing code.

Bug: 1436031
Source-Repo: https://github.com/servo/servo
Source-Revision: dde15d8d6511bfb1440afeff5135757611b96a6c

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 9d4213440d0c137c44b626038d46d6d344370cdd
2018-02-06 16:42:23 -05:00