Commit Graph

12699 Commits

Author SHA1 Message Date
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
Emilio Cobos Álvarez
0c34c4b04f Bug 1540385 - Fix revalidation in <svg:use> subtree. r=heycam
So as to avoid incorrectly sharing styles across elements.

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

--HG--
extra : moz-landing-system : lando
2019-04-04 03:46:55 +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
a7ccd628a6 No bug - Remove comment that is outdated since I fixed it in bug 1483808. 2019-04-02 14:51:11 +02:00
Emilio Cobos Álvarez
d5f76a387b Bug 1537594 - Make the fixed generic family a parse-time alias to monospace. r=jfkthame
As discussed on IRC, fixed is only used for prefs right now, and:

 * We already copy the fixed size to the monospace font.
 * We already serialize the fixed family as "monospace" in the style system.

So it already works somewhat inconsistently. Making it an alias makes it
work consistently.

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

--HG--
extra : moz-landing-system : lando
2019-04-01 21:48:08 +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
Emilio Cobos Álvarez
1396481b91 Bug 1537575 - Trivially cleanup and remove some dead font code. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D24271

--HG--
extra : moz-landing-system : lando
2019-04-01 21:47:43 +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
9cee1c4e85 Bug 1537594 - Make the fixed generic family a parse-time alias to monospace. r=jfkthame
As discussed on IRC, fixed is only used for prefs right now, and:

 * We already copy the fixed size to the monospace font.
 * We already serialize the fixed family as "monospace" in the style system.

So it already works somewhat inconsistently. Making it an alias makes it
work consistently.

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

--HG--
extra : moz-landing-system : lando
2019-04-01 18:48:10 +00: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
b0f2640ec4 Bug 1537575 - Trivially cleanup and remove some dead font code. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D24271

--HG--
extra : moz-landing-system : lando
2019-03-31 23:39:17 +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
6b5853fa8e Bug 1474793 - Part 10.8: Add derived ToShmem implementations. r=emilio
Depends on D17196

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

--HG--
extra : moz-landing-system : lando
2019-03-30 00:16:25 +00:00
Cameron McCormack
2883bbaaea Bug 1474793 - Part 10.7: Add ToShmem impl for FontFamilyList. r=emilio
Depends on D17195

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

--HG--
extra : moz-landing-system : lando
2019-03-30 00:16:23 +00:00
Cameron McCormack
ca6083b00d Bug 1474793 - Part 10.6: Add ToShmem impl for UrlExtraData. r=emilio
Depends on D17194

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

--HG--
extra : moz-landing-system : lando
2019-03-30 00:16:21 +00:00
Cameron McCormack
828bb401f3 Bug 1474793 - Part 10.5: Add ToShmem impl for URLValueSource. r=emilio
Depends on D17193

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

--HG--
extra : moz-landing-system : lando
2019-03-30 00:16:19 +00:00
Cameron McCormack
36b203d8d1 Bug 1474793 - Part 10.4: Add ToShmem impl for shared_lock::Locked. r=emilio
Depends on D17192

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

--HG--
extra : moz-landing-system : lando
2019-03-30 00:16:17 +00:00
Cameron McCormack
25e28640fe Bug 1474793 - Part 10.3: Add ToShmem impl for Atom. r=emilio
Depends on D17191

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

--HG--
extra : moz-landing-system : lando
2019-03-30 00:16:15 +00:00
Cameron McCormack
d46b90bcd7 Bug 1474793 - Part 10.2: Add ToShmem impls for collections and strings. r=emilio
Depends on D17190

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

--HG--
extra : moz-landing-system : lando
2019-03-30 00:16:13 +00:00
Cameron McCormack
cf65641653 Bug 1474793 - Part 10.1: Add simple ToShmem implementations. r=emilio
Depends on D17189

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

--HG--
extra : moz-landing-system : lando
2019-03-30 00:16:11 +00:00
Cameron McCormack
8c9949aa66 Bug 1474793 - Part 9: Add support for deriving ToShmem. r=emilio
Depends on D17188

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

--HG--
extra : moz-landing-system : lando
2019-03-30 00:16:08 +00:00
Cameron McCormack
c1d7542bbd Bug 1474793 - Part 8: Factor out some of style_derive. r=emilio
Depends on D17187

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

--HG--
rename : servo/components/style_derive/Cargo.toml => servo/components/derive_common/Cargo.toml
rename : servo/components/style_derive/cg.rs => servo/components/derive_common/cg.rs
extra : moz-landing-system : lando
2019-03-30 00:16:01 +00:00
Cameron McCormack
b3a8e5cfb6 Bug 1474793 - Part 7: Add SharedMemoryBuilder type and ToShmem trait. r=emilio
Depends on D17186

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

--HG--
extra : moz-landing-system : lando
2019-03-30 00:15:59 +00:00
Cameron McCormack
ea948106dd Bug 1474793 - Part 6: Add support for static references to servo_arc::Arc. r=emilio
Depends on D17185

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

--HG--
extra : moz-landing-system : lando
2019-03-30 00:15:57 +00:00
Cameron McCormack
b43b0a8e3a Bug 1474793 - Part 5: Add support for read only SharedRwLocks, which don't need any locking. r=emilio
Depends on D17184

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

--HG--
extra : moz-landing-system : lando
2019-03-30 00:15:55 +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
Masayuki Nakano
de2d589e58 Bug 1540015 - part 3: Rename Document::GetShell() to Document::GetPresShell() and make it return PresShell* rather than nsIPresShell* r=smaug,emilio
This makes `Document::GetShell()` return `PresShell*` instead of `nsIPresShell`.

Additonally, "shell" is unclear ("docshell" vs. "presshell").  Therefore, this
also renames `Document::GetShell()` to `Document::GetPresShell()`.

Similarly, some other method names of `Document` are also renamed from
`*Shell*` to `*PresShell*`.

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

--HG--
extra : moz-landing-system : lando
2019-03-29 15:12:47 +00:00
Dorel Luca
5a0fa68b78 Backed out 3 changesets (bug 1540015) for build bustage. CLOSED TREE
Backed out changeset 7b71c9da0214 (bug 1540015)
Backed out changeset 5723ddbc5c44 (bug 1540015)
Backed out changeset 9561d2c36fa5 (bug 1540015)
2019-03-29 16:14:26 +02:00
Masayuki Nakano
9273f25ce2 Bug 1540015 - part 3: Rename Document::GetShell() to Document::GetPresShell() and make it return PresShell* rather than nsIPresShell* r=smaug,emilio
This makes `Document::GetShell()` return `PresShell*` instead of `nsIPresShell`.

Additonally, "shell" is unclear ("docshell" vs. "presshell").  Therefore, this
also renames `Document::GetShell()` to `Document::GetPresShell()`.

Similarly, some other method names of `Document` are also renamed from
`*Shell*` to `*PresShell*`.

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

--HG--
extra : moz-landing-system : lando
2019-03-29 13:09:26 +00:00
Emilio Cobos Álvarez
859ca6ad05 Bug 1540093 - Unship line-height: -moz-block-height. r=mats
They're only used in forms.css, and only for some anonymous content, which are
not content-accessible in the first place.

The only place where this could be exposed is calling
getComputedStyle(input, "::placeholder"), so I think this should be pretty safe,
but I've added a pref just in case.

While at it, also derive the Parse implementation. Less code is better.

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

--HG--
extra : moz-landing-system : lando
2019-03-29 11:11:27 +00:00
Emilio Cobos Álvarez
3514c8548d Bug 1540093 - Refactor some enabledness checks. r=mats
There are some common checks that could get some easy-to-use aliases.

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

--HG--
extra : moz-landing-system : lando
2019-03-29 11:12:12 +00:00
Emilio Cobos Álvarez
c752cecc84 Bug 1538589 - Fix ::marker invalidation when we need to potentially insert a marker as a result of a style change. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D24888

--HG--
extra : moz-landing-system : lando
2019-03-28 13:50:13 +00:00
Emilio Cobos Álvarez
992c298f60 Bug 1539267 - Bug 1539171 - Follow the list-item definition from the spec a bit more closely. r=mats
The HTML restriction doesn't match any browser.

This matches Edge, though I filed
https://github.com/w3c/csswg-drafts/issues/3766 about the pseudo-element
condition.

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

--HG--
extra : moz-landing-system : lando
2019-03-27 15:03:20 +00:00
Emilio Cobos Álvarez
cfa6b9a741 Bug 1529681 - Update bindgen. r=bbouvier
This works around an LLVM bug and also pulls a fair amount of bugfixes and perf
improvements. None of the breaking changes affect either the style system or
cranelift stuff.

Changelog for convenience:

https://github.com/rust-lang/rust-bindgen/compare/v0.43.2...v0.49.0

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

--HG--
extra : moz-landing-system : lando
2019-03-27 14:39:41 +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
4a1b23092d Bug 1539326 - Fix servo build, and appease tidy checks. 2019-03-27 03:16:37 +01:00
Peter Hall
32484d9bdf Bug 1539326 - Cherry-pick changes for servo/servo#8539 (config preferences backend restructure). r=npotb 2019-03-27 03:16:24 +01:00
Emilio Cobos Álvarez
300bf233c5 Bug 1536718 - Honor browser.display.use_document_fonts again. r=manishearth,jwatt
Differential Revision: https://phabricator.services.mozilla.com/D24218

--HG--
extra : moz-landing-system : lando
2019-03-26 18:42:27 +00:00
Emilio Cobos Álvarez
58f4eeb7f4 Bug 1536584 - Remove bindings.rs. r=xidorn
I kept it building the most straight-forward way possible (pub use) because it
seems to me that bindings is not a bad name, and we should probably move
structs.rs to be bindings.rs rather than the other way around.

But that's a different bug in any case, need to think more about it.

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

--HG--
extra : moz-landing-system : lando
2019-03-26 18:15:47 +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
a072622b02 Bug 1536584 - Remove bindings.rs. r=xidorn
I kept it building the most straight-forward way possible (pub use) because it
seems to me that bindings is not a bad name, and we should probably move
structs.rs to be bindings.rs rather than the other way around.

But that's a different bug in any case, need to think more about it.

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

