Anthony Ramine
bceecddb64
Update html5ever to 0.24
2019-09-27 17:43:37 +02:00
Simon Sapin
5c60023cb8
WebIDL codegen: Replace cmake with a single Python script
...
When playing around with Cargo’s new timing visualization:
https://internals.rust-lang.org/t/exploring-crate-graph-build-times-with-cargo-build-ztimings/10975/21
… I was surprised to see the `script` crate’s build script take 76 seconds.
I did not expect WebIDL bindings generation to be *that* computationally
intensive.
It turns out almost all of this time is overhead. The build script uses CMake
to generate bindings for each WebIDL file in parallel, but that causes a lot
of work to be repeated 366 times:
* Starting up a Python VM
* Importing (parts of) the Python standard library
* Importing ~16k lines of our Python code
* Recompiling the latter to bytecode, since we used `python -B` to disable
writing `.pyc` file
* Deserializing with `cPickle` and recreating in memory the results
of parsing all WebIDL files
----
This commit remove the use of CMake and cPickle for the `script` crate.
Instead, all WebIDL bindings generation is done sequentially
in a single Python process. This takes 2 to 3 seconds.
2019-09-27 13:53:19 +02:00
bors-servo
f12f6546a4
Auto merge of #24294 - servo:missing-feature, r=jdm
...
Fix error message for invalid combination of style crate feature flags
Instead of ``cannot find value `engine` in this scope`` https://github.com/servo/servo/issues/24284
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg " height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24294 )
<!-- Reviewable:end -->
2019-09-25 21:11:55 -04:00
Simon Sapin
36e53a39bf
Fix error message for invalid combination of style crate feature flags
...
Instead of ``cannot find value `engine` in this scope``
https://github.com/servo/servo/issues/24284
2019-09-25 18:29:52 +02:00
Simon Sapin
d69607064b
Upgrade to rustc 1.39.0-nightly (66bf391c3 2019-09-23)
2019-09-25 18:04:35 +02:00
Anthony Ramine
9cef3eee65
Uncomment more stuff related to box construction
2019-09-19 11:58:07 +02:00
Emilio Cobos Álvarez
cd3b0c23fa
style: Fix Servo build, and rustfmt recent changes.
2019-09-12 23:04:56 +02:00
Emilio Cobos Álvarez
9eaadc6860
style: Shutdown Servo's thread-pool in leak-checking builds, leak the atom table elsewhere.
...
Differential Revision: https://phabricator.services.mozilla.com/D44217
2019-09-12 22:34:16 +02:00
Michael Woerister
d54d1bcb17
style: Remove duplicated logic from stylo's Gecko wrapper.
...
Stylo's Gecko wrapper duplicated some logic from the C++ side so
that the Rust compiler would be able to optimize better. Now that
we have xLTO, this kind of manual inlining should not be neccessary
anymore.
Differential Revision: https://phabricator.services.mozilla.com/D43765
2019-09-12 22:34:16 +02:00
Boris Chiou
eb8195dfa4
style: Tweak the serialization of text-decoration.
...
We are trying to not serialize `text-decoration-line: none` if there are other
non-default values for the longhands.
Differential Revision: https://phabricator.services.mozilla.com/D44908
2019-09-12 22:34:16 +02:00
Cameron McCormack
3c2e4d1e98
style: Align the Rust and C++ representations of WritingMode.
...
Differential Revision: https://phabricator.services.mozilla.com/D44412
2019-09-12 22:34:16 +02:00
Emilio Cobos Álvarez
987a1eeb62
style: Use cbindgen for counters.
...
Differential Revision: https://phabricator.services.mozilla.com/D44403
2019-09-12 22:34:16 +02:00
Emilio Cobos Álvarez
3fcd23dcdf
style: Add a comment about a Send bound that may look confusing.
2019-09-12 22:34:16 +02:00
Emilio Cobos Álvarez
c7add81517
style: Account for user stylesheets for Shadow DOM invalidation.
...
Differential Revision: https://phabricator.services.mozilla.com/D43992
2019-09-12 22:34:16 +02:00
Boris Chiou
c3a3bd48d7
style: Support css use counters for unimplemented properties.
...
For developing properties, we will handle them in an other bug.
Besides, I use an iframe for the test because we create a use counter in
the constructor of Document, which use the prefs to decide what kind of
properties we want to record. So, in the test, we have to reload iframe
to make sure we re-create the document, so does the use counter, to make
sure the prefs work properly.
The two prefs affect the css use counters:
1. layout.css.use-counters.enabled: Allocate use counters, and record
non-custom properties.
2. layout.css.use-counters-unimplemented.enabled: Record all unimplmented
properties into the use counters.
If we disable layout.css.use-counters.enblaed, we don't create use counters
object, so layout.css.use-counters-unimplemented.enabled doesn't work,
either.
Differential Revision: https://phabricator.services.mozilla.com/D43860
2019-09-12 22:34:16 +02:00
Mats Palmgren
f7a87c49b1
style: [css-lists-3] Make 'none' invalid as a <counter-style> in counter()/counters().
...
CSSWG resolution:
https://github.com/w3c/csswg-drafts/issues/4163#issuecomment-521331100
Spec:
https://drafts.csswg.org/css-lists-3/#counter-functions
Differential Revision: https://phabricator.services.mozilla.com/D43893
2019-09-12 22:34:16 +02:00
Joel Olsson
1406ae7f39
style: Media Query - Enable single <number> and <number>/<number> for <aspect-ratio>.
...
Differential Revision: https://phabricator.services.mozilla.com/D41557
2019-09-12 22:34:16 +02:00
Emilio Cobos Álvarez
54ce45f3ee
style: Update cbindgen.
...
This cleans up the pattern of "Use a private dtor so that the helper functions
do the right thing" by enabling it everywhere using:
https://github.com/eqrion/cbindgen/pull/377
It also caught some uninitialized value issues.
I think they're mostly harmless since we zero-initialize our structs:
https://searchfox.org/mozilla-central/rev/325c1a707819602feff736f129cb36055ba6d94f/servo/components/style/properties/gecko.mako.rs#632
And since we override the clip rect, which is the other bit of code that was
failing to build with this change.
Differential Revision: https://phabricator.services.mozilla.com/D43491
2019-09-12 22:34:16 +02:00
Emilio Cobos Álvarez
b238698691
style: Use cbindgen for clip / -moz-image-region.
...
This also fixes some of the issues with -moz-image-region, where we just minted
an auto out of the blue.
Differential Revision: https://phabricator.services.mozilla.com/D43474
2019-09-12 22:34:16 +02:00
Emilio Cobos Álvarez
53cd37ce39
style: Remove old warning allow which is no longer relevant.
...
-moz-appearance uses cbindgen since a long time ago.
Differential Revision: https://phabricator.services.mozilla.com/D43472
2019-09-12 22:34:16 +02:00
Emilio Cobos Álvarez
b0f3a68a6c
style: Rustfmt declaration_block.rs.
...
Differential Revision: https://phabricator.services.mozilla.com/D43400
2019-09-12 22:34:16 +02:00
Emilio Cobos Álvarez
ee106992e1
style: Simplify -x-span property.
...
Differential Revision: https://phabricator.services.mozilla.com/D42914
2019-09-12 22:34:16 +02:00
Emilio Cobos Álvarez
432b417d98
style: Avoid manual paint-order glue code.
...
Differential Revision: https://phabricator.services.mozilla.com/D42913
2019-09-12 22:34:16 +02:00
Emilio Cobos Álvarez
14c7e133ad
style: Avoid some signed -> unsigned conversions for box-ordinal-group.
...
This is consistent with the `order` property anyhow, and allows to simplify some
code.
Negatives are still not parsed, but rust uses a similar representation for all
CSS <integer> values and so should C++.
Differential Revision: https://phabricator.services.mozilla.com/D42912
2019-09-12 22:34:16 +02:00
Emilio Cobos Álvarez
7c4dc9e797
style: Make font-variant-alternates use cbindgen.
...
Differential Revision: https://phabricator.services.mozilla.com/D42859
2019-09-12 22:34:16 +02:00
Emilio Cobos Álvarez
b8108eaa80
style: Remove unused impl_coord_copy.
...
Differential Revision: https://phabricator.services.mozilla.com/D42857
2019-09-12 22:34:16 +02:00
Mats Palmgren
dd5715d4f1
style: Remove display:-moz-inline-grid/-moz-inline-stack.
...
Differential Revision: https://phabricator.services.mozilla.com/D42552
2019-09-12 22:34:16 +02:00
Boris Chiou
d794c8527d
style: Clamp negative values for font-size-adjust animations.
...
Differential Revision: https://phabricator.services.mozilla.com/D42586
2019-09-12 22:07:45 +02:00
Emilio Cobos Álvarez
9404ac89b7
style: Don't clamp font-size calc() factors too early.
...
These two bugs (bug 1572738 and bug 1572451) are stylo regressions.
When font-family changes, we try to recompute the font-size with a length /
percentage combinations in case the generic family changes, so the user
preferences are kept.
When calc() is involved, we clamp to non-negative too early, via
NonNegativeLength::scale_by.
I think we should generally dump this "try to track font-size across calc()"
thingie, as as various comments note it is not quite perfect, and it's not clear
how it should work in presence of min()/max().
This patch fixes the issue and simplifies code a bit, I may consider removing
this altogether in a follow-up.
Differential Revision: https://phabricator.services.mozilla.com/D41776
2019-09-12 22:07:45 +02:00
Mats Palmgren
bff52ae4a1
style: Implement layout for 'display: flow-root list-item'.
...
Differential Revision: https://phabricator.services.mozilla.com/D42087
2019-09-12 22:07:45 +02:00
Anthony Ramine
4444c5a2ad
Import victor's layout system 🍷
2019-09-11 10:36:30 +02:00
Bastien Orivel
b6cddbebaa
Deduplicate parking_lot and friends by updating it to 0.9
2019-09-05 10:47:39 +02:00
Simon Sapin
98e4a53b72
Upgrade to rustc 1.39.0-nightly (f7af19c27 2019-08-15)
2019-08-23 08:23:21 +02:00
bors-servo
aa60077563
Auto merge of #23973 - emilio:gecko-sync, r=emilio,jdm
...
style: Sync changes from mozilla-central.
See each individual commit for details.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg " height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23973 )
<!-- Reviewable:end -->
2019-08-16 06:44:52 -04:00
Emilio Cobos Álvarez
4752110d53
Fix Servo build and unify display representation.
2019-08-15 17:11:08 +02:00
Emilio Cobos Álvarez
4d8fc4b8f7
style: Fix formatting of recent changes.
2019-08-15 17:02:37 +02:00
Emilio Cobos Álvarez
cea6966fd2
style: Fix Servo build.
2019-08-15 17:02:37 +02:00
Mats Palmgren
5949d42bf7
style: Implement 'display:block ruby'.
...
Differential Revision: https://phabricator.services.mozilla.com/D40211
2019-08-15 17:02:30 +02:00
Mats Palmgren
2d29e6edd4
style: Implement 'inline list-item' and 'inline flow-root list-item' values for the 'display' property.
...
Differential Revision: https://phabricator.services.mozilla.com/D39832
2019-08-15 17:02:23 +02:00
Mats Palmgren
07dad28e49
style: Hide some 'display' values in devtools auto-completion that we want to discourage authors from using.
...
Differential Revision: https://phabricator.services.mozilla.com/D39810
2019-08-15 17:02:17 +02:00
Mats Palmgren
a9814ccb82
style: Implement multi-keyword 'display' values for Gecko.
...
Differential Revision: https://phabricator.services.mozilla.com/D39764
2019-08-15 17:02:09 +02:00
Charlie Marlow
cf7b0e13b6
style: adding from-font support to text-underline-offset and text-decoration-thickness.
...
Differential Revision: https://phabricator.services.mozilla.com/D41476
2019-08-15 17:02:01 +02:00
Emilio Cobos Álvarez
566f1ea600
style: Use shortest serialization for computed text-emphasis-style too.
...
Differential Revision: https://phabricator.services.mozilla.com/D41513
2019-08-15 17:01:54 +02:00
Emilio Cobos Álvarez
0844439bb2
style: Adjust comment grammar as suggested by xidorn.
2019-08-15 17:01:47 +02:00
Emilio Cobos Álvarez
0c76998719
style: Remove now-incorrect comment.
2019-08-15 17:01:39 +02:00
Joel Olsson
6a3ef7e959
style: Enable font-size:xxx-large.
...
Differential Revision: https://phabricator.services.mozilla.com/D41240
2019-08-15 17:01:33 +02:00
Charlie Marlow
0d0f1fb69c
style: updating text-underline-offset to support ::first-line/first-letter/placeholder.
...
Differential Revision: https://phabricator.services.mozilla.com/D41227
2019-08-15 17:01:27 +02:00
Emilio Cobos Álvarez
a9e914e3f0
style: Undo last minute serialization change so that I can land it with tests.
2019-08-15 17:01:20 +02:00
Emilio Cobos Álvarez
7f02662770
style: Use cbindgen for text-emphasis-style.
...
I sent https://github.com/eqrion/cbindgen/pull/377 since I got sick of
copy-pasting the private default constructor stuff :)
Differential Revision: https://phabricator.services.mozilla.com/D41419
2019-08-15 17:01:14 +02:00
Emilio Cobos Álvarez
fa06241ab6
style: Simplify text-emphasis-style.
...
Differential Revision: https://phabricator.services.mozilla.com/D41418
2019-08-15 17:01:06 +02:00