Commit graph

5790 commits

Author SHA1 Message Date
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
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
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
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