Commit graph

127 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
0b67b218d0
style: Add a new Timer structure to the shared style context, and basic infrastructure for controlling animations. 2016-07-20 09:05:53 -07:00
Simon Sapin
6d0e48f6cc Remove some type aliases that are now just re-exports. 2016-07-20 08:42:47 +02:00
Simon Sapin
5c70dfab01 Have a concrete SelectorImpl type everywhere in the style crate.
It is conditionally compiled to one implementation or the other
(Gecko or Servo) with `#[cfg(…)]`.
2016-07-20 08:42:46 +02:00
Simon Sapin
b2a7e44373 Move ServoSelectorImpl to a dedicated module. 2016-07-20 08:40:53 +02:00
Simon Sapin
2f967893f3 Move geckolib/selector_impl.rs -> style/gecko_selector_impl.rs 2016-07-20 08:40:49 +02:00
Simon Sapin
db3607471f Move geckolib/properties.mako.rs to style/properties/gecko.mako.rs 2016-07-20 08:40:22 +02:00
Simon Sapin
2c1f7c8a85 Move geckolib/values.rs to style/gecko_values.rs 2016-07-20 08:33:52 +02:00
Manish Goregaokar
704d7a01c9
Handle Calc refcounting 2016-07-19 11:29:11 +05:30
Manish Goregaokar
67bcb96cea
Add glue for calc values 2016-07-19 11:29:07 +05:30
Manish Goregaokar
3ead9cc67b Improve mach clippy, add plugins to style/util 2016-07-12 19:59:58 +05:30
Ms2ger
9f13278b77 Move arc_ptr_eq to style. 2016-07-11 12:13:12 +02:00
Ms2ger
8dd711d3db Move util::cache to style. 2016-07-08 16:44:47 +02:00
Anthony Ramine
8ecb5962f3 Move util::str to style 2016-07-05 10:43:54 +02:00
Anthony Ramine
744b94346a Move util::tid to style 2016-07-05 10:36:38 +02:00
Anthony Ramine
bf34fdde1f Move util::workqueue to style 2016-07-04 21:56:09 +02:00
Anthony Ramine
a5b524d559 Move util::vec::ForgetfulSink to style::sink and simplify it 2016-07-04 16:48:14 +02:00
Emilio Cobos Álvarez
c1fd7432e9
style: Add @keyframe rule parsing. 2016-06-28 15:09:53 +00:00
Simon Sapin
3932a82a2c Replace usage of discriminant_value in viewport.rs 2016-06-28 06:47:57 +02:00
bors-servo
3809e4a23d Auto merge of #11834 - servo:style-docs, r=SimonSapin
Add some documentation to the style crate.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11834)
<!-- Reviewable:end -->
2016-06-27 17:14:55 -05:00
Ms2ger
79e0d18a1d Add some documentation to the style crate. 2016-06-27 17:33:14 +02:00
Simon Sapin
f7f81e0ed0 Use our copy of RefCell for style data.
This allows removing `#![feature(as_unsafe_cell)]` in geckolib
and make progress towards #11815.
2016-06-23 16:13:49 +02:00
Simon Sapin
00b6210519 Make the style crate almost build on stable Rust.
`discriminant_value` will need to be replaced with something else later.
2016-06-22 15:44:13 +02:00
Cameron McCormack
6d67aa8a01 Pass Gecko sheet base/referrer/principal from Servo_StylesheetFromUTF8Bytes through ParserContext. 2016-05-24 12:12:17 +10:00
bors-servo
0a3a50a129 Auto merge of #10706 - zwn:unused-extern-crates, r=nox
Turn on unused-extern-crates warning.

As discussed in #9256. It should solve second half of the issue.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10706)
<!-- Reviewable:end -->
2016-04-22 13:40:38 -07:00
Zbynek Winkler
b021874ba0 Silence unused-extern-crates false positives.
Added #[allow(unused_extern_crates)] to silence false positives

 * bitflags, lazy_static and matches because macro_use
 * alloc_jemalloc because builtin crate

See https://github.com/rust-lang/rust/issues/30849
2016-04-22 22:20:05 +02:00
Ms2ger
0f2b83ca0f Use num-traits in style. 2016-04-20 15:11:41 +02:00
Bobby Holley
3c44dbae21 Add a skeleton implementation of TComputedValues in geckolib. 2016-03-24 11:50:58 -07:00
Ms2ger
08083f1c9d Deny unsafe code in more crates. 2016-03-18 14:43:03 +01:00
Suvish Varghese Thoovamalayil
de68820e76 Remove unused cell_extras feature gates. Fixes #9912 2016-03-08 16:56:13 +05:30
Anthony Ramine
db8d502f41 Move util::logical_geometry to style 2016-02-18 10:17:13 +01:00
Anthony Ramine
09f865919d Move util::bezier to style 2016-02-14 19:45:24 +01:00
Emilio Cobos Álvarez
dd503dfacb Refactor style to be completely backend-independent
This commit refactors the style crate to be completely independent of
the actual implementation and pseudo-elements supported.

