Commit graph

2338 commits

Author SHA1 Message Date
bors-servo
fd8b4b59c2 Auto merge of #19119 - CYBAI:font-size-out-of-mako, r=emilio
style: Move font-size outside of mako

This is a sub-PR of #19015
r? emilio

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #19111  (github issue number if applicable).
- [x] These changes do not require tests

<!-- 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/19119)
<!-- Reviewable:end -->
2017-11-08 04:05:47 -06:00
CYBAI
0f57d250bb style: Move font-size outside of mako 2017-11-08 14:31:06 +08: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
Emilio Cobos Álvarez
7f073456f9
style: respect allow_quirks for boxed properties.
This will unblock #19119
2017-11-07 14:25:51 +01: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
79fb584eac Use helpers.predefined_type for transform property. 2017-11-06 11:49:50 -08:00
Markus Stange
c439475b66 Bug 1414147 - Move fontSmoothingBackgroundColor from nsStyleUserInterface to nsFont, stylo changes. 2017-11-04 12:46:03 -04:00
bors-servo
107ead64d0 Auto merge of #19101 - CYBAI:moz-script-level-out-of-mako, r=emilio
style: Move font -moz-script-level outside of mako

This is a sub-PR of #19015
r? emilio

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #19068 (github issue number if applicable).
- [x] These changes do not require tests because _____

<!-- 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/19101)
<!-- Reviewable:end -->
2017-11-03 11:09:39 -05:00
CYBAI
d316c55590 style: Move font -moz-script-level outside of mako 2017-11-03 09:49:19 +08:00
Manish Goregaokar
cb9645cd17
Comments and minor fixes 2017-11-02 14:37:54 -07:00
Manish Goregaokar
5098948c0d
Handle distance calculation of new variants 2017-11-02 14:30:14 -07:00
Manish Goregaokar
ca02785e02
Handle case of empty transform lists 2017-11-02 14:30:12 -07:00
Manish Goregaokar
9c9a181f35
Allow cross interpolation between differing translate/scale functions
See ToPrimitive() in StyleAnimationValue.cpp
2017-11-02 14:30:11 -07:00
Manish Goregaokar
f699b8cfb2
Handle animating 2D matrices 2017-11-02 14:30:10 -07:00
Manish Goregaokar
aba00be52d
Add more operations to animation 2017-11-02 14:30:09 -07:00
Manish Goregaokar
e15695289d
Add support for transform functions with an optional final argument in gecko glue 2017-11-02 14:30:08 -07:00
Manish Goregaokar
e20c508a6e
Add support for 2D matrices in Gecko glue 2017-11-02 14:30:07 -07:00
Manish Goregaokar
fc29de8986
Add support for more functions in Gecko glue 2017-11-02 14:30:06 -07:00
Manish Goregaokar
079b25db93
Share transform function lists between set_transform and clone_transform
This will also fix https://bugzilla.mozilla.org/show_bug.cgi?id=1405881
2017-11-02 14:30:05 -07:00
Manish Goregaokar
6631594e28
Replace old transform code with new generic code 2017-11-02 14:30:04 -07:00
Connor Brewster
285d8bb58b style: Move font-weight outside of mako 2017-11-01 11:06:40 -05:00
bors-servo
c882266c89 Auto merge of #19074 - emilio:font-size-woes, r=Manishearth
style: Avoid double-applying text-zoom for keywords.

Bug: 1412743
Reviewed-by: Manishearth

<!-- 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/19074)
<!-- Reviewable:end -->
2017-10-31 15:08:24 -05:00
Emilio Cobos Álvarez
ed9cf6b4eb
style: Avoid double-applying text-zoom for keywords.
Bug: 1412743
Reviewed-by: Manishearth
2017-10-31 20:20:55 +01:00
Emilio Cobos Álvarez
b721215a00
style: Update bindgen to 0.31.3.
Constified enums are default now. I think I want to introduce an option to
bindgen to allow setting the default enum behavior, but it doesn't need to block
this.

The ServoBindings.toml changes are somewhat hacky, but that's because of
https://github.com/rust-lang-nursery/rust-bindgen/issues/1125.

Also, the fixups now need to account for whitespace, since quote generates stuff
like root :: nsString, and we don't rustfmt the bindings if there's no rustfmt
installed.

Bug: 1412486
Reviewed-by: xidorn
MozReview-Commit-ID: EY5eNnCiTIw
2017-10-31 20:09:18 +01:00
Emilio Cobos Álvarez
480d2267e6
style: Don't force ComputedValues to derive Debug.
The code that uses it is of dubious utility, fwiw, but some of it is used on
Servo, so I'll kill that separately.

