Commit graph

6718 commits

Author SHA1 Message Date
Cameron McCormack
509007febb style: Read visited links pref directly. 2017-11-17 15:42:39 +08:00
CYBAI
3ff497aaff style: Move font-variant-ligatures outside of mako 2017-11-17 10:12:46 +08:00
bors-servo
e07245caba Auto merge of #19235 - emilio:chrome-props, r=xidorn
style: Add infra to differentiate chrome and UA sheets.

This keeps the behavior of stuff being accessible from chrome stylesheets being
the same of content sheets except on the UA origin. That will be changed in a
followup.

<!-- 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/19235)
<!-- Reviewable:end -->
2017-11-16 14:01:39 -06:00
Emilio Cobos Álvarez
bbfb7a47eb
style: Add machinery to handle properties enabled in chrome. 2017-11-16 21:00:44 +01:00
Emilio Cobos Álvarez
128bb02e1d
style: Remove now unused gecko_pref_ident. 2017-11-16 14:31:37 +01:00
Emilio Cobos Álvarez
2bd91d21d7
style: Replace Gecko's hacky EXPERIMENTAL set with the same mechanism as servo.
We can remove the PREF_foo bits in a bit.
2017-11-16 14:31:36 +01:00
bors-servo
bf29f64bf6 Auto merge of #19237 - upsuper:error-nested-rule, r=emilio
Use InvalidRule for nested rule list

This fixes [bug 1417548](https://bugzilla.mozilla.org/show_bug.cgi?id=1417548).

Apparently it makes no sense to have different error between top level rules and nested 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/19237)
<!-- Reviewable:end -->
2017-11-16 03:03:48 -06:00
bors-servo
6938b4f3eb Auto merge of #19230 - emilio:lru-cache, r=nox
style: Move lru_cache to its own crate.

One less crate pointlessly in components/.

<!-- 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/19230)
<!-- Reviewable:end -->
2017-11-15 22:40:06 -06:00
Michael Wilson
10f3ef42bb style: :dir() pseudo class now represented by enum
Fixes #19195
2017-11-15 18:12:44 -08:00
bors-servo
8c332f5dd3 Auto merge of #19220 - CYBAI:font-variant-east-asian-out-of-mako, r=emilio
style: Move font-variant-east-asian 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 #19216
- [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/19220)
<!-- Reviewable:end -->
2017-11-15 20:00:48 -06:00
Emilio Cobos Álvarez
187d28c732
style: Add gecko_pref annotation to the properties. 2017-11-16 02:44:35 +01:00
Emilio Cobos Álvarez
f4683d1718
style: Change experimental to servo_pref. 2017-11-16 02:44:13 +01:00
Emilio Cobos Álvarez
24c4afa8d3
style: Remove unnecessary explicit argument passing.
It passes kwargs anyway, and it's not used.
2017-11-15 23:55:47 +01:00
Xidorn Quan
faa6898237 Use InvalidRule for nested rule list. 2017-11-15 13:23:52 -08:00
bors-servo
9863d51451 Auto merge of #19227 - servo:array-warn, r=emilio
Work around "this expression will panic at run-time" warnings

CC https://github.com/rust-lang/rust/issues/45850

<!-- 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/19227)
<!-- Reviewable:end -->
2017-11-15 11:00:29 -06:00
bors-servo
85fa6409bb Auto merge of #19226 - emilio:inline-qs, r=nox
style: Sprinkle some inline in trivial methods.

These methods are instantiated by the Gecko library, and used during
querySelector, which means that they end up being super-hot in micro-benchmarks.

MozReview-Commit-ID: K1XJb0QyX5a

<!-- 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/19226)
<!-- Reviewable:end -->
2017-11-15 09:22:14 -06:00
Emilio Cobos Álvarez
47b02658ec
style: Move lru_cache to its own crate.
One less crate pointlessly in components/.
2017-11-15 16:18:11 +01:00
bors-servo
40adc3fd88 Auto merge of #19199 - emilio:no-unused-unsafe, r=nox
style: Stop allowing unused_unsafe.

<!-- 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/19199)
<!-- Reviewable:end -->
2017-11-15 08:22:00 -06:00
Simon Sapin
aca0015930 Work around "this expression will panic at run-time" warnings
CC https://github.com/rust-lang/rust/issues/45850
2017-11-15 14:31:39 +01:00
CYBAI
c110c8a131 style: Move font-variant-east-asian outside of mako 2017-11-15 21:27:12 +08:00
bors-servo
d117694ecc Auto merge of #19164 - emilio:more-traversal-cleanup, r=nox
style: More traversal cleanup.

This is cleanup that allows me to fix https://bugzilla.mozilla.org/show_bug.cgi?id=1415013 in a more straight-forward way.

<!-- 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/19164)
<!-- Reviewable:end -->
2017-11-15 06:51:27 -06:00
Emilio Cobos Álvarez
28c04278e1
style: Sprinkle some inline in trivial methods.
These methods are instantiated by the Gecko library, and used during
querySelector, which means that they end up being super-hot in micro-benchmarks.

MozReview-Commit-ID: K1XJb0QyX5a
2017-11-15 13:45:32 +01:00
Emilio Cobos Álvarez
f0d749a544
style: Stop allowing unused_unsafe. 2017-11-15 13:26:26 +01:00
Emilio Cobos Álvarez
fd68091491
style: Update bindings. 2017-11-15 13:26:25 +01:00
Emilio Cobos Álvarez
69ddb9501b
style: Remove some uses of unused unsafe. 2017-11-15 13:26:24 +01:00
bors-servo
b2c19b1544 Auto merge of #19222 - upsuper:serialize-group-rule, r=emilio
Serialize media rule and supports rule like Gecko

