Commit graph

43 commits

Author SHA1 Message Date
Bobby Holley
d78ca4c4f9 Use StyleArc in the style system.
MozReview-Commit-ID: flF0fv9E9M
2017-05-02 17:35:44 -07:00
Bobby Holley
8cf331a498 Rearrange PropertyDeclaration to avoid embedding DeclaredValue.
From https://bugzilla.mozilla.org/show_bug.cgi?id=1347719

This effectively combines the discriminants of the two enums and reduces the
size of PropertyDeclaration by one word.

MozReview-Commit-ID: 9rCRiSVZTQT
2017-03-16 14:40:55 -07:00
Xidorn Quan
03f6d21cb5 Make DeclaredValue store CSSWideKeyword
Rather than having separate variant for each CSS-wide keyword.
2017-03-02 11:09:05 +11:00
Nazım Can Altınova
adb6d20293 Box DeclaredValue::WithVariables 2017-02-09 11:10:10 +01:00
Nazım Can Altınova
43731c5757 Box custom property 2017-02-09 11:10:09 +01:00
Emilio Cobos Álvarez
369c2f299e
style: Simplify the cascade function in the custom_properties module. 2017-01-02 12:57:56 +01:00
Emilio Cobos Álvarez
c44826f1cc
style: Document the custom_properties module. 2017-01-02 12:57:56 +01:00
Xidorn Quan
2a502d7377 Store unset keyword as specified value 2016-12-21 10:43:26 +11:00
Ravi Shankar
dee1a65a69 Use the ParserContext along with Parser in the parse function 2016-11-27 08:49:20 +05:30
Artem Biryukov
9564673b5a Fix related to #14101
Add Parse trait implementation for some structures
2016-11-12 05:26:15 +03:00
Ravi Shankar
6061985898 Prefer Servo-specific ToCss for all types 2016-11-07 09:14:22 +05:30
Simon Sapin
53b638c0e2 Update to string-cache 0.3 2016-11-03 16:23:05 +01:00
Emilio Cobos Álvarez
9e88a495c8
style: Introduce a generic way of gathering information from the cascade, and use it for viewport units. 2016-08-16 10:58:16 -07:00
Manish Goregaokar
2091981db8 Some fixes in style 2016-07-12 20:00:24 +05:30
Ms2ger
79e0d18a1d Add some documentation to the style crate. 2016-06-27 17:33:14 +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
Pawel Kondzior
db2e10a70f Report memory usage from LayoutThreadData Stylist [#7038] 2016-03-19 11:53:13 -07:00
Anthony Ramine
cb5cd8d881 Say farewell to in-tree HeapSizeOf 2016-02-04 22:03:32 +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
Simon Sapin
3973085cb6 Fix double /**//**/ 2015-11-06 23:01:55 +01:00
Simon Sapin
40e6cc118e Detect var() in shorthand declarations. 2015-11-06 23:01:54 +01:00
Simon Sapin
6ed5b561df Derive more Debug impls. 2015-11-06 23:01:12 +01:00
Simon Sapin
020d03b656 Custom properties: handle premature EOF correctly. 2015-11-06 23:01:10 +01:00
Ravi Shankar
889eec364b sorted the extern crate, mod & use declarations 2015-09-24 02:12:45 +05:30
Simon Sapin
feaf6f4c3f Initial support for custom properties in CSSStyleDeclaration 2015-09-17 14:48:56 +02:00
Simon Sapin
d56ea10770 var() substitution: insert /**/ between tokens that would be parse as one token. 2015-09-17 14:48:20 +02:00
Simon Sapin
81dd1ab363 Record first and last token type of custom property values. 2015-09-17 14:48:19 +02:00
Simon Sapin
54ef8055ec The function name var() is case-insensitive. 2015-09-17 14:48:15 +02:00
Simon Sapin
ab9e1af206 Allow whitespace-only custom property values. 2015-09-17 14:48:14 +02:00
Simon Sapin
c7622bf22f Fix !important in custom properties.
Test changes are also in https://github.com/w3c/csswg-test/pull/847/files
2015-09-17 14:48:13 +02:00
Simon Sapin
c651c2f3db Remove obsolete FIXME comment.
See https://lists.w3.org/Archives/Public/www-style/2015Jul/0360.html
2015-09-03 23:02:25 +02:00
Simon Sapin
a9db4eef14 Factor out custom property name parsing. 2015-09-03 23:02:24 +02:00
Simon Sapin
b4fdb5d803 Substitute var() in longhand property declarations. 2015-09-03 23:02:22 +02:00
Simon Sapin
b2ee828520 [T]::position_elem is deprecated. 2015-09-03 23:02:22 +02:00
Simon Sapin
1d47857be9 Invalid at computed-value time customp properties get their inherited value. 2015-09-03 23:02:21 +02:00
Simon Sapin
a18a1a8d79 Add a FIXME comment of EOF handling in custom properties. 2015-09-03 23:02:20 +02:00
Simon Sapin
c3b8b39437 An empty <declaration-value> is invalid. 2015-09-03 23:02:19 +02:00
Simon Sapin
4bf28417b4 Make custom property substitution do less work.
When var() is substituted, record that result rather than re-compute it later.
2015-09-03 23:02:18 +02:00
Simon Sapin
1c1a9379a3 Substitute var() in custom properties at computed value time. 2015-09-03 23:02:17 +02:00
Simon Sapin
7bcf9f0c9a Use nested parsers as appropritate 2015-09-03 23:02:16 +02:00
Simon Sapin
3fcd8938f3 Support CSS-wide keywords in custom properties 2015-09-02 18:32:38 +02:00
Simon Sapin
65d4ecaa39 Remove custom property declarations in dependency cycles. 2015-09-02 18:32:37 +02:00
Simon Sapin
09e60beb78 Add parsing of CSS Custom Properties. 2015-09-02 18:32:36 +02:00