Emilio Cobos Álvarez
e3c58df155
style: Remove UnsafeNode.
...
No longer needed since a while ago.
2017-09-25 01:58:52 +02:00
Tom Tromey
c48226ff6f
Preserve sourceURL comment on style sheets
...
In addition to the sourceMappingURL comment, there is a second special
comment, "sourceURL", that can be used to set the "display name" of a
style sheet for developer tools. This name is also used as the base
URL for the source-map URL resolution algorithm. sourceURL is
described here:
https://blog.getfirebug.com/2009/08/11/give-your-eval-a-name-with-sourceurl/
The devtools feature bug is here:
https://bugzilla.mozilla.org/show_bug.cgi?id=880831
This patch changes servo to preserve and expose this value for use in M-C.
2017-09-14 12:39:18 -06:00
Nicholas Nethercote
c5aa2cb986
Measure PropertyDeclaration more thoroughly.
...
This patch replaces the handwritten MallocSizeOf implementation for
PropertyDeclaration with a derived one, which gives much more thorough
measurement.
This requires (a) deriving MallocSizeOf for a *lot* of additional types (most
of which already have `derive(HeapSizeOf)` in Servo builds), and (b)
implementing MallocSizeOf for a few more types in the `malloc_size_of` crate.
These changes would significantly improve the reporting coverage for gmail if
it weren't for the fact that SpecifiedUrl isn't measured due to a lack of
clarity about its fields; that can be fixed as a follow-up once bug 1397971 has
landed.
2017-09-14 13:18:03 +10:00
Boris Chiou
535c1e3c6f
Replace Au with CSSPixelLength in CalcLengthOrPercentage.
...
We replace Au with CSSPixelLength for the length part of
computed::CalcLengthOrPercentage. Therefore, it would be easier to use
CSSPixelLength for all other LengthOrPercentage{*} types.
2017-09-13 18:10:39 +08:00
Tom Tromey
4768597b13
Remove get_location_with_offset
...
Now that rust-cssparser reports 1-based locations, bump the required
cssparser version and remove get_location_with_offset. Previously,
some code paths were not calling get_location_with_offset; see
https://bugzilla.mozilla.org/show_bug.cgi?id=1398869 for some
background.
2017-09-12 07:35:55 -06:00
Boris Zbarsky
b2c56345d7
Update rust-cssparser to 0.20.2.
...
This reduces memory consumption of list-valued properties in the common case of one entry in the list.
2017-09-11 10:55:27 -04:00
Fernando Jiménez Moreno
337a90329c
stylo: Error reporting for unknown media features
2017-09-08 12:48:50 +02:00
Josh Matthews
6827a10893
Report more specific error for invalid filter properties (bug 1386900).
2017-09-06 10:06:07 -07:00
Simon Sapin
e94d8d5bc1
Remove usage of write!
in components/style/properties/longhand/box.mako.rs
2017-09-02 18:37:57 +02:00
Simon Sapin
37722838c6
Remove uses of write!
in components/style_traits
2017-09-02 10:49:24 +02:00
Xidorn Quan
2bca62045f
Parse at-rule without block in two stages
2017-09-01 16:21:22 +10:00
Emilio Cobos Álvarez
36ff89bd28
style: Remove HasViewportPercentage.
...
It's not needed since #18268
2017-08-29 23:51:21 +02:00
Anthony Ramine
ba4136b5a8
Document how style traits can be derived
2017-08-28 12:26:43 +02:00
Simon Sapin
dc5dfafbba
Use Parser::skip_whitespace in a few places to make Parser::try rewind less.
...
Gecko’s CSS parsing microbenchmarks before:
```
43.437 ± 0.391 ms Stylo.Servo_StyleSheet_FromUTF8Bytes_Bench
29.244 ± 0.042 ms Stylo.Gecko_nsCSSParser_ParseSheet_Bench
281.884 ± 0.028 ms Stylo.Servo_DeclarationBlock_SetPropertyById_Bench
426.242 ± 0.008 ms Stylo.Servo_DeclarationBlock_SetPropertyById_WithInitialSpace_Bench
```
After:
```
29.779 ± 0.254 ms Stylo.Servo_StyleSheet_FromUTF8Bytes_Bench
28.841 ± 0.031 ms Stylo.Gecko_nsCSSParser_ParseSheet_Bench
296.240 ± 4.744 ms Stylo.Servo_DeclarationBlock_SetPropertyById_Bench
293.855 ± 4.304 ms Stylo.Servo_DeclarationBlock_SetPropertyById_WithInitialSpace_Bench
```
2017-08-26 01:44:45 +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
7382dad939
Update to cssparser 0.19, count line numbers during tokenization
2017-08-09 22:37:16 +02:00
Josh Matthews
4b736354c4
Report an error for invalid CSS color values (bug 1381143).
2017-07-31 16:49:53 -04:00
Alan Jeffrey
936dd3ef63
Speculatively evaluate paint functions during style.
2017-07-31 13:02:28 -05:00
Dzmitry Malyshau
101c426eb7
WR multi-document update
2017-07-28 22:28:11 -04:00
Gecko Backout
3f1af3e62f
Backed out changeset c424ad1c5f94 for build failures a=backout CLOSED TREE
...
Backs out https://github.com/servo/servo/pull/17892
2017-07-28 23:21:03 +00:00
Dzmitry Malyshau
8c588e8c36
WR multi-document update
2017-07-28 14:22:36 -04: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
Alan Jeffrey
caa3585219
Fixed scaling artefacts in paint worklets caused by zoom and hidpi.
2017-07-20 17:25:50 -05:00
Josh Matthews
bbf3280fef
Store COW strings in CSS parser errors when possible.
2017-07-19 12:57:07 -04:00
Josh Matthews
94d631c1f4
Suppress CSS parser errors for vendor-prefixed properties.
2017-07-17 10:00:31 -04:00
Martin Robinson
e58e8ab42e
Upgrade to the latest version of WebRender
2017-07-13 07:44:08 +10:00
Josh Matthews
0b43d0072c
stylo: Update rust-cssparser; extract more specific error types when reporting (bug 1352669).
2017-07-10 20:46:12 -04:00
Gecko Backout
32269fa7cc
Backed out changeset fec394734f83 (bug 17624) for build bustage a=backout CLOSED TREE
...
Backs out https://github.com/servo/servo/pull/17624
2017-07-06 21:58:15 +00:00
Josh Matthews
f5a3830ea2
stylo: Update rust-cssparser; extract more specific error types when reporting (bug 1352669).
2017-07-06 14:32:37 -04:00
Anthony Ramine
c03f5f19ab
Introduce CommaWithSpace
...
This allows us to support stroke-dasharray the same way as comma-separated
values.
2017-06-27 23:37:48 +02:00
Anthony Ramine
17875b8a81
Introduce Separator::parse
2017-06-27 23:37:44 +02:00
Nazım Can Altınova
5362c5ee74
Bump cssparser version to 0.16.1 in toml files
2017-06-22 15:44:03 -07:00
Anthony Ramine
39e29f557e
Simplify machinery to serialise optional parts of CSS values
...
We simply implement ToCss for Option<T>, printing nothing if the value is None,
and we then use SequenceWriter to skip writing of separators around empty parts.
2017-06-21 11:17:22 +02:00
bors-servo
fc2c5b7ef4
Auto merge of #17402 - servo:derive-all-the-things, r=emilio
...
Use generics for the filter property
<!-- 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/17402 )
<!-- Reviewable:end -->
2017-06-20 06:23:17 -07:00
Anthony Ramine
6f4061d4ad
Use generics for the filter property
...
This introduces an additional shadow type for drop-shadow().
2017-06-20 13:48:53 +02:00
Jonathan Chan
26179b3660
style: Have OneOrMoreSeparated replace OneOrMoreCommaSeparated.
...
A future patch series has some values that should be separated by spaces. This
allows us to re-use the code for serialization, but the types do get a little
clunky. The separator is now indicated with an associated type.
2017-06-19 16:09:37 -07:00
Simon Sapin
316cd35767
Untry
2017-06-18 13:21:51 +02:00
Simon Sapin
b83afdedc8
Upgrade cssparser to 0.15
2017-06-16 15:05:46 +02:00
Simon Sapin
605ef8b7ec
Remove explicit dependencies on serde_derive
2017-06-16 13:58:21 +02:00
Bastien Orivel
76d8573393
Bump serde to 1.0
2017-06-16 13:31:18 +02:00
Nicolas Silva
8617320500
Bump euclid to 0.14.
2017-06-14 16:00:59 +02:00
Hiroyuki Ikezoe
6c5915068a
AllowedNumericType.is_ok() takes ParingMode as well.
...
And it returns true if ParsingMode.allows_all_numeric_values is true regardless
of AllowedNumericType itself.
2017-06-14 09:52:06 +09:00
Hiroyuki Ikezoe
7341574b66
Make AllowedLengthType.is_ok() returning true if parsing mode allows all numeric values.
...
Even if the type is NonNegative and the given value is a negative.
2017-06-14 09:51:54 +09:00
Hiroyuki Ikezoe
8bfed4cb3c
Move ParsingMode into style_traits.
2017-06-14 09:51:36 +09:00
Josh Matthews
27ae1ef2e7
Thread ParseError return values through CSS parsing.
2017-06-09 16:46:25 -04:00
Anthony Ramine
c8c6f3482f
Implement ToCss for str and String
2017-06-08 11:13:39 +02:00
Anthony Ramine
45e8b0e8c7
Support unit variants when deriving ToCss
2017-06-07 16:47:59 +02:00
Bastien Orivel
0a254b0306
Bump euclid to 0.13 and heapsize to 0.4
2017-06-05 19:28:39 +02:00
Manish Goregaokar
41f1c3463e
Bump cssparser to 0.13.7
2017-06-02 17:43:56 -07:00
Anthony Ramine
af3ede418b
Refactor BorderRadius and move it to the border modules
...
BorderRadius now parses itself reusing Rect<T>.
2017-05-28 14:36:37 +02:00