Commit graph

6360 commits

Author SHA1 Message Date
Charles Vandevoorde
cb9940faf3 Update metadata tests 2017-01-11 18:02:46 +01:00
Anthony Ramine
30f0553ac7 Introduce PendingScript
This moves scripts' loading results in Document, instead of maintaining them
behind a DOMRefCell in each HTMLScriptElement.
2017-01-11 17:37:19 +01:00
bachar
980dde7e15 HTML image map support 2017-01-11 01:29:45 -08:00
charlesvdv
2bcefa6470 Modify test to check if @import stylesheet get applied in a alternate stylesheet 2017-01-10 15:38:38 +01:00
bors-servo
f54dd0112b Auto merge of #14928 - nox:insert, r=SimonSapin
Unify text insertion when parsing HTML and XML

<!-- 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/14928)
<!-- Reviewable:end -->
2017-01-10 03:51:47 -08:00
Anthony Ramine
d853e7fee9 Unify text insertion when parsing HTML and XML 2017-01-10 11:16:42 +01:00
bors-servo
867df7f3d7 Auto merge of #14920 - upsuper:shorthand-variable, r=emilio
Correctly handle unserializable shorthand

get_shorthand_appendable_value doesn't always return a serializable value. This change makes it handle that case correctly.

This change also updates step number in property_value_to_css to reflect the latest spec.

---
<!-- 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 stylo [bug 1329533](https://bugzilla.mozilla.org/show_bug.cgi?id=1329533)

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

<!-- 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/14920)
<!-- Reviewable:end -->
2017-01-09 20:10:32 -08:00
bors-servo
f1c82be0e6 Auto merge of #14868 - bd339:iss14068, r=jdm
Fix loss of response type information in Fetch API

<!-- Please describe your changes on the following line: -->
Avoids mapping response types that are distinct according to [the spec](https://fetch.spec.whatwg.org/#concept-response-type) to fewer response types. Also updates test expectations to match that we now pass tests that check the response type.

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

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

<!-- 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/14868)
<!-- Reviewable:end -->
2017-01-09 18:36:38 -08:00
bors-servo
851d6230f3 Auto merge of #14818 - glennw:zb, r=pcwalton
Update WR (first phase of z-buffer optimizations / improvements).

<!-- 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/14818)
<!-- Reviewable:end -->
2017-01-09 11:56:40 -08:00
bors-servo
50bba770d6 Auto merge of #14789 - Manishearth:supports, r=SimonSapin
Support @supports

fixes #14786

cc @heycam @upsuper
r? @SimonSapin

<!-- 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/14789)
<!-- Reviewable:end -->
2017-01-09 10:54:38 -08:00
Simon Sapin
b5d9210f16 Fix too many parens in @supports serialization. 2017-01-09 19:35:00 +01:00
bd339
0f1eb13e33 Don't lose information in Fetch API
Also update test expectations.
2017-01-09 14:52:14 +01:00
Imanol Fernandez
c5705bff50 WebVR API Implementation, r=larsbergstrom 2017-01-09 12:44:39 +01:00
Xidorn Quan
c183899c06 Correctly handle unserializable shorthand
get_shorthand_appendable_value doesn't always return a serializable
value. This change makes it handle that case correctly.
2017-01-09 15:38:13 +11:00
Glenn Watson
3987f6267a Disable test that permnanently fails with this update, due to #13400. 2017-01-09 12:58:35 +10:00
Nazım Can Altınova
227737c685 Convert animation-iteration-count longhand into vector_longhand 2017-01-08 17:19:09 +03:00
Nazım Can Altınova
8e21d65303 Convert transition-timing-function longhand into vector_longhand 2017-01-08 17:19:01 +03:00
Nazım Can Altınova
55ae25c3ae Convert transition-duration longhand into vector_longhand 2017-01-08 16:29:48 +03:00
bors-servo
87cce8180a Auto merge of #14648 - cynicaldevil:xmlhttpreq-send, r=KiChjang
Implemented XMLHttpRequest.send(Document)

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

<!-- Either: -->
r? @KiChjang

`XMLHttpRequest/send-entity-body-document.htm` is not working atm, I get this output:
```
$ ./mach test-wpt tests/wpt/web-platform-tests/XMLHttpRequest/send-entity-body-document.htm
Running 1 tests in web-platform-tests

Ran 1 tests finished in 0.0 seconds.
  • 1 ran as expected. 1 tests skipped.
```
<!-- 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/14648)
<!-- Reviewable:end -->
2017-01-08 00:21:14 -08:00
Manish Goregaokar
dbc35f4360 Add test for CSS interface 2017-01-07 23:37:50 -08:00
Manish Goregaokar
56731dc6b5 Update test expectations, enable css-conditional-3 tests 2017-01-07 23:17:54 -08:00
bors-servo
f958dafcae Auto merge of #14865 - mrnayak:sri-fetch, r=jdm
Implement Subresource Integrity

