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

12393 Коммитов

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