Commit graph

5970 commits

Author SHA1 Message Date
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
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
Maxim Novikov
83c7f80baa Implement EventTarget constructor
Resolves #19283
2017-11-19 16:14:57 +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
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
olmanz
b08d455b75 Fixed tidy-test errors 2017-11-17 11:20:10 +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
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
Gregory Terzian
b98635f212 allow unknown HTTP methods 2017-11-16 13:36:22 +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
Gregory Terzian
d196f3de62 copy headers from script request to net request 2017-11-15 19:28:03 +08:00
Jon Leighton
93b047a91b Fire 'select' event in SetSelection{Start,End}
Issue #19171
2017-11-15 10:54:24 +01:00
ddh
2ef28d05b5 added navigation start for interactive metrics 2017-11-14 15:21:35 +00:00
Sandeep Hegde
61794f8bbd Made test summary more descriptive and Updated Readme 2017-11-13 20:40:16 -05:00
Shing Lyu
c120234f0e Enable screen.availHeight/availWidth/Height/Width 2017-11-13 21:32:10 +01:00
bors-servo
f1cf41da00 Auto merge of #19192 - MortimerGoro:webgl2_glsl, r=jdm
Set the correct Angle GLSL output  when using WebGL 2

Set the correct Angle GLSL output  when using WebGL 2

<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [x] 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/19192)
<!-- Reviewable:end -->
2017-11-13 11:50:44 -06:00
Imanol Fernandez
c22674481b Set the correct Angle GLSL output when using WebGL 2 2017-11-13 14:58:06 +01:00
bors-servo
37760054e2 Auto merge of #19127 - tigercosmos:overflow10, r=emilio
scroll, SetScrollTop, SetScrollLeft in `element.rs`

<!-- Please describe your changes on the following line: -->
Currently dom-element-scroll have not finished yet. (Step 10)
This PR finish the step 10 of `scroll`, `SetScrollTop`, `SetScrollLeft`

[Step 10 description](https://drafts.csswg.org/cssom-view/#dom-element-scrolltop):
> If the element does not have any associated CSS layout box, the element has no associated scrolling box, or the element has no overflow, terminate these steps.
---
<!-- 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 #19114 (github issue number if applicable).

<!-- Either: -->
- [X] There are tests for these changes

<!-- 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/19127)
<!-- Reviewable:end -->
2017-11-12 17:24:33 -06:00
tigercosmos
9965f7e2cc scroll, SetScrollTop, SetScrollLeft in dom-element-scroll with test 2017-11-12 02:01:44 +08:00
Fernando Jiménez Moreno
2974dae431 Fix binding generation for overloaded functions with optionals and default values 2017-11-11 08:41:19 +01:00
Emilio Cobos Álvarez
5200ded17c
script: Fix Servo relying on descendants being visited when there's a reframe. 2017-11-10 20:47:37 +01:00
Emilio Cobos Álvarez
c9d9304912
script: Call content_and_heritage_changed from children_changed instead of add_child / remove_child.
add_child / remove_child aren't called when a node character data changed. This
is important for finer grained invalidation.

The only test that tests this is now wallpapered, but won't be after #19164.
2017-11-10 13:12:24 +01:00
bors-servo
338e2ae520 Auto merge of #18262 - KiChjang:value-sanitization, r=nox
Implement value sanitization on HTMLInputElement

https://html.spec.whatwg.org/multipage/input.html#value-sanitization-algorithm

<!-- 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/18262)
<!-- Reviewable:end -->
2017-11-09 18:35:07 -06:00
Keith Yeung
8203605c04 Implement value sanitization on HTMLInputElement 2017-11-09 16:34:14 -08:00
Simon Sapin
793bebfc0e Upgrade to rustc 1.23.0-nightly (02004ef78 2017-11-08) 2017-11-09 16:56:39 +01:00
Keith Yeung
9d60333af9 Implement string stripping utilities from the Infra spec 2017-11-08 11:58:18 -08:00
Keith Yeung
ce8486ab9b Import sequence inner types if it appears in dictionary members 2017-11-08 04:20:30 -08:00
bors-servo
5227df260c Auto merge of #19038 - CJ8664:master, r=jdm
Added implementation for itemprop and itemtype along with test files

<!-- 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

<!-- Either: -->
- [x] There are tests for these changes OR

<!-- 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/19038)
<!-- Reviewable:end -->
2017-11-06 14:17:11 -06:00
Vijay Hebbar
4a43dba8d7 Add implementation for itemprop and itemtype
Created test file

Added the stub methods for itemprop and itemscope

Resolved html5ever dependency, added ItemScope and ItemProp attr

Resolving dependency

Added pref override on metadata attributes

Resetting to original state due to change in requirement

Reverted adding attributes

1. add a customized implementation of parse_plain_attribute
2. add the following methods to HTMLElement.webidl

added itemprop and itemtype, enabled pref in test

Added initial implementation for getting itemprop property values

Adding the wireframe for testing

Implemented function to handle itemType

Corrected typo

Fixed typo bug in code

Handling duplicates for itemtype attribute values

Added the test suite structure

Added test for extra space

Added test for regular test values

Added test cases for Single property values

Test cases to check absence of itemtype and itemprop attributes