Implemented response validation part of https://w3c.github.io/webappsec-subresource-integrity/.
Implemented step eighteen of the main fetch. If a request has integrity metadata, then following steps are performed
1) Wait for response body
2) If the response does not have a termination reason and response does not match request’s integrity metadata, set response and internalResponse to a network error.

Dependency updated: html5ever-atoms from 0.1.2 to 0.1.3. This will not completely fix #14523, It will implement changes related to response validation. Request validation algorithm implementation needs CSP.

I did not update any WPT-Test. In my local system, I found some assertion issue dependent on the order of execution of test-case. It would be helpful if someone could do "try" build on these changes to get wpt results.

r? @jdm
<!-- 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

<!-- 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/14865)
<!-- Reviewable:end -->
2017-01-07 23:14:37 -08:00
bors-servo
cdf14730ff Auto merge of #14712 - KiChjang:css-keyframe-rule-style, r=Manishearth
Implement CSSKeyframeRule.style

Fixes #14636.

r? @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/14712)
<!-- Reviewable:end -->
2017-01-07 22:18:11 -08:00
Keith Yeung
18567ce7a8 Implement CSSKeyframeRule.style 2017-01-07 22:18:04 -08:00
mrnayak
a3026499f4 Implement Subresource Integrity
Implemented response validation part of
https://w3c.github.io/webappsec-subresource-integrity/.
Implemented step eighteen of the main fetch. If a request has integrity
metadata, then following steps are performed
*Wait for response body
*If the response does not have a termination reason and response does not
match request’s integrity metadata, set response to a
network error.# Please enter the commit message for your changes. Lines starting
2017-01-08 08:52:18 +05:30
Nazım Can Altınova
8d90aa0b88 Update transition-timing-function css test 2017-01-08 02:26:27 +03:00
Nazım Can Altınova
533ac6bdb4 Convert computed_value::T to SpecifiedValue in serialization.rs 2017-01-08 02:26:26 +03:00
bors-servo
d14158a592 Auto merge of #14893 - Manishearth:alias, r=emilio
Support property aliases

Aliases now get forwarded to their "original" property name at parse time. CSSOM continues to provide access through alias getters.

We'll need to probably add `${"-webkit-foo -moz-foo" if gecko else ""}` all over the place. Might want to come up with a convenient attibute name for that (`gecko_prefix="mw"`) or something.

r? @heycam or @bholley

<!-- 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/14893)
<!-- Reviewable:end -->
2017-01-07 13:56:19 -08:00
Nikhil Shagrithaya
401836e8f0 Implemented XMLHttpRequest.send(Document) 2017-01-08 03:04:51 +05:30
Manish Goregaokar
33966a84fb Support property aliases 2017-01-07 13:17:00 -08:00
Anthony Ramine
0cb09468a0 Properly insert text in document when parsing
If the last child of a node is a Text child and we are inserting text in that node,
we need to append it to that Text child. Doing that means that
HTMLStyleElement::children_changed gets called less frequently, but that's not a
problem during parsing thanks to the pop hook.
2017-01-07 19:21:02 +01:00
bors-servo
fdddeb1c92 Auto merge of #14833 - emilio:mq-refactor, r=heycam,bz
style: Isolate the soon-to-be style-backend-specific code from the media_query module.

The idea here is having (for convenience) different `Expression` and `Device` representations for Gecko.

Both will be implemented in rust, but will use `nsMediaFeatures` as a source of media features instead of the Servo bits.

Does it sound good?

r? @heycam or @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/14833)
<!-- Reviewable:end -->
2017-01-07 05:03:41 -08:00
Emilio Cobos Álvarez
c0cf847043
style: Isolate the soon-to-be style-backend-specific from the media_query module. 2017-01-07 12:34:43 +01:00
bors-servo
3b2a066088 Auto merge of #14874 - mbrubeck:always-be-updating, r=Manishearth
Update url, num_cpus, heapsize, webdriver.

<!-- 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/14874)
<!-- Reviewable:end -->
2017-01-06 23:34:20 -08:00
Matt Brubeck
6f3831b2d1 Update url, num_cpus, heapsize, webdriver. 2017-01-06 14:12:42 -08:00
bors-servo
0cd0bdd33e Auto merge of #14875 - anholt:webgl-expected-updates, r=emilio
webgl: test expectation updates