--HG--
extra : moz-landing-system : lando
2019-03-26 13:38:14 +00: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
4b5f164752 Bug 205202 part 3 - [css-lists][css-pseudo] Add support for the 'content' CSS property on ::marker pseudo elements. r=emilio 2019-03-24 23:13:53 +01:00
Mats Palmgren
53f517142f Bug 205202 part 1 - [css-lists][css-pseudo] Add support for the ::marker pseudo element on list items. Alias :-moz-list-bullet/number to that in the parser. r=emilio 2019-03-24 23:13:53 +01: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
Mats Palmgren
f46136021c Bug 288704 part 1 - [css-lists] Add an inherited internal UA sheet property (-moz-list-reversed:true|false) to propagate <ol reversed> to its relevant decendants. r=emilio 2019-03-24 23:13:52 +01:00
Mats Palmgren
426b73e37a Bug 1518201 - [css-lists] Implement the counter-set property. 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
Cameron McCormack
0b3540c9bb Bug 282126 - Part 4: Use horizontal metrics for ch in vertical mixed/sideways writing modes and for ex always. r=emilio
Depends on D23425

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

--HG--
extra : moz-landing-system : lando
2019-03-21 04:50:47 +00:00
Cameron McCormack
076c3e7246 Bug 282126 - Part 2: Allow FontMetricsProvider to produce ex height and zero width independently. r=emilio
We are always able to produce an x height, but depending on whether the
glyph exists, we sometimes can't produce a zero glyph width.

Depends on D23423

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

--HG--
extra : moz-landing-system : lando
2019-03-21 04:50:43 +00:00
Emilio Cobos Álvarez
0f9d0b6755 Bug 1537576 - fix some rust-nightly warnings about unused doc comments. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D24287

--HG--
extra : moz-landing-system : lando
2019-03-20 22:47:30 +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
Emilio Cobos Álvarez
c9b429b7f8 Bug 1516780 - Keep track of whether a style is affected by font metrics. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D20728

--HG--
extra : moz-landing-system : lando
2019-03-19 21:10:13 +00:00
Boris Chiou
cbef6a9f42 Bug 1425837 - Part 6: Add individual transform properties into compositor animation list. r=hiro
Now, its time to let individual transform run on the compositor thread.

Depends on D19636

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

--HG--
extra : moz-landing-system : lando
2019-03-18 18:05:00 +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
5bf307c2a8 Bug 1535165 - Make the will-change bitfield use cbindgen. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D23414

--HG--
extra : moz-landing-system : lando
2019-03-18 18:08:08 +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
63dc1243e4 Bug 1529537 - Make all font-metrics-affecting properties cascade early. r=heycam
And make font-size computation work on the whole font of the parent, not just
accounting for the parent's font-size.

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

--HG--
extra : moz-landing-system : lando
2019-03-18 16:27:54 +00:00
Emilio Cobos Álvarez
ac54c9333b Bug 1534494 - Try to bring some more sanity into our font code. r=manishearth
It's not very easy to understand on its current state, and it causes subtle bugs
like bug 1533654.

It could be simpler if we centralized where the interactions between properties
are handled. This patch does this.

This patch also changes how MathML script sizes are tracked when scriptlevel
changes and they have relative fonts in between.

With this patch, any explicitly specified font-size is treated the same (being a
scriptlevel boundary), regardless of whether it's either an absolute size, a
relative size, or a wide keyword.

Relative lengths always resolve relative to the constrained size, which allows
us to avoid the double font-size computation, and not give up on sanity with
keyword font-sizes.

I think given no other browser supports scriptlevel it seems like the right
trade-off.

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

--HG--
extra : moz-landing-system : lando
2019-03-18 15:37:03 +00:00
Emilio Cobos Álvarez
4baf60220e Bug 1533654 - Don't call PrefillDefaultForGeneric when inheriting font-family. r=heycam
This is the low-risk fix for this issue, that we should get into 67.

What's going on here is that font-family is tracked via the font list, from the
POV of the style system the font list is generally just the
RefPtr<SharedFontList>, but in Gecko there's also mDefaultGenericId.

The way we end up with the right mDefaultGenericId is fishy at best, bogus at
worst. I left various fixmes over time related to a bunch of this code.

After my patch, we end up with a mDefaultGenericId of serif, rather than the
right one (none).

The parent font always has none because nsLayoutUtils::ComputeSystemFont always
sets it to none if the font is known.

Before my patch, PrefillDefaultForGeneric with aGenericId of none (from the
parent), which makes it the default generic id for the current language, serif
in this case.

Before my optimization, apply_declaration_ignoring_phase called
copy_font_family_from, which resets both the font list _and_ the default
generic.

This patch achieves the same effect by not having the first mutation in the
first place.

This code is still terribly fishy in any case, all the _skip_font_family stuff
is just ridiculous. I'll try to clean up a bit after this, but for 68.

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

--HG--
extra : moz-landing-system : lando
2019-03-12 00:48:27 +00:00
Emilio Cobos Álvarez
4c1252347e Bug 1533783 - Avoid crashing when calling insertRule("@import ...") on a detached sheet. r=heycam
This should unblock the fuzzers for now, though it's not the ideal solution.

It's the only reasonably easy solution to unblock them though, I think.

We should probably always keep track of the document a stylesheet was associated
with. We'll need that for constructible stylesheets anyway.

That requires some though on how to get the cycle-collection and such right,
though, and I wouldn't be able to write or land that ASAP.

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

--HG--
extra : moz-landing-system : lando
2019-03-14 22:30:37 +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
44b112b7e7 Bug 1535084 - followup: Add a comment to unbust the tree.
CLOSED TREE
2019-03-13 22:29:46 +01:00
Emilio Cobos Álvarez
e4b13f1adb Bug 1535084 - Cleanup contain property. r=dholbert
Now that cbindgen supports bitflags, this is trivial.

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

--HG--
extra : moz-landing-system : lando
2019-03-13 19:55:54 +00:00
Emilio Cobos Álvarez
1d17f71255 Bug 1534726 - Fix servo build. 2019-03-12 19:01:35 +01:00
Emilio Cobos Álvarez
b3bd9a6099 Bug 1534726 - Reformat recent style system changes. 2019-03-12 19:01:28 +01:00
violet
7d525e84a8 Bug 1508028 - Change stroke-miterlimit restriction from GreaterThanOrEqualToOneNumber to NonNegativeNumber. r=longsonr,emilio 2019-03-09 13:05:56 +00:00
Emilio Cobos Álvarez
6fa29022c2 Bug 1215878 - Optimize cascading of other wide keywords if possible. r=xidorn
The way the copy-on-write stuff works, and the way that we have to apply
properties from most specific to less specific guarantees that always that we're
going to inherit an inherited property, or reset a reset property, we have
already the right value on the style.

Revert relies on that, so there doesn't seem to be a reason to not use that fact
more often and skip useless work earlier.

Font-size is still special of course... I think I have a way to move the
specialness outside of the style, but piece by piece.

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

--HG--
extra : moz-landing-system : lando
2019-03-07 12:48:07 +00:00
Emilio Cobos Álvarez
0b5807bc62 Bug 1215878 - Implement CSS revert keyword. r=heycam,birtles
The only fishy bit is the animation stuff. In particular, there are two places
where we just mint the revert behavior:

 * When serializing web-animations keyframes (the custom properties stuff in
   declaration_block.rs). That codepath is already not sound and I wanted to
   get rid of it in bug 1501530, but what do I know.

 * When getting an animation value from a property declaration. At that point
   we no longer have the CSS rules that apply to the element to compute the
   right revert value handy. It'd also use the wrong style anyway, I think,
   given the way StyleBuilder::for_animation works.

   We _could_ probably get them out of somewhere, but it seems like a whole lot
   of code reinventing the wheel which is probably not useful, and that Blink
   and WebKit just cannot implement either since they don't have a rule tree,
   so it just doesn't seem worth the churn.

The custom properties code looks a bit different in order to minimize hash
lookups in the common case. FWIW, `revert` for custom properties doesn't seem
very useful either, but oh well.

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

--HG--
extra : moz-landing-system : lando
2019-03-07 11:59:36 +00:00
Emilio Cobos Álvarez
c6307e16b7 No bug - fix a typo.
DONTBUILD
2019-03-07 00:15:49 +01:00
Emilio Cobos Álvarez
be8ce9ba8a Bug 1532135 - followup: Add a comment as requested on Phabricator. 2019-03-07 00:15:47 +01:00
Emilio Cobos Álvarez
cb19991fd7 Bug 1533142 - Use more cbindgen features. r=kats
We can get back the fancy flag syntax as soon as we get C++17 inline variables,
which I sent an email to dev-platform@ about, with no reply.

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

--HG--
extra : moz-landing-system : lando
2019-03-06 23:01:11 +00:00
Emilio Cobos Álvarez
eda315e71c Bug 1532135 - Derive more stuff for clip rects. r=boris
I feel a bit weird for using LenghtPercentageOrAuto to implement LengthOrAuto,
but I don't think much other code will use it so it seemed a bit better to me.

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

--HG--
extra : moz-landing-system : lando
2019-03-06 21:37:48 +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
8c9a745531 Bug 1530193 - Refactor preference stylesheet prefs to not require a pres context. r=jwatt
We really only have two sets of prefs, one for chrome-like documents
(stuff in chrome docshells + chrome-origin images), and one for the rest.

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

--HG--
extra : moz-landing-system : lando
2019-03-06 21:34:30 +00:00
Daniel Holbert
1467eb13b8 Bug 1530896: Drop css parser support for 'contain:style'. r=emilio
We're not sure we're going to ship support for this value, and it's been marked
as 'at-risk' in the spec, so let's stop pretending we support it in the parser.

Spec issue:
https://github.com/w3c/csswg-drafts/issues/3280

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

--HG--
extra : moz-landing-system : lando
2019-03-06 20:44:37 +00:00
Emilio Cobos Álvarez
25098daaaa Bug 1532122 - Make word-spacing, letter-spacing, and line-height use Rust lengths. r=boris
This also adopts the resolution from [1] while at it, making letter-spacing
compute to a length, serializing 0 to normal rather than keeping normal in the
computed value, which matches every other engine.

This removes the SMIL tests for percentages from letter-spacing since
letter-spacing does in fact not support percentages, so they were passing just
by chance.

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

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

--HG--
extra : moz-landing-system : lando
2019-03-04 18:19:40 +00:00
Emilio Cobos Álvarez
dc03ea30c7 Bug 1532134 - Remove Options from TransformOperation. r=xidorn
This may or may not be part of the plan to get rid of nsCSSValue ;)

Option is not usable via FFI, and they should not be needed (we should be
following the shortest serialization principle instead). These patches also do
that, which matches the other transform properties. I think that slight change
is fine, if we can make it work, and consistent with other properties.

