Commit Graph

8323 Commits

Author SHA1 Message Date
Mats Palmgren
0cdadab9e8 Bug 1520229 - [css-logical] Implement the inset-block/inline shorthands. r=emilio 2019-01-16 19:26:14 +01:00
Emilio Cobos Álvarez
b44ff327e9 Bug 1520154 - Move cursor to cbindgen. r=boris
The only reason it was on style_traits is so that they could use it from some
other crates, but Servo eventually ends up getting the value from an integer, so
may as well pass it around and do that in the end of the process anyway.

Differential Revision: https://phabricator.services.mozilla.com/D16557
2019-01-16 14:13:07 +01:00
Mats Palmgren
663f6ee46c Bug 1519944 - [css-logical] Implement the margin-block/inline shorthands. r=emilio 2019-01-15 02:27:44 +01:00
Mats Palmgren
9a48b50d31 Bug 1519847 - [css-logical] Implement the padding-block/inline shorthands. r=emilio 2019-01-14 19:22:03 +01:00
Emilio Cobos Álvarez
ecd9b9bc0f Bug 1519729 - Rustfmt recent changes. 2019-01-13 21:55:56 +01:00
Emilio Cobos Álvarez
f8f381bf03 Bug 1519629 - Document a few more macros. 2019-01-13 21:55:43 +01:00
lqd
2b08ae08b2 Bug 1519729 - Typo fix in new doc-comment. r=emilio
Cherry-picks a commit from https://github.com/servo/servo/pull/22674

Co-Authored-By: SimonSapin <simon.sapin@exyr.org>
2019-01-13 21:55:05 +01:00
Simon Sapin
9d5e559547 Bug 1519729 - Document public macros. r=emilio
Undocumented public macros emit warnings in nightly-2019-01-11,
and we #![deny] that warning.

Cherry-picks a commit from https://github.com/servo/servo/pull/22674
2019-01-13 21:54:38 +01:00
Simon Sapin
9bdfa9feca Bug 1519729 - Remove unused macro. r=emilio
Cherry-picks a commit from https://github.com/servo/servo/pull/22674
2019-01-13 21:53:43 +01:00
Bobby Holley
b381fba212 Bug 1519454 - Put malloc_size_of_derive on crates.io, and add a reduced fork of malloc_size_of for WebRender. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D16353


--HG--
rename : servo/components/malloc_size_of_derive/LICENSE-APACHE => gfx/wr/wr_malloc_size_of/LICENSE-APACHE
rename : servo/components/malloc_size_of_derive/LICENSE-MIT => gfx/wr/wr_malloc_size_of/LICENSE-MIT
rename : servo/components/malloc_size_of_derive/LICENSE-APACHE => third_party/rust/malloc_size_of_derive/LICENSE-APACHE
rename : servo/components/malloc_size_of_derive/LICENSE-MIT => third_party/rust/malloc_size_of_derive/LICENSE-MIT
rename : servo/components/malloc_size_of_derive/lib.rs => third_party/rust/malloc_size_of_derive/lib.rs
2019-01-12 12:36:22 -08:00
Bogdan Tara
1b63fe08ee Backed out 4 changesets (bug 1519454) for api.rs build bustage CLOSED TREE
Backed out changeset 21d74c03c00a (bug 1519454)
Backed out changeset 054028a8d4a7 (bug 1519454)
Backed out changeset e9b1d04247de (bug 1519454)
Backed out changeset f3ef205b4f63 (bug 1519454)

--HG--
rename : third_party/rust/malloc_size_of_derive/LICENSE-APACHE => servo/components/malloc_size_of_derive/LICENSE-APACHE
rename : third_party/rust/malloc_size_of_derive/LICENSE-MIT => servo/components/malloc_size_of_derive/LICENSE-MIT
rename : third_party/rust/malloc_size_of_derive/lib.rs => servo/components/malloc_size_of_derive/lib.rs
2019-01-12 21:54:54 +02:00
Bobby Holley
466c21b4c4 Bug 1519454 - Put malloc_size_of_derive on crates.io, and add a reduced fork of malloc_size_of for WebRender. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D16353

--HG--
rename : servo/components/malloc_size_of_derive/LICENSE-APACHE => gfx/wr/wr_malloc_size_of/LICENSE-APACHE
rename : servo/components/malloc_size_of_derive/LICENSE-MIT => gfx/wr/wr_malloc_size_of/LICENSE-MIT
rename : servo/components/malloc_size_of_derive/LICENSE-APACHE => third_party/rust/malloc_size_of_derive/LICENSE-APACHE
rename : servo/components/malloc_size_of_derive/LICENSE-MIT => third_party/rust/malloc_size_of_derive/LICENSE-MIT
rename : servo/components/malloc_size_of_derive/lib.rs => third_party/rust/malloc_size_of_derive/lib.rs
extra : moz-landing-system : lando
2019-01-12 19:21:56 +00: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
Boris Chiou
bdec90c4ee Bug 1348519 - Part 2: Implement Animate for track lists on grid-template-{columns|rows}. r=emilio
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1348519#c6 and
https://github.com/w3c/csswg-drafts/issues/3201:

