Commit graph

6718 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
09c11d49d5
style: Make a Servo-only assertion apply to Gecko too.
MozReview-Commit-ID: CWhSfDQ8naE
2017-11-24 20:50:18 +01:00
Markus Stange
2c466658a6 Regenerate structs.rs. 2017-11-23 14:24:46 -05:00
Markus Stange
a0716e3545 Servo changes for system colors-moz-mac-vibrant-titlebar-light/dark 2017-11-23 14:24:25 -05:00
Markus Stange
4d64a6d973 Servo changes for -moz-appearance values-moz-mac-vibrant-titlebar-light/dark 2017-11-23 14:24:08 -05:00
bors-servo
7ac376eed6 Auto merge of #19349 - heycam:media-feature-range, r=emilio
style: Stop using nsMediaExpression_Range.

Servo part of https://bugzilla.mozilla.org/show_bug.cgi?id=1420071, reviewed there by Emilio.

<!-- 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/19349)
<!-- Reviewable:end -->
2017-11-23 09:23:25 -06:00
Cameron McCormack
4a3fea1bd1 style: Stop using nsMediaExpression_Range. 2017-11-23 17:48:43 +08:00
CYBAI
20cfefbbbd style: Move -moz-script-size-multiplier outside of mako 2017-11-23 10:26:50 +08:00
Gecko Backout
a06a80b5da Backed out changeset 2e20100d8f59 (bug 1417709) for error in toolkit/library/rust/target r=backout on a CLOSED TREE
Backs out https://github.com/servo/servo/pull/19255
2017-11-22 23:20:51 +00:00
Markus Stange
7be33e3a45 Regenerate structs.rs. 2017-11-22 14:09:55 -05:00
Markus Stange
b3ad54f468 Servo changes for system colors -moz-mac-vibrant-titlebar-light/dark 2017-11-22 14:00:05 -05:00
Markus Stange
753304411a Servo changes for -moz-appearance values -moz-mac-vibrant-titlebar-light/dark 2017-11-22 14:00:05 -05:00
Michael Wilson
1ebc1382ce moving :dir() param serialization FIXME 2017-11-21 21:47:41 -08:00
Hiroyuki Ikezoe
64bd97a0d3 Update bindings. 2017-11-22 13:02:45 +09:00
bors-servo
06d834c1b9 Auto merge of #19321 - emilio:supports-dumb, r=SimonSapin
style: Avoid unneessary malloc churn when evaluating @supports rules.

<!-- 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/19321)
<!-- Reviewable:end -->
2017-11-21 15:27:59 -06:00
CYBAI
d671859426 style: Move -x-lang outside of mako 2017-11-21 23:46:34 +08:00
Emilio Cobos Álvarez
a6923522a0
style: Avoid unneessary malloc churn when evaluating @supports rules. 2017-11-21 16:10:33 +01:00
bors-servo
3864f320e8 Auto merge of #19317 - emilio:property-allowed-in, r=SimonSapin
style: Move property allowance tests to PropertyId::parse_into.

It's not only more consistent (since we have a proper ParserContext there), but
also fixes a bunch of bugs where Gecko accidentally exposes and allows setting
internal state because of conversions from nsCSSPropertyID to PropertyId.

This adds the extra complexity of caring about aliases for longer, but that's
probably not a big deal in practice, since we have PropertyDeclarationId.

<!-- 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/19317)
<!-- Reviewable:end -->
2017-11-21 07:47:52 -06:00
Emilio Cobos Álvarez
8de554f334
style: Move property allowance tests to PropertyId::parse_into.
It's not only more consistent (since we have a proper ParserContext there), but
also fixes a bunch of bugs where Gecko accidentally exposes and allows setting
internal state because of conversions from nsCSSPropertyID to PropertyId.

This adds the extra complexity of caring about aliases for longer, but that's
probably not a big deal in practice, since we also have PropertyDeclarationId.

MozReview-Commit-ID: C2Js8PfloxQ
2017-11-21 14:26:16 +01:00
bors-servo
17e97b9320 Auto merge of #19316 - servo:stylo-size-of, r=emilio
Fix Stylo tests to pass on both Stable and Nightly Rust

This is on top of https://github.com/servo/servo/pull/19285.

Rust Nightly has new enum memory layout optimizations: https://github.com/rust-lang/rust/pull/45225

<!-- 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/19316)
<!-- Reviewable:end -->
2017-11-21 05:41:12 -06:00
Simon Sapin
aaba33e56b Fix Stylo tests to pass on both Stable and Nightly Rust.
This is on top of https://github.com/servo/servo/pull/19285.

