bors-servo
575fecf810
Auto merge of #19953 - emilio:cleanup, r=wafflespeanut
...
style: Various cleanups
See each commit for details.
<!-- 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/19953 )
<!-- Reviewable:end -->
2018-02-05 07:17:54 -05:00
Emilio Cobos Álvarez
b76bbdf501
style: Make input[type=number] pseudo-elements accessible to chrome.
...
Bug: 1433389
Reviewed-by: jwatt
MozReview-Commit-ID: 2ycajPYd3CV
2018-02-05 13:05:26 +01:00
Emilio Cobos Álvarez
2090371203
style: Cleanup indentation of Position::parse_quirky.
2018-02-05 13:02:56 +01:00
Emilio Cobos Álvarez
a03aa1b4b9
style: Cleanup the indentation of a function.
2018-02-05 13:02:55 +01:00
Emilio Cobos Álvarez
d4b238bada
style: Cleanup shape-outside code.
2018-02-05 13:02:54 +01:00
Emilio Cobos Álvarez
57ebb2c8af
style: Use debug_assert_eq!.
2018-02-05 13:02:54 +01:00
Emilio Cobos Álvarez
7178e9bf69
style: Remove stray space.
2018-02-05 13:02:53 +01:00
Emilio Cobos Álvarez
412f0133ca
style: Remove unneeded impl block.
2018-02-05 13:02:52 +01:00
Emilio Cobos Álvarez
c72a5623b1
style: Avoid double hash lookup when inserting in OrderMap.
2018-02-05 13:02:52 +01:00
Emilio Cobos Álvarez
001653080d
style: Update bindings.
2018-02-05 11:54:02 +01:00
Emilio Cobos Álvarez
1804f135ec
style: Optimize @keyframes rule insertions.
...
Bug: 1435214
Reviewed-by: xidorn,hiro
MozReview-Commit-ID: AHwhZynLBv
2018-02-05 11:54:01 +01:00
Emilio Cobos Álvarez
9c66b07b67
style: Make insertion of @font-face rules not necessarily restyle the whole document.
...
Bug: 1435214
Reviewed-by: xidorn
MozReview-Commit-ID: 5ewKiShUHNi
2018-02-05 11:24:40 +01:00
Anthony Ramine
3918c983e1
Use LonghandId::is_animatable in PropertyDeclaration::is_animatable
2018-02-04 23:23:21 +01:00
Anthony Ramine
90b37cfa21
Use less type aliases from longhands in PropertyDeclaration
...
This will help us reuse code between different variants in a later patch,
to implement Clone by hand to optimise it.
2018-02-04 22:57:53 +01:00
Anthony Ramine
df11a7fec7
Simplify counter CSS properties
2018-02-04 14:52:38 +01:00
bors-servo
2f8cd0fe22
Auto merge of #19941 - emilio:cleanup-style-builder, r=emilio
...
style: Handle correctly nested links.
Followup to #19935 , since I'm dumb and missed some orange in my try run.
<!-- 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/19941 )
<!-- Reviewable:end -->
2018-02-03 15:28:58 -05:00
Emilio Cobos Álvarez
2e08ab1492
style: Handle correctly nested links.
...
Followup to #19935 , since I'm dumb and missed that orange.
2018-02-03 20:45:56 +01:00
bors-servo
bad455138f
Auto merge of #19938 - servo:single-keyword, r=emilio
...
Simplify single_keyword
<!-- 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/19938 )
<!-- Reviewable:end -->
2018-02-03 14:27:18 -05:00
Anthony Ramine
70a99cef15
Derive ToComputedValue for keywords without extra specified values
2018-02-03 18:44:56 +01:00
Emilio Cobos Álvarez
349d6e7167
style: Cleanup StyleBuilder.
...
This is in preparation of a cascade optimization for custom properties.
This fixes various fishiness around our StyleBuilder stuff. In particular,
StyleBuilder::for_derived_style (renamed to for_animation) is only used to
compute specified values, and thus doesn't need to know about rules, visited
style, or other things like that.
The flag propagation that was done in StyleAdjuster is now done in StyleBuilder,
since we know beforehand which ones are always inherited, and it simplified the
callers and the StyleAdjuster code. It also fixed some fishiness wrt which flags
were propagated to anon boxes and text.
The text-decoration-lines bit is interesting, because the way it was implemented
in #17722 meant that display: contents elements did get HAS_DECORATION_LINES
flags only if its parent also had it, so in practice the Contents check
preserves behavior, but it's only an optimization looking at Gecko's call-sites,
so we can remove it too.
MozReview-Commit-ID: 6BHCyEO2U8c
2018-02-03 18:07:25 +01:00
Emilio Cobos Álvarez
7fb470c373
style: Remove some uses of StyleBuilder::for_derived_style.
...
for_derived_style(default_values) is effectively for_inheritance(default_values).
MozReview-Commit-ID: DfTeD49uTlp
2018-02-03 17:40:35 +01:00
Anthony Ramine
ccc932ad10
Don't duplicate specified and computed keywords
...
The previous code would generate two distinct types for specified and
computed values if some variants had aliases.
2018-02-03 15:22:08 +01:00
bors-servo
0a8c58dce9
Auto merge of #19927 - bholley:sheet_flush_optimization, r=emilio
...
Avoid stylist flushes when sheets are appended and then removed again before flusing layout
https://bugzilla.mozilla.org/show_bug.cgi?id=1434756
<!-- 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/19927 )
<!-- Reviewable:end -->
2018-02-01 12:59:35 -06:00
Bobby Holley
1d6841b9fd
Avoid stylist flushes when sheets are appended and then removed again before flushing layout.
...
MozReview-Commit-ID: CHgbqfHnjwI
2018-02-01 09:14:07 -08:00
bors-servo
a07002a0f0
Auto merge of #19923 - emilio:less-crappy-code, r=nox
...
style: Cleanup and remove unused / dubious Length stuff.
On top of #19918 , turns out that the parse_numbers_are_pixels stuff is unused.
<!-- 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/19923 )
<!-- Reviewable:end -->
2018-02-01 10:27:57 -06:00
bors-servo
38ef515463
Auto merge of #19529 - DonatJR:counter-reset-out-of-mako, r=emilio
...
style: moved css longhand counter-reset out of mako
<!-- Please describe your changes on the following line: -->
This is a sub-PR of #19015
Code does not yet compile with `build-geckolib`.
r? emilio
---
<!-- 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 #19387
<!-- Either: -->
- [x] These changes do not require tests
<!-- 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/19529 )
<!-- Reviewable:end -->
2018-02-01 09:42:40 -06:00
Jonas Reinwald
d24301b7a0
moved css longhand counter-reset out of mako
2018-02-01 15:43:40 +01:00
Emilio Cobos Álvarez
deac051cb9
style: Cleanup and remove unused / dubious Length stuff.
...
On top of #19918 , turns out that the parse_numbers_are_pixels stuff is unused.
2018-02-01 15:27:39 +01:00
bors-servo
d222c9501b
Auto merge of #19924 - emilio:bim, r=emilio
...
style: Move border-image-repeat outside of mako.
This is a rebased / nitpick-addressed / bug-fixed version of #19021 , and with a commit from #19668 renaming the two `RepeatKeyword`s to different names.
<!-- 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/19924 )
<!-- Reviewable:end -->
2018-02-01 08:24:12 -06:00
Mauricio Collares
8e411105ce
style: Rename background::RepeatKeyword and border::RepeatKeyword.
2018-02-01 15:23:41 +01:00
chansuke
50b517d0db
style: Move border-image-repeat outside of mako.
2018-02-01 13:59:10 +01:00
bors-servo
dcd13b857c
Auto merge of #19918 - emilio:font-stuff-is-a-mess, r=nox
...
style: Refactor font-feature-settings and font-variation-settings.
This fixes all known issues with serialization and parsing of these two
properties, and in particular calc handling and such:
https://bugzilla.mozilla.org/show_bug.cgi?id=1434692
https://bugzilla.mozilla.org/show_bug.cgi?id=1434724
Also does a fair amount of cleanup and all that, which was needed, this code
was a mess.
There are further cleanups that can be done, like renaming the
font-variation-settings animation stuff.
<!-- 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/19918 )
<!-- Reviewable:end -->
2018-02-01 06:45:20 -06:00
Emilio Cobos Álvarez
3b34d734e6
style: Refactor font-feature-settings and font-variation-settings.
...
This fixes all known issues with serialization and parsing of these two
properties, and in particular calc handling and such:
https://bugzilla.mozilla.org/show_bug.cgi?id=1434692
https://bugzilla.mozilla.org/show_bug.cgi?id=1434724
Also does a fair amount of cleanup and all that, which was needed.
2018-02-01 12:54:45 +01:00
Anthony Ramine
3d99a4489c
Don't use define_css_keyword_enum in style anymore
2018-02-01 12:43:48 +01:00
Anthony Ramine
09e304adb3
Rename FillRule variants to follow the same rules as other enums
2018-02-01 12:43:29 +01:00
Anthony Ramine
bac8781cc7
Kill define_numbered_css_keyword_enum
2018-02-01 12:43:28 +01:00
Anthony Ramine
1f8777bb0b
Move TransformStyle out of Mako files
2018-02-01 12:40:36 +01:00
Anthony Ramine
579cef6a69
Rename #[parse(aliases)] to #[css(aliases)]
2018-02-01 10:36:14 +01:00
Anthony Ramine
3fba02a0d6
Fix naming of ExtremumLength variants
2018-02-01 10:04:27 +01:00
bors-servo
e6d9c251d1
Auto merge of #19912 - emilio:ordermap, r=Manishearth
...
style: Temporarily use OrderMap on Gecko.
This will allow us to discard std hash map as a source of crashes.
<!-- 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/19912 )
<!-- Reviewable:end -->
2018-01-31 21:33:36 -06:00
Emilio Cobos Álvarez
09398d42af
style: Move a bunch of font stuff living under generics to the proper module.
...
FontSettingsTagInt and such shouldn't be in the generic module, I know...
But that will change in a bit.
2018-02-01 02:35:33 +01:00
Emilio Cobos Álvarez
1380f1a14f
style: Remove the stupid space serialization on font-settings.
2018-02-01 02:35:32 +01:00
Emilio Cobos Álvarez
190e9b9715
style: Tidy and sprinkle some comments.
2018-02-01 02:35:31 +01:00
CJ Ku
8a4661b829
Implement Animate trait for individual transforms
2018-01-31 22:15:31 +00:00
CJ Ku
9a62c0bf02
Implement interpolation of Quaternions
...
So that we can reuse the code in ComputedRotate.
2018-01-31 22:12:35 +00:00
CJ Ku
174f5f7128
Implement scale property styling
2018-01-31 22:12:34 +00:00
CJ Ku
de3e8c9a8b
Implement translate property styling
2018-01-31 22:12:33 +00:00
CJ Ku
62c0c6feee
Implement rotate property styling
2018-01-31 22:12:26 +00:00
Brian Birtles
a8c133d07e
Update bindings
2018-01-31 21:10:10 +00:00
bors-servo
4bd0590117
Auto merge of #19915 - emilio:color-errors-whee, r=jdm
...
stylo: Fix missing null terminator in error reporting code.
This was causing the patch in bug 1420026 to fail.
<!-- 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/19915 )
<!-- Reviewable:end -->
2018-01-31 12:37:33 -06:00