2014-09-09 18:18:18 +04:00
|
|
|
[package]
|
|
|
|
|
|
|
|
name = "gfx"
|
|
|
|
version = "0.0.1"
|
|
|
|
authors = ["The Servo Project Developers"]
|
2016-07-14 19:33:18 +03:00
|
|
|
license = "MPL-2.0"
|
2016-03-03 23:07:14 +03:00
|
|
|
publish = false
|
2014-09-09 18:18:18 +04:00
|
|
|
|
|
|
|
[lib]
|
|
|
|
name = "gfx"
|
|
|
|
path = "lib.rs"
|
|
|
|
|
2015-08-04 07:40:35 +03:00
|
|
|
[dependencies]
|
2016-08-12 20:23:10 +03:00
|
|
|
app_units = "0.3"
|
2016-05-18 01:43:14 +03:00
|
|
|
bitflags = "0.7"
|
2016-08-21 04:04:17 +03:00
|
|
|
euclid = "0.10.1"
|
2015-08-04 07:40:35 +03:00
|
|
|
fnv = "1.0"
|
2016-08-23 03:20:19 +03:00
|
|
|
fontsan = {git = "https://github.com/servo/fontsan"}
|
2016-05-18 01:43:14 +03:00
|
|
|
gfx_traits = {path = "../gfx_traits"}
|
2015-09-30 00:37:11 +03:00
|
|
|
harfbuzz-sys = "0.1"
|
2016-02-13 16:20:41 +03:00
|
|
|
heapsize = "0.3.0"
|
2016-11-03 05:49:08 +03:00
|
|
|
heapsize_derive = "0.1"
|
2016-08-12 20:23:10 +03:00
|
|
|
ipc-channel = "0.5"
|
2016-05-03 02:48:45 +03:00
|
|
|
lazy_static = "0.2"
|
2015-11-27 08:17:00 +03:00
|
|
|
libc = "0.2"
|
2016-03-17 15:57:36 +03:00
|
|
|
log = "0.3.5"
|
2016-05-18 01:43:14 +03:00
|
|
|
msg = {path = "../msg"}
|
|
|
|
net_traits = {path = "../net_traits"}
|
2016-08-09 18:13:30 +03:00
|
|
|
ordered-float = "0.2.2"
|
2016-05-18 01:43:14 +03:00
|
|
|
plugins = {path = "../plugins"}
|
|
|
|
range = {path = "../range"}
|
2016-08-12 20:23:10 +03:00
|
|
|
serde = "0.8"
|
servo: Merge #14043 - Update to string-cache 0.3 (from servo:string-cache-up); r=nox
Previously, `string-cache` defined:
* An string-like `Atom` type,
* An `atom!("foo")` macro that expands to a value of that type, for a set of strings known at compile-time,
* A `struct Namespace(Atom);` type
* A `ns!(html)` macro that maps known prefixed to `Namespace` values with the corresponding namespace URL.
Adding a string to the static set required making a change to the `string-cache` crate.
With 0.3, the `Atom` type is now generic, with a type parameter that provides a set of static strings. We can have multiple such sets, defined in different crates. The `string_cache_codegen` crate, to be used in build scripts, generates code that defines such a set, a new atom type (a type alias for `Atom<_>` with the type parameter set), and an `atom!`-like macro.
The html5ever repository has a new `html5ever_atoms` crate that defines three such types: `Prefix`, `Namespace`, and `LocalName` (with respective `namespace_prefix!`, `namespace_url!`, and `local_name!` macros). It also defines the `ns!` macro like before.
This repository has a new `servo_atoms` crate in `components/atoms` that, for now, defines a single `Atom` type (and `atom!`) macro. (`servo_atoms::Atom` is defined as something like `type Atom = string_cache::Atom<ServoStaticStringSet>;`, so overall there’s now two types named `Atom`.)
In this PR, `servo_atoms::Atom` is used for everything else that was `string_cache::Atom` before. But more atom types can be defined as needed. Two reasons to do this are to auto-generate the set of static strings (I’m planning to do this for CSS property names, which is the motivation for this change), or to have the type system help us avoid mix up unrelated things (this is why we had a `Namespace` type ever before this change).
Introducing new types helped me find a bug: when creating a new attribute `dom::Element::set_style_attr`, would pass `Some(atom!("style"))` instead of `None` (now `Option<html5ever_atoms::Prefix>` instead of `Option<string_cache::Atom>`) to the `prefix` argument of `Attr::new`. I suppose the author of that code confused it with the `local_name` argument.
---
Note that Stylo is not affected by any of this. The `gecko_string_cache` module is unchanged, with a single `Atom` type. The `style` crate conditionally compiles `Prefix` and `LocalName` re-exports for that are both `gecko_string_cache::Atom` on stylo.
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).
<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Source-Repo: https://github.com/servo/servo
Source-Revision: 5b4cc9568dbd5c15e5d2fbc62719172f11566ffa
2016-11-03 19:19:44 +03:00
|
|
|
servo_atoms = {path = "../atoms"}
|
2016-12-15 03:48:42 +03:00
|
|
|
servo_geometry = {path = "../geometry"}
|
2016-11-18 00:34:47 +03:00
|
|
|
servo_url = {path = "../url"}
|
2016-10-10 04:12:38 +03:00
|
|
|
serde_derive = "0.8"
|
2015-08-04 07:40:35 +03:00
|
|
|
smallvec = "0.1"
|
2016-05-18 01:43:14 +03:00
|
|
|
style = {path = "../style"}
|
|
|
|
style_traits = {path = "../style_traits"}
|
2015-08-04 07:40:35 +03:00
|
|
|
time = "0.1.12"
|
2016-05-18 01:43:14 +03:00
|
|
|
unicode-script = {version = "0.1", features = ["harfbuzz"]}
|
2016-05-01 07:20:38 +03:00
|
|
|
xi-unicode = "0.0.1"
|
2016-04-27 01:46:37 +03:00
|
|
|
|
2016-06-27 17:47:34 +03:00
|
|
|
[dependencies.webrender_traits]
|
2016-08-18 21:30:12 +03:00
|
|
|
git = "https://github.com/servo/webrender"
|
2017-01-09 18:35:28 +03:00
|
|
|
default-features = false
|
2016-11-24 23:29:52 +03:00
|
|
|
features = ["serde_derive", "ipc"]
|
2016-06-27 17:47:34 +03:00
|
|
|
|
2016-04-27 01:46:37 +03:00
|
|
|
[target.'cfg(target_os = "macos")'.dependencies]
|
2016-05-21 03:58:23 +03:00
|
|
|
byteorder = "0.5"
|
2015-12-03 10:28:29 +03:00
|
|
|
core-foundation = "0.2"
|
2016-08-12 20:23:10 +03:00
|
|
|
core-graphics = "0.4"
|
|
|
|
core-text = "2.0"
|
2015-06-07 21:15:20 +03:00
|
|
|
|
2016-10-05 04:06:29 +03:00
|
|
|
[target.'cfg(any(target_os = "linux", target_os = "android"))'.dependencies]
|
2016-12-22 03:24:27 +03:00
|
|
|
freetype = "0.1.3"
|
2016-08-12 04:12:29 +03:00
|
|
|
servo-fontconfig = "0.2.1"
|
2015-06-07 21:15:20 +03:00
|
|
|
|
2016-04-27 01:46:37 +03:00
|
|
|
[target.'cfg(any(target_arch = "x86_64", target_arch = "aarch64"))'.dependencies]
|
|
|
|
simd = {git = "https://github.com/huonw/simd"}
|
2016-10-05 04:06:29 +03:00
|
|
|
|
|
|
|
[target.'cfg(target_os = "windows")'.dependencies]
|
2016-11-24 23:29:52 +03:00
|
|
|
dwrote = "0.1.1"
|