Alternative is adding more TransformOperation variants or such, which I rather
not do.

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

--HG--
extra : moz-landing-system : lando
2019-03-03 11:31:54 +00:00
Emilio Cobos Álvarez
c3755249b4 Bug 1532134 - Use contextual_skip_if for background-size. r=xidorn
Also drive-by cleanup.

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

--HG--
extra : moz-landing-system : lando
2019-03-03 11:31:40 +00:00
Emilio Cobos Álvarez
1103c6531f Bug 1532134 - Use skip_if for translate serialization. r=xidorn
Trivial drive-by cleanup.

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

--HG--
extra : moz-landing-system : lando
2019-03-03 11:31:30 +00:00
Emilio Cobos Álvarez
2ade1e5e73 Bug 1532134 - When deriving something with an output type, map preconditions as well. r=xidorn
Otherwise, deriving ToComputedValue and ToAnimatedValue in structs or enums with
other where clauses just doesn't work.

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

--HG--
extra : moz-landing-system : lando
2019-03-03 11:31:21 +00:00
Emilio Cobos Álvarez
5bea6a1b83 Bug 1532134 - Implement a version of #[css(skip_if)] that takes more context. r=xidorn
I called it contextual_skip_if, though better names welcome.

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

--HG--
extra : moz-landing-system : lando
2019-03-03 11:31:06 +00:00
Emilio Cobos Álvarez
f02f6a3545 Bug 1218257 - Use rust lengths for the SVG lengths. r=boris
As it turns out we need this to avoid losing precision both during painting and
during serialization.

This patch also changes to serialize `context-value` if it's the computed value.

I could keep the previous behavior, but it makes no sense to serialize the
initial value. We're the only ones to support this value anyway, and I couldn't
find a definition or spec for this.

Also update tests and expectations for:

 * New unexpected passes.
 * Always serializing the unit in getComputedStyle.
 * Calc and interpolation support.

Chrome also always serializes the unit in getComputedStyle, so I'm pretty sure
this is compatible with them. Chrome is inconsistent and keeps numbers in
specified style, but that's inconsistent with itself and with other quirky
lengths, so I updated the tests instead.

Differential Revision: https://phabricator.services.mozilla.com/D21819
2019-03-03 00:16:24 +01:00
Emilio Cobos Álvarez
7e10c7b612 Bug 1218257 - Cleanup and fix interpolation of SVG lengths. r=boris
Instead of storing them as LengthPercentage | Number, always store as
LengthPercentage, and use the unitless length quirk to parse numbers instead.

Further cleanups to use the rust representation can happen as a followup, which
will also get rid of the boolean argument (since we can poke at the rust length
itself). That's why I didn't bother to convert it to an enum class yet.

Differential Revision: https://phabricator.services.mozilla.com/D21804
2019-03-03 00:16:13 +01:00
Emilio Cobos Álvarez
3d044b1111 Bug 1296042 - Make word-break: break-word behave like word-break: normal; overflow-wrap: anywhere. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D21398

--HG--
extra : moz-landing-system : lando
2019-03-01 02:33:07 +00:00
Emilio Cobos Álvarez
5eb5f7eff7 Bug 1530847 - Add a Zero trait that doesn't require Add, and use it in place of num_traits and IsZeroLength. r=heycam
Use it to be consistent in InsetRect serialization and storage between Servo and
Gecko.

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

--HG--
extra : moz-landing-system : lando
2019-02-28 19:03:03 +00:00
Emilio Cobos Álvarez
90554be433 Bug 1530826 - Fix computed value clamping. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D21268

--HG--
extra : moz-landing-system : lando
2019-02-26 23:34:25 +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
Hiroyuki Ikezoe
43d46aa4b7 Bug 1530571 - Explicitly specify animation_value_type for scroll-padding. r=boris
Otherwise the Trait for clamping negative animation value isn't generated thus
negative animating results are exposed in computed values.

Depends on D21152

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

--HG--
extra : moz-landing-system : lando
2019-02-26 10:17:25 +00: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
Cosmin Sabou
2bc99829bf Backed out changeset 4d220064bcf8 (bug 1529681) for causing Windows 2012 AArch64 build bustages. CLOSED TREE
--HG--
extra : histedit_source : a68af39c236effa1c63bb091f4f72146c84a1be3
2019-02-25 20:31:13 +02:00
Emilio Cobos Álvarez
a185f2109d Bug 1516454 - Make the generic size not use euclid under the hood. r=firefox-style-system-reviewers,boris
The euclid size is not really used for anything. Also rename it to Size2D to
avoid cbindgen conflicts with values::length::Size.

Depends on D20958

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

--HG--
extra : moz-landing-system : lando
2019-02-25 03:05:39 +00:00
Emilio Cobos Álvarez
76fb626711 Bug 1516454 - Simplify border-radius serialization. r=firefox-style-system-reviewers,boris
Differential Revision: https://phabricator.services.mozilla.com/D20958

--HG--
extra : moz-landing-system : lando
2019-02-25 03:03:15 +00:00
Emilio Cobos Álvarez
a970076f63 Bug 1529681 - Update bindgen. r=bbouvier 2019-02-25 09:51:02 -08:00
Andreea Pavel
6d82da21f3 Backed out changeset e99833064d36 (bug 1529681) for build bustages on a CLOSED TREE 2019-02-25 18:44:17 +02:00
Emilio Cobos Álvarez
66f3c5b7eb Bug 1529681 - Update bindgen. r=bbouvier
This works around an LLVM bug and also pulls a fair amount of bugfixes and perf
improvements. None of the breaking changes affect either the style system or
cranelift stuff.

Changelog for convenience:

https://github.com/rust-lang/rust-bindgen/compare/v0.43.2...v0.47.2

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

--HG--
extra : moz-landing-system : lando
2019-02-25 09:43:11 +00: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
d0982a7b89 No bug - Appease tidy. r=whitespace-only 2019-02-23 21:13:19 -08:00
Emilio Cobos Álvarez
b45ffb4f71 No bug - Remove unnecessary derive. r=npotb 2019-02-23 21:13:17 -08:00
Emilio Cobos Álvarez
c59f73ed00 No bug - Rustfmt recent changes. r=whitespace-only 2019-02-23 21:13:15 -08:00
Emilio Cobos Álvarez
99549860f7 Bug 1529058 - Use Rust types from transform-origin / perspective-origin. r=mattwoodrow
Depends on D20381

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

--HG--
extra : moz-landing-system : lando
2019-02-19 20:28:47 +00:00
Emilio Cobos Álvarez
c4ae51b99d Bug 1529058 - Use Rust types for perspective and z-index. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D20381

--HG--
extra : moz-landing-system : lando
2019-02-19 23:04:45 +00:00
Asfiya
2b8ec74bf6 Bug 1528940 - convert NS_STYLE_FLEX_DIRECTION to an enum class in nsStyleConsts.h r=emilio
Converted the #define variable NS_STYLE_FLEX_DIRECTION to an enum class in nsStyleConsts.h and made changes in other files that access it

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

--HG--
extra : moz-landing-system : lando
2019-02-19 17:01:59 +00:00
scharing
87df459a63 Bug 1528464 - Convert NS_STYLE_MASK_MODE_* to enum class r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D20063

--HG--
extra : moz-landing-system : lando
2019-02-19 16:54:52 +00:00
Emilio Cobos Álvarez
bf84e7fd35 Bug 1528035 - Improve #[derive(Parse)]. r=xidorn
I want to do this so that I can get rid of Either<>. The reasons for getting rid
of either is multiple:

 * It doesn't generate as nice C++ code using cbindgen.
 * It isn't that nice to use either from Rust.
 * cbindgen has bugs with zero-sized types.

I started using this for ColorOrAuto and a few others, for now.

Differential Revision: https://phabricator.services.mozilla.com/D19844
2019-02-19 15:22:55 +01:00
Emilio Cobos Álvarez
c9cb04e111 Bug 1527972 - Use Rust types for some misc properties. r=jwatt
-moz-tab-size, border-image-outset and border-image-slice.

This is not a particularly interesting patch, just removes some code. We can
remove way more code when a few related properties are also ported.

Differential Revision: https://phabricator.services.mozilla.com/D19825
2019-02-19 15:22:40 +01:00
Emilio Cobos Álvarez
d2cbf071d5 Bug 1528712 - Remove nsFont::featureValueLookup. r=jfkthame
It's a global object, it doesn't have to be stored in nsFont. Pass it from the
caller like the user font set and co.

Depends on D20141

Differential Revision: https://phabricator.services.mozilla.com/D20142
2019-02-19 14:54:04 +01:00
Emilio Cobos Álvarez
8ccb77e27d Bug 1528712 - Remove a couple trivial dependencies on nsPresContext. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D20141
2019-02-19 14:54:01 +01: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
Ciure Andrei
965d533ca4 Backed out 2 changesets (bug 1528712) for Linux spcshell and reftest failures (test_ext_browserSettings.js, 1022481-1.html) CLOSED TREE
Backed out changeset 2d5c4e71e258 (bug 1528712)
Backed out changeset d981515b874b (bug 1528712)
2019-02-19 14:25:57 +02:00
Emilio Cobos Álvarez
f97a9f50a2 Bug 1528712 - Remove nsFont::featureValueLookup. r=jfkthame
It's a global object, it doesn't have to be stored in nsFont. Pass it from the
caller like the user font set and co.

Depends on D20141

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

--HG--
extra : moz-landing-system : lando
2019-02-18 14:03:47 +00:00
Emilio Cobos Álvarez
522e6c9366 Bug 1528712 - Remove a couple trivial dependencies on nsPresContext. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D20141

--HG--
extra : moz-landing-system : lando
2019-02-19 11:17:28 +00:00
Hiroyuki Ikezoe
64a777f7b5 Bug 1528834 - Implement scroll-snap-align parser and serializer. r=emilio
https://drafts.csswg.org/css-scroll-snap-1/#scroll-snap-align

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

--HG--
extra : moz-landing-system : lando
2019-02-18 23:10:08 +00:00
Hiroyuki Ikezoe
0a5721ad9c Bug 1528640 - Implement scroll-padding parser and serializer. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D20103

--HG--
extra : moz-landing-system : lando
2019-02-18 02:46:09 +00:00
Hiroyuki Ikezoe
842f78da12 Bug 1528639 - Implement scroll-margin parser and serializer. r=emilio
The reason why we use  RelaxedAtomBoolis that
ScrollSnapUtils::GetSnapPointForDestination() is called both from the main and
the compositor threads, and the function will have a branch depending on the
pref value.

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