Rust Nightly has new enum memory layout optimizations:
https://github.com/rust-lang/rust/pull/45225
2017-11-21 12:24:08 +01:00
bors-servo
5905f8d3ea Auto merge of #19315 - emilio:chrome-rules-user-sheets, r=heycam
style: Enable chrome-only CSS features in user stylesheets.

MozReview-Commit-ID: FJ4vTiOrotH
Bug: 1418963
Reviewed-by: heycam

<!-- 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/19315)
<!-- Reviewable:end -->
2017-11-21 04:27:25 -06:00
Emilio Cobos Álvarez
c7a3c929f6
style: Enable chrome-only CSS features in user stylesheets.
MozReview-Commit-ID: FJ4vTiOrotH
Reviewed-by: heycam
Bug: 1418963
2017-11-21 10:59:47 +01:00
bors-servo
006202732f Auto merge of #19195 - wilsoniya:issue-16840, r=emilio
style: :dir() pseudo class now represented by enum

`:dir()` pseudo class param now represented as enum variants.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #16840
- [X] There are tests for these changes

<!-- 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/19195)
<!-- Reviewable:end -->
2017-11-21 02:56:49 -06:00
bors-servo
b74e71fdd1 Auto merge of #19312 - aethanyc:use-computedurl, r=heycam
style: Use ComputedUrl instead of SpecifiedUrl in conversion.rs

In stylo, ComputedUrl and SpecifiedUrl happen to be the same. However, using
ComputedUrl can make code clearer that conversion.rs is for converting
computed values between gecko and servo types.

<!-- 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/19312)
<!-- Reviewable:end -->
2017-11-21 01:39:44 -06:00
Ting-Yu Lin
107a9b2c81 style: Use ComputedUrl instead of SpecifiedUrl in conversion.rs
In stylo, ComputedUrl and SpecifiedUrl happen to be the same. However, using
ComputedUrl can make code clearer that conversion.rs is for converting
computed values between gecko and servo types.
2017-11-21 15:08:44 +08:00
Cameron McCormack
ca10caa85d style: Regenerate Gecko bindings. 2017-11-21 13:59:18 +08:00
Cameron McCormack
f2bc28f358 style: Update layer filling function call. 2017-11-21 12:25:14 +08:00
bors-servo
e67bb6ccb5 Auto merge of #19297 - emilio:hidden-props, r=upsuper
style: Expose some properties to chrome code, and hide some accidentally-exposed ones.

I'm adding a test for internal properties after this in Gecko.

<!-- 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/19297)
<!-- Reviewable:end -->
2017-11-20 15:58:46 -06:00
bors-servo
bc937f54d1 Auto merge of #19303 - emilio:flattened-tree-fallback, r=heycam
style: Account for fallback content in GetFlattenedTreeParent.

Otherwise we may inappropriately style it or what not. This asserts with the
patches of bug 1414999 plus the cleanup of bug 1418456, since we no longer do
StyleNewChildren (which walks over the flattened tree children).

Too bad that GetXBLBinding is a virtual call in Gecko, probably can do just
MAY_BE_IN_BINDING_MGR...

Bug: 1418560
Reviewed-by: heycam
MozReview-Commit-ID: CNU0YdKeaR0

<!-- 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/19303)
<!-- Reviewable:end -->
2017-11-20 08:57:50 -06:00
Emilio Cobos Álvarez
6a6b5a53ee
style: Account for fallback content in GetFlattenedTreeParent.
Otherwise we may inappropriately style it or what not. This asserts with the
patches of bug 1414999 plus the cleanup of bug 1418456, since we no longer do
StyleNewChildren (which walks over the flattened tree children).

Too bad that GetXBLBinding is a virtual call in Gecko, probably can do just
MAY_BE_IN_BINDING_MGR...

Bug: 1418560
Reviewed-by: heycam
MozReview-Commit-ID: CNU0YdKeaR0
2017-11-20 15:49:09 +01:00
CYBAI
dcdc384122 Implement normal for FontSettings 2017-11-20 21:38:50 +08:00
Emilio Cobos Álvarez
808432b271
style: Expose some properties to chrome code, and hide some accidentally-exposed ones. 2017-11-20 11:53:08 +01:00
bors-servo
e4cfff8364 Auto merge of #19296 - emilio:bye-unstyled-only, r=heycam
style: Get rid of unstyled children only traversals.

They're useless now, provided we remove the hack to not traverse XBL-bound
elements on initial styling.

Bug: 1418456
Reviewed-by: heycam
MozReview-Commit-ID: AvBVdyF1wb6