Bug: 1412486
Reviewed-by: xidorn
MozReview-Commit-ID: KauvXX32zLM
2017-10-31 17:30:52 +01:00
Bastien Orivel
29b4eec141 Bump bitflags to 1.0 in every servo crate 2017-10-30 23:36:06 +01:00
bors-servo
10227e3cd2 Auto merge of #19051 - CYBAI:moz-script-min-size-no-mako, r=emilio,canaltinova
style: Move font -moz-script-min-size outside of mako

This is a sub-PR for #19015
r? emilio

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #19034 (github issue number if applicable).
- [X] These changes do not require tests because _____

<!-- 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/19051)
<!-- Reviewable:end -->
2017-10-30 15:00:05 -05:00
bors-servo
7f8842f7a9 Auto merge of #19044 - cbrewster:text_overflow_nomako, r=emilio
style: Move text-overflow outside of mako

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

---
<!-- 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 are apart of #19015 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because refactoring.

<!-- 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/19044)
<!-- Reviewable:end -->
2017-10-30 14:04:52 -05:00
CYBAI
63cd930fd0 style: Move font -moz-script-min-size outside of mako 2017-10-31 00:44:55 +08:00
Xidorn Quan
c7172052f9 Add support for -moz-window-opacity to stylo 2017-10-30 16:33:51 +11:00
Connor Brewster
deb932784e style: Move text-overflow outside of mako 2017-10-27 23:09:05 -05:00
Boris Chiou
3a29c63250 Handle rotate, rotate{x|y|z}, and skew{x|y} properly when cloning transforms. 2017-10-27 21:18:31 +02:00
Boris Chiou
1f5551c397 Add Servo_AnimationValue_Transform which creates an AnimationValue of transform. 2017-10-27 21:18:11 +02:00
Connor Brewster
122626e46b Move table -x-span outisde of mako 2017-10-27 01:09:57 -05:00
CYBAI
cefc622e9b style: Move -x-text-zoom outside of mako 2017-10-27 02:32:59 +08:00
Emilio Cobos Álvarez
328f142f38
style: Cleanup a bit the scroll-snap-type properties.
Still not perfect, but at least a bit more consistent.
2017-10-25 20:12:37 +02:00
bors-servo
f9f71c7ed1 Auto merge of #19005 - emilio:less-mako-more-joy, r=jdm
style: Move animation-name and animation-iteration-count outside of mako.

<!-- 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/19005)
<!-- Reviewable:end -->
2017-10-24 15:29:21 -05:00
Emilio Cobos Álvarez
d972b07822
style: Move animation-name outside of mako. 2017-10-24 22:28:40 +02:00
Emilio Cobos Álvarez
71abec6205
style: Fix spec link for animation-iteration-count. 2017-10-24 22:28:39 +02:00
Emilio Cobos Álvarez
dc414134bf
style: Move animation-iteration-count outside of mako. 2017-10-24 22:28:34 +02:00
Emilio Cobos Álvarez
fd1e2c1f3f
style: Move background-repeat and mask-repeat outside of mako. 2017-10-24 15:31:11 +02:00
Emilio Cobos Álvarez
326f914018
style: Do not require to import ToCss in define_css_keyword_enum. 2017-10-24 14:30:51 +02:00
Emilio Cobos Álvarez
b8021335d7
style: Ensure logical longhands appear before their physical counter-part.
Bug: 1410028
Reviewed-by: xidorn
MozReview-Commit-ID: KPIbt1e2Eq
2017-10-23 08:37:49 +02:00
Jeremy Chen
d7a5f22408 stylo: Avoid using InterpolateMatrix as a fallback for matched transform function pair.
In the current implementation, if there is any interpolation error in a matched
transform function pair, we fall-back to use InterpolateMatrix unconditionally.
However, the error could be caused by:

1. mismatched transform function pair
2. matched transform function pair within at least one undecomposable matrix.

Using InterpolateMatrix for case 1 makes sense, however, using InterpolateMatrix
for case 2 does not. According to the spec, we should just report error for
case 2, and let the caller do the fallback procedure. Using InterpolateMatrix
for case 2 will go through more unnecessary code path, and produce more memory
usage and calculation cost, which should be avoidable.

In this patch, we add an extra pass to check if a transform function pair have
matched operations in advance. With this information, we can easily tell whether
the interpolation error in a equal-length transform function pair is caused by
case 1 or case 2. So, we can avoid the unnecessary cost.

Gecko bug: Bug 1399049
2017-10-20 15:04:43 +08: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
bors-servo
421baa854e Auto merge of #18932 - nnethercote:rename-size_of_is_0, r=emilio
Rename `size_of_is_0!` as `malloc_size_of_is_0!`.

The new name makes it clearer that it comes from the `malloc_size_of`
crate.

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

---
<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because it's a trivial name change.

<!-- 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/18932)
<!-- Reviewable:end -->
2017-10-18 02:17:40 -05:00