This also adds a gecko backend which introduces parsing for the
anonymous box pseudo-elements[1], although there's still no way of
querying them.

https://mxr.mozilla.org/mozilla-central/source/layout/style/nsCSSAnonBoxList.h
2016-02-13 16:05:14 +01:00
Anthony Ramine
cb5cd8d881 Say farewell to in-tree HeapSizeOf 2016-02-04 22:03:32 +01:00
Emilio Cobos Álvarez
a1c830f1c1 Update rust-selectors
This commits updates rust-selectors to use the generic parser, and as
such it moves the element state into the style crate.
2016-02-03 02:11:31 +01:00
Simon Sapin
6fd46b5e6a Update cssparser.
https://github.com/servo/rust-cssparser/pull/91
2016-01-21 17:58:03 +01:00
bors-servo
77d3fbcca3 Auto merge of #9284 - bholley:bootstrap_stylo, r=SimonSapin
Add Partial Implementation of style DOM traits for Gecko, and some basic glue to let Gecko call into Servo

The wrapper stuff is partially-complete, modulo some unimplemented methods. The glue code is just a toy for now. Regardless, I think it's worth getting some of this stuff in-tree to minimize breakage.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9284)
<!-- Reviewable:end -->
2016-01-19 14:19:10 +05:30
Lars Bergstrom
8a0175c041 Remove deny_unsafe, due to introduction of unsafe code in thread_local expansion 2016-01-15 07:18:01 -06:00
Bobby Holley
77b1027646 Hoist style() and unstyle() into TNode. 2016-01-12 13:16:05 -08:00
Bobby Holley
384cdfcfff Hoist ParseErrorReporter into style and remove the dependency on msg.
The pipeline id stuff is currently unused. If someone needs it, they can add
an additional trait bound on their css error reporter to get the pipeline id.
2016-01-11 18:01:48 -08:00
Bobby Holley
136c0938a2 Hoist the style parts of sequential.rs into style/. 2016-01-06 19:21:11 -08:00
Bobby Holley
60b3c66b28 Hoist the style parts of parallel.rs into style/. 2016-01-06 19:21:07 -08:00
Bobby Holley
f9a02f0aba Hoist the style parts of traversal.rs into style/. 2016-01-06 18:50:16 -08:00
Bobby Holley
513a75d86a Hoist the rest of css/matching.rs into style/. 2016-01-04 09:41:31 -08:00
Ms2ger
2fa45aa064 Deny unsafe code in style. 2015-12-30 14:46:35 +01:00
Bobby Holley
a05d7f1dfd Hoist style-related context bits into style/.
We do a few things-here:
* Hoist non-layout-dependent fields in SharedLayoutData and LocalLayoutData into style/.
* Hoist parts of css/matching.rs into style/.
* Hoist parts of layout/animation.rs into style/animation.rs.
* Remove the duplicated-but-slightly-different definition of OpaqueNode.
2015-12-29 12:07:07 -08:00
Bobby Holley
47059d2d26 Separate style+layout and layout-specific wrapper functionality.
This patch does a number of things, unfortunately all at once:
* Hoists a large subset of the layout wrapper functionality into the style system.
* Merges TElementAttributes into the newly-created TElement.
* Reorganizes LayoutData by style vs layout, and removes LayoutDataShared.
* Simplifies the API for borrowing style/layout data.

There's still more to do to make the style system usable standalone, but
this is a good start.
2015-12-29 11:50:03 -08:00
GauriGNaik
fc81276c8e Add pipeline information to CSS error reporting. 2015-12-14 11:18:30 -05:00
Tetsuharu OHZEKI
e8c12c1c6d Fix warnings: Use Vec.extend_from_slice instead of Vec.push_all 2015-12-10 16:49:29 -05:00
Guillaume Gomez
6e7de62b38 Add check up on extern crate order and sort extern crates alphabetically 2015-11-28 03:11:08 +01:00
Alan Jeffrey
3dec6edd10 Update string_cache to 0.2.
Updated string_cache, html5ever, xml5ever and selectors in Cargo.toml files and Cargo.lock.
Removed references to string_cache_plugin.
Import atom! and ns! from string_cache.
Replaced ns!("") by ns!().
Replaced ns!(XML) and co by ns!(xml) and co.
Replaced atom!(foo) by atom!("foo").
Replaced Atom::from_slice by Atom::from.
Replaced atom.as_slice() by &*atom.
2015-11-25 10:13:21 -06:00