Currently grid-template-rows/columns interpolate “per computed value”, which
means that if the number of tracks differs, or any track changes to/from a
particular keyword value to any other value, or if a line name is added/removed
at any position, the entire track listing is interpolated as “discrete”.
But we "agree" with two more granular options:

1. Check interpolation type per track, rather than for the entire list, before
   falling back to discrete. I.e. a length-percentage track can animate between
   two values while an adjacent auto track flips discretely to min-content.
2. Allow discrete interpolation of line name changes independently of track
   sizes.

Besides, for the repeat() function, it's complicated to support interpolation
between different repeat types (i.e. auto-fill, auto-fit) and different repeat
counts, so we always fall-back to discrete if the first parameter of repeat()
is different.

Depends on D16339

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

--HG--
extra : moz-landing-system : lando
2019-01-12 02:22:39 +00:00
Boris Chiou
6a58da235c Bug 1348519 - Part 1: Support field_bound on Animate. r=emilio
So we can derive Animate on more generic types.

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

--HG--
extra : moz-landing-system : lando
2019-01-12 02:19:04 +00:00
Daniel Varga
1b2c69a5c1 Merge mozilla-central to mozilla-inbound. a=merge on a CLOSED TREE 2019-01-11 06:23:02 +02:00
Daniel Varga
f0a9c979bb Merge mozilla-inbound to mozillia-central. a=merge 2019-01-11 06:14:14 +02:00
Emilio Cobos Álvarez
06e203c285 Bug 1519269 - Rustfmt recent changes. 2019-01-11 01:02:56 +01: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
Cameron McCormack
58ee8c6caf Bug 1518992 - Remove unnecessary mem::transmute in MediaListKey r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D16147

--HG--
extra : moz-landing-system : lando
2019-01-10 06:01:03 +00:00
Bogdan Tara
6d78d1e2c9 Backed out 15 changesets (bug 1305957) for ASAN failures CLOSED TREE
Backed out changeset 4d5eb85d3155 (bug 1305957)
Backed out changeset 51c86d025ecb (bug 1305957)
Backed out changeset d8eef8f3e396 (bug 1305957)
Backed out changeset 950bf6ad1ef2 (bug 1305957)
Backed out changeset b4cb2cbebdb6 (bug 1305957)
Backed out changeset bfca5019a9cc (bug 1305957)
Backed out changeset e76b842c7b7f (bug 1305957)
Backed out changeset d9445a5f3458 (bug 1305957)
Backed out changeset d9052f7b34d9 (bug 1305957)
Backed out changeset e7124fecb721 (bug 1305957)
Backed out changeset bdb766faa867 (bug 1305957)
Backed out changeset 3033401ef320 (bug 1305957)
Backed out changeset 6b96050386f6 (bug 1305957)
Backed out changeset c66c00f73296 (bug 1305957)
Backed out changeset 6bd0bdab93cb (bug 1305957)
2019-01-10 18:49:22 +02:00
Cameron McCormack
b05708ce89 Bug 1500362 - Make GkAtoms opaque to avoid lld-link.exe errors r=emilio
Depends on D15078

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

--HG--
extra : moz-landing-system : lando
2019-01-07 09:50:25 +00:00
Cameron McCormack
81b00f453b Bug 1500362 - Use atom handles in favour of atom pointers in style system code r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D15078

--HG--
extra : moz-landing-system : lando
2019-01-07 07:54:46 +00:00
Ryan Hunt
9f09201ef2 Bug 1305957 part 2 - Add 'overflow-anchor' CSS property. r=emilio
https://drafts.csswg.org/css-scroll-anchoring/#exclusion-api

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

--HG--
extra : rebase_source : 14d4a6282274b125a6153a05daff5d93e34a29b7
extra : source : c66c00f7329619d53bc14ec615a0d92f06b6a892
2018-11-21 22:33:15 -06:00
Emilio Cobos Álvarez
2fdc41fadf Bug 1518954 - Three-value position syntax uses calc() as its computed value representation. r=heycam
This restores the previous behavior of using calc().

Note that background-position / object-position, which test this, weren't
hitting the assertion because they use another codepath.

I didn't add more extensive tests for this because it's well tested for those
two properties, and because this is legacy anyway, see the comment in the test.

I did add the assertion to the codepath those two properties hit.

