Commit graph

6493 commits

Author SHA1 Message Date
Bastien Orivel
2bd99317fb Update toml to 0.4 2018-03-13 10:24:11 +01:00
Igor Gutorov
217c4be2bf style: Fix a typo in Integer struct docs 2018-03-13 02:02:38 +02:00
Emilio Cobos Álvarez
9364cd21b8
style: Don't share style with an element that has a different proto binding than us.
See the lengthy comment about why... XBL sucks.

MozReview-Commit-ID: 8UgeJAVkj6a
2018-03-12 21:47:47 +01:00
Emilio Cobos Álvarez
c338745b17
style: Allow to share style across elements with similar XBL bindings. 2018-03-12 21:47:46 +01:00
bors-servo
cdaa36df2d
Auto merge of #20274 - emilio:moz-src, r=xidorn
style: Make the generated bindings really be formatted.

TOOLTOOL_DIR isn't passed down to the rust scripts it seems, per:

  https://treeherder.mozilla.org/#/jobs?repo=try&revision=46854db239166ab3a43d36c7a954debb56968eab

<!-- 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/20274)
<!-- Reviewable:end -->
2018-03-12 07:12:13 -04:00
Anthony Ramine
a6aac0ed5f Document #[animation(no_bound(…))] and #[distance(field_bound)] 2018-03-12 09:51:15 +01:00
Anthony Ramine
dcae5860a8 Share a single #[animation(no_bound(…))] for the animation traits 2018-03-12 09:48:25 +01:00
Anthony Ramine
ba12a344c6 Opt out of bounds on type params for #[derive(ToAnimatedZero)] 2018-03-12 09:48:25 +01:00
Anthony Ramine
6f7425059c Opt out of bounds on type params for #[derive(ComputeSquaredDistance)] 2018-03-12 09:48:24 +01:00
Anthony Ramine
5cc2d7c4b3 Opt out of trait bounds on type params for #[derive(Animate)]
This allows us to not generate trait bounds for field types anymore,
by excluding bounds for type parameters used only in fields annotated
with `#[animation(error)]`.

The syntax is `#[animation(no_bound(Foo, Bar))]` where `Foo` is a type
parameter for the type on which we derive things. Ideally this should
be an attribute on the type parameter but this isn't stable yet.
2018-03-12 09:47:18 +01:00
Emilio Cobos Álvarez
4295bef063
style: Make the generated bindings really be formatted.
TOOLTOOL_DIR isn't passed down to the rust scripts it seems, per:

  https://treeherder.mozilla.org/#/jobs?repo=try&revision=46854db239166ab3a43d36c7a954debb56968eab
2018-03-11 20:14:47 +01:00
Florian Wagner
85bb94be9c Refactor KeyframePercentage::parse. This adresses #20179 2018-03-11 11:41:52 +01:00
bors-servo
aa8fb3a204
Auto merge of #20252 - NeverHappened:extract_text_emphasis_style, r=upsuper
Extract text emphasis style

<!-- Please describe your changes on the following line: -->
Extracted the text-emphasis-style property out of the inherited_text.mako.rs.
This is a part of #19015

---
<!-- 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] `./mach cargo-geckolib check` does not report any errors
- [X] These changes fix #19940 (github issue number if applicable).

<!-- Either: -->
- [X] These changes do not require tests because it's a 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/20252)
<!-- Reviewable:end -->
2018-03-09 19:20:10 -05:00
bors-servo
909ebff184
Auto merge of #20258 - servo:derive-all-the-things, r=emilio
Continue to improve style_derive

<!-- 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/20258)
<!-- Reviewable:end -->
2018-03-09 17:29:05 -05:00
Dmitry
a1dd888c23 Rename entities that belong to text-emphasis-style value. Fix order of imports 2018-03-09 20:55:26 +03:00
Anthony Ramine
4d0bf2ddf9 Opt into field bounds for #[derive(ToComputedValue)] 2018-03-09 18:54:59 +01:00
Anthony Ramine
2efd06c12d Remove #[compute(clone)] 2018-03-09 15:45:34 +01:00
Emilio Cobos Álvarez
3fc5bf87d3
style: Fix serialization of place-items.
If the justify-items / align-items value has the `legacy` bit or anything like
that we shouldn't serialize it, just as we don't parse it.

Bug: 1339656
Reviewed-by: xidorn
MozReview-Commit-ID: JsM4NrePEU6
2018-03-09 14:48:43 +01:00
Anthony Ramine
afaa00a344 Remove some uses of trivial_to_computed_value 2018-03-09 11:57:22 +01:00
Anthony Ramine
491a79ee4e Don't bound on Copy to implement Animate for Size2D and Point2D 2018-03-09 11:57:21 +01:00
Anthony Ramine
9f631fd886 Don't derive Animate for Transform<T>
There is a custom implementation already in animated_properties.
2018-03-09 11:57:21 +01:00
Anthony Ramine
e82d0c20a6 Don't use #[animation(constant)] in ShapeBox
We can just rely on the implementation for the involved fields to return an error
if the values are different.
2018-03-09 11:56:49 +01:00
Dmitry
acdb4df53b Fix test-tidy formatting errors 2018-03-09 01:39:31 +03:00
Emilio Cobos Álvarez
a37bb8e6aa
style: Reorder style sharing checks so that cheaper and broader ones are earlier. 2018-03-08 22:50:34 +01:00
Dmitry
4739775877 Remove duplicate derive for text emphasis style enum 2018-03-09 00:27:09 +03:00
Dmitry
6febdf3751 Add docs for text-emphasis-property values 2018-03-09 00:04:32 +03:00
Dmitry
73113e28dd Move text-emphasis-style variables out of mako templates 2018-03-09 00:04:32 +03:00
bors-servo
4c797dfb52
Auto merge of #20247 - bholley:fix_stat_collection, r=Manishearth
Stop unconditionally collecting traversal statistics in nightly builds