<!-- 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/19296)
<!-- Reviewable:end -->
2017-11-20 04:18:30 -06:00
bors-servo
af6c2f93b9 Auto merge of #19294 - emilio:debug-detached-pseudo, r=heycam
style: Collect more debugging info when collecting rules of detached pseudos.

Called Option::unwrap() on a None value is not a helpful crash message.

This will hopefully help figure out what is causing bug 1418856.

<!-- 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/19294)
<!-- Reviewable:end -->
2017-11-20 02:29:59 -06:00
Emilio Cobos Álvarez
b1fecea0aa
style: Get rid of unstyled children only traversals.
They're useless now, provided we remove the hack to not traverse XBL-bound
elements on initial styling.

Bug: 1418456
Reviewed-by: heycam
MozReview-Commit-ID: AvBVdyF1wb6
2017-11-20 08:24:08 +01:00
bors-servo
9edb453447 Auto merge of #19293 - CYBAI:font-feature-settings-out-of-mako, r=emilio
style: Move font-feature-settings 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 #19290
- [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/19293)
<!-- Reviewable:end -->
2017-11-20 00:48:16 -06:00
Emilio Cobos Álvarez
143341a061
style: Collect more debugging info when collecting rules of detached pseudos.
Called Option::unwrap() on a None value is not a helpful crash message.

This will hopefully help figure out what is causing bug 1418856.
2017-11-20 07:43:54 +01:00
bors-servo
63bd783c55 Auto merge of #19282 - CYBAI:use-macro-for-font-variant, r=canaltinova
Use macro to impl From for font variant

As I discussed in #19277, I'd like to change the implementation for `From` of font variant to use macro, `impl_gecko_keyword_conversions`.
r? @emilio

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes update `From` impl for font variant to use macro `impl_gecko_keyword_conversions`.
- [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/19282)
<!-- Reviewable:end -->
2017-11-19 21:43:25 -06:00
CYBAI
70033edccd style: Move font-feature-settings outside of mako 2017-11-20 11:26:09 +08:00
Cameron McCormack
780f63caf3 style: Add comment about -moz-control-character-visibility initial value. 2017-11-20 10:17:35 +08:00
bors-servo
6361aed46d Auto merge of #19279 - canaltinova:force-broken-image, r=emilio
style: Move -moz-force-broken-image-icon out 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 fix part of #19015.

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

<!-- 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/19279)
<!-- Reviewable:end -->
2017-11-19 14:07:35 -06:00
Nazım Can Altınova
b2df766da8 style: Move -moz-force-broken-image-icon out of mako 2017-11-19 22:52:18 +03:00
Eduard-Mihai Burtescu
6031de9a39 Update expected stylo sizes for rust-lang/rust#45225. 2017-11-19 11:35:28 +02:00
CYBAI
3e9d49303f Use macro to impl From for font variant 2017-11-19 11:12:09 +08:00
bors-servo
011e52f6ed Auto merge of #19277 - CYBAI:font-variant-numeric-out-of-mako, r=emilio
style: Move font-variant-numeric 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 #19276
- [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/19277)
<!-- Reviewable:end -->
2017-11-18 13:22:10 -06:00
CYBAI
a38de8b540 style: Move font-variant-numeric outside of mako 2017-11-18 17:57:22 +08:00
Emilio Cobos Álvarez
01e41d0439
style: Replace "internal" properties with "enabled_in"
This allows enabling properties in ua sheets and chrome differently.

The setup is:

  * enabled_in needs to be one of the four values:
    ["", "ua", "chrome", "content"]

  * "chrome" implies "ua", and implies that they're explicitly enabled.

  * "" implies the property will never be parsed.

  * "content" implies the property is accessible unconditionally, modulo a pref.

Experimental still keeps trumping over those when the pref is enabled.

This PR replaces uses of internal="" by enabled_in="ua" or enabled_in="".

This may seem that it changes behavior, but since the properties where I added
enabled_in="" already unconditionally error from parse it's not.

Next step is annotating chrome-only properties.
2017-11-18 05:15:19 +01:00
bors-servo
b4c274d190 Auto merge of #19253 - CYBAI:font-variant-ligatures-out-of-mako, r=emilio
style: Move font-variant-ligatures 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 #19246
- [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/19253)
<!-- Reviewable:end -->
2017-11-17 15:03:14 -06:00
Emilio Cobos Álvarez
7ea98a577b
style: Remove unused argument in element_needs_traversal. 2017-11-17 16:56:26 +01:00
Cameron McCormack
e286ad7dca style: Regenerate Gecko bindings. 2017-11-17 17:12:10 +08:00