Commit graph

138 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
54b444992d
Fix servo build. 2018-04-28 10:26:47 +02:00
Mats Palmgren
62c6f58a5b
style: Add 'row-gap' and 'gap' properties; make 'grid-[column|row]-gap' and 'grid-gap' alias the respective unprefixed properties.
This also makes 'normal' the initial value for the grid-*
properties, per:
https://github.com/w3c/csswg-drafts/issues/2294#issuecomment-369313438

Bug: 1398482
Reviewed-by: emilio
2018-04-28 10:26:08 +02:00
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
Emilio Cobos Álvarez
593e4e4c9e
style: Rename justify-items: auto to legacy.
Bug: 1363875
Reviewed-by: mats,xidorn
MozReview-Commit-ID: Jfwib2XDmSw
2018-04-28 10:25:58 +02:00
Xidorn Quan
7403ec8b70
style: Support prefs for aliases.
Bug: 1453521
Reviewed-by: heycam
MozReview-Commit-ID: 8DAFmLDVYlR
2018-04-16 20:15:13 +02:00
Emilio Cobos Álvarez
744809a8b2
style: Add support for 'flex-basis:content' in the style system.
Bug: 1105111
Reviewed-by: xidorn
MozReview-Commit-ID: 5WhgHJJ0mDB
2018-04-02 03:17:56 +02:00
Emilio Cobos Álvarez
6cc6280004
style: Remove a stray pref value.
This should've been removed in
https://bugzilla.mozilla.org/show_bug.cgi?id=1398492
2018-02-28 00:33:41 +01:00
Anthony Ramine
b44ffcf498 Replace IntegerOrAuto with ZIndex
It's its only use.
2018-02-20 15:18:22 +01:00
Manish Goregaokar
daea6d0f75 Set restyle_damage = reflow for some more properties 2018-02-09 08:48:07 -08:00
Manish Goregaokar
6ba23fe58a Set damage for min/max width/height to reflow_and_bubble 2018-02-09 08:48:05 -08:00
Manish Goregaokar
8c2b7b41ef Autogenerate compute_damage (fixes #10622) 2018-02-09 08:48:04 -08:00
Emilio Cobos Álvarez
d9ae47cb13
style: Fix interpolation of the gecko-size properties.
Followup to #19966 because, well...

The animation code should probably be more obvious.
2018-02-07 07:02:48 +01:00
Emilio Cobos Álvarez
ed2ba30261
style: Sprinkle some comments. 2018-02-07 03:11:14 +01:00
Emilio Cobos Álvarez
32c409d5aa
style: Get rid of gecko_size_type.
This also fixes a style sharing issue with MaxLength, anecdotally.
2018-02-07 02:05:30 +01:00
Emilio Cobos Álvarez
100f4cd7c3
style: "%s" % foo is pointless. 2018-02-06 23:06:08 +01:00
Emilio Cobos Álvarez
a0d0769998
style: Move flex-basis out of gecko_size_type. 2018-02-06 23:06:07 +01:00
CYBAI
9004ffff46 Implement GridTemplateAreas with reference counting 2018-01-31 09:53:34 +08:00
Emilio Cobos Álvarez
8d7a3f4f3d
style: Update align-self / justify-self to the spec too.
MozReview-Commit-ID: 8JKF5ucCbYm
2018-01-29 10:37:17 +01:00
Emilio Cobos Álvarez
7497720081
style: Make content distribution parsing know the axis it's parsed for.
MozReview-Commit-ID: LMPXVtKU1mq
2018-01-29 10:37:16 +01:00
Emilio Cobos Álvarez
711ea51d7b
style: Rename AlignJustifySelf to SelfAlignment.
This matches the spec term and, again, the two properties will have different
grammars soon.

MozReview-Commit-ID: 8f8JXj2NnCi
2018-01-24 14:34:04 +01:00
Emilio Cobos Álvarez
d4a44de928
style: Rename AlignJustifyContent to ContentDistribution.
align-content and justify-content will have different types in a second.

MozReview-Commit-ID: 5JDeR5kXZNP
2018-01-24 14:34:03 +01:00
CYBAI
3f6a613bea Use Python's True instead of string for arbitrary Python code in mako 2018-01-13 00:23:30 +08:00
Emilio Cobos Álvarez
af3a50a9d9
style: Remove the grid pref.
Bug: 1398492
Reviewed-by: mats
MozReview-Commit-ID: 6Qez8NE8oze
2017-12-16 22:10:22 +01:00
CYBAI
003ddfc945 style: Move grid-template-areas outside of mako 2017-11-29 22:36:55 +08:00
CYBAI
09321bfb68 style: Move grid-auto-flow outside of mako 2017-11-26 23:51:02 +08:00
Emilio Cobos Álvarez
187d28c732
style: Add gecko_pref annotation to the properties. 2017-11-16 02:44:35 +01:00
Emilio Cobos Álvarez
7adad61db8
style: Get rid of parse_specified.
It has a single use, and I don't think we should use it in the future.
2017-11-08 01:33:13 +01:00
Gecko Backout
11c64178d8 Backed out changeset e64e659c077d: servo PR #18809 and revendor for reftest failures, e.g. in layout/reftests/bugs/392435-1.html. r=backout on a CLOSED TREE
Backs out https://github.com/servo/servo/pull/18809
2017-10-19 21:26:51 +00:00
Bastien Orivel
e8e2d0a4b2 Update bitflags to 1.0 in every servo crate
It still needs dependencies update to remove all the other bitflags
versions.
2017-10-19 15:01:17 +02: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
Manish Goregaokar
8bce37e6ba stylo: use FnvHashMap everywhere, remove default HashMap construction methods 2017-10-03 14:10:31 -07: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
Boris Chiou
b89286e8e7 Use CSSPixelLength in LengthOrPercentage{*}.
Replace Au with CSSPixelLength in LengthOrPercentage,
LengthOrPercentageOrAuto, and LengthOrPercentageOrNone.
2017-09-13 18:10:46 +08:00
Emilio Cobos Álvarez
84f3073402
style: Avoid ComputedValueAsSpecified in template-areas.
Would need to impl ToComputedValue for Range and Box, which is undoable right
now.
2017-09-11 11:22:21 +02:00
Emilio Cobos Álvarez
5b05aa7c52
style: Derive ToComputedValue in grid properties. 2017-09-11 11:22:20 +02:00
Manish Goregaokar
5cd296a264
stylo: Replace all hashtable collections with ones from style::hash 2017-08-31 16:28:30 -07: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
bors-servo
32f835260c Auto merge of #17984 - Manishearth:rm-testing, r=SimonSapin
Remove style/testing feature

We added this because a year ago we had no reliable Gecko CI. This meant that Gecko-only properties needed to be tested *somehow*, and we solved that by making it so that for unit tests we compile all properties, not just the servo ones.

This was useful back then, but I don't think we need this anymore. We have reliable Gecko CI, and all the gecko-only stuff we tested is adequately handled by the properties-database parsing mochitests. It's a bit of annoying cruft that just complicates things; we probably should remove it.

r? @emilio or @SimonSapin

<!-- 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/17984)
<!-- Reviewable:end -->
2017-08-08 07:35:29 -05:00
Manish Goregaokar
2ebce54d75 Remove testing feature from style crate 2017-08-07 14:30:31 -07:00
Boris Chiou
1e79e5fe1b Bug 1374233 - Part 10: Implement ToAnimatedValue for MozLength and MaxLength.
For flex-basis, width/height, {max|min}-width, {max|min}-height.