The current code also makes us panic when DUMP_STYLE_STATISTICS=1 is
set. :-(

<!-- 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/20247)
<!-- Reviewable:end -->
2018-03-08 15:53:11 -05:00
Bobby Holley
4a2e1be874 Stop unconditionally collecting traversal statistics in nightly builds.
The current code also makes us panic when DUMP_STYLE_STATISTICS=1 is
set. :-(

MozReview-Commit-ID: JWGMojOnGFK
2018-03-08 11:32:21 -08:00
bors-servo
46dfc35364
Auto merge of #20245 - mbrubeck:logging, r=emilio
Disable logging in bindgen to reduce code size

This disables bindgen's `logging` feature, which builds `env_logger`
with default features, including regex support.  Disabling it allows
Gecko to build `env_logger` without the `regex` crate, reducing code
size.

Part of https://bugzilla.mozilla.org/show_bug.cgi?id=1444097

---

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes do not require tests because they only change unused build config

<!-- 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/20245)
<!-- Reviewable:end -->
2018-03-08 13:36:04 -05:00
bors-servo
b6de0563fb
Auto merge of #20237 - servo:derive-all-the-things, r=emilio
Opt into field bounds when deriving ToCss, instead of opting out

<!-- 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/20237)
<!-- Reviewable:end -->
2018-03-08 12:25:20 -05:00
bors-servo
9b540d199e
Auto merge of #20241 - emilio:xbl-faster, r=bholley
style: Make getting the XBL binding faster.

<!-- 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/20241)
<!-- Reviewable:end -->
2018-03-08 11:31:35 -05:00
Matt Brubeck
2f2bfb23db Disable logging in bindgen to reduce code size
This disables bindgen's `logging` feature, which builds `env_logger`
with default features, including regex support.  Disabling it allows
Gecko to build `env_logger` without the `regex` crate, reducing code
size.

Part of https://bugzilla.mozilla.org/show_bug.cgi?id=1444097
2018-03-08 08:06:48 -08:00
Anthony Ramine
2074e8902a Derive ToCss for SVGStrokeDashArray<T> 2018-03-08 16:35:13 +01:00
Anthony Ramine
36db6f9cdd Derive ToCss for FontSettings<T> 2018-03-08 16:35:13 +01:00
Anthony Ramine
91e12563eb Derive ToCss for Transform<T>
Now that #[derive(ToCss)] unconditionally bounds type params, we can derive
the trait for Transform<T>.
2018-03-08 16:35:12 +01:00
Anthony Ramine
859002a81f Opt into field bounds when deriving ToCss, instead of opting out 2018-03-08 16:33:19 +01:00
bors-servo
212c321145
Auto merge of #20240 - emilio:special-color-fix, r=upsuper
style: Fix special color keywords.

They're -moz-activehyperlinktext and -moz-visitedhyperlinktext.

This fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1444059.

<!-- 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/20240)
<!-- Reviewable:end -->
2018-03-08 10:06:03 -05:00
bors-servo
8133f788cf
Auto merge of #20236 - emilio:to-css-skip-if, r=nox
Introduce #[css(skip_if)]

This is most of #20224 but without the actual counter() fix since it's waiting on a WPT update.

<!-- 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/20236)
<!-- Reviewable:end -->
2018-03-08 09:16:55 -05:00
Emilio Cobos Álvarez
da97d56d4e
style: Make getting the XBL binding faster.
MozReview-Commit-ID: GPj3uv4xgAv
2018-03-08 14:12:08 +01:00
Emilio Cobos Álvarez
0717047e1e
style: Make weird color parsing marginally faster. 2018-03-08 14:08:54 +01:00
Emilio Cobos Álvarez
2192090ea5
style: Fix special color keywords.
They're -moz-activehyperlinktext and -moz-visitedhyperlinktext.
2018-03-08 14:01:09 +01:00
Xidorn Quan
ecbc55ffcf Construct URLValue eagerly and share it between specified value and style structs. 2018-03-08 23:34:35 +11:00
Xidorn Quan
fa5d76c395 Split CssUrl from SpecifiedUrl for non-value URLs. 2018-03-08 23:34:34 +11:00
Xidorn Quan
0090fbb3c8 Move ComputedUrl into their impl mods. 2018-03-08 23:34:33 +11:00
Xidorn Quan
d001fd9a0a Move Parse impl of SpecifiedUrl into corresponding files. 2018-03-08 23:34:33 +11:00
Xidorn Quan
a99ca543cd Add SpecifiedImageUrl for <url> used as images. 2018-03-08 23:34:32 +11:00
Xidorn Quan
14b708311b Remove some useless clone() call on SpecifiedUrl::image_value. 2018-03-08 21:35:33 +11:00
Emilio Cobos Álvarez
0d7dae1f85
style: Derive ToCss for TimingFunction. 2018-03-08 10:28:11 +01:00
Emilio Cobos Álvarez
1f4b3556e6
style: reindent list-style-type. 2018-03-08 10:26:40 +01:00