Commit graph

4215 commits

Author SHA1 Message Date
Corey Farwell
957e1d8e7a Make 'reset-form.html' test more granular. 2016-10-20 00:02:53 -04:00
Simon Sapin
742681a623 Add RwLock in more Arc’d things in stylesheets. 2016-10-19 19:55:05 +02:00
bors-servo
9e3cf3189b Auto merge of #13804 - canaltinova:gradient-parsing, r=Manishearth
Fix radial gradient's <size>/<ending-shape> parsing

<!-- Please describe your changes on the following line: -->
Parsing now handles sizes and shapes in various order.
I had to delete `EndingShape`'s parse implementation and mix it with `Position` in `parse_radial`. It became a bit complicated to read but I couldn't make it simpler.
r? @Manishearth

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

<!-- 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/13804)
<!-- Reviewable:end -->
2016-10-19 09:10:15 -05:00
Nazım Can Altınova
00244a2248 Add parsing tests for radial gradient 2016-10-19 16:35:02 +03:00
Manish Goregaokar
b0c50d8219 Fix style unit tests 2016-10-18 20:46:59 +05:30
Manish Goregaokar
6ca2c7ba77 Move parse_longhand macro to parse tests module 2016-10-18 20:42:17 +05:30
bors-servo
80447a79c4 Auto merge of #13614 - jdm:wptrunnerup3, r=Ms2ger
Upgrade wptrunner

This gets us back to a pristine local copy and allows us to start experimenting with webdriver 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/13614)
<!-- Reviewable:end -->
2016-10-18 08:15:11 -05:00
Josh Matthews
a9c2dda299 Revert wptrunner 496353104e7ee0969e316c12caf3dc2988efb8e8 2016-10-18 09:11:47 -04:00
Josh Matthews
d6318c8ea5 Upgrade wptrunner to 83fb6b727817a7dfeb24763d099aca95bc674b8e. 2016-10-18 09:11:46 -04:00
Scott Trinh
ab0ddf9040 Partial fix for 12415 2016-10-17 16:08:07 -04:00
Jeena Lee
94ea24e47b Allow Request's Headers to be created with various objects
While Headers could be constructed correctly with an array or
object (open ended dictionary/MozMap), Request's Headers failed to be
created with non-Headers object (such as array or open ended
dictionary/MozMap).

Before, Request's Headers could be filled with only a Headers object in
Step 28. This has been expanded to accommodate array and open ended
dictionary.

Step 29 empties the Request's Headers list after it had been filled in
Step 28, thus resulting in an empty Headers object when it shouldn't
be. This step has been removed with a comment in this commit.

If a RequestInit Headers is *not* given, but a RequestInfo Headers is
given, RequestInfo Headers should be used to construct Request
Headers. That step has been added after Step 31.

Corresponding wpt result is updated in this commit.
2016-10-17 09:14:30 -07:00
bors-servo
a71b1e65be Auto merge of #13783 - frewsxcv:select-value, r=nox
Implement `value` property on `<select>`.

<!-- 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/13783)
<!-- Reviewable:end -->
2016-10-17 02:47:48 -05:00
Corey Farwell
a3d4d336b7 Implement value property on <select>. 2016-10-16 17:06:58 -04:00
bors-servo
4af21e3ae1 Auto merge of #13787 - lucasloisp:fix-12415/htmll-htmlo, r=emilio
Removed incorrectly exposed webidl interfaces

<!-- Please describe your changes on the following line: -->
I removed exposure in Window and Worker to some interfaces that
was not specified in the specification. Specifically:
- HTMLLinkElement.webidl
- HTMLMapElement.webidl
- HTMLMediaElement.webidl
- HTMLMetaElement.webidl
- HTMLMeterElement.webidl
- HTMLModElement.webidl
- HTMLObjectElement.webidl
- HTMLOListElement.webidl
- HTMLOptGroupElement.webidl
- HTMLOptionElement.webidl
- HTMLOutputElement.webidl

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because they do not add any feature

<!-- 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/13787)
<!-- Reviewable:end -->
2016-10-16 11:45:28 -05:00
Lucas Lois
d764eef5a2 Removed incorrectly exposed webidl interfaces
I removed exposure in Window and Worker to some interfaces that
was not specified in the specification.
2016-10-16 13:29:47 -03:00
bors-servo
ecbdeb330f Auto merge of #11624 - g-k:wpt-cookie-path-tests, r=jdm
wpt cookie path tests

