Commit graph

52 commits

Author SHA1 Message Date
Manish Goregaokar
8c2b7b41ef Autogenerate compute_damage (fixes #10622) 2018-02-09 08:48:04 -08:00
Jon Leighton
bd55639d01 Move image-orientation property outside of mako
Fixes https://github.com/servo/servo/issues/19765
2018-01-14 21:19:12 +01:00
Emilio Cobos Álvarez
187d28c732
style: Add gecko_pref annotation to the properties. 2017-11-16 02:44:35 +01:00
Emilio Cobos Álvarez
f4683d1718
style: Change experimental to servo_pref. 2017-11-16 02:44:13 +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
Simon Sapin
c0f8f15f39 Update to cssparser 0.22 (source location in error types) 2017-10-10 13:28:17 +02:00
Emilio Cobos Álvarez
2c88248b87
style: Kill -servo-under-display-none.
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-17 04:31:15 +02: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
Anthony Ramine
f2b1c6b7cf Do not use CVAS for the -servo-under-display-none property 2017-09-11 18:41:15 +02:00
Emilio Cobos Álvarez
36ff89bd28
style: Remove HasViewportPercentage.
It's not needed since #18268
2017-08-29 23:51:21 +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
Daisuke Akatsuka
c5de3e56a2 make image-orientation animatable 2017-08-03 22:34:14 +09:00
Emilio Cobos Álvarez
e374a54050
style: Cleanup the cascade a good bit. 2017-07-20 11:20:37 +02:00
Pavel Sergeev
729b8120e0 rustify if statements style 2017-07-15 19:57:47 +03:00
Jonathan Chan
c6a7f10182 Sync Servo / Gecko image-orientation rounding; pass as enum.
Make Servo's rounding of image-orientation values agree with Gecko's,
and pass orientations directly as an enum instead of as angles.

Depends on a Gecko change to be subsequently landed in m-c.
2017-07-14 14:44:23 -07:00
Gecko Backout
02d9305782 Backed out changeset 3977404931e5 for failing mochitest layout/style/test/test_value_computation.html. r=backout
Backs out https://github.com/servo/servo/pull/17654
2017-07-11 22:14:04 +00:00
Jonathan Chan
e554146e2a Make Servo's rounding of image-orientation values agree with Gecko's,
and pass orientations directly as an enum instead of as angles.

Depends on a Gecko change to be subsequently landed in m-c.
2017-07-11 11:19:39 -07:00
Simon Sapin
a5bb55790f Untry style 2017-06-18 13:18:13 +02:00
Josh Matthews
27ae1ef2e7 Thread ParseError return values through CSS parsing. 2017-06-09 16:46:25 -04:00
daisuke
917dbdfdbd Implements simple discrete animatable properties 2017-05-29 16:08:09 +09:00
Anthony Ramine
00bfc6b172 Remove a lot of unused imports 2017-05-20 15:23:19 +02:00
Jeremy Chen
1c8e6eb30c stylo: Fix the serialization of image-orientation property. r=heycam
Gecko bug: Bug 1363295
2017-05-09 23:01:44 +08:00
Anthony Ramine
fe1381b4fe Fix serialisation of 'image-orientation: <angle> flip' 2017-05-05 17:12:12 +02:00
Hiroyuki Ikezoe
e47d30f668 Rename 'normal' of animation_value_type to 'ComputedValue'. 2017-04-24 15:40:13 +09:00
Hiroyuki Ikezoe
94fb839fdd Rename animation_type to animation_value_type. 2017-04-24 15:23:39 +09:00
Cameron McCormack
221aa87650 style: Make text-orientation:sideways-right an alias.
Gecko does not preserve this specified value; it converts it to sideways
at parse time.
2017-04-17 11:24:27 +10:00
Cameron McCormack
35c88367cb style: Add Gecko-only support for the deprecated SVG 1.1 writing-mode aliases. 2017-04-17 11:24:25 +10:00
Cameron McCormack
b73916a135 style: Add Gecko-only support for writing-mode:sideways-{lr,rl}.
Fixes #15213.
2017-04-17 11:24:23 +10:00
Manish Goregaokar
1ea8175163 stylo: Support most MathML presentation attributes 2017-04-12 22:15:57 +08:00
bors-servo
a093b0a087 Auto merge of #16361 - KuoE0:bug-1354000, r=heycam
Make stylo recognize -moz-crisp-edges keyword.

<!-- Please describe your changes on the following line: -->

See [Bug 1354000](https://bugzilla.mozilla.org/show_bug.cgi?id=1354000).

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [Bug 1354000](https://bugzilla.mozilla.org/show_bug.cgi?id=1354000)

<!-- Either: -->
- [X] These changes do not require tests because the they're in gecko.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- 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/16361)
<!-- Reviewable:end -->
2017-04-12 01:51:56 -05:00
KuoE0
fdbf0f2aaf Make stylo recognize -moz-crisp-edges keyword.
MozReview-Commit-ID: GZyvkN4HAqT
2017-04-12 11:36:28 +08:00
Jeremy Chen
5332d4b265 Stylo - support image-orientation property
First, we need to make Servo's image-orientation parser to be agreed with Gecko's.
Numbers without any AngleUnit, including unitless 0 angle, should be invalid
for image-orientation. However, rotate() and skew() for transform properties
accept unitless 0 angle. In order to make all these properties work properly,
I fixed Angle::parse() to match Gecko. For the existing users of Angle::parse(),
I create Angle::parse_with_unitless() and use it as an alternative for them.
Once https://github.com/w3c/csswg-drafts/issues/1162 is resolved, we shall be
able to use an unified version of Angle::parse() then.

The parser of image-orientation is also fixed to report parsing errors on
empty string.

Then, with the newly added binding functions support in Gecko side, we shall
reuse the same methods from Gecko to pass the computed value from Servo to Gecko.

Gecko bug: Bug 1341758
2017-04-11 19:23:43 +08:00
Hiroyuki Ikezoe
03d354afba Rename animatable to animation_type.
animation_type takes following values:

animation_type="none" for non-animatable properties
animation_type="normal" for animatable properties
animation_type="discrete" for animatable but discrete type of animations

We use string value to distinguish the case where no animation_type is
specified.
animation_type="discrete" will be used in a subsequent patch to make a property
animatable as discrete type.
2017-04-07 10:38:28 +09:00
Emilio Cobos Álvarez
fc72f096a0
style: Properly track whether <angle> or <time> values came from calc() expressions. 2017-03-27 12:42:22 +02:00
Nazım Can Altınova
abc40f61c0 Replace NoViewportPercentage with a macro 2017-02-09 10:41:16 +01:00
Matt Brubeck
b3820c1296 Convert text-orientation to a Gecko-only property
Remove incomplete and buggy support for text-orientation in Servo.
Make the property values align with Gecko and the latest draft of CSS
Writing Modes Level 3.
2017-01-27 21:12:38 -08:00
Manish Goregaokar
94412ab6b0 Fix image-orientation line-wrap 2017-01-03 14:28:11 -08:00
Manish Goregaokar
71026c5ddb Add spec links for inherited_box properties 2017-01-03 14:03:16 -08:00
Sumant Manne
faddb0c3bb Added image-orientation property 2016-12-10 13:43:49 -06:00
Ravi Shankar
6061985898 Prefer Servo-specific ToCss for all types 2016-11-07 09:14:22 +05:30
Ravi Shankar
e7cbd10ece Auto-generate 'image-rendering' using 'single_keyword' 2016-10-26 12:56:11 +05:30
Ravi Shankar
710157c617 Add support for 'image-rendering' in geckolib 2016-10-07 23:35:57 +05:30
Ravi Shankar
5fd398ec06 Change 'image_rendering' enum variants to snake cases 2016-10-07 23:31:30 +05:30
Manish Goregaokar
2f69e7ff8c Use ComputedValueAsSpecified wherever possible 2016-09-22 18:45:34 +05:30
Manish Goregaokar
c965beb3d9
Use conditional compilation for stylo properties 2016-09-02 17:45:48 +05:30
Simon Sapin
789807b7b0 Remove the ComputedValue traits and style_struct_traits 2016-07-20 08:42:40 +02:00
Shing Lyu
f754cacbd5 Only restyle viewport-relative nodes on viewport size change 2016-07-18 11:01:42 +08:00
Emilio Cobos Álvarez
faed3df594
style: Take down the global animatable props list and use a kwarg instead 2016-06-28 15:28:00 +00: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
Matt Brubeck
5c09e26e55 Stop generating flows under display: none.
Because this is a bottom-up traversal it can generates flows and throw them away. To prevent that, this cascades an internal `-servo-under-display-none` property and then checks that during flow construction.  Fixes #1536.
2016-05-25 11:54:21 -07:00