--HG--
extra : moz-landing-system : lando
2019-02-18 02:25:54 +00:00
Jonathan Kingston
83bd9bdac8 Bug 1494034 - Add support for CSS prefers-color-scheme media feature. r=emilio 2019-02-15 21:40:35 +01:00
Cosmin Sabou
a4b19fcd61 Merge mozilla-inbound to mozilla-central. a=merge
--HG--
rename : browser/components/nsBrowserContentHandler.js => browser/components/BrowserContentHandler.jsm
2019-02-15 20:39:45 +02:00
Brian Birtles
95e299f85d Bug 1524480 - Don't share styles when an element has animations applied to it; r=emilio
We already avoid putting styles in the shared style cache for an element that
has animations[1] but if we are doing the initial style of two siblings where
the _second_ has animations applied, there is nothing to stop us from trying to
share with the first (un-animated) element. This patch adds a check to prevent
sharing in that case since sharing style between animated elements is unsound
for the reasons described in [1].

A number of tests including:

  testing/web-platform/tests/web-animations/animation-model/animation-types/visibility.html

will fail without this fix once we remove the style flush from
KeyframeEffect::SetKeyframes later in this patch series.

[1] https://searchfox.org/mozilla-central/rev/6e3cc153566f5f288ae768a2172385b8436d61dd/servo/components/style/sharing/mod.rs#597

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

--HG--
extra : moz-landing-system : lando
2019-02-15 06:35:04 +00:00
Emilio Cobos Álvarez
9db2ce6d9b Bug 1527542 - Use rust types for background-size. r=jwatt
Hopefully straight-forward.

Differential Revision: https://phabricator.services.mozilla.com/D19625
2019-02-15 04:09:26 +01:00
Emilio Cobos Álvarez
95454d416b Bug 1527438 - Use Rust types for Position. r=jwatt
This one should be much easier to review / much more pleasant to see :-)

Differential Revision: https://phabricator.services.mozilla.com/D19563
2019-02-15 04:05:32 +01:00
Emilio Cobos Álvarez
aec730ed7d Bug 1527410 - Preserve calc() rounding behavior. r=heycam,jrmuizel
See the comment. I don't really this is ideal, I filed bug 1528114 to
investigate changing that.