Adds wpt tests for the cookie path attribute.

Notes:

* I included polyfills for fetch and promise to get tests running.  Assuming these changes are OK, I'll remove them and add failure expectations so they don't get synced to w3c.
* I didn't work out a way to test sending cookies when the request and cookie paths exactly match (e.g. request path `/cookies/path/match-exact-page.sub.html` and cookie path `/cookies/path/match-exact-page.sub.html` will not send cookies to `/cookies/resources/echo-json.py`)
* test names could be clearer
* everything can be squashed to one commit

---

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #8756 (github issue number if applicable).

- [x] These changes do not require tests because they are tests (and if we test our tests do we need to test our test tests? ...)

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11624)
<!-- Reviewable:end -->
2016-10-16 09:48:47 -05:00
bors-servo
97bcd97ebd Auto merge of #13747 - scotttrinh:canvas-webidl, r=Ms2ger
Partial fix for #12415: expose Canvas interfaces

<!-- Please describe your changes on the following line: -->
Fix interface exposure per [the specs](https://html.spec.whatwg.org/multipage/scripting.html#2dcontext).

One lingering question I have is if [`CanvasPath`](https://html.spec.whatwg.org/multipage/scripting.html#canvaspath) needs to be added to `interfaces.worker.js` since it *is* exposed to the `Worker` environment. I tried adding it to the `interfaces.worker.js` list but it failed tests at https://github.com/servo/servo/blob/master/tests/wpt/mozilla/tests/mozilla/interfaces.js#L82

---
<!-- 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 contain a partial fix for #12415 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] 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/13747)
<!-- Reviewable:end -->
2016-10-16 00:18:09 -05:00
Patrick Walton
7df456e8ac layout: Rewrite clipping to be a two-phase process that takes physical
border box positions and transforms into account.

Clipping region computation now follows a simple process: (1) in the
parent's coordinate system, parents store appropriate clipping regions
into children; (2) each child moves its clipping region to its own
coordinate system if necessary.

Because clipping region computation is now based on stacking-relative
border box positions and the `transform_rect` method, it can handle
`position: relative` offsets and more types of transforms, such as
scaling.

Improves etsy.com.

Closes #13753.
2016-10-15 14:18:48 -07:00
bors-servo
759185abe0 Auto merge of #13765 - pcwalton:relative-position-vertical-percentage, r=emilio
layout: Make percentages in `top` and `bottom` for relative positions relative to height, not width.

Improves etsy.com.

Closes #13760.

r? @mbrubeck

<!-- 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/13765)
<!-- Reviewable:end -->
2016-10-14 23:47:24 -05:00
Greg Guthe
ec68a990d0 test cookie path matching 2016-10-14 20:44:13 -04:00
bors-servo
697e197985 Auto merge of #13703 - Rafagd:my_changes, r=Ms2ger
Replacing Node.rootNode for Node.getRootNode.

- Changed the specification for the Node element to reflect the new standard.
- Changed the implementation of the NodeMethod.

I'm still waiting for some answers for the questions I've posted on #13699, but I'm already doing the pull request so I can get some feedback as well.

---
<!-- 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 #13699 (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/13703)
<!-- Reviewable:end -->
2016-10-14 14:07:12 -05:00
Patrick Walton
d5443ee450 layout: Make percentages in top and bottom for relative positions
relative to height, not width.

Improves etsy.com.

Closes #13760.
2016-10-14 11:15:39 -07:00
bors-servo
0f4209644c Auto merge of #13759 - bholley:owning_handle, r=SimonSapin
Implement OwningHandle in style

I've also PR-ed this against upstream [1], but I don't want to block on that in case it takes a while to be merged / published.

[1] https://github.com/Kimundi/owning-ref-rs/pull/15

<!-- 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/13759)
<!-- Reviewable:end -->
2016-10-14 10:42:10 -05:00
Ms2ger
6eaef7c18a Update the bug number for Blob-XHR-revoke.html. 2016-10-14 14:18:04 +02:00
Ms2ger
e134871a95 Implement blob url support in the fetch stack. 2016-10-14 14:18:03 +02:00
Ms2ger
fc68e0a6ca Add a FileManager to FetchContext. 2016-10-14 11:30:09 +02:00
Ms2ger
53b6343f3c Add missing type to uniformOutOfBounds.html.ini. 2016-10-14 11:30:07 +02:00
Bobby Holley
d73047584c Implement OwningHandle in style.
I've also PR-ed this against upstream [1], but I don't want to block on that
in case it takes a while to be merged / published.