Differential Revision: https://phabricator.services.mozilla.com/D16176
2019-01-11 01:19:13 +01:00
Ryan Hunt
53ae64fd5e Bug 1305957 part 2 - Add 'overflow-anchor' CSS property. r=emilio
https://drafts.csswg.org/css-scroll-anchoring/#exclusion-api

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

--HG--
extra : rebase_source : eaef41c6fecb8e90850c617b5b1d3602f91990b2
extra : histedit_source : 3beb002b612e4caf22538928acffd702f70adf92
2018-11-21 22:33:15 -06:00
Emilio Cobos Álvarez
ee2d827d48 Bug 1517511, bug 1518098 - followup: Rustfmt so Servo's lints are happy. 2019-01-07 17:00:15 +01:00
Emilio Cobos Álvarez
a66b31c93c Bug 1517511 - followup: fix servo build. 2019-01-07 16:46:29 +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
Bastien Orivel
24db8c61b4 Bug 1518045 - Update owning_ref to 0.4.
This cherry-picks https://github.com/servo/servo/pull/22534, plus the relevant
re-vendoring.
2019-01-07 01:13:43 +01:00
Emilio Cobos Álvarez
b1ddabc921 Bug 1518045 - Rustfmt recent changes. 2019-01-07 00:53:17 +01:00
Simon Sapin
2720b7c034 Bug 1518045 - Publish selectors 0.21.0 on crates.io. r=emilio
This cherry-picks https://github.com/servo/servo/pull/22577, with the relevant
lockfile update.
2019-01-07 00:53:11 +01:00
Bastien Orivel
a0c3211f27 Bug 1518045 - Fix all clippy warnings in style_derive. r=emilio
This cherry-picks https://github.com/servo/servo/pull/22439.
2019-01-07 00:53:08 +01:00
Simon Sapin
81312a11be Bug 1518045 - Rustfmt has changed its default style. r=emilio
This cherry-picks the formatting parts of
https://github.com/servo/servo/pull/22385.
2019-01-07 00:53:06 +01: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
Hiroyuki Ikezoe
88483b9261 Bug 1517682 - Drop layout.css.background-blend-mode.enabled pref. r=heycam
It was enabled by default in bug 970600.

Depends on D15707

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

--HG--
extra : moz-landing-system : lando
2019-01-04 07:21:32 +00:00
Hiroyuki Ikezoe
1415d28adf Bug 1517682 - Drop layout.css.scroll-behavior.property-enabled pref. r=heycam
It was enabled by default in bug 1041833 (for desktops) and
bug 1087562 (for Fennect).

Depends on D15706

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

--HG--
extra : moz-landing-system : lando
2019-01-04 07:21:53 +00:00
Hiroyuki Ikezoe
602a0bb6c3 Bug 1517682 - Drop layout.css.mix-blend-mode.enabled pref. r=heycam
It was enabled by default in bug 952643.

Depends on D15705

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

--HG--
extra : moz-landing-system : lando
2019-01-04 07:22:13 +00:00
Hiroyuki Ikezoe
bed5a404f1 Bug 1517682 - Drop layout.css.isolation.enabled pref. r=heycam
It was enabled by default in bug 1091885.

Depends on D15704

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

--HG--
extra : moz-landing-system : lando
2019-01-04 07:22:27 +00:00
Hiroyuki Ikezoe
9bdfa0cf64 Bug 1517682 - Drop layout.css.image-orientation.enabled pref. r=heycam
It was enabled by default in bug 825771.

Depends on D15703

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

--HG--
extra : moz-landing-system : lando
2019-01-04 07:22:52 +00:00
Hiroyuki Ikezoe
6aaa816a8a Bug 1517682 - Drop layout.css.color-adjust.enabled pref. r=heycam
It was enabled by default in bug 1209273.

Depends on D15702

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

--HG--
extra : moz-landing-system : lando
2019-01-04 07:23:38 +00:00
Hiroyuki Ikezoe
f2d516f849 Bug 1517682 - Drop layout.css.box-decoration-break.enabled pref. r=heycam
It was enabled by default in bug 1006326.

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

--HG--
extra : moz-landing-system : lando
2019-01-04 07:23:07 +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
Xidorn Quan
e9eae8a984 Bug 1516829 - Replace trim_{left,right}* with trim_{start,end}*. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D15496

--HG--
extra : moz-landing-system : lando
2018-12-30 08:37:19 +00:00
quasicomputational
baf06c6032 Bug 1422235 - Implement the 'overflow-inline' media query. r=emilio 2018-12-28 02:16:59 +01:00
quasicomputational
20fa93316d Bug 1422235 - Implement the 'overflow-block' media query. r=emilio 2018-12-28 02:16:53 +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