Differential Revision: https://phabricator.services.mozilla.com/D19584
2019-02-15 03:59:34 +01:00
Emilio Cobos Álvarez
e9ae3b0907 Bug 1527410 - Use Rust sizes for flex-basis, width, height, and their min/max properties. r=jwatt
Really sorry for the size of the patch :(

Only intentional behavior change is in the uses of HasLengthAndPercentage(),
where it's easier to do the right thing. The checks that used to check for
(IsCalcUnit() && CalcHasPercentage()) are wrong since bug 957915.

Differential Revision: https://phabricator.services.mozilla.com/D19553
2019-02-15 03:59:31 +01: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
Alan Jeffrey
9dbc608ab3 No bug - Cherry-pick changes from Servo PR #22825. r=npotb 2019-02-10 06:51:02 +01: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
ca19235faa Bug 1523071 - Use the style system's LengthPercentage for shape-margin. r=jwatt
This also makes us pass a few WPTs because we stop losing precision when
serializing the computed value.

Differential Revision: https://phabricator.services.mozilla.com/D17738
2019-02-10 04:11:00 +01:00
Emilio Cobos Álvarez
0b8aea8fdd Bug 1523071 - Add bindings for LengthPercentage, and use it for text-indent. r=jwatt
Which is the only property that uses LengthPercentage alone.

Differential Revision: https://phabricator.services.mozilla.com/D17737
2019-02-10 04:10:24 +01:00
Emilio Cobos Álvarez
286396f97a Bug 1525955 - Cleanup a bit after bug 1525371. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D19001

--HG--
extra : moz-landing-system : lando
2019-02-08 22:40:26 +00: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
38e4d112d2 Bug 1440384 - Generate combined transform just once. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D18567
2019-02-04 23:14:41 +01:00
Emilio Cobos Álvarez
a155f63750 Bug 1523712 - Make -moz-binding chrome / UA only. r=boris
But enable it in all tests because a lot of them rely on using it in the
style="" attribute for example, or in inline stylesheets, which will no longer
parse this (even in chrome documents), and we don't want to rewrite all the XUL
and XBL tests.

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

--HG--
extra : moz-landing-system : lando
2019-01-30 20:55:54 +00:00
Emilio Cobos Álvarez
6f7882539b No bug - rustfmt recent changes. 2019-01-29 03:22:06 +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
Emilio Cobos Álvarez
1381add9e4 Bug 1521405 - Cleanup a few shorthand properties. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D17082
2019-01-23 18:53:45 +01:00
Bobby Holley
819658d44b Bug 1521187 - Derive more. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D17029
2019-01-22 12:19:22 -08:00
Bobby Holley
c0182b02f9 Bug 1521187 - Add a dependency on derive_more. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D17028


--HG--
rename : third_party/rust/semver/.cargo-checksum.json => third_party/rust/semver-0.6.0/.cargo-checksum.json
rename : third_party/rust/semver/Cargo.toml => third_party/rust/semver-0.6.0/Cargo.toml
rename : third_party/rust/semver/README.md => third_party/rust/semver-0.6.0/README.md
rename : third_party/rust/semver/src/lib.rs => third_party/rust/semver-0.6.0/src/lib.rs
rename : third_party/rust/semver/src/version.rs => third_party/rust/semver-0.6.0/src/version.rs
rename : third_party/rust/semver/src/version_req.rs => third_party/rust/semver-0.6.0/src/version_req.rs
2019-01-22 12:19:22 -08: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
Razvan Maries
e89eab8264 Merge mozilla-inbound to mozilla-central a=merge 2019-01-21 13:34:31 +02:00
Emilio Cobos Álvarez
c16bf47250 Bug 1521399 - Remove layout.css.overflow.moz-scrollbars.enabled. r=mats
We've been shipping it for a few releases already, see bug 1481125.

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

--HG--
extra : moz-landing-system : lando
2019-01-21 01:35:00 +00:00
Emilio Cobos Álvarez
330daedbea Bug 1521392 - Make tidy happy. 2019-01-20 17:52:24 +01:00
Emilio Cobos Álvarez
9a934ed822 Bug 1521392 - Cherry-pick Servo-only changes to malloc_size_of. 2019-01-20 16:29:22 +01:00
Emilio Cobos Álvarez
ea73c6b7e9 Bug 1521392 - Fix servo build and rustfmt recent changes. 2019-01-20 16:29:19 +01:00
Emilio Cobos Álvarez
564b5b883b Bug 1520989 - Represent the percentage in LengthPercentage with something other than an option. r=firefox-style-system-reviewers,boris
Not the prettiest, but it will work, and LengthPercentage will be 12 bytes which is pretty good (we could do better if wanted I guess):

  * Au(i32) length;
  * f32 percentage;
  * AllowedNumericType(u8) clamping_mode;
  * bool has_percentage;
  * bool was_calc;

This will allow me to start moving C++ stuff to use this representation.

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

--HG--
extra : moz-landing-system : lando
2019-01-18 19:32:27 +00:00
Martin Stransky
8ddc948f81 Bug 1433667 - Honour system titlebar button left/right placement, r=dao
Differential Revision: https://phabricator.services.mozilla.com/D16466

--HG--
extra : moz-landing-system : lando
2019-01-18 13:52:29 +00:00
Mats Palmgren
9c04886e64 Bug 1520684 part 2 - [css-logical] Implement the flow-relative border-radius properties. r=emilio 2019-01-17 21:49:07 +01:00
Mats Palmgren
5890654480 Bug 1520684 part 1 - Add plumbing for handling physical/logical corner values. r=emilio 2019-01-17 21:49:07 +01:00
Mats Palmgren
e11d61d0d9 Bug 1520236 - [css-logical] Implement the border-{block,inline}-{color,style,width} shorthands. r=emilio 2019-01-17 20:02:41 +01:00
Martin Stransky
53be695239 Bug 1490344 - [Linux/Gtk] Enable hidden system titlebar by default on Gnome, r=dao
This patch implements -moz-gtk-csd-hide-titlebar-by-default media query
to check if the system titlebar should be disabled by default on Linux systems
(it's already disabled on Window/Mac).

It also removes explicit definition of browser.tabs.drawInTitlebar preference on Linux.
When browser.tabs.drawInTitlebar is missing the -moz-gtk-csd-hide-titlebar-by-default
is used to obtain the titlebar state. When browser.tabs.drawInTitlebar is set
in about:config or by Customize menu, the user peference is used instead of the default.

It also fixes a -moz-gtk-csd-available media query,
it was always true regardless the actual system setting.

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

--HG--
extra : moz-landing-system : lando
2019-01-17 12:44:49 +00:00
Noemi Erli
d3bda31250 Backed out changeset 009cf5f885ba (bug 1520236) for multiple failures in logical-box-border-color-visited-link-002.html 2019-01-17 01:18:00 +02:00
Mats Palmgren
790c50dcf0 Bug 1520396 - [css-logical] Implement the border-block/border-inline shorthands. r=emilio 2019-01-16 19:26:15 +01:00
Mats Palmgren
1db6a31ac4 Bug 1520236 - [css-logical] Implement the border-{block,inline}-{color,style,width} shorthands. r=emilio 2019-01-16 19:26:15 +01:00
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
Emilio Cobos Álvarez
d3c8dea1ae Bug 1520229 - [css-logical] Implement the inset shorthand. r=mats
Reviewers: mats

Reviewed By: mats

Bug #: 1520229

Differential Revision: https://phabricator.services.mozilla.com/D16704
2019-01-20 18:32:11 +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
sharath
ba62a9414a Bug 1516221 - changes to implement enum class for #define NS_STYLE_COLOR_ADJUST. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D15284

--HG--
extra : moz-landing-system : lando
2018-12-24 15:28:11 +00:00
Cameron McCormack
99f949e5e4 Bug 1515533 - Bump smallvec and smallbitvec r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D15052

--HG--
extra : moz-landing-system : lando
2018-12-20 01:49:42 +00:00
Boris Chiou
87c7ed9b72 Bug 1512883 - Part 1: Clamp to non-negative value after doing interpolation for circle(), ellipse(), and inset(). r=emilio,birtles
Replace LengthOrPercentage with NonNegativeLengthOrPercentage on
ShapeRadius, Circle, Ellipse. And derive ToAnimatedValue for ShapeSource and
its related types, so we clamp its interpolated results into non-negative
values. (i.e. The radius of circle()/ellipse() and the border-radius of
inset().)

Note: We may get negative values when using a negative easing function, so the
clamp is necessary to avoid the incorrect result or any undefined behavior.

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

--HG--
extra : moz-landing-system : lando
2018-12-19 19:08:08 +00:00
Boris Chiou
5c91563dc1 Bug 1322780 - Part 3: Let logical height, block-size, accept keywords. r=emilio
We should let block-size/min-block-size/max-block-size accept keywords as the
initial value, just like width in vertical writing mode or height in horizontal
writing mode.

Depends on D7536

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

--HG--
extra : moz-landing-system : lando
2018-12-18 18:47:39 +00:00
Boris Chiou
c35f47093e Bug 1322780 - Part 2: Support unprefixed min-content and max-content. r=mats,emilio
Support unprefixed min-content and max-content and treat the prefixed
version as aliases for
1. width, min-width, max-width if inline-axis is horizontal, and
2. height, min-height, max-height if inline-axis is vertical, and
3. inline-size, min-inline-size, max-inline-size, and
4. flex-basis.

Besides, update the test cases to use unprefixed max-content and
min-content.

Depends on D7535

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

--HG--
extra : moz-landing-system : lando
2018-12-18 18:47:37 +00:00
Boris Chiou
17c2c5c3c4 Bug 1322780 - Part 1: Use cbindgen for ExtremumLength. r=emilio
ExtremumLength is the keyword type for css sizing properties, so we
could use cbindgen.

In Gecko, we use nsStyleCoord to store the sizing properties, and use
integer values to check the enum values, so I keep the macros in nsStyleConsts.
Even though we need to convert the enum type into integer, we still have
benefits to reduce the complexity of converting Rust into C++, and leave
the simplified mappings in C++ for better readability.

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

--HG--
extra : moz-landing-system : lando
2018-12-18 18:47:35 +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
d9fc919cd1 Bug 1514449 - Cleanup some conversion code dealing with NonNegative. r=boris,xidorn,#style
I'm about to introduce another use of it and I don't want to repeat the same
copy-pasta again.

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

--HG--
extra : moz-landing-system : lando
2018-12-16 09:13:49 +00:00
Emilio Cobos Álvarez
94522362b2 Bug 1513920 - Make <use> shadow trees lookup keyframe rules in the containing tree. r=heycam
The same thing we do for rule matching.

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

--HG--
extra : moz-landing-system : lando
2018-12-17 13:14:19 +00:00
Emilio Cobos Álvarez
a8df58f265 Bug 1514086 - The 'all' property is not animatable. r=hiro
Since it allows to animate display, which is not good.

This is a regression from:

  https://hg.mozilla.org/mozilla-central/rev/6884ba750aa3

Actually I wonder if the logic shouldn't be the other way around, i.e., a
shorthand is animatable if all the longhands are, not if just one.

In any case this rolls back to the previous behavior, should we do that, it
should be another bug.

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

--HG--
extra : moz-landing-system : lando
2018-12-15 22:48:37 +00:00
Daniel Holbert
1d4ecff2ef Bug 1501492: Enable CSS containment for frontend code. r=dbaron
Differential Revision: https://phabricator.services.mozilla.com/D9963

--HG--
extra : moz-landing-system : lando
2018-12-15 08:17:46 +00:00
Emilio Cobos Álvarez
5b2e5c9d79 Bug 1514439 - Fix tidy issues. 2018-12-15 03:55:44 +01:00
Shotaro Yamada
1f70d62e6e Bug 1514439 - Remove redundant .clone()s. r=emilio 2018-12-15 03:55:42 +01:00
Emilio Cobos Álvarez
2e85a22d15 Bug 1514439 - Fix formatting of inverse transform matrix. 2018-12-15 03:55:41 +01: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
Daniel Holbert
38e7aed189 Bug 1514309 part 1: Include the 'unsafe' keyword in serializations of css-align properties. r=emilio
Previously we'd omit it since it was merely an explicit way of requesting the
default behavior.  But the spec has changed such that it's not necessarily
equivalent to the default anymore:
https://drafts.csswg.org/css-align/#overflow-values

(Technically the behaviors are probably still equivalent in our implementation,
pending bug 1451380, but we don't have to publicize that via our
serialization.)

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

--HG--
extra : moz-landing-system : lando
2018-12-14 21:24:17 +00:00
Boris Zbarsky
5fda010a9b Bug 1514029. Fix serialization of explicitly case-sensitive attr selectors with a namespace. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D14493

--HG--
extra : moz-landing-system : lando
2018-12-13 23:25:08 +00:00
Cosmin Sabou
7e60b89bf0 Merge mozilla-central to autoland. 2018-12-13 06:00:52 +02:00
Emilio Cobos Álvarez
61a51a3800 Bug 1512026 - Handle nested slots correctly in slotted matching and invalidation. r=heycam
The patch and test should be pretty much self-descriptive.

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

--HG--
extra : moz-landing-system : lando
2018-12-13 02:17:53 +00: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
Boris Zbarsky
d3b02f9991 Bug 1512386. Add support for 's' flag on attribute selectors. r=emilio
We could keep using ParsedCaseSensitivity::CaseSensitive as a temporary stand-in
for "case-sensitive or maybe not depending on what HTML says" until we check the
attribute list, but it seems better to make that explicit.

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

--HG--
extra : moz-landing-system : lando
2018-12-10 22:24:49 +00:00
Emilio Cobos Álvarez
4591031b65 Bug 1513012 - Move overflow to use cbindgen. r=heycam
It's one of the most annoying / hacky mako bits we have.

Differential Revision: https://phabricator.services.mozilla.com/D14084
2018-12-11 03:07:08 +01:00
Emilio Cobos Álvarez
1bc5b6ea92 Bug 1513058 - Deduplicate a bit the malloc_size_of code for hashmaps / hashsets. r=heycam
This allows to experiment with other hash maps easily rather than
depending on what hashglobe::fake::HashMap dereferences to.

In particular I wrote it while trying to get a build working with hashbrown.

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

--HG--
extra : moz-landing-system : lando
2018-12-11 00:11:18 +00:00
Emilio Cobos Álvarez
0b0dd2d95f Bug 1512328 - Use cbindgen for a couple more CSS properties. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D13886
2018-12-07 15:06:07 -05:00
Bastien Orivel
e648c4dee9 Bug 1511811 - Update syn and related dependencies. r=emilio 2018-12-07 09:00:20 -05:00
Daniel Varga
860ad350dd Merge mozilla-central to autoland. a=merge
--HG--
extra : rebase_source : 8ee1e412347621306f50b7d0dd1d8121ddcd498e
2018-12-06 23:48:46 +02:00
Olli Pettay
1ceeb71b80 Bug 1512256 - Move FragmentOrElement::mAttrs to Element, r=ehsan 2018-12-06 15:58:40 +02: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
79ea897cf5 Bug 1511811 - Minor build fixup after the Servo crossbeam_channel update. 2018-12-03 08:48:25 -05:00
Bastien Orivel
87addfd044 Bug 1511811 - Update crossbeam-channel to 0.3.
Cherry-picks https://github.com/servo/servo/pull/22142
2018-12-03 08:48:15 -05:00
Emilio Cobos Álvarez
c11d6bcf14 Bug 1511811 - Update Servo's version of encoding_rs. 2018-12-03 08:47:30 -05:00
Paul Rouget
f17cf51bfd Bug 1511811 - Update mozjs and enable 'init_once' feature for Android.
Cherry-picks https://github.com/servo/servo/pull/22200
2018-12-03 08:47:06 -05:00
Emilio Cobos Álvarez
59e1f1e9ec Bug 1511811 - Rustfmt new changes to ensure Servo-tidy doesn't complain. 2018-12-03 08:45:08 -05:00
Emilio Cobos Álvarez
41f6c49a69 Bug 1511811 - Make page-break-* Gecko-only.
Servo doesn't support it.
2018-12-03 08:44:49 -05: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
ee324a2b68 Bug 1511811 - Minor build fixup after the Servo crossbeam_channel update. 2018-12-03 08:15:30 -05:00
Emilio Cobos Álvarez
9ba570d998 Bug 1511811 - Go back to bindgen 0.43 since I can't manage to make the tup build succeed. 2018-12-03 08:15:29 -05:00
Emilio Cobos Álvarez
bd99a5f577 Bug 1511811 - Fix formatting of inverse transform matrix to appease tidy. 2018-12-03 08:15:27 -05:00
Bastien Orivel
768dd101be Bug 1511811 - Update crossbeam-channel to 0.3.
Cherry-picks https://github.com/servo/servo/pull/22142
2018-12-03 08:15:26 -05:00
Emilio Cobos Álvarez
6461b805b2 Bug 1511811 - Update Servo's version of encoding_rs. 2018-12-03 08:15:24 -05:00
Paul Rouget
0faf4cc0c4 Bug 1511811 - Update mozjs and enable 'init_once' feature for Android.
Cherry-picks https://github.com/servo/servo/pull/22200
2018-12-03 08:15:23 -05:00
Emilio Cobos Álvarez
920bd15066 Bug 1511811 - Make page-break-* Gecko-only.
Servo doesn't support it.
2018-12-03 08:15:22 -05: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
Emilio Cobos Álvarez
f2451c8b17 Bug 1511811 - Rustfmt new changes to ensure Servo-tidy doesn't complain. 2018-12-03 08:15:19 -05:00
Bastien Orivel
d9cbef23e2 Bug 1511811 - Update syn and related dependencies. r=emilio 2018-12-03 08:15:15 -05:00
Emilio Cobos Álvarez
b54948124d Bug 1509717 - Use cbindgen for border-style and outline-style. r=heycam
I'm pretty sure the FIXME I left in the outline-style code is a bug,
but I want to clean this up further and I didn't want to fix it without adding
a test.

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

--HG--
extra : moz-landing-system : lando
2018-11-30 05:27:28 +00:00
Emilio Cobos Álvarez
31b0b0f833 Bug 1509717 - Move BorderStyle to border.rs. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D12858

--HG--
extra : moz-landing-system : lando
2018-11-30 05:16:52 +00:00
Emilio Cobos Álvarez
c279a94301 Bug 775618 - Implement page-break-{before,after} as legacy shorthands for {before,after}. r=heycam
This is all the style-system work needed for this.

This implements the concept of legacy shorthands, teaches tests to understand
it, and adds a few more tests for these properties in particular.

The WPT even caught a few WebKit / Blink bugs:

  https://bugs.chromium.org/p/chromium/issues/detail?id=906336
  https://bugs.webkit.org/show_bug.cgi?id=191803

This doesn't change the layout behavior for page-break-before: always, since
it'd stop breaking in multicol and such. Similarly, break-before / break-after:
column and page still behave the same, I'll file followups for those given
comment 22.

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

--HG--
extra : moz-landing-system : lando
2018-11-30 05:35:47 +00:00
Emilio Cobos Álvarez
cd451a8c96 Bug 775618 - Introduce the concept of legacy shorthands. r=heycam
We need this because there's a weird mapping between these properties' values
('always' maps to 'page').

See https://drafts.csswg.org/css-cascade-4/#legacy-shorthand.

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

--HG--
extra : moz-landing-system : lando
2018-11-20 04:39:36 +00:00
Emilio Cobos Álvarez
c76f00a8ad Bug 775618 - Introduce break-inside, and alias page-break-inside to it. r=heycam
This property has no weird value mapping, so we can just do this.

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

--HG--
extra : moz-landing-system : lando
2018-11-20 05:07:52 +00:00
Shubham Kumaram
b87c4f4c0c Bug 1509664 - Change Text Rendering constants to enum classes in nsStyleConsts.h. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D12839

--HG--
extra : moz-landing-system : lando
2018-11-30 05:08:46 +00:00
Emilio Cobos Álvarez
e119964c92 Bug 1510862 - Prevent exponential blowup of custom properties. r=jwatt
Put a hard cap on the value length instead of counting substitutions, because it
works best, see the comment.

Differential Revision: https://phabricator.services.mozilla.com/D13352
2018-11-29 12:14:01 +01:00
Dorel Luca
12d48b559b Backed out changeset 3e5ea9da2cbb (bug 1510862) for Linting failure. CLOSED TREE 2018-11-29 12:35:42 +02:00
Emilio Cobos Álvarez
6ae5fdab0a Bug 1510862 - Prevent exponential blowup of custom properties. r=jwatt
Put a hard cap on the value length instead of counting substitutions, because it
works best, see the comment.

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

--HG--
extra : moz-landing-system : lando
2018-11-29 10:16:38 +00: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
Emilio Cobos Álvarez
ef08f4f834 Bug 1509945 - Remove the display: -moz-box overrides display: -webkit-box hack. r=dholbert
display: -moz-box is no longer exposed to content so this is not necessary.

See bug 1407701 for context.

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

--HG--
extra : moz-landing-system : lando
2018-11-26 18:56:14 +00:00
Emilio Cobos Álvarez
9ed36d7ba6 Bug 1506547 - Align user-select behavior more with other UAs. r=mats
There's a few subtle behavior changes here, which I'll try to break down in the
commit message.

The biggest one is the EditableDescendantCount stuff going away. This
was added in bug 1181130, to prevent clicking on the non-editable div from
selecting the editable div inside. This is problematic for multiple reasons:

 * First, I don't think non-editable regions of an editable element should
   be user-select: all.

 * Second, it just doesn't work in Shadow DOM (the editable descendant count is
   not kept up-to-date when not in the uncomposed doc), so nested
   contenteditables behave differently inside vs. outside a Shadow Tree.

 * Third, I think it's user hostile to just entirely disable selection if you
   have a contenteditable descendant as a child of a user-select: all thing.

   WebKit behaves like this patch in the following test-case (though not Blink):

     https://crisal.io/tmp/user-select-all-contenteditable-descendant.html

   Edge doesn't seem to support user-select: all at all (no pun intended).

   But we don't allow to select anything at all which looks wrong.

 * Fourth, it's not tested at all (which explains how we broke it in Shadow DOM
   and not even notice...).

