Commit graph

31 commits

Author SHA1 Message Date
Ms2ger
fe6b0b845d Remove unused dependency on util from geckolib. 2016-08-23 09:05:17 +02:00
Simon Sapin
fdb2071b2d Update to selectors 0.8.2 2016-08-09 18:18:38 +02:00
Emilio Cobos Álvarez
27b2bad256
stylo: Fix and ensure alignment of restyle hints. Test it on Travis.
Turns out eRestyle_LaterSiblings was not really matching, sigh...
2016-08-03 15:18:32 -07:00
Emilio Cobos Álvarez
611e611215
style: Rewrite the restyle hints code to allow different kinds of element snapshots, and use it for Gecko.
This is a rewrite for how style interfaces with its consumers in order to allow
different representations for an element snapshot.

This also changes the requirements of an element snapshot, requiring them to
only implement MatchAttr, instead of MatchAttrGeneric. This is important for
stylo since implementing MatchAttrGeneric is way more difficult for us given the
atom limitations. This also allows for more performant implementations in the
Gecko side of things.
2016-07-21 14:24:04 -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
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
bors-servo
4a5a0a417b Auto merge of #12339 - emilio:stylo-node-dirtying, r=heycam
stylo: Implement dirtyness tracking for stylo.

<!-- Please describe your changes on the following line: -->

---
<!-- 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

<!-- Either: -->
- [x] These changes do not require tests because geckolib-only changes.

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

r? @bholley

<!-- 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/12339)
<!-- Reviewable:end -->
2016-07-13 19:48:54 -07:00
Simon Sapin
a39170728d Remove geckolib’s "servo_features" Cargo feature
We’re about to switch to separate CARGO_TARGET_DIR (and different
compiler version) so we won’t be able to share build output with servo’s
"normal" build anyway.
2016-07-08 22:27:19 +02:00
Emilio Cobos Álvarez
73ba2c5984
stylo: Remove some unused imports and code 2016-07-08 01:47:28 -07:00
Bobby Holley
99e3e12259 Add stub for missing je_malloc_usable_size symbol in geckolib. 2016-07-05 17:34:57 -07:00
Emilio Cobos Álvarez
203d2a62c2
style: Remove the Mutex from new_animations_sender by moving it to the local StyleContext.
As a follow-up, we could move all the data living under a mutex in the
SharedLayoutContext only in order to create the local context to the same place.

This should increase animation performance when there are multiple animations in
one page that happen to be on different threads.
2016-07-01 13:48:06 -07: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
b103e8baa7 Remove some usage of unstable features in geckolib 2016-06-22 15:49:07 +02:00
Matt Brubeck
d4a84cce8e Support keyword values for 'cursor' in geckolib 2016-06-09 10:09:53 -07:00
Bobby Holley
d6a6f2c7e0 Hoist gecko bindings into their own crate.
This will be helpful for leveraging the bindings with our nsIAtom-backed
string_cache replacement.
2016-05-11 14:32:26 -07:00
Bobby Holley
d4aa0288d6 Enable standard logging for geckolib. 2016-05-03 17:40:05 -07:00
bors-servo
ca05f03ea3 Auto merge of #10938 - bholley:margin_padding_fontsize_hasclass, r=emilio
Geckolib: Implement Margin, Padding, font-size, and has_class

<!-- 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/10938)
<!-- Reviewable:end -->
2016-05-01 19:48:53 -07:00
Bobby Holley
0982e6f237 Implement Margin and Padding.
Note: We still need to handle the cached value stuff. I'll do that shortly.
2016-05-01 19:47:59 -07:00
Matt Brubeck
1e23d90631 Upgrade to bitflags 0.6.0 and selectors 0.5.6
Types generated by `bitflags!` are now private by default.  This PR marks them
`pub` where necessary.
2016-04-30 10:14:03 -07:00
Bobby Holley
8153a468ef Avoid moves of Gecko style structs. 2016-04-13 16:51:13 -07:00
Bobby Holley
0bdbf815f9 Take an initial pass of putting binding-generated gecko style structs inside GeckoComputedValues. 2016-03-30 10:33:57 -07:00
Bobby Holley
3c44dbae21 Add a skeleton implementation of TComputedValues in geckolib. 2016-03-24 11:50:58 -07:00
Bobby Holley
c2daea2c9c Parameterize the rest of the style system on TNode. 2016-03-24 11:50:57 -07: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
Bobby Holley
2e770b78a2 Implement a more realistic and persistent document restyle. 2016-02-03 18:39:16 -08:00
Bobby Holley
cafc0aabdf Hoist style-only traversal into geckolib.
Implementing StandaloneStyleContext::new is going to require a TLS key (just
like LayoutContext::new), and we don't want that key in shared code.
2016-02-03 18:39:16 -08: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
Bobby Holley
84f24a04a4 Basic wrappers and glue for GeckoLib. 2016-01-13 12:14:00 -08:00
Bobby Holley
840df61ba3 Implement a geckolib target. 2016-01-09 12:37:56 -08:00