MozReview-Commit-ID: 4gGYSXoBS8e
2017-08-04 14:23:25 +08:00
Boris Chiou
e72a0f126e Bug 1374233 - Part 7: Add NonNegativeLengthOrPercentage.
For padding-{*} and grid-{*}-gap.

MozReview-Commit-ID: 81G0b1k6JnD
2017-08-04 14:23:21 +08:00
Boris Chiou
4cc97746f2 Bug 1374233 - Part 1: Add NonNegativeNumber and GreaterThanOrEqualToOneNumber.
NonNegativeNumber: for -moz-box-flex, flex-grow, and flex-shrink.
GreaterThanOrEqualToOneNumber: for stroke-miterlimit.

MozReview-Commit-ID: Kgbt99BPdVA
2017-08-04 14:21:21 +08:00
Daisuke Akatsuka
f4bd93ea38 Make grid-template-columns/rows animatable 2017-08-01 17:13:42 +09:00
Daisuke Akatsuka
4dcc2d1c9d Make grid-template-areas animatable 2017-08-01 17:12:23 +09:00
Emilio Cobos Álvarez
2d9255bff1
style: Get rid of GetParentAllowServo in implementation of CSS 'justify-items' property.
Bug: 1384542
Reviewed-by: heycam
MozReview-Commit-ID: 4qydjqSoVXs
2017-07-31 11:55:04 +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
710637c53b stylo: Properly serialize grid shorthand 2017-07-06 21:44:42 -07:00