[1] https://github.com/Kimundi/owning-ref-rs/pull/15
2016-10-13 16:53:37 -06:00
Patrick Walton
18cf103ee0 layout: Don't try to vertically align absolutely positioned children of
table rows.

Improves http://reddit.com/r/aww.
2016-10-13 14:52:10 -07:00
Rafael Gomes Dantas
0074d2a7a8 Replacing Node.prototype.rootNode for Node.prototype.getRootNode. 2016-10-13 22:40:27 +01:00
Scott Trinh
df8030c50d Partial fix for #12415: expose Canvas interfaces 2016-10-13 16:08:50 -04:00
bors-servo
dc5dc5e614 Auto merge of #13737 - pcwalton:expand-matches, r=emilio
resources: Avoid using `:matches` in `presentational-hints.css`, since we don't support it.

Based on IRC discussions, this was determined to be an acceptable
stopgap in lieu of implementing `:matches`, which has complicated
precedence rules.

Improves Google search results.

r? @nox

<!-- 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/13737)
<!-- Reviewable:end -->
2016-10-13 12:51:53 -05:00
bors-servo
bbcc743bb4 Auto merge of #13732 - pcwalton:inline-block-vertical-align-overflow, r=notriddle
layout: Use the margin box for vertical positioning of `inline-block` fragments if `overflow` is not `visible` per CSS 2.1 § 10.8.1.

Additionally, this patch reverts the change introduced in #12642 in
favor of the spec-compliant behavior described above. This patch also
removes the `inline_block_overflow.html` reftest introduced in #3725, as
the behavior it expected contradicted CSS 2.1 (and in fact the test
fails in Gecko).

The changes that this patch makes to `input_selection_a.html` and
`input_selection_incremental_a.html` are necessary workarounds to make
the tests pass in light of the fact that Servo's UA stylesheet applies
`overflow: hidden` to `<input>` elements. I believe that the changes are
not necessary in other rendering engines because they hard-code
`overflow: hidden`-like behavior for `<input>` elements, while Servo
uses the actual CSS `overflow: hidden` behavior. As far as I can tell,
Servo's behavior is arguably more spec-compliant, but it remains to be
seen how Web compatible it is.

Improves the Google results pages.

Closes #13707.

r? @notriddle

<!-- 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/13732)
<!-- Reviewable:end -->
2016-10-13 12:06:44 -05:00
Patrick Walton
c25dd2adf6 layout: Use the margin box for vertical positioning of inline-block
fragments if `overflow` is not `visible` per CSS 2.1 § 10.8.1.

Additionally, this patch reverts the change introduced in #12642 in
favor of the spec-compliant behavior described above. This patch also
removes the `inline_block_overflow.html` reftest introduced in #3725, as
the behavior it expected contradicted CSS 2.1 (and in fact the test
fails in Gecko).

The changes that this patch makes to `input_selection_a.html` and
`input_selection_incremental_a.html` are necessary workarounds to make
the tests pass in light of the fact that Servo's UA stylesheet applies
`overflow: hidden` to `<input>` elements. I believe that the changes are
not necessary in other rendering engines because they hard-code
`overflow: hidden`-like behavior for `<input>` elements, while Servo
uses the actual CSS `overflow: hidden` behavior. As far as I can tell,
Servo's behavior is arguably more spec-compliant, but it remains to be
seen how Web compatible it is.

Improves the Google results pages.

Closes #13707.
2016-10-13 09:36:02 -07:00
Patrick Walton
95b095c1a1 resources: Avoid using :matches in presentational-hints.css, since
we don't support it.

Based on IRC discussions, this was determined to be an acceptable
stopgap in lieu of implementing `:matches`, which has complicated
precedence rules.

Improves Google search results.
2016-10-13 09:33:49 -07:00
bors-servo
85b2490e70 Auto merge of #13744 - servo:jdm-patch-1, r=Manishearth
Disable some frequent intermittent failures

