Emilio Cobos Álvarez
059a50bba0
style: Remove some unused extern crate declarations now that style is in rust 2018.
...
This avoids some warnings.
2020-06-18 23:51:18 +02:00
Mike Hommey
07c1b39637
style: Convert GenerateServoCSSPropList.py to py3.
...
Differential Revision: https://phabricator.services.mozilla.com/D70308
2020-04-16 16:35:07 +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
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
ddb4e369dd
Stylo: replace product={gecko,servo} with engine={gecko,servo-2013,servo-2020}
...
Renaming the variable helped make sure I looked at every use.
2019-07-29 17:37:03 +02:00
Emilio Cobos Álvarez
66eae2fc81
style: Remove the ability to build Gecko without the bindgen feature.
...
This is not used for anything, as far as I can tell.
Differential Revision: https://phabricator.services.mozilla.com/D38584
2019-07-23 22:54:07 +02:00
Jan Andre Ikenmeyer
1d6fe65401
Update MPL license to https (part 4)
2018-11-19 14:47:27 +01:00
Pyfisch
cb07debcb6
Format remaining files
2018-11-06 22:30:31 +01:00
Bobby Holley
c99bcdd4b8
Run rustfmt on selectors, servo_arc, and style.
...
This was generated with:
./mach cargo fmt --package selectors &&
./mach cargo fmt --package servo_arc &&
./mach cargo fmt --package style
Using rustfmt 0.4.1-nightly (a4462d1 2018-03-26)
2018-04-10 17:35:15 -07:00
Anthony Ramine
3abc020744
Kill RUSTC_HAS_PR45225 🎉
2018-03-01 14:47:57 +01:00
Simon Sapin
890257ebc3
Check that 'style' is compiled in a supported configuration.
...
Provide an explanatory error message when the compilation would fail because of missing or duplicate items.
2017-12-10 02:58:31 +01:00
Simon Sapin
aaba33e56b
Fix Stylo tests to pass on both Stable and Nightly Rust.
...
This is on top of https://github.com/servo/servo/pull/19285 .
Rust Nightly has new enum memory layout optimizations:
https://github.com/rust-lang/rust/pull/45225
2017-11-21 12:24:08 +01:00
Matt Brubeck
c169f52b25
Use env::var_os to read paths from the environment
...
This avoids unnecessary UTF-8 validation on OsStrings that we just pass
back to the OS.
2017-10-20 09:03:21 -07:00
Paul Rouget
cd13888a1b
use cargo manifest path to find build.py script
2017-09-05 09:31:37 +02:00
Manish Goregaokar
2ebce54d75
Remove testing feature from style crate
2017-08-07 14:30:31 -07:00
bors-servo
a01ab9ad34
Auto merge of #16935 - servo:out-of-crate-bindings-tests, r=emilio
...
Move bindings tests out of the style crate
This cuts in almost half the time to run:
```
touch components/style/lib.rs
./mach test-stylo
```
<!-- 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/16935 )
<!-- Reviewable:end -->
2017-05-19 03:48:14 -05:00
Xidorn Quan
f123b26e6c
Move config info from build_gecko.rs to a toml file in gecko.
2017-05-19 11:08:35 +10:00
Simon Sapin
ee2794e966
Move bindings tests out of the style crate.
...
This cuts in almost half the time to run:
```
touch components/style/lib.rs
./mach test-stylo
```
2017-05-18 18:46:29 +02:00
Xidorn Quan
d44b904f08
Move python path into a lazy static.
2017-05-08 21:33:57 +10:00
Emilio Cobos Álvarez
a1930fc554
stylo: Add a build log mechanism.
...
MozReview-Commit-ID: 4Zo1EveUYkK
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-03-18 13:21:10 +01:00
Simon Sapin
2f996e34f5
Use ascii_case_insensitive_phf_map! in PropertyId::parse
2017-02-26 11:10:33 +01:00
Emilio Cobos Álvarez
14692bd26e
Bindgenup.
...
MozReview-Commit-ID: 7s0GsWaEjwe
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-01-25 10:42:44 +01:00
Ms2ger
14fe337866
Update rustc to 1.16.0-nightly (7821a9b99 2017-01-23).
2017-01-24 11:02:51 +01:00
Xidorn Quan
1cefd1bef0
Do build-time bindgen
...
Majority of build_gecko.rs is just the straightforward conversion from
regen.py. There are two differences that:
1. Side in whitelist is changed to mozilla::Side
2. std::atomic__My_base is added to opaque types for Windows
2016-12-10 00:33:41 -10:00
Simon Sapin
fdc40592de
Use rust-phf to map strings to property IDs
2016-12-09 10:56:23 -10:00
Manish Goregaokar
919bf17e51
Run style with all properties enabled
2016-09-23 15:10:40 +05:30
Xidorn Quan
6389107e19
Detect python2.7.exe on windows
...
Latest python2 package on msys2 installs the executable file to
python2.7.exe rather than python27.exe.
2016-07-08 18:50:59 +10:00
Matt Brubeck
65e6938291
Explicitly list inputs to the style crate's build script
...
This avoids unncessary build script runs caused by changes to unrelated files.
2016-05-11 10:46:33 -07:00
Simon Sapin
2d8c17e600
Extract some Python code from properties.mako.rs into a separate file.
2016-04-20 15:30:27 +02:00
Simon Sapin
7787b21e30
Move Mako-related files into a new sub-directory.
...
There’s gonna be more of them.
2016-04-20 14:49:27 +02:00
Simon Sapin
b7eb720c74
Merge list_properties.py into build_properties_rs.py
2016-04-20 14:41:42 +02:00
Per Lundberg
8815bb9594
Extracted Mako compilation to separate .py files.
...
This breaks out some of the parts on #10586 , that should be easily mergeable. The idea would be to let you review & merge it first, and then I'll complete the other PR rebase off of this stuff.
2016-04-14 23:26:04 +03:00
Simon Sapin
d1c09bc84c
Work around a Mako bug on Windows
...
http://logs.glob.uno/?c=mozilla%23servo#c403766
https://i.imgur.com/j5Zv4LX.png
https://bitbucket.org/zzzeek/mako/issues/150/line-ending-handling-broken-on-win32
2016-04-11 21:11:55 +02:00
Bobby Holley
4861d5add8
Add some machinery to allow us to disable CSS properties (or a subset of values for a property) on a per-product basis.
2016-04-07 16:31:31 -07:00
Vladimir Vukicevic
77aea599c7
win32: look for python.exe and variants on win32 in style/build.rs
2016-01-20 08:38:23 -06:00
Johann Tuffe
ec07178b6f
sort all uses
2015-08-20 20:47:12 +08:00
Simon Sapin
1033886409
Fix CSSStyleDeclaration.setPropertyPriority
...
Before, it was a complicated no-op. (`parse_style_attribute` expects
input like `a: b; c: d;`, when given just a name it return an empty
vector.)
2015-07-31 08:08:36 +02:00
Simon Sapin
1094ce202c
Show Mako template errors on the console
2015-07-31 08:08:36 +02:00
Patrick Walton
5d8b213201
layout: Outline the individual property cascading functions to reduce
...
I-cache footprint.
Reduces the size of `properties::cascade` from over 100K of code to
under 5K. Due to the improved I-cache utilization, improves ARM scaling
on 4 cores by 15%.
2015-07-06 12:42:31 -07:00
Corey Farwell
8e3f4bba85
Reduce max line length from 150 to 120 characters
...
Part of https://github.com/servo/servo/issues/6041
2015-05-24 00:01:49 -04:00
Simon Sapin
ef8edd4e87
Upgrade to rustc 551a74dddd84cf01440ee84148ebd18bc68bd7c8.
2015-05-05 10:07:34 -04:00
Simon Sapin
fef279a8f5
Fix build scripts warnings.
2015-03-18 21:53:48 +01:00
Ms2ger
5f15eb5fbf
Upgrade rustc to d3c49d2140fc65e8bb7d7cf25bfe74dda6ce5ecf/rustc-1.0.0-dev.
2015-03-18 13:18:31 -04:00
Simon Sapin
d5dd1d658e
Upgrade to rustc ba2f13ef0 2015-02-04
2015-02-11 14:48:34 -08:00
Simon Sapin
6e95bd8e50
style::properties : move generated file out of source tree, use new-style Cargo build script.
2015-01-30 15:08:30 +01:00