This should fix [bug 1417207](https://bugzilla.mozilla.org/show_bug.cgi?id=1417207).

<!-- 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/19222)
<!-- Reviewable:end -->
2017-11-15 05:40:24 -06:00
Xidorn Quan
ae3989ebf0 Serialize media rule and supports rule like Gecko. 2017-11-14 13:42:06 -08:00
bors-servo
6f1d9a198f Auto merge of #19211 - KiChjang:text-decoration-line, r=emilio
Move text-decoration-line out of mako

Part of #19015.

<!-- 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/19211)
<!-- Reviewable:end -->
2017-11-14 15:34:10 -06:00
Keith Yeung
6f59a45cdc Move text-decoration-line out of mako 2017-11-14 13:13:23 -08:00
bors-servo
c18417db5e Auto merge of #19214 - CYBAI:font-variation-settings-out-of-mako, r=emilio
style: Move font-variation-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 #19208
- [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/19214)
<!-- Reviewable:end -->
2017-11-14 08:29:58 -06:00
Emilio Cobos Álvarez
eac0d104a3
style: Remove mozmm CSS unit.
Bug: 1416564
Reviewed-by: heycam
MozReview-Commit-ID: AU4CUq09tw4
2017-11-14 14:25:40 +01:00
CYBAI
c561c2cb9b style: Move font-variation-settings outside of mako 2017-11-14 19:56:27 +08:00
bors-servo
c261ff38c7 Auto merge of #19188 - CYBAI:font-language-override-out-of-mako, r=emilio
style: Move font-language-override 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 #19187
- [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/19188)
<!-- Reviewable:end -->
2017-11-13 10:20:22 -06:00
CYBAI
38eae70666 style: Move font-language-override outside of mako 2017-11-13 23:15:09 +08:00
Emilio Cobos Álvarez
759becc5fc
style: add accidentally removed deny(warnings).
It was accidentally commented out in #19197 because I was developing on a
tree without #19162.
2017-11-13 14:34:39 +01:00
bors-servo
5d3a90ecce Auto merge of #19197 - emilio:source-size-list-integration, r=Manishearth
stylo: Integrate Servo SourceSizeList in ResponsiveImageSelector.

Bug: 1408308
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/19197)
<!-- Reviewable:end -->
2017-11-12 21:01:34 -06:00
Emilio Cobos Álvarez
1309573b98
style: Update bindings.
MozReview-Commit-ID: BAXvyXmZWzo
2017-11-13 02:48:50 +01:00
Emilio Cobos Álvarez
a76cb65751
stylo: Integrate Servo SourceSizeList in ResponsiveImageSelector.
This needs to dumb down the parsing in order to match what we do in Gecko and
pass more tests.

The remaining tests are just because of calc() in media queries and "or" media
expressions.

Bug: 1408308
Reviewed-by: Manishearth
MozReview-Commit-ID: CXGdYVbojBL
2017-11-13 02:48:48 +01:00
Emilio Cobos Álvarez
8191853233
style: Support calc() in media queries.
Bug: 1396057
Reviewed-by: Manishearth
MozReview-Commit-ID: 6YbeqInC5Mw
2017-11-12 23:44:53 +01:00
Emilio Cobos Álvarez
6747eb7f45
style: Fix evaluation of rem inside media queries.
Also fix the tests so that they would've caught this.

Bug: 1396057
Reviewed-by: Manishearth
MozReview-Commit-ID: ByaR4ZA995l
2017-11-12 23:44:31 +01:00
Emilio Cobos Álvarez
a09f5208d4
style: Fix indentation of the media query code.
Bug: 1396057
Reviewed-by: Manishearth
MozReview-Commit-ID: BtdGHbQAzeS
2017-11-12 23:44:02 +01:00
Xidorn Quan
79ea639458 Add general impl in gecko_properties for TransformOrigin value and add -moz-window-transform-origin. 2017-11-12 10:59:55 -08:00
Xidorn Quan
dfbf632fd6 Add general impl in gecko_properties for Transform value and add -moz-window-transform. 2017-11-12 10:59:54 -08:00
Xidorn Quan
8b9bbfea75 Use helpers.predefined_type for transform property. 2017-11-12 10:59:53 -08:00
Emilio Cobos Álvarez
194c2712b5
style: Make MozScriptLevel::Absolute serialize as -moz-absolute(foo). 2017-11-12 16:25:01 +01:00
Emilio Cobos Álvarez
92944cd5eb
style: Make css(dimension) apply to the variant. 2017-11-12 16:25:00 +01:00
Emilio Cobos Álvarez
4927786d90
style: Implement css(dimension) and derive ToCss for a bunch of stuff.
For css(dimension), it'd be nice to derive(Parse) too, I think...
2017-11-12 16:22:45 +01:00
Emilio Cobos Álvarez
1b533f9bdc
style: Derive ToCss for MozScriptLevel. 2017-11-12 05:24:09 +01:00
Emilio Cobos Álvarez
06f8f0384b
style: add css(function, iterable), and derive ToCss for VariantAlternates. 2017-11-12 05:24:08 +01:00
Emilio Cobos Álvarez
3a5d70f106
style: Stop inspecting children to recascade them just because we reframed.
We only need to do this when display changes from none to non-none, so handle it
explicitly when computing the cascade requirement.

This patch also removes a few conditions that are redundant because they're
handled also by the cascade requirement check, like the initial styling.
2017-11-10 20:47:37 +01:00