In any case I've verified that this doesn't regress the editor from that bug. If
this regresses anything we can fix it as outlined in the first bullet point
above, which should also make us more compatible with other UAs in that
test-case.

The other change is `all` not overriding everything else. So, something like:

  <div style="-webkit-user-select: all">All <div style="-webkit-user-select: none">None</div></div>

Totally ignores the -webkit-user-select: none declaration in Firefox before this
change. This doesn't match any other UA nor the spec, and this patch aligns us
with WebKit / Blink.

This in turn makes us not need -moz-text anymore, whose only purpose was to
avoid this.

This also fixes a variety of bugs uncovered by the previous changes, like the
SetIgnoreUserModify(false) call in editor being completely useless, since
presShell->SetCaretEnabled ended in nsCaret::SetVisible, which overrode it.

This in turn uncovered even more bugs, from bugs in the caret painting code,
like not checking -moz-user-modify on the right frame if you're the last frame
of a line, to even funnier bits where before this patch you show the caret but
can't write at all...

In any case, the new setup I came up with is that when you're editing (the
selection is focused on an editable node) moving the caret forces it to end up
in an editable node, thus jumping over non-editable ones.

This has the nice effect of not completely disabling selection of
-moz-user-select: all elements that have editable descendants (which was a very
ad-hoc hack for bug 1181130, and somewhat broken per the above), and also
not needing the -moz-user-select: all for non-editable bits in contenteditable.css
at all.

This also fixes issues with br-skipping like not being able to insert content in
the following test-case:

  <div contenteditable="true"><span contenteditable="false">xyz </span><br>editable</div>

If you start moving to the left from the second line, for example.

I think this yields way better behavior in all the relevant test-cases from bug
1181130 / bug 1109968 / bug 1132768, shouldn't cause any regression, and the
complexity is significantly reduced in some places.

There's still some other broken bits that this patch doesn't fix, but I'll file
follow-ups for those.

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

--HG--
extra : moz-landing-system : lando
2018-11-26 09:21:37 +00:00
Brindusan Cristian
31f0c21cca Backed out changeset 1575904619b5 (bug 1506547) for mochitest failures on test_reftests_with_caret.html. 2018-11-26 03:03:14 +02:00
Emilio Cobos Álvarez
b74c31e4d9 Bug 1506547 - Align user-select behavior more with other UAs. r=mats
There's a few subtle behavior changes here, which I'll try to break down in the
commit message.

The biggest one is the EditableDescendantCount stuff going away. This
was added in bug 1181130, to prevent clicking on the non-editable div from
selecting the editable div inside. This is problematic for multiple reasons:

 * First, I don't think non-editable regions of an editable element should
   be user-select: all.

 * Second, it just doesn't work in Shadow DOM (the editable descendant count is
   not kept up-to-date when not in the uncomposed doc), so nested
   contenteditables behave differently inside vs. outside a Shadow Tree.

 * Third, I think it's user hostile to just entirely disable selection if you
   have a contenteditable descendant as a child of a user-select: all thing.

   WebKit behaves like this patch in the following test-case (though not Blink):

     https://crisal.io/tmp/user-select-all-contenteditable-descendant.html

   Edge doesn't seem to support user-select: all at all (no pun intended).

   But we don't allow to select anything at all which looks wrong.

 * Fourth, it's not tested at all (which explains how we broke it in Shadow DOM
   and not even notice...).

In any case I've verified that this doesn't regress the editor from that bug. If
this regresses anything we can fix it as outlined in the first bullet point
above, which should also make us more compatible with other UAs in that
test-case.

The other change is `all` not overriding everything else. So, something like:

  <div style="-webkit-user-select: all">All <div style="-webkit-user-select: none">None</div></div>

Totally ignores the -webkit-user-select: none declaration in Firefox before this
change. This doesn't match any other UA nor the spec, and this patch aligns us
with WebKit / Blink.

This in turn makes us not need -moz-text anymore, whose only purpose was to
avoid this.

This also fixes a variety of bugs uncovered by the previous changes, like the
SetIgnoreUserModify(false) call in editor being completely useless, since
presShell->SetCaretEnabled ended in nsCaret::SetVisible, which overrode it.

This in turn uncovered even more bugs, from bugs in the caret painting code,
like not checking -moz-user-modify on the right frame if you're the last frame
of a line, to even funnier bits where before this patch you show the caret but
can't write at all...

In any case, the new setup I came up with is that when you're editing (the
selection is focused on an editable node) moving the caret forces it to end up
in an editable node, thus jumping over non-editable ones.

This has the nice effect of not completely disabling selection of
-moz-user-select: all elements that have editable descendants (which was a very
ad-hoc hack for bug 1181130, and somewhat broken per the above), and also
not needing the -moz-user-select: all for non-editable bits in contenteditable.css
at all.

This also fixes issues with br-skipping like not being able to insert content in
the following test-case:

  <div contenteditable="true"><span contenteditable="false">xyz </span><br>editable</div>

If you start moving to the left from the second line, for example.

I think this yields way better behavior in all the relevant test-cases from bug
1181130 / bug 1109968 / bug 1132768, shouldn't cause any regression, and the
complexity is significantly reduced in some places.

There's still some other broken bits that this patch doesn't fix, but I'll file
follow-ups for those.

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

--HG--
extra : moz-landing-system : lando
2018-11-25 20:01:07 +00:00
Margareta Eliza Balazs
876022232b Merge inbound to mozilla-central. a=merge 2018-11-22 11:21:21 +02:00
Coroiu Cristina
5b23f6f303 Merge mozilla-central to autoland a=merge 2018-11-22 06:33:06 +02:00
Hiroyuki Ikezoe
1c6d6276f9 Bug 1506988 - Set the important rule change flag when a newly important rule is inserted. r=birtles
Without this change an assertion checking IsInStyleRefresh() in
EffectCompositor::PostRestyleForAnimation will be hit when we call
FindAnimationsForCompositor from RestyleManager::DoProcessPendingRestyles
that will be introduced in a subsequent commit in this series.

I wrote a crash test which causes an assertion in KeyframeEffect::CanThrottle()
without the subsequent commit, but we need more work in display item stuff to
make the assertion won't happen (bug 1508466).

Depends on D12367

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

