Commit graph

17494 commits

Author SHA1 Message Date
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
Eduard-Mihai Burtescu
6031de9a39 Update expected stylo sizes for rust-lang/rust#45225. 2017-11-19 11:35:28 +02:00
Christian Gati
53e518ea01
Treat application/xml like text/xml in ParserContext::process_response
Update wpt
2017-11-18 15:44:59 -05: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
bors-servo
a757fb14cf Auto merge of #19267 - emilio:ua-props, r=upsuper
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.

<!-- 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/19267)
<!-- Reviewable:end -->
2017-11-18 01:48:12 -06:00
Cameron McCormack
523ffd587d selectors: Allow white space in the brackets of an attribute selector. 2017-11-18 14:47:33 +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
07fd6155aa Auto merge of #19254 - olmanz:issue19179, r=jdm
Move custom elements stuff to their own dom::bindings submodule

<!-- Please describe your changes on the following line: -->
r? jdm
Moved the following functions from components/script/dom/bindings/interface.rs to a new file components/script/dom/bindings/htmlconstructor.rs:

- html_constructor()
- get_constructor_object_from_local_name()
- pop_current_element_queue()
- push_new_element_queue()

---
<!-- 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 #19179.

<!-- Either: -->
- [X] These changes do not require tests

<!-- 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/19254)
<!-- Reviewable:end -->
2017-11-17 16:06:38 -06: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
olmanz
b08d455b75 Fixed tidy-test errors 2017-11-17 11:20:10 +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
Glenn Watson
cdc163533c Update WR (opaque image optimizations, property binding optimizations) 2017-11-17 10:38:04 +10: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
olmanz
83adc7b769 Moved pop_current_element_queue() and push_new_element_queue() to htmlconstructor.rs 2017-11-16 19:14:12 +01:00
bors-servo
50f11e3584 Auto merge of #18984 - dsandeephegde:master, r=jdm
Initial steps of Mutation testing

<!-- Please describe your changes on the following line: -->
- Added one strategy of mutation which is replacing occurrences && to ||.
- Added test mapping framework for running mutation tests corresponding to a mutant.
- Added one test_mapping.json to map source file in a folder to WPT test.
- Added README mentioning about Mutation testing.
- Added CI script to invoke mutation test.
---
<!-- 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 #18529 (github issue number if applicable).
- [x] These changes do not require tests because it is a python script to run mutation test and does not change any behavior.

<!-- 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/18984)
<!-- Reviewable:end -->
2017-11-16 11:51:01 -06:00
Sandeep Hegde
b8c6d144f3 Reveting accidental mutant commit 2017-11-16 10:55:13 -05:00
bors-servo
5c7e79e91c Auto merge of #19249 - tigercosmos:info, r=jdm
fix annotation URL

The annotation URL for `scroll_node` is wrong. (The origin URL is where it is called, not its implement.)
The implement is in https://drafts.csswg.org/cssom-view/#element-scrolling-members

---
<!-- 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 do not require tests

<!-- 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/19249)
<!-- Reviewable:end -->
2017-11-16 07:49:20 -06: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
2755c1a89a Auto merge of #19247 - servo:bumps, r=jdm
Bump servo-websocket to 0.20

This removes one use of an obsolete bitflags version.

<!-- 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/19247)
<!-- Reviewable:end -->
2017-11-16 06:47:34 -06:00
olmanz
d71ff786c6 Moved function html_constructor() from interface.rs to new file htmlconstructor.rs 2017-11-16 13:06:50 +01:00
tigercosmos
6f9591db26 fix annotation URL 2017-11-16 19:58:50 +08:00
Anthony Ramine
02ccb98096 Bump servo-websocket to 0.20
This removes one use of an obsolete bitflags version.
2017-11-16 10:51:38 +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
9ec17ca347 Auto merge of #19229 - servo:bumps, r=emilio
Bump image and offscreen_gl_context

<!-- 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/19229)
<!-- Reviewable:end -->
2017-11-15 20:58:46 -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
bors-servo
c9884604e9 Auto merge of #18882 - KiChjang:fix-origin, r=jdm
Use the correct origin in fetch

Fixes #18147.

<!-- 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/18882)
<!-- Reviewable:end -->
2017-11-15 16:08:49 -06:00
Xidorn Quan
faa6898237 Use InvalidRule for nested rule list. 2017-11-15 13:23:52 -08:00
Keith Yeung
1c8d04973e Use the correct URL when checking for bad port 2017-11-15 13:17:17 -08:00
Keith Yeung
d5e7137b52 Use the correct origin in fetch 2017-11-15 13:17:16 -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
Anthony Ramine
60bde30563 Bump image and offscreen_gl_context 2017-11-15 15:47:15 +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