<!-- Please describe your changes on the following line: -->
This series cherry-picks some diffs from a full

    ./mach update-wpt --ignore-existing

on the webgl conformance tests, all of which I think are just leftovers from previous fixes.

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

<!-- 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/14875)
<!-- Reviewable:end -->
2017-01-06 06:35:55 -08:00
bors-servo
85d3bbd999 Auto merge of #14840 - servo:entry-global, r=nox
Implement the entry global.

Partial fix for #10963.

<!-- 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/14840)
<!-- Reviewable:end -->
2017-01-06 05:15:11 -08:00
Ms2ger
cb47a7e403 Implement the entry global.
Partial fix for #10963.
2017-01-06 12:56:35 +01:00
bors-servo
7f9fd0ec1f Auto merge of #14860 - asajeffrey:constellation-index-past-correctly-when-discarding, r=cbrewster
Index the session past correctly when discarding.

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

Oops, indexed from the wrong end when discarding documents in #14312.

---
<!-- 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 because we're not testing document discarding

<!-- 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/14860)
<!-- Reviewable:end -->
2017-01-06 03:53:35 -08:00
Alan Jeffrey
b401556f03 Added a test to make sure that forward-then-back triggers a reload. 2017-01-06 10:58:48 +00:00
bors-servo
8b274f25d3 Auto merge of #14559 - asajeffrey:script-track-document-and-bc-discarding, r=cbrewster
Implement browsing context discarding

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

Implement browsing context discarding (https://html.spec.whatwg.org/multipage/browsers.html#discard-a-document).

* When a pipeline is closed, inform the script thread whether the browsing context is to be discarded.
* In script threads, synchronously discard any similar-origin documents and browsing contexts.
* When a browsing context is discarded, it loses the reference to the active document, but the window keeps it, so we need to move the `Document` pointer from `BrowsingContext` to `Window`.
* Fix the webIDL for Window to make parent and top optional (the spec says they can return null when the browsing context is discarded).

---
<!-- 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 #14411
- [X] There are tests for these changes

<!-- 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/14559)
<!-- Reviewable:end -->
2017-01-05 18:20:12 -08:00
Eric Anholt
d020638ae4 webgl: Update expecteds for webgl-specific.html
This one is a combination of the new stencil* function support, and
the depthRange() validation I had added.
2017-01-05 18:15:15 -08:00
Eric Anholt
b5fa219f5a webgl: Drop expecteds for more calls to now-implemented functions. 2017-01-05 18:15:13 -08:00
Eric Anholt
1b84e633ff webgl: Drop more expected parsing failures from missing FBO support.
At least, it looks to me like that's what these were from -- they're
in about the right places to be from us previously missing
checkFramebufferStatus().
2017-01-05 18:14:27 -08:00
Eric Anholt
190e56c7c7 webgl: Drop some expected parsing failures.
I believe these were fixed with the getParameter(GL_FRAMEBUFFER_BINDING)
support.
2017-01-05 18:12:20 -08:00
Eric Anholt
9a8784c04d webgl: Remove some expected-fails for gl-vertex-attrib-zero-issues.html.
These expecteds were added in a07d6b37cc
with the addition of disableVertexAttribArray(), but they haven't been
happening in my test runs.
2017-01-05 18:12:18 -08:00
Alan Jeffrey
7c2de62124 Implement browsing context discarding. 2017-01-05 21:12:57 +00:00
bors-servo
42e28bf7e5 Auto merge of #14863 - charlesvdv:prefs, r=jdm
Allow cli prefs to have numerical value

I'm not sure as I'm new with servo but shouldn't the new function ```parse_opt_prefs``` be in ```prefs.rs``` instead of ```opts.rs``` ?

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

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

<!-- 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/14863)
<!-- Reviewable:end -->
2017-01-05 12:09:01 -08:00
charlesvdv
6a22174eb7 Allow cli prefs to have numerical value
Fix for #14842.

Extract the code inside a function to unit-test it.
2017-01-05 19:32:14 +01:00
bors-servo
1d9bbfa07b Auto merge of #14851 - hiikezoe:float-iteration-count-rebased, r=emilio
animation-iteration-count property is a number instead of integer.

<!-- Please describe your changes on the following line: -->
This is a revised PR  for #14732.
@emilio?
---
<!-- 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

<!-- 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/14851)
<!-- Reviewable:end -->
2017-01-05 03:44:20 -08:00