--HG--
extra : moz-landing-system : lando
2018-11-22 04:03:06 +00:00
Mats Palmgren
91372ff9f3 Bug 1507905 - Add -webkit-appearance:textarea and make that the default for <textarea> for compatibility with other UAs. r=jwatt 2018-11-21 22:05:20 +01: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
Andreea Pavel
72b0594cb8 Merge mozilla-inbound to mozilla-central. a=merge 2018-11-17 13:27:24 +02:00
Emilio Cobos Álvarez
77a61b05f9 Bug 1508026 - Cherry-pick some changes to malloc_size_of's Cargo.toml. 2018-11-17 10:01:59 +01:00
CYBAI
7433c9192b Bug 1508026 - Fix wrong spec link. r=emilio
This cherry-picks servo/servo#22172.
2018-11-17 10:01:31 +01:00
Emilio Cobos Álvarez
bdd6cb8f48 Bug 1508026 - Fix formatting. 2018-11-17 10:01:24 +01:00
Boris Chiou
e2fc919e91 Bug 1464791 - Add comments for the calculation of Procedure::Add on Scale and transform list. r=birtles
Add more comments to let people know the intention of the special case.

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

--HG--
extra : moz-landing-system : lando
2018-11-16 19:06:16 +00:00
Boris Chiou
727ec2b557 Bug 1424134 - Part 4: Expand the mako code of Matrix3D and move them into transform.rs. r=emilio
Although the methods of Matrix3D in animated_properties.mako.rs could be
simplified by mako, it's a little bit hard to read because they are far
from the usage and definition. Therefore, we move them to the definition of
computed::Matrix3D and expand the mako.

Depends on D11935

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

--HG--
extra : moz-landing-system : lando
2018-11-16 19:29:28 +00:00
Boris Chiou
2718fd0897 Bug 1424134 - Part 3: Implement ComputeSquaredDistance for individual transforms. r=birtles
We manually implement ComputeSquaredDistance for Translate, Rotate, and
Scale because we have to handle mismatch cases, and actually we don't
need to implement it for specified types.

Depends on D11934

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

--HG--
extra : moz-landing-system : lando
2018-11-16 18:58:41 +00:00
Boris Chiou
40a2db875c Bug 1424134 - Part 2: Move the animation code of transform into a different file. r=emilio
Basically, most of the animation code of transform don't need mako, so
we could move them into values/animated/transform.rs.

However, we still use mako to generate some code to make the methods of
Matrix3D simpler, so I still leave them in animated_properties.mako.rs.

Depends on D11933

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

--HG--
rename : servo/components/style/properties/helpers/animated_properties.mako.rs => servo/components/style/values/animated/transform.rs
extra : moz-landing-system : lando
2018-11-16 18:58:39 +00:00
Boris Chiou
a9d05e01da Bug 1424134 - Part 1: Factor the mako code out from transform functions. r=emilio
I'm trying to put all the mako code together, so we could move transform
code into a different file.

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

--HG--
extra : moz-landing-system : lando
2018-11-16 18:58:37 +00:00
Kristen Wright
f22175b197 Bug 1460439 - Conversion from NS_STYLE_BORDER_STYLE_* macro to StyleBorderStyle::* enum class r=emilio
Converted NS_STYLE_BORDER_STYLE_* consts to enum class. Updated corresponding values to enum class. reduced BCCornerInfo struct values to fit StyleBorderStyle values inside struct. Added defaults to switches that do not fully cover all instances of StyleBorderStyle.
2018-11-07 11:56:17 -08:00
Alex Gaynor
16b6cb470e Bug 1507498 - fixed an unused import warning; r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D12028

--HG--
extra : moz-landing-system : lando
2018-11-15 16:42:54 +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
Emilio Cobos Álvarez
e31725c66f Bug 1507311 - Make the serialization of the mask shorthand more compact. r=heycam
This helps to preserve the old longhand form when possible (mask used to be a
longhand), which will be relevant when we serialize this for the computed
value.

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

--HG--
extra : moz-landing-system : lando
2018-11-15 08:22:31 +00:00
Emilio Cobos Álvarez
96e9a73918 Bug 1507309 - Simplify background-repeat. r=heycam
This way we always serialize in the shortest form, and take less space.

This is useful because when serializing uncomputed values we'd like to compare
to the initial value to avoid serializing parts of a shorthand, but with the
existing implementation we would generate always a second keyword, which means
that we'll never match it.

This also matches Chrome and WebKit, incidentally, so I'm pretty confident the
behavior change when serializing specified style is web-compatible.

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

--HG--
extra : moz-landing-system : lando
2018-11-15 03:23:39 +00:00
Emilio Cobos Álvarez
d16b7e3e9a Bug 1507127 - Also move page-break-inside outside of mako. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D11876

--HG--
extra : moz-landing-system : lando
2018-11-15 08:16:23 +00:00
Emilio Cobos Álvarez
7cefd0df6a Bug 1507127 - Move the page-break-{before,after} properties to not use mako. r=heycam
And respect the computed value of `left` / `right` / etc.

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

--HG--
extra : moz-landing-system : lando
2018-11-15 08:15:13 +00:00
Timothy Guan-tin Chien
af2973ef61 Bug 1503019 - Part II, Remove dom.webcomponents.customelements.enabled pref r=smaug
This patch removes the following functions:

* nsContentUtils::IsCustomElementsEnabled()
* CustomElementRegistry::IsCustomElementEnabled(JSContext* aCx, JSObject* aObject)
* CustomElementRegistry::IsCustomElementEnabled(nsIDocument* aDoc)

and all references of the pref.

Depends on D11183

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

--HG--
extra : moz-landing-system : lando
2018-11-15 06:52:01 +00:00
Timothy Guan-tin Chien
2b5881e46b Bug 1503019 - Part I, Remove dom.webcomponents.shadowdom.enabled r=smaug
This patch removes the dom.webcomponents.shadowdom.enabled pref and all its
references, including the following functions:

* nsContentUtils::IsShadowDOMEnabled()
* nsIDocument::IsShadowDOMEnabled()
* nsDocument::IsShadowDOMEnabled(JSContext* aCx, JSObject* aGlobal)
* nsDocument::IsShadowDOMEnabled(const nsINode* aNode)
* nsTextNode::IsShadowDOMEnabled(JSContext* aCx, JSObject* aObject)

This function is renamed and updated to nsDocument::IsCallerChromeOrAddon():

* nsDocument::IsShadowDOMEnabledAndCallerIsChromeOrAddon(JSContext* aCx, JSObject* aObject)

I didn't change the tests that load Shadow DOM tests in an iframe, in the interest of keeping hg annotation history.

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

--HG--
extra : moz-landing-system : lando
2018-11-15 06:51:07 +00:00
Andreea Pavel
d51566f085 Backed out 2 changesets (bug 1503019) for failing crashtests at dom/base/crashtests/1505811.html on a CLOSED TREE
Backed out changeset 06b12fd41ff1 (bug 1503019)
Backed out changeset 7b845eac9dd7 (bug 1503019)
2018-11-15 01:52:30 +02:00
Andreea Pavel
9cabbb0b47 Merge mozilla-central to autoland. a=merge on a CLOSED TREE 2018-11-15 00:35:07 +02:00
Timothy Guan-tin Chien
c69315234b Bug 1503019 - Part II, Remove dom.webcomponents.customelements.enabled pref r=smaug
This patch removes the following functions:

* nsContentUtils::IsCustomElementsEnabled()
* CustomElementRegistry::IsCustomElementEnabled(JSContext* aCx, JSObject* aObject)
* CustomElementRegistry::IsCustomElementEnabled(nsIDocument* aDoc)

and all references of the pref.

Depends on D11183

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

--HG--
extra : moz-landing-system : lando
2018-11-14 19:37:42 +00:00
Timothy Guan-tin Chien
c0cc4f74e7 Bug 1503019 - Part I, Remove dom.webcomponents.shadowdom.enabled r=smaug
This patch removes the dom.webcomponents.shadowdom.enabled pref and all its
references, including the following functions:

* nsContentUtils::IsShadowDOMEnabled()
* nsIDocument::IsShadowDOMEnabled()
* nsDocument::IsShadowDOMEnabled(JSContext* aCx, JSObject* aGlobal)
* nsDocument::IsShadowDOMEnabled(const nsINode* aNode)
* nsTextNode::IsShadowDOMEnabled(JSContext* aCx, JSObject* aObject)

This function is renamed and updated to nsDocument::IsCallerChromeOrAddon():

* nsDocument::IsShadowDOMEnabledAndCallerIsChromeOrAddon(JSContext* aCx, JSObject* aObject)

I didn't change the tests that load Shadow DOM tests in an iframe, in the interest of keeping hg annotation history.

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

--HG--
extra : moz-landing-system : lando
2018-11-14 19:34:52 +00:00
Cameron McCormack
dd8df1647e Bug 1507050 - Store MediaFeatureDescription references as an index into the MEDIA_FEATURES array r=emilio
The current use of a static reference is incompatible with sharing style sheet data
across processes.

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

--HG--
extra : moz-landing-system : lando
2018-11-14 21:33:01 +00:00
Cameron McCormack
d3bc43cc8c Bug 1506760 - Store variable references with a boxed slice rather than a PrecomputedHashSet r=emilio
Once we've parsed the variable references, there is no need to keep an entire HashSet
object around, as all we do is iterate over the values.

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

--HG--
extra : moz-landing-system : lando
2018-11-13 12:51:05 +00:00
Boris Chiou
94b54b2b26 Bug 1504327 - Support keywords [x|y|z] on rotate. r=emilio
Update the parser and the serialization to support the keywords, [x|y|z].

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

--HG--
extra : moz-landing-system : lando
2018-11-13 18:37:14 +00:00
Emilio Cobos Álvarez
6ca25ecbe6 Bug 1499170 - Add an atom bit to know whether we're ascii lowercase. r=njn
And thus massively speed up ascii-case-insensitive atom comparisons when both
atoms are lowercase (which is the common case by far).

This removes almost all the slow selector-matching in this page, and it seems
an easier fix than storing the lowercased version of all class-names in quirks
mode in elements and selectors...

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

--HG--
extra : moz-landing-system : lando
2018-11-13 12:47:40 +00:00
Cosmin Sabou
007b66c1f5 Merge mozilla-inbound to mozilla-central. a=merge 2018-11-13 06:23:01 +02:00
Boris Chiou
6e361a1a9a Bug 1505200 - Part 3: Parse any order of number and angle for Rotate. r=emilio
Rotate accepts rotate axis and angle in any order
(i.e. <number>{3} <angle> or <angle> <number>{3}), so we rewrite the
parser.

Depends on D11401

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

--HG--
extra : moz-landing-system : lando
2018-11-12 19:21:32 +00:00
Boris Chiou
5f3b39da88 Bug 1505200 - Part 1: Rewrite the interpolation of Rotate to return correct type. r=birtles
The original implementation always returns Rotate::Rotate3D, but it is
not correct, so we have to rewrite it:
1. If both from value and to value are none, we don't have to convert it
   into identity value, so just return None.
