Bobby Holley
96af00fbb9
Add has_attr method to TElement.
...
If this is all the information the caller needs, we can get it from gecko without
worrying about atomization and string conversions.
2016-07-05 18:03:36 -07:00
Bobby Holley
7947afc699
Remove get_attrs from TElement.
...
This should just be a helper.
2016-07-05 18:03:35 -07:00
Anthony Ramine
a5b524d559
Move util::vec::ForgetfulSink to style::sink and simplify it
2016-07-04 16:48:14 +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
Ms2ger
e723d72570
Move the initialize_data method out of the TNode trait.
...
This reduces the dependency of TNode implementations on layout types.
2016-06-13 15:21:29 +01:00
Emilio Cobos Álvarez
028f9b6cd2
style: layout: Allow a lazy pseudo-element implementation in Servo.
2016-05-04 00:33:58 +02:00
Emilio Cobos Álvarez
2a499d5a0b
layout: Stop storing PrecomputedStyleData in LayoutNode
...
Use the SharedStyleContext instead.
2016-04-29 22:54:48 +02:00
Emilio Cobos Álvarez
b6402a81d0
style: Add infrastructure for non-eagerly-cascaded pseudo-elements
...
This commit also removes StylistWrapper and uses Arc::get_mut instead.
2016-04-29 22:54:45 +02:00
Per Lundberg
4cb4cc93e4
Renamed TComputedValues to ComputedValues
...
This is a followup to #10210 , and a continuation of #10185 .
2016-03-29 23:30:13 +03:00
faineance
418842faf9
use self.0 instead of destructing single item tuple structs
2016-03-27 11:50:08 +01:00
Bobby Holley
c2daea2c9c
Parameterize the rest of the style system on TNode.
2016-03-24 11:50:57 -07:00
Bobby Holley
b1878bd925
Remove lifetimes from T{Node,Element,Document}.
2016-03-14 14:31:57 -07:00
Emilio Cobos Álvarez
61e04df266
style: Refactor the per_pseudo map from StyleData to avoid having an option value type.
...
This make the layout code way clearer.
2016-02-13 16:05:17 +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
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
9abbd1b5d1
Sequentialize assign_block_size for flows that can be fragmented.
...
Fragmentation will be intertwined with block size calculation.
2016-01-28 09:42:17 +01:00
Simon Sapin
da2b4ab381
Disable incremental reflow for multicol and their descendants.
...
Fragmentation with dynamic updates is hard.
2016-01-27 17:33:12 +01:00
Bobby Holley
77b1027646
Hoist style() and unstyle() into TNode.
2016-01-12 13:16:05 -08:00
Bobby Holley
ebc5eb1b98
Make parallel DOM traversal and style calculation operate on TNode instead of LayoutNode.
2016-01-06 17:58:53 -08:00
Bobby Holley
27987c3bb4
Introduce a concept of restyle damage to the style system.
...
We can't hoist RestyleDamage itself, because it's very layout-dependent. But this
should be enough to let us hoist the things we need.
2016-01-04 09:38:04 -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