Added code to handle absence of itemtype or itemprop attributes

Added shell script to run all test cases

cleared up Cargo file

Tidying up

Removed the local test file

Removed new line for test-tidy

Ordered key in prefs.json

Fixes for test-tidy

Enabled test preferences

Created test using wpt

Creating WPT Tests for Regular and Single Prop Types

Fixed the Regular type test

Fixed tests

Removed old test case metadata

Incorporate review changes from PR

Updated MANIFEST to sync test cases

Making changed suggested in review

Removed editor folding

Removed unnecessary code

Resolving cargo conflicts

Updated PropertyNames and itemtypes implementation

Trying different data in test case

Updated manifest

Updated code based on reviews
2017-11-06 15:11:50 -05:00
Sandeep Hegde
ffbabf4a4c Added randomness to the mutation strategy
- now running only maximum one mutation per file.
- Beautified the output
2017-11-06 13:00:14 -05:00
Sandeep Hegde
c2d46c3b90 Fixed json tidy error 2017-11-06 13:00:13 -05:00
Sandeep Hegde
58ab11cf9b Fixed few tidy errors 2017-11-06 13:00:13 -05:00
Sandeep Hegde
ba2152900c Added Test Mapping framework and running through a path. 2017-11-06 13:00:12 -05:00
bors-servo
a509ebf90c Auto merge of #18657 - emilio:bye-applet, r=KiChjang
script: Remove HTMLAppletElement.

It was removed from the spec, there's no reason to keep it in tree.

<!-- 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/18657)
<!-- Reviewable:end -->
2017-11-06 10:46:44 -06:00
Emilio Cobos Álvarez
8b0f58c8af
script: Remove HTMLAppletElement.
It was removed from the spec, there's no reason to keep it in tree.
2017-11-06 17:08:14 +01:00
tigercosmos
ea3d8972df fix overflow_y_is_visible() 2017-11-06 10:24:00 +08:00
bors-servo
92b49010b1 Auto merge of #19091 - MortimerGoro:webgl2_suite, r=jdm
Add WebGL conformance 2.0.0 tests

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

This PR includes WebGL conformance 2.0.0 tests. For now I have disabled three folders in the new suite:
- `Conformance`: Tests WebGL 1.0 API like the current 1.0.3 suite we are using, but it includes a lot more tests and many expectations have to be updated. This is better to do in a separate PR because it will require to update github intermittent paths again and maybe detect new intermittents.
- `Conformance2\textures`: It causes a lot of timeouts because of using videos, svgs, and other complicated formats.
- `deqp`: It's a extra GPU testing suite included in the Khronos 2.0.0 suite. Disabled for now because it causes some timeouts.

So in a nutshell, it uses part of the 2.0.0 suite to test webgl 2.0 and keeps using 1.0.3 in order to test WebGL 1.0. It's good enough to enable TDD for the new WebGL 2.0 features

We can create follow-up issues for the next steps:
* deprecate 1.0.3 and use the new 'conformance' folder in 2.0.0 in order to test WebGL 1.0
* Enable `conformance2/textures` and  'deqp' tests once WebGL 2.0 implementation is more advanced or the timeouts are monitored in more detail.

---
<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [x] 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/19091)
<!-- Reviewable:end -->
2017-11-02 15:52:42 -05:00
Imanol Fernandez
ec1f61d9cc Add configuration for webgl2 tests and update test expectations 2017-11-02 15:12:35 +01:00
Henri Sivonen
18a52ea0e9 Avoid decoding XHR type="json" responses as UTF-16BE/LE
https://infra.spec.whatwg.org/#parse-json-from-bytes says to use
"UTF-8 decode" rather than "decode", so UTF-16BE/LE BOM should
not be honored.
2017-11-02 14:28:51 +02:00
ddh
0a09ee5cd8 changed f64 to u64 for navigation start timing until it had to be float 2017-11-01 20:45:22 +00:00
bors-servo
fa93a79ed0 Auto merge of #19082 - Eijebong:fixme_issue_718, r=jdm
Remove a workaround for https://github.com/rust-lang/rfcs/issues/718

<!-- 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/19082)
<!-- Reviewable:end -->
2017-11-01 07:57:04 -05:00
Bastien Orivel
516857a15d Remove a workaround for https://github.com/rust-lang/rfcs/issues/718 2017-11-01 13:03:35 +01:00
bors-servo
994ff4b66e Auto merge of #19073 - servo:encoding-rs, r=SimonSapin
Use encoding-rs instead of rust-encoding

<!-- 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/19073)
<!-- Reviewable:end -->
2017-11-01 06:37:54 -05:00
Simon Sapin
a3971eb686 Replace rust-encoding with encoding-rs 2017-11-01 10:16:11 +01:00
bors-servo
63af764fc5 Auto merge of #19040 - MortimerGoro:webgl2_extensions, r=emilio
Add support for filtering WebGL extensions based on WebGL version

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

Add support for filtering WebGL extensions based on WebGL version

---
<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [x] 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/19040)
<!-- Reviewable:end -->
2017-10-31 16:14:59 -05:00
Imanol Fernandez
f2f5817f56 Add support for filtering WebGL extensions based on WebGL version 2017-10-31 21:38:39 +01:00