Commit graph

6718 commits

Author SHA1 Message Date
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
Emilio Cobos Álvarez
989e1c2e68
style: Remove outdated TODO. 2018-03-08 10:26:24 +01:00
bors-servo
2f4c13d27d
Auto merge of #20230 - servo:derive-all-the-things, r=emilio
Introduce #[css(if_empty = "…", iterable)]

<!-- 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/20230)
<!-- Reviewable:end -->
2018-03-07 11:06:09 -05:00
Emilio Cobos Álvarez
ef4ea7cc49
style: Separate the XBL and shadow dom styling bits.
Bug: 1441022
Reviewed-by: xidorn
MozReview-Commit-ID: 2W0BmZ8wWXg
2018-03-07 15:42:28 +01:00
Anthony Ramine
90b23963b7 Introduce #[css(if_empty = "…", iterable)] 2018-03-07 13:07:13 +01:00
Anthony Ramine
92f116a95c Derive ToCss for TemplateAreas 2018-03-07 12:32:53 +01:00
Xidorn Quan
20ec610e68 Do not disable thread pool in the parent process. 2018-03-07 09:40:33 +11:00
bors-servo
785b7c7775
Auto merge of #20211 - servo:derive-all-the-things, r=emilio
Improve #[derive(ToCss)]

<!-- 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/20211)
<!-- Reviewable:end -->
2018-03-06 11:42:58 -05:00
Emilio Cobos Álvarez
a5fc724349
style: Add a comment about the weird setup for justify-items.
And derive ToCss while at it.
2018-03-06 11:28:41 +01:00
Anthony Ramine
85950a801f Move #[css(iterable)] on fields rather than variants 2018-03-06 11:08:19 +01:00
Anthony Ramine
2aa5f68c92 Derive ToCss for FontSize 2018-03-05 15:53:16 +01:00
Anthony Ramine
ca45695db1 Introduce #[css(skip)] 2018-03-05 15:53:15 +01:00
Anthony Ramine
75b05c518d Derive ToCss for DeclaredValueOwned rather than DeclaredValue 2018-03-05 12:02:32 +01:00
Anthony Ramine
247bcbbbd6 Derive ToCss for all vector longhands that cannot be empty
We don't need to check for emptiness and write `none` for them.
2018-03-05 12:02:31 +01:00
Anthony Ramine
31036d6510 Derive ToCss for MediaList
This uncovered the fancy snowflake `use fmt::Write` in the impl of ToCss
for NonTSPseudoClass.
2018-03-05 12:02:31 +01:00
Anthony Ramine
fb8b6fc0a5 Derive ToCss for CounterBound 2018-03-05 12:02:30 +01:00
Anthony Ramine
0b3a5b42ba Introduce enum CounterBound for the bounds in counter_style::Ranges 2018-03-05 12:02:25 +01:00
bors-servo
fbeb5a81a8
Auto merge of #20194 - emilio:ascii-ext-stuff, r=nox
style: remove unused AsciiExt imports.

eq_ignore_ascii_case is not in AsciiExt since rustc 1.23.

<!-- 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/20194)
<!-- Reviewable:end -->
2018-03-04 13:35:04 -05:00
bors-servo
1783e41f34
Auto merge of #20191 - jfkthame:font-shorthand-resets-variation-settings, r=emilio
style: Make 'font' shorthand reset 'font-variation-settings' property

As required by the spec: https://drafts.csswg.org/css-fonts-4/#font-prop

See https://bugzilla.mozilla.org/show_bug.cgi?id=1435983

Basically, make font-variation-settings work in the same way as font-feature-settings
already does.

- [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).

- [ ] There are tests for these changes OR
- [X] These changes do not require tests because font-variation-settings isn't supported in servo; it is implemented here for gecko/stylo, and will be tested by mozilla-central mochitests.

<!-- 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/20191)
<!-- Reviewable:end -->
2018-03-04 11:50:56 -05:00
Emilio Cobos Álvarez
39a3d93b4f
style: remove unused AsciiExt imports.
eq_ignore_ascii_case is not in AsciiExt since rustc 1.23.
2018-03-04 15:31:06 +01:00
bors-servo
a716dfd40b
Auto merge of #20192 - servo:derive-all-the-things, r=emilio
Derive ToCss for DeclaredValue

<!-- 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/20192)
<!-- Reviewable:end -->
2018-03-04 09:29:01 -05:00
Anthony Ramine
886554dba5 Derive ToCss for DeclaredValue 2018-03-04 15:21:11 +01:00
Anthony Ramine
1937f594ac Implement ToCss for UnparsedValue 2018-03-04 15:16:09 +01:00
Jonathan Kew
33ead015b1 style: Make 'font' shorthand reset the 'font-variation-settings' property.
As required by the spec: https://drafts.csswg.org/css-fonts-4/#font-prop

See https://bugzilla.mozilla.org/show_bug.cgi?id=1435983

Basically, make font-variation-settings work in the same way as font-feature-settings
already does.
2018-03-04 12:26:32 +00:00
bors-servo
86a7010082
Auto merge of #20189 - servo:squared-distance-for-real, r=emilio
Never store a squared root in SquaredDistance

<!-- 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/20189)
<!-- Reviewable:end -->
2018-03-03 20:11:41 -05:00
Anthony Ramine
6ce5e9a869 Never store a squared root in SquaredDistance 2018-03-04 02:10:44 +01:00