2. If one of the value is none, we replace it with an identity value based on
   the other one's rotate axis.
3. If we only have 2D rotation, we just animate the <angle>.
4. Otherwise, we do interpolation by 3D rotation.

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

--HG--
extra : moz-landing-system : lando
2018-11-12 23:17:19 +00:00
Emilio Cobos Álvarez
bea44aa4f6 Bug 1473184: Remove serialize_basicshape_position. r=xidorn
Per https://github.com/w3c/csswg-drafts/issues/2274. There's a whole lot of new failures, but those need to be updated along with the spec changes in that issue.

We did resolve that position serialized the same everywhere though.

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

--HG--
extra : moz-landing-system : lando
2018-11-12 09:21:17 +00:00
Emilio Cobos Álvarez
f8ed926bb3 Bug 1506391 - Manually extinguish multi-line use statements. 2018-11-11 02:40:30 +01:00
Emilio Cobos Álvarez
652ee99c60 Bug 1506391 - Revert try -> r#try change.
Since we're in an inconsistent state because mako files weren't updated, and
it's really ugly.
2018-11-11 02:40:28 +01:00
Emilio Cobos Álvarez
58166142d5 Bug 1506391 - cargo fix on the merged changes + formatting. 2018-11-11 02:40:26 +01:00
Simon Sapin
f7c7465ccb Bug 1506391 - cargo fix --edition --features gecko. r=emilio 2018-11-11 02:40:24 +01:00
Simon Sapin
4f9e2bcf36 Bug 1506391 - cargo fix --edition. r=emilio 2018-11-11 02:40:21 +01:00
Simon Sapin
078d2c6545 Bug 1506391 - Use 2018-style paths in code generated by Mako. r=emilio 2018-11-11 02:40:19 +01:00
Simon Sapin
271e888fb3 Bug 1506391 - Use 2018-style paths in code generated by style_derive. r=emilio 2018-11-11 02:40:17 +01:00
Brindusan Cristian
d67cc09fb1 Backed out 7 changesets (bug 1506391) for Btup bustages.
Backed out changeset b8216171101c (bug 1506391)
Backed out changeset 03d2309b737d (bug 1506391)
Backed out changeset 7b63f3149852 (bug 1506391)
Backed out changeset be88680421db (bug 1506391)
Backed out changeset 3840ce1ebfb0 (bug 1506391)
Backed out changeset 94517e21621c (bug 1506391)
Backed out changeset 32bde6f52a32 (bug 1506391)
2018-11-11 01:08:20 +02:00
Emilio Cobos Álvarez
e8ce491b80 Bug 1506391 - Manually extinguish multi-line use statements. 2018-11-10 21:41:50 +01:00
Emilio Cobos Álvarez
e9e41c8b89 Bug 1506391 - Revert try -> r#try change.
Since we're in an inconsistent state because mako files weren't updated, and
it's really ugly.
2018-11-10 21:41:38 +01:00
Emilio Cobos Álvarez
1524f0c8ba Bug 1506391 - cargo fix on the merged changes + formatting. 2018-11-10 21:14:24 +01:00
Simon Sapin
c584ac16a7 Bug 1506391 - cargo fix --edition --features gecko. r=emilio 2018-11-10 21:14:15 +01:00
Simon Sapin
10fbe4919b Bug 1506391 - cargo fix --edition. r=emilio 2018-11-10 21:14:05 +01:00
Simon Sapin
81f4b86edb Bug 1506391 - Use 2018-style paths in code generated by Mako. r=emilio 2018-11-10 21:13:57 +01:00
Simon Sapin
1f69b0da92 Bug 1506391 - Use 2018-style paths in code generated by style_derive. r=emilio 2018-11-10 21:13:12 +01:00
Cosmin Sabou
00f29cfcf6 Merge mozilla-central to mozilla-inbound. 2018-11-10 13:51:14 +02:00
Boris Chiou
a2c42ba3de Bug 1505156 - Percentage values of translate are serialized as percent for computed values. r=emilio
Basically, we rewrite the type of generics::transform::Translate and its
ToCss to match the spec. Besides, we always serialize Translate by servo,
so we could drop a lot of duplicated code.

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

--HG--
extra : moz-landing-system : lando
2018-11-08 22:41:00 +00:00
Emilio Cobos Álvarez
a404004f99 No bug - Remove outdated comment.
DONTBUILD, comment only.
2018-11-14 12:15:38 +01:00
Razvan Maries
a1dd45dddc Merge mozilla-central to mozilla-inbound. a=merge on a CLOSED TREE 2018-11-12 19:22:31 +02:00
Emilio Cobos Álvarez
cbc11eb6a3 Bug 1492958 - Allow user-select: -moz-text on user-agent stylesheets only. r=mats
It's only used in contenteditable.css, and same usage in comm-central. That
sheet is loaded as a ua sheet so let's restrict it to that. No relevant
external usage either. This value was introduced in bug 1181130.

Differential Revision: https://phabricator.services.mozilla.com/D11584
2018-11-12 13:47:44 +01:00
Emilio Cobos Álvarez
e7cb518669 Bug 1492958 - Remove user-select: -moz-all. r=mats
It's an attempt of an alias to `all`, except it doesn't get handled in all
places.

Seems unused both in comm-central and mozilla-central, and all external usage I
could find is followed by -webkit-user-select: all.

Differential Revision: https://phabricator.services.mozilla.com/D11582
2018-11-12 13:47:41 +01:00
Emilio Cobos Álvarez
318ef24ef6 Bug 1492958 - Remove unimplemented values of the user-select property. r=mats
Can't believe we literally had no code to handle them.

Differential Revision: https://phabricator.services.mozilla.com/D11581
2018-11-12 13:47:40 +01:00
Emilio Cobos Álvarez
33b3044c08 Bug 1492958 - Move user-select outside of mako. r=xidorn
This is the first step to unprefix user-select.

This has no behavior change, it's just a nicer way to do the same thing which
allows us to unship individual values more easily using parse(condition).

Differential Revision: https://phabricator.services.mozilla.com/D11580
2018-11-12 13:46:52 +01:00
Margareta Eliza Balazs
cccd9d1083 Backed out 5 changesets (bug 1492958) for bc failures in browser/base/content/test/static/browser_parsable_css.js CLOSED TREE
Backed out changeset d7c8793ee054 (bug 1492958)
Backed out changeset e59edfbbd327 (bug 1492958)
Backed out changeset 5e643bc2e17b (bug 1492958)
Backed out changeset 59cf251c1a59 (bug 1492958)
Backed out changeset edc955448df6 (bug 1492958)
2018-11-12 14:36:43 +02:00
Emilio Cobos Álvarez
3825f8f77b Bug 1492958 - Allow user-select: -moz-text on user-agent stylesheets only. r=mats
It's only used in contenteditable.css, and same usage in comm-central. That
sheet is loaded as a ua sheet so let's restrict it to that. No relevant
external usage either. This value was introduced in bug 1181130.

Differential Revision: https://phabricator.services.mozilla.com/D11584
2018-11-12 11:51:51 +01:00
Emilio Cobos Álvarez
740de114a9 Bug 1492958 - Remove user-select: -moz-all. r=mats
It's an attempt of an alias to `all`, except it doesn't get handled in all
places.

Seems unused both in comm-central and mozilla-central, and all external usage I
could find is followed by -webkit-user-select: all.

Differential Revision: https://phabricator.services.mozilla.com/D11582
2018-11-12 11:51:50 +01:00
Emilio Cobos Álvarez
e0b5a6ba3e Bug 1492958 - Remove unimplemented values of the user-select property. r=mats
Can't believe we literally had no code to handle them.

Differential Revision: https://phabricator.services.mozilla.com/D11581
2018-11-12 11:51:48 +01:00
Emilio Cobos Álvarez
47eb45a0b5 Bug 1492958 - Move user-select outside of mako. r=xidorn
This is the first step to unprefix user-select.

This has no behavior change, it's just a nicer way to do the same thing which
allows us to unship individual values more easily using parse(condition).

Differential Revision: https://phabricator.services.mozilla.com/D11580
2018-11-12 11:51:46 +01:00
Emilio Cobos Álvarez
c316a1e452 No bug - Remove outdated comment. 2018-11-12 11:51:44 +01:00
Emilio Cobos Álvarez
03ce7b0699 Bug 1392185 - Remove dynamic HTML5 atoms. r=njn,hsivonen
This is a rebase + manual refcounting on some places, + cleanup of the original
patch in the bug.

Co-authored-by: Nicholas Nethercote <nnethercote@mozilla.com>

Differential Revision: https://phabricator.services.mozilla.com/D11035
2018-11-09 14:45:30 +01:00
Gurzau Raul
ff7bbb9936 Merge mozilla-central to inbound. a=merge CLOSED TREE
--HG--
rename : dom/media/ipc/RemoteVideoDecoder.cpp => dom/media/ipc/GpuDecoderModule.cpp
rename : dom/media/ipc/RemoteVideoDecoder.h => dom/media/ipc/GpuDecoderModule.h
extra : rebase_source : 0503e2d45fffafb1e8dd1ddcd2115af2778a5c66
2018-11-09 07:46:56 +02:00
Mats Palmgren
754a89bb89 Bug 1501506 - Add -webkit-appearance:progress-bar and make that the default for <progress> for compatibility with other UAs. r=jwatt
Keep our old 'progressbar' as an alias for now, but unship
'progresschunk' by restricting it to UA/chrome sheets only.
Unship 'progresschunk-vertical' by removing it since it's
not used internally for anything.
2018-11-09 04:25:56 +01:00
Mats Palmgren
2882783137 Bug 1501483 - Add -webkit-appearance:meter and make that the default for <meter> for compatibility with other UAs. r=jwatt
Keep our old value 'meterbar' as an alias for now, but unship 'meterchunk'
by restricting it to UA/chrome sheets only.
2018-11-09 04:25:56 +01:00
Emilio Cobos Álvarez
4a4b56f77f Bug 1505565 - Split up push_applicable_declarations. r=heycam
Introduce RuleCollector, which contains all the state we need during the
cascade, and allows to reuse a bit of code.

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

--HG--
extra : moz-landing-system : lando
2018-11-08 23:07:40 +00:00
Emilio Cobos Álvarez
b96f400afd Bug 1505816 - Cleanup text-align. r=heycam
Use derive(FromPrimitive) instead.

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

--HG--
extra : moz-landing-system : lando
2018-11-08 22:57:18 +00:00