Simon Sapin
529164e4a5
Refactor the cascade
...
Converting the specified value of some properties into a computed value
depends on the value of other properties. For example, the `em` unit
of any length depends on the `font-size` property.
Previously, we would do a first pass over applicable declarations
to build up a `values::computed::Context` struct with a number of fields
for each such piece of data from other properties.
This simplies the struct by instead having it contain the
set of computed values (for a given element) that is being populated
and classify properties into "early" and "other",
such that the only dependencies can be from "other" to "early".
We iterate applicable_declarations twice, first cascading "early" properties
then "other".
Unfortunately, it’s not easy to check that this classification is correct.
2016-03-18 17:09:16 +01:00
Ms2ger
08083f1c9d
Deny unsafe code in more crates.
2016-03-18 14:43:03 +01:00
Anthony Ramine
46c505e47b
Bump serde to 0.7
2016-03-17 13:52:39 +01:00
Anthony Ramine
f7af675861
Update log to 0.3.5
2016-03-16 23:36:04 -07:00
Patrick Walton
d59dee0c65
style: Compute damage for text nodes.
...
They have styles just like elements do.
Allows a dynamic change of `display: none` to `display: inline` to work.
Closes #9868 .
2016-03-15 21:32:16 -07:00
Simon Sapin
bab28e5070
Fix up overflow_x and _y after the fact rather than have their values in computed::Context.
2016-03-15 18:10:17 +01:00
Simon Sapin
54790d0ae5
Fix the rem unit.
...
(I think it’s never worked in over a year since it was implemented…)
2016-03-15 18:10:16 +01:00
Bobby Holley
b1878bd925
Remove lifetimes from T{Node,Element,Document}.
2016-03-14 14:31:57 -07:00
bors-servo
7ff7932a8c
Auto merge of #9824 - danlrobertson:element1, r=asajeffrey
...
Add the scrollWidth and scrollHeight extensions to the element interface
Add the `scrollWidth` and `scrollHeight` extensions to the element interface. My goal was to create a method that encompassed getting `scrollWidth`, `scrollHeight`, `scrollTop`, and `scrollLeft`.
I also noted that `clientHeight` and `clientWidth` to not handle the root element and the body element correctly.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg " height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9824 )
<!-- Reviewable:end -->
2016-03-12 00:19:24 +05:30
Daniel Robertson
16d2778ece
Add scrollWidth/Height to element interface
...
Add the scrollWidth and scrollHeight extensions to the element
interface.
2016-03-11 18:22:16 +00:00
Anthony Ramine
b66d190166
Bump url to 0.5.7
2016-03-09 20:15:16 +01:00
Anthony Ramine
10e19e06a7
Bump string_cache to 0.2.11
2016-03-09 20:15:15 +01:00
Anthony Ramine
f89c321141
Bump euclid to 0.6.4
2016-03-09 20:15:11 +01:00
Anthony Ramine
200e2286fd
Bump cssparser to 0.5.4
2016-03-09 20:14:38 +01:00
Anthony Ramine
5720c76816
Bump app_units to 0.2.3
2016-03-09 20:14:35 +01:00
bors-servo
5fbed88248
Auto merge of #9886 - nox:unstable-feature, r=SimonSapin
...
Make Cargo share more things between servo and ports
This should enable Cargo to reuse more build artifacts between servo and geckolib.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg " height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9886 )
<!-- Reviewable:end -->
2016-03-08 20:03:24 +05:30
Suvish Varghese Thoovamalayil
de68820e76
Remove unused cell_extras feature gates. Fixes #9912
2016-03-08 16:56:13 +05:30
Anthony Ramine
b7ef9ed97a
Enable nightly feature for serde in style
...
Some external dependencies (at least webrender_traits) present only in servo
and not in geckolib use it already and this prevents Cargo to reuse build
artifacts depending on serde between the two targets.
2016-03-08 02:51:06 +01:00
bors-servo
49e9594fb9
Auto merge of #9852 - bholley:stylo_uplifts_3, r=bholley
...
Stylo uplifts 3
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg " height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9852 )
<!-- Reviewable:end -->
2016-03-05 01:48:35 +05:30
Bobby Holley
4da1171474
Stop using servo UA stylesheets for geckolib.
...
Gecko will provide these. This also removes the need to reference
the servo resource directory.
2016-03-04 11:46:32 -08:00
Simon Sapin
142610265e
Add the -servo-overflow-clip-box property.
2016-03-04 19:47:20 +01:00
Simon Sapin
7126fdfc10
Add a mechanism for "internal" CSS properties
...
… that can only be parsed in a user-agent stylesheet.
2016-03-04 19:46:54 +01:00
Corey Farwell
75353e19a7
Indicate components should not be published to crates.io.
...
http://doc.crates.io/manifest.html#the-publish--field-optional
2016-03-03 15:04:44 -05:00
Anthony Ramine
0adfb08089
Implement From<DOMString> for Atom
2016-02-24 17:52:17 +01:00
Anthony Ramine
cc030df36e
Make use of From<String> for Atom
2016-02-24 17:52:13 +01:00
Anthony Ramine
50af73d1a2
Bump string_cache to 0.2.10
2016-02-24 16:47:10 +01:00
Anthony Ramine
db8d502f41
Move util::logical_geometry to style
2016-02-18 10:17:13 +01:00
zakorgyula
43d527fcc8
Move parse_integer and parse_unsigned_integer from util::str to style::attr
2016-02-17 07:05:39 +01:00
bors-servo
f0d4c03bd9
Auto merge of #9636 - nox:mv-cursor, r=Ms2ger
...
Move util::cursor to style_traits
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg " height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9636 )
<!-- Reviewable:end -->
2016-02-16 16:50:20 +05:30
Anthony Ramine
290694b27e
Move util::cursor to style_traits
2016-02-16 00:50:01 +01:00
Jayflux
d169d7bd9e
refactor, moving functions into attr and htmlfontelemend fixes #9639 #9638
2016-02-15 22:33:14 +00:00
bors-servo
c9b2ef5c7f
Auto merge of #9634 - craftytrickster:issue/9564, r=Manishearth
...
Adding warning to properties.mako.rs regarding the Mako parser mangling
https://github.com/servo/servo/issues/9564#issuecomment-183765401
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg " height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9634 )
<!-- Reviewable:end -->
2016-02-15 10:15:35 +05:30
Anthony Ramine
09f865919d
Move util::bezier to style
2016-02-14 19:45:24 +01:00
David Raifaizen
8fa82f611c
Adding warning to properties.mako.rs regarding the Mako parser mangling Rust code
2016-02-14 12:23:53 -05: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
a604d605ed
style: Prevent a crash when push_applicable_declarations is called with a non eagerly-cascaded pseudo-element
...
This actually didn't happen, but this should be done sooner than later.
2016-02-13 16:05:16 +01:00
Emilio Cobos Álvarez
eddec5cc06
style: Use fnv hashing for pseudo-elements
2016-02-13 16:05:14 +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
55dcee94be
Bump heapsize to 0.3
2016-02-13 11:13:19 +01:00
Anthony Ramine
680c817d53
Bump url to 0.5.5
2016-02-13 00:08:12 +01:00
Anthony Ramine
899a5bbfa4
Bump selectors to 0.4.1
2016-02-13 00:08:11 +01:00
Anthony Ramine
874fa5595f
Bump euclid to 0.6.2
2016-02-13 00:08:08 +01:00
Anthony Ramine
d0ab28a735
Bump cssparser to 0.5.3
2016-02-13 00:08:07 +01:00
Anthony Ramine
e2d9734609
Bump string_cache to 0.2.9
2016-02-13 00:08:06 +01:00
Anthony Ramine
2d6ac4da97
Bump app_units to 0.2.1
2016-02-13 00:08:05 +01:00
Anthony Ramine
c6262c368f
Reorder dependencies in some Cargo.toml files
2016-02-13 00:08:04 +01:00
bors-servo
2a6707ce58
Auto merge of #9532 - nox:dedup-heapsize, r=Manishearth
...
Say farewell to in-tree HeapSizeOf
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg " height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9532 )
<!-- Reviewable:end -->
2016-02-05 03:40:36 +05:30
Anthony Ramine
cb5cd8d881
Say farewell to in-tree HeapSizeOf
2016-02-04 22:03:32 +01:00
bors-servo
629b1d33d5
Auto merge of #9515 - bholley:stylo_uplifts_2, r=SimonSapin
...
Stylo uplifts Part 2
A bunch of random things that we might as well merge into the tree.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg " height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9515 )
<!-- Reviewable:end -->
2016-02-04 23:25:09 +05:30
Anthony Ramine
5bb3fc395a
Bump cssparser to 0.5.2
2016-02-04 14:14:23 +01:00