Commit graph

44 commits

Author SHA1 Message Date
Nazım Can Altınova
1c48a3bedb stylo: Hide accidentally exposed subgrid behind prefs 2017-12-06 00:05:26 +03:00
Emilio Cobos Álvarez
92944cd5eb
style: Make css(dimension) apply to the variant. 2017-11-12 16:25:00 +01:00
Simon Sapin
954b2cc3d8
Allow unused imports for AsciiExt in style code.
See #19128, this part is cherry-picked so Gecko can build with rust nightly.
2017-11-09 12:43:23 +01:00
Nicholas Nethercote
4506f0d30c Replace all uses of the heapsize crate with malloc_size_of.
Servo currently uses `heapsize`, but Stylo/Gecko use `malloc_size_of`.
`malloc_size_of` is better -- it handles various cases that `heapsize` does not
-- so this patch changes Servo to use `malloc_size_of`.

This patch makes the following changes to the `malloc_size_of` crate.

- Adds `MallocSizeOf` trait implementations for numerous types, some built-in
  (e.g. `VecDeque`), some external and Servo-only (e.g. `string_cache`).

- Makes `enclosing_size_of_op` optional, because vanilla jemalloc doesn't
  support that operation.

- For `HashSet`/`HashMap`, falls back to a computed estimate when
  `enclosing_size_of_op` isn't available.

- Adds an extern "C" `malloc_size_of` function that does the actual heap
  measurement; this is based on the same functions from the `heapsize` crate.

This patch makes the following changes elsewhere.

- Converts all the uses of `heapsize` to instead use `malloc_size_of`.

- Disables the "heapsize"/"heap_size" feature for the external crates that
  provide it.

- Removes the `HeapSizeOf` implementation from `hashglobe`.

- Adds `ignore` annotations to a few `Rc`/`Arc`, because `malloc_size_of`
  doesn't derive those types, unlike `heapsize`.
2017-10-18 22:20:37 +11:00
Matt Brubeck
efc3683cc7 Fix commonmark Markdown warnings in docs, part 1
Fixes warnings from rust-lang/rust#44229 when `--enable-commonmark` is
passed to rustdoc.

This is mostly a global find-and-replace for bare URIs on lines by
themselves in doc comments.
2017-10-17 11:24:57 -07:00
Simon Sapin
c0f8f15f39 Update to cssparser 0.22 (source location in error types) 2017-10-10 13:28:17 +02:00
Emilio Cobos Álvarez
64ab73eabd
style: Properly use integers on grid properties, and derive ToComputedValue. 2017-09-11 11:29:27 +02:00
Fernando Jiménez Moreno
8306946e7f stylo: store specified value of grid layout repeat() function 2017-09-06 12:53:07 +02:00
Emilio Cobos Álvarez
36ff89bd28
style: Remove HasViewportPercentage.
It's not needed since #18268
2017-08-29 23:51:21 +02:00
Anthony Ramine
735e093de7 Implement #[compute(clone)] for #[derive(ToComputedValue)] 2017-08-28 10:39:53 +02:00
Anthony Ramine
efc852f6e3 Improve handling of trait bounds when deriving fmap-like traits 2017-08-28 10:39:50 +02:00
Clément DAVID
c5fe235112 order derivable traits lists
Ignoring :
 - **generated**.rs
 - python/tidy/servo_tidy_tests/rust_tidy.rs
