Commit graph

17529 commits

Author SHA1 Message Date
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
00b3612fe9 Auto merge of #19274 - Manishearth:xhr-cancel, r=jdm
Fetch cancellation

This PR implements cancellation for fetch, and uses it for XHR. This means that fetch clients can now send a message to the fetch task asking for the network request to be aborted.

Previously, clients like XHR had abort functionality but would implement it by simply ignoring future messages from the network task; and would not actually cancel the network fetch.

<!-- 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/19274)
<!-- Reviewable:end -->
2017-11-20 20:48:17 -06:00
bors-servo
9797935932 Auto merge of #19272 - jonleighton:issue-19171-2, r=jdm
Further changes in relation to #19171

<!-- 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/19272)
<!-- Reviewable:end -->
2017-11-20 19:31:52 -06:00
Manish Goregaokar
6f59b152f1 Add aborted flag to response, set when fetch is aborted 2017-11-20 17:04:55 -08:00
Manish Goregaokar
7249fd6bd8 Fetch cancellation: Listen for cancellation and prematurely abort if cancelled 2017-11-20 16:54:25 -08:00
Manish Goregaokar
6dd7af2bda Fetch cancellation: Add CancellationListener 2017-11-20 16:54:24 -08:00
bors-servo
e2bc0f017c Auto merge of #18676 - gterzian:continue_http_cache_work, r=jdm
Continue http cache work

<!-- Please describe your changes on the following line: -->

Work in progress, and not quite worth a review yet. (Continuation of https://github.com/servo/servo/pull/4117)

TODO

- [ ] cache metadata (find some subset of`net_traits::Metadata` that can be shared across threads, it seems the problem is mainly stuff inside `hyper::header` in the `headers` field)

- [ ] determine which other fields of a `Response` need to be cached, so a full and valid one can be returned upon a cache hit.

- [ ] determine how to best share the cache across fetch threads (inside HttpState like I tried now?)

- [ ] Spend more time reading the spec and make sure the cache follows it where it matters.

- [ ] Make the current wpt tests pass.

- [ ] More...

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #12972  (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- 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/18676)
<!-- Reviewable:end -->
2017-11-20 18:22:06 -06: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
db5fb74a4d Auto merge of #19288 - m-novikov:impl-eventtarget-constructor, r=KiChjang
Implement EventTarget constructor

Resolves #19283
Do "Wrap" functions only created for elements that aren't marked Abstract in .webidl file?
How can I see code that was generated from webidls?

<!-- 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 #19283 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because they are covered by webplatform 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/19288)
<!-- Reviewable:end -->
2017-11-19 18:18:48 -06: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
Maxim Novikov
83c7f80baa Implement EventTarget constructor
Resolves #19283
2017-11-19 16:14:57 +01:00
Gregory Terzian
6196a6e65d add pref to disable http cache, mozilla tests 2017-11-19 13:52:13 +08:00
CYBAI
3e9d49303f Use macro to impl From for font variant 2017-11-19 11:12:09 +08:00
Jon Leighton
6beda3c761 Extract common text control selection code
The API for text control selection is the same for both <input> and
<textarea>:

https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#textFieldSelection

Before this change, they had similar but not identical implementations
with duplicate code. Now there is a common TextControl trait which
contains the implementation used by both. As a result, some previously
failing tests now pass.
2017-11-18 22:33:05 +01: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
Manish Goregaokar
27457e4d84 Fetch cancellation: Send cancellation message whenever XHR needs to abort a fetch 2017-11-17 16:00:09 -08:00
Manish Goregaokar
87e4c15280 Fetch cancellation: Store cancel_chan in XHR 2017-11-17 16:00:08 -08:00
Manish Goregaokar
1dfb125cc9 Fetch cancellation: Add cancel_chan to FetchContext 2017-11-17 15:59:59 -08: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
Gregory Terzian
5f8a310bd1 also cache redirects 2017-11-17 21:36:30 +08: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