Commit graph

44 commits

Author SHA1 Message Date
Xidorn Quan
bc81f09833
style: Add GETCS_NEEDS_LAYOUT_FLUSH flag in Servo side and propagate it to ServoCSSPropList.h.
Bug: 1454830
Reviewed-by: emilio
MozReview-Commit-ID: 5k08FWjobCg
2018-04-28 10:26:02 +02:00
Xidorn Quan
2cd06807fa
style: Have ENABLED_IN flags in nsCSSPropList.h match those in Servo side.
Bug: 1452542
Reviewed-by: emilio
MozReview-Commit-ID: 48t5u1D5rZX
2018-04-28 10:26:00 +02:00
Emilio Cobos Álvarez
808432b271
style: Expose some properties to chrome code, and hide some accidentally-exposed ones. 2017-11-20 11:53:08 +01:00
Nazım Can Altınova
b2df766da8 style: Move -moz-force-broken-image-icon out of mako 2017-11-19 22:52:18 +03:00
Emilio Cobos Álvarez
01e41d0439
style: Replace "internal" properties with "enabled_in"
This allows enabling properties in ua sheets and chrome differently.

The setup is:

  * enabled_in needs to be one of the four values:
    ["", "ua", "chrome", "content"]

  * "chrome" implies "ua", and implies that they're explicitly enabled.

  * "" implies the property will never be parsed.

  * "content" implies the property is accessible unconditionally, modulo a pref.

Experimental still keeps trumping over those when the pref is enabled.

This PR replaces uses of internal="" by enabled_in="ua" or enabled_in="".

This may seem that it changes behavior, but since the properties where I added
enabled_in="" already unconditionally error from parse it's not.

Next step is annotating chrome-only properties.
2017-11-18 05:15:19 +01:00
Xidorn Quan
79ea639458 Add general impl in gecko_properties for TransformOrigin value and add -moz-window-transform-origin. 2017-11-12 10:59:55 -08:00
Xidorn Quan
dfbf632fd6 Add general impl in gecko_properties for Transform value and add -moz-window-transform. 2017-11-12 10:59:54 -08:00
Gecko Backout
2c1b041fc6 Backed out changeset d77275db6419 (bug 1374178) for failure reftests/transform-3d/translatez-1a.html r=backout a=backout on a CLOSED TREE
Backs out https://github.com/servo/servo/pull/19106
2017-11-07 06:49:27 +00:00
Xidorn Quan
7dfcbb582a Add general impl in gecko_properties for TransformOrigin value and add -moz-window-transform-origin. 2017-11-06 11:49:53 -08:00
Xidorn Quan
9f5195eeec Add general impl in gecko_properties for Transform value and add -moz-window-transform. 2017-11-06 11:49:52 -08:00
Xidorn Quan
c7172052f9 Add support for -moz-window-opacity to stylo 2017-10-30 16:33:51 +11: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
Xidorn Quan
53a786cea6 Use exhaustive match for cloning keyword value by default for property using enum class 2017-09-14 18:48:12 +10: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
b16c2572a9 Do not use CVAS for the -moz-force-broken-image-icon property 2017-09-11 18:41:21 +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
4486758fae make -moz-user-select property animatable 2017-07-20 12:26:21 +09:00
Xidorn Quan
9299a0dc2c Handle prefixed value of -moz-user-select properly 2017-06-29 14:37:28 -07:00
Simon Sapin
a5bb55790f Untry style 2017-06-18 13:18:13 +02:00
bors-servo
061cb5f48e Auto merge of #16752 - jdm:css-parse-error, r=SimonSapin
Report more informative CSS errors

This requires https://github.com/servo/rust-cssparser/pull/143 for the final commit. There's no better way to split that work up, unfortunately, and it's extremely easy to bitrot. I would appreciate if we could expedite reviewing this work.

This is the work necessary to enable https://bugzilla.mozilla.org/show_bug.cgi?id=1352669. It makes sense to merge it separately because it's so much effort to keep it up to date with the ongoing Stylo work.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [x] There are tests for these changes

<!-- 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/16752)
<!-- Reviewable:end -->
2017-06-09 14:31:48 -07:00
Josh Matthews
27ae1ef2e7 Thread ParseError return values through CSS parsing. 2017-06-09 16:46:25 -04:00
Daisuke Akatsuka
367c0a4b43 Implements numeric field type properties animatable 2017-06-09 23:46:51 +09:00
daisuke
23e673f2a2 Implements ui related discrete animatable properties 2017-05-29 23:09:30 +09:00
daisuke
917dbdfdbd Implements simple discrete animatable properties 2017-05-29 16:08:09 +09:00
Manish Goregaokar
dd1cc6bb45 stylo: Support -moz-window-shadow 2017-05-26 22:34:03 -07:00
Anthony Ramine
00bfc6b172 Remove a lot of unused imports 2017-05-20 15:23:19 +02:00
Anthony Ramine
2c9a2f61f4 Implement -moz-force-broken-image-icon in geckolib 2017-05-01 15:00:23 +02:00
Hiroyuki Ikezoe
94fb839fdd Rename animation_type to animation_value_type. 2017-04-24 15:23:39 +09: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
Stefano Chiodino
f195b247c0 #15842 Add gecko glue for caret-color.
Implement from(StyleComplexColor) for ColorOrAuto. Thanks @emilio. (+4 squashed commits)
Squashed commits:
[baf7cc0] Add clone to caret-color
[9cb82ca] Correctly call methods to copy a color in a SympleComplexColor and getting its auto
[c483f07] Add set and copy functions for caret_color
[0aa20be] Move caret-color and set its product property to gecko
2017-03-16 16:13:34 +00:00
Xidorn Quan
a304b5bfac Fix -moz-user-select: tri-state 2017-03-15 20:23:09 +11:00
Nazım Can Altınova
bae7c50ef7
Fix wrong initial values in various single keyword properties 2017-03-10 17:18:22 +03:00
austinprete
a2074f2653 Implement parsing/serialization for caret-color 2017-03-05 10:52:32 -07:00
Karan Singh
3d5b607ba5 Add remaining keyword values of -moz-user-select (fixes #15197) 2017-03-03 16:13:54 +01:00
Manish Goregaokar
2410591119 Implement -moz-window-dragging
MozReview-Commit-ID: Ed6qYsOi5Ix
2017-02-09 10:16:29 -08:00
Xidorn Quan
8a8ef48fb3 Add other property aliases 2017-01-11 11:18:01 +11:00
Manish Goregaokar
0c6829aea1 Add spec links for ui properties 2017-01-03 14:03:37 -08:00
Cameron McCormack
0ff7b5f2de Support declaring keyword property Gecko coverage as inexhaustive.
This allows us to control whether the catchall case in the match expression
that maps Gecko const to Servo enum will be generated.

MozReview-Commit-ID: L65IjTONdfl
2016-12-05 21:38:58 -10:00
Emilio Cobos Álvarez
b1091dff58
stylo: Regenerate the world. 2016-08-15 22:58:32 -07: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
Keith Yeung
ff98e44654 Add -moz-user-select 2016-05-17 04:12:20 -04:00
Cameron McCormack
88f51af3f8 Add Servo_GetStyleFoo functions to get style structs from GeckoComputedValues.
While we're here we also:

* remove any code conditional on style_struct.gecko_ffi_name, since all
  style structs now do have a corresponding Geckos struct

* add new UIReset and XUL style structs, so that all Gecko structs are
  now present (apart from Variables, which is special)
2016-04-27 17:13:26 +10:00