<!-- 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/13744)
<!-- Reviewable:end -->
2016-10-13 06:31:04 -05:00
Josh Matthews
b9e57e1fc1 Disable 013.html 2016-10-13 07:25:53 -04:00
Josh Matthews
de77f67c8a Disable uniformOutOfBounds.html 2016-10-13 07:24:25 -04:00
Josh Matthews
1ed3b0b6e6 Disable microtask_after_raf.html 2016-10-13 07:18:41 -04:00
bors-servo
1a3287bef7 Auto merge of #13733 - jeenalee:request-clone, r=jdm
Fix Request's Headers to be cloned correctly

<!-- Please describe your changes on the following line: -->
Previously, when `Clone()` was called, Headers of the template Request did not get cloned properly. This commit fixes that issue, and updates the expected wpt results.

---
<!-- 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 #11894 (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/13733)
<!-- Reviewable:end -->
2016-10-13 05:33:36 -05:00
bors-servo
0ffbba94fa Auto merge of #13705 - pcwalton:incremental-float, r=notriddle
layout: Don't touch the inline positions of block children unless they are to be reflowed.

See the comment added to
`BlockFlow::propagate_assigned_inline_size_to_children()` for details.

Closes #13704.

r? @notriddle

<!-- 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/13705)
<!-- Reviewable:end -->
2016-10-12 16:00:37 -05:00
Jeena Lee
d03167d980 Fix Request's Headers to be cloned correctly
Previously, when `Clone()` was called, Headers of the template Request
did not get cloned properly. This commit fixes that issue, and updates
the expected wpt results.
2016-10-12 12:49:02 -07:00
bors-servo
a466f43fe5 Auto merge of #13493 - scotttrinh:webgl-idl, r=jdm
Partial fix for #12415: expose WebGL interfaces

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because they do not add any features

<!-- 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/13493)
<!-- Reviewable:end -->
2016-10-12 06:53:17 -05:00
bors-servo
cd2f950de3 Auto merge of #13056 - KiChjang:transition-event, r=mbrubeck
Implement transition event and infrastructure

Fixes #10245.

<!-- 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/13056)
<!-- Reviewable:end -->
2016-10-12 02:08:37 -05:00
Keith Yeung
668163ec5c Emit TransitionEnd events in the layout thread and process it in the script thread 2016-10-11 19:36:06 -07:00
Patrick Walton
06d9e91f7b layout: Don't touch the inline positions of block children unless they
are to be reflowed.

See the comment added to
`BlockFlow::propagate_assigned_inline_size_to_children()` for details.

Closes #13704.
2016-10-11 16:48:06 -07:00
Patrick Walton
773614f84c layout: Rewrite Servo's vertical-align support to match CSS 2.1 §
10.8, and implement `vertical-align: middle` per CSS 2.1 § 10.8.1.

`InlineMetrics` has been split into `InlineMetrics` for fragments and
`LineMetrics` for lines. Both structures' fields have been renamed in
order to more clearly delineate the difference between *space* and
*content*. Vertical positioning of fragments has been reworked to take
margins and borders into account only for replaced content.

This patch fixes the `vertical_align_super_a.html` reftest. Servo now
matches the rendering that Gecko and WebKit produce.

Additionally, this includes a test for the popular inline-block
centering technique described here:
https://s.codepen.io/shshaw/fullpage/gEiDt?#Inline-Block
2016-10-11 12:47:50 -07:00
Scott Trinh
5bdc8c806d Partial fix for #12415: expose WebGL interfaces 2016-10-11 06:33:04 -04:00
Corey Farwell
60afad1b61 Migrate user agent string to Cow<'static, str>.
In most scenarios, where the user of Servo will not override the default
user agent, the user agent can be a `&'static str`. But since we allow
for customization, we currently use a `String` to represent the user
agent. This commit migrates the user agent to be represented as a
`Cow<'static, str>`, which (at the cost of ergonomics) prevents
unnecessary allocations whenever cloning the user agent string in the
scenario the user doesn't override the user agent.
2016-10-10 16:34:20 -04:00
Eric Anholt
61debe5c01 webgl: Implement uniformMatrix*fv.
These new functions are derived from the existing uniform*fv
functions.  They get used in a lot of demo code, so it should greatly
improve our compatibility.

This regresses uniformMatrixBadArgs.html, which gets at an existing
problem in our uniform matrix support (failure to validate that the
uniform is a matrix before calling down) but previously just failed
because it only called the 'fv' variants and never the existing 'f'
variants.
2016-10-09 15:49:59 -07:00