2017-08-23 21:38:44 +02:00
Simon Sapin
eb98ae6e04 Update cssparser to 0.18
https://github.com/servo/rust-cssparser/pull/171
2017-07-24 11:39:12 +02:00
Nazım Can Altınova
ac1d15f726 Add a bug link as comment for repeat function 2017-07-19 22:09:15 -07:00
Nazım Can Altınova
1ab86a46b6 Convert Vec values into boxed slices 2017-07-19 14:26:28 -07:00
Nazım Can Altınova
ade76f10b7 Convert TrackList's 'values' field to store only TrackSize.
It was storing both TrackSize and TrackRepeat before and TrackRepeat have to be
converted into sequence of TrackSize during serialization. Instead of doing this
in serialization process(which is hard and hacky), we converted to do this in
parsing process. We were doing this conversion in the ComputedValue conversion.
So we only had to move this process to parsing.
2017-07-14 15:55:40 -07:00
Anthony Ramine
7bc9a95b46 Rename MinMax to Minmax 2017-07-12 11:45:17 +02:00
Nazım Can Altınova
fd3b99027a Prevent parsing 'none' keyword in grid-template's columns part 2017-07-03 17:08:06 -07:00
Nazım Can Altınova
f4eccdae3f Fall back to an older version of the spec in TrackRepeat for the parity with gecko 2017-07-03 17:08:05 -07:00
Ravi Shankar
9d9d99ec25 Switch to GridTemplateComponent for subgrid line names 2017-07-03 17:08:00 -07:00
Ravi Shankar
8af912200c Add support for subgrid line name lists 2017-07-03 14:57:17 -07:00
Ravi Shankar
c145dd7b0c Cleanup some old code 2017-06-18 21:18:43 -07:00
Simon Sapin
b83afdedc8 Upgrade cssparser to 0.15 2017-06-16 15:05:46 +02:00
Josh Matthews
27ae1ef2e7 Thread ParseError return values through CSS parsing. 2017-06-09 16:46:25 -04:00
Malo Jaffré
72db1765d0 Refactor grid style types and impls
Fixes #16949.
2017-05-21 20:46:45 +02:00
Anthony Ramine
cb2e04acf6 Remove style::values::HasViewportPercentage reexport 2017-05-20 22:00:05 +02:00
Anthony Ramine
90bae7f802 Derive HasViewportPercentage 🍷 2017-05-20 14:48:04 +02:00
Ravi Shankar
4899bb471b Fix old grid code
* Fix <grid-line> parsing/serialization and fit-content parsing
 * Fix <track-size> flex computation
 * Cleanup <grid-line> and <track-size> code
2017-05-18 21:58:13 +05:30
Ravi Shankar
26540dfbf2 Merge grid <line-names> in <track-list> computed value 2017-05-18 21:57:23 +05:30
Ravi Shankar
0d9bdb9a85 Add parsing/serialization for <track-list> 2017-05-18 21:57:01 +05:30
Ravi Shankar
7d1505a188 Apply track repetitions and merge grid <line-names> in ToComputedValue 2017-05-18 21:56:41 +05:30
Ravi Shankar
81b4e64dfc Add parsing/serialization for repeat() function 2017-05-18 21:56:38 +05:30
Ravi Shankar
d3e394c68a Add RepeatCount enum for handling the first component of repeat() 2017-05-18 21:56:35 +05:30
Ravi Shankar
efe1a5d256 Add functions for checking <fixed-size> and <fixed-breadth> 2017-05-18 21:56:32 +05:30
Ravi Shankar
53c7b0ac15 Add function to parse <line-names> 2017-05-18 21:56:21 +05:30
J. Ryan Stinnett
1a31b87c22 Pass ParserContext down to lengths
To make it possible to check the rule type when parsing lengths, we need to pass
the `ParserContext` down through many layers to the place where length units are
parsed.

This change leaves it unused, so it's only to prepare for the next change.

MozReview-Commit-ID: 70YwtcCxnWw
2017-04-12 16:40:48 +08:00
Emilio Cobos Álvarez
705ecb4557
style: Multiple style nits across parsing code. 2017-04-06 20:56:23 +02:00
Ravi Shankar
c70fb42cea Add docs for grid types 2017-02-20 14:31:30 +05:30
Ravi Shankar
b55cc7f9da Computed value for TrackBreadth and TrackSize 2017-02-20 14:29:45 +05:30
Ravi Shankar
76d4a48885 Add parsing/serialization for <track-size> 2017-02-20 14:28:21 +05:30
Ravi Shankar
cf80c07d6d Add parsing/serialization for <track-breadth> 2017-02-20 14:28:20 +05:30
Nazım Can Altınova
abc40f61c0 Replace NoViewportPercentage with a macro 2017-02-09 10:41:16 +01:00
Emilio Cobos Álvarez
f37aa12927
style: Prevent more missing docs in the values module. 2016-12-31 12:17:02 +01:00
Ravi Shankar
7976640251 Add GridLine type for grids 2016-12-16 13:03:27 +05:30