Commit graph

3609 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
babb5d4247
Add a test for nested stacking context overflow areas. 2016-08-16 15:44:43 -07:00
bors-servo
49431be44a Auto merge of #12838 - emilio:viewport, r=SimonSapin
Fix restyling on viewport resize.

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

Fixes https://github.com/servo/servo/issues/12835

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

<!-- 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/12838)
<!-- Reviewable:end -->
2016-08-16 13:48:20 -05:00
Emilio Cobos Álvarez
9e88a495c8
style: Introduce a generic way of gathering information from the cascade, and use it for viewport units. 2016-08-16 10:58:16 -07:00
Anthony Ramine
6cc862d0c6 Lessen pressure on the thread-local RNG
When loading HTTP requests, initialise the request ID only if devtools
are used, to lessen the pressure put on the RNG initialisation.

This tentatively fixes #11100 on OS X.
2016-08-16 10:12:33 +02:00
bors-servo
d687f77fef Auto merge of #12873 - shinglyu:abs-margin-patch, r=notriddle,emilio
Fix absolute-flow's auto positioning

<!-- Please describe your changes on the following line: -->
If an absolute positioned flow has no top, bottom, left, right property, its hypothetical box position should be the margin-end of its previous sibling, not the border-end.

---
<!-- 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 #12676 (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/12873)
<!-- Reviewable:end -->
2016-08-15 08:19:04 -05:00
Shing Lyu
332cdd05c8 Absolute positioned flow should be placed at the margin-end of its previous flow 2016-08-15 19:34:37 +08:00
bors-servo
8472699885 Auto merge of #12857 - anholt:webgl-framebuffer-binding-2, r=emilio
Implement GL_FRAMEBUFFER_BINDING (and fix a VertexAttrib1fv typo)

<!-- Please describe your changes on the following line: -->
This PR fixes many webgl conformance test failures due to missing support for a getParameter() call in the webgl test utils.

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

<!-- 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/12857)
<!-- Reviewable:end -->
2016-08-14 04:46:17 -05:00
Eric Anholt
6651db8b56 webgl: Add support for getParameter(GL_FRAMEBUFFER_BINDING).
To do this, we need to keep a map of GL names (encapsulated as
WebGLFramebufferId) to WebGLFramebuffer objects so that we can return
the right type.

Fixes #12852
2016-08-14 00:49:41 -07:00
bors-servo
700bb911fc Auto merge of #12839 - notriddle:11818_sequential_layout_bug, r=emilio
Fix a cached style cascade bug that only manifested in sequential mode

When copying cached styles, keep the `writing_mode` up to date.

---

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #11818 (github issue number if applicable).
- [X] There are tests for these changes

EDIT: The test is now working. I ran it with the first commit (the actual fix) reverted and it failed.

<!-- 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/12839)
<!-- Reviewable:end -->
2016-08-14 02:27:19 -05:00
Michael Howell
0809809c23 Add test for #11818 2016-08-13 16:48:54 -07:00
Anthony Ramine
fc6faf72ee Update Rust to 1.12.0-nightly (1deb02ea6 2016-08-12) 2016-08-13 18:34:44 +02:00
bors-servo
78160bf3f9 Auto merge of #12700 - jeenalee:jeena-requestAPI, r=jdm
Implement the Request API

<!-- Please describe your changes on the following line: -->
This PR implements the [Request API](https://fetch.spec.whatwg.org/#request-class) for the Fetch API, including its attributes and constructor, and introduces changes in relevant files.

This Request integrates `net_traits::request::Request` and `dom::headers`.

There are few related TODOs and comments:
1. `net_traits::request::Request`'s `headers` field does not point to `dom::request::Request`'s `headers_reflector`.
2. Every Constructor step that involves `Readable Stream` object is not implemented.
3. Every Constructor step that involves `entry settings object` or `environment settings object` is not implemented.
4. `./mach build -d` does not report any error, but prints a few warnings about unused variables related to (1) and (2).
5. Enum `ReferrerPolicy` generated by `RequestBinding` does not match `net_traits::request::Request`'s implementation.
6. `Promise`s in Body webidl are commented out.

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests  because tests for the Request API already exists, but this commit does not implement the interface fully.

<!-- 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/12700)
<!-- Reviewable:end -->
2016-08-12 23:54:49 -05:00
Jeena Lee
69f4cf6808 Modify Headers API to correctly validate value.
This commit modifies the headers API script to correctly validate value. As a result of this change, more wpt tests pass. The commit also changes the expected test results.
2016-08-12 15:40:09 -07:00
Jeena Lee
fabe2b8f7e Implement the Request API for the Fetch API.
This commit adds new files related to implementing the [Request
API](https://fetch.spec.whatwg.org/#request-class). This commit also
changes the expected web platform tests results. It also modifies the
following files:

components/net_traits/request.rs
HeapSizeOf is implemented in net_traits/request so that dom::request can
be used as a wrapper around net_traits::request::Request.

components/script/dom/headers.rs
Several methods are added to Headers so that request can access and
modify some of the headers fields.
2016-08-12 15:39:40 -07:00
Anthony Ramine
7ad51dcd7a Update serde to 0.8 (fixes #12659) 2016-08-12 18:37:27 +02:00
bors-servo
5b915c403d Auto merge of #12817 - servo:euclid, r=nox
Update to euclid 0.8

<!-- 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/12817)
<!-- Reviewable:end -->
2016-08-11 20:12:29 -05:00
Martin Robinson
6259df5e2d Update to euclid 0.8 2016-08-12 03:12:06 +02:00
bors-servo
4cefbcc949 Auto merge of #12813 - emilio:hit-test, r=notriddle
dom: getElementsFromPoint does the hit testing on viewport coordinates.

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

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

We got this wrong (I think it wasn't my fault actually), I was just writing a test for #12777 when I found this.

<!-- 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/12813)
<!-- Reviewable:end -->
2016-08-11 05:34:27 -05:00
Alexandrov Sergey
a9c1817fee update tests expectations 2016-08-11 10:34:34 +03:00
Alexandrov Sergey
93334cf178 add tests to check if inline pseudo elements paddings and margins are accounted correctly 2016-08-11 10:34:34 +03:00
Emilio Cobos Álvarez
f9c0f2df13
dom: getElementsFromPoint does the hit testing on viewport coordinates.
We got this wrong, I was just writing a test for #12777 when I found this.
2016-08-10 21:15:10 -07:00
bors-servo
1b2450339c Auto merge of #12757 - emilio:stylo, r=bholley,pcwalton
stylo: Stop restyling display: none elements, remove the has_changed hack that made us use ReconstructFrame unconditionally.

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

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

r? @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/12757)
<!-- Reviewable:end -->
2016-08-10 21:02:30 -05:00
Emilio Cobos Álvarez
2c321015e9
Add a regression test for pseudo-element restyles. 2016-08-10 18:26:26 -07:00
Emilio Cobos Álvarez
6b60383f24
layout: Ensure a element's style is up to date when processing queries. 2016-08-10 18:26:23 -07:00
Anthony Ramine
bce5544a31 Enable canvas_over_area.html (closes #8311)
This was related to #7787 that was closed because it didn't happen for a long time.
We check whether that is the case for #8311 too.
2016-08-10 16:10:34 +02:00
bors-servo
dc47e66d8c Auto merge of #12796 - nox:intermittent, r=jdm
Enable hide_layers2.html (closes #8769)

<!-- 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/12796)
<!-- Reviewable:end -->
2016-08-10 08:05:12 -05:00
Anthony Ramine
7f8cce6beb Enable hide_layers2.html (closes #8769)
This was apparently fixed by #10082.
2016-08-10 14:52:45 +02:00
bors-servo
ddf4e68c91 Auto merge of #12780 - izgzhen:xhr-file-upload, r=Manishearth
Add XHR support for FormData and related fixes

+ Update IDL for `FormData`, and related fixes
+ Reuse `htmlformelement::FormDatum` for `formdata.rs` for a uniform representation, and related fixes
+ Add support for `FormData` branch of XHR `BodyInit`.
+ Fixes a lot of related WPT tests

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] There are tests for these changes OR

<!-- 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/12780)
<!-- Reviewable:end -->
2016-08-10 06:40:16 -05:00
Zhen Zhang
184b522230 Add XHR support for FormData 2016-08-10 12:58:35 +02:00
Eric Anholt
1caf82bc0f Remove expected-crash state of many WebGL tests on Linux.
These tests are still all skipped currently (see #9331), but with
skipping removed, these didn't crash with Mesa 12.1 on Haswell
(Intel).
2016-08-09 22:51:30 -07:00
bors-servo
944cbbff8b Auto merge of #12629 - notriddle:intermittents, r=aneeshusa
Intermittents

We probably want to have Buildbot run that script.

---

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #12435, #11574, and #11561
- [X] These changes do not require tests because reasons

<!-- 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/12629)
<!-- Reviewable:end -->
2016-08-09 23:28:17 -05:00
Michael Howell
c2be1270d7 Re-enable intermittents fixed by #12543
* Fixes #11574
  * Fixes #11561
2016-08-09 14:11:33 -07:00
Simon Martin
1e60c915f9 Issue #12421: tidy should also check .html files 2016-08-09 22:04:57 +02:00
bors-servo
5e83b3f83b Auto merge of #12571 - servo:selectors-generic-atom_, r=bholley
Update to selectors 0.8.2 (generic over atoms)

This removes the `[replace]` override in geckolib and therefore unblocks https://github.com/servo/servo/pull/12391.

This includes the `gecko_string_cache` redesign discussed in https://github.com/servo/servo/pull/12548.

r? @bholley

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

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

<!-- 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/12571)
<!-- Reviewable:end -->
2016-08-09 12:02:55 -05:00
Simon Sapin
fdb2071b2d Update to selectors 0.8.2 2016-08-09 18:18:38 +02:00
bors-servo
2420dc4a3e Auto merge of #12760 - splav:inline_split_fixes#12699, r=notriddle
Inline split fixes#12699

<!-- Please describe your changes on the following line: -->
Fix fragment splitting algorithm to set FIRST/LAST_FRAGMENT_OF_ELEMENT flag correctly, account for border_padding for border_box and set zero border_padding between for new fragments.

---
<!-- 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 #12699 (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/12760)
<!-- Reviewable:end -->
2016-08-09 11:05:57 -05:00
bors-servo
44ebbfc20d Auto merge of #12768 - nox:fix-transition, r=SimonSapin
Fix interpolation of CalcLengthOrPercentage (fixes #12765)

<!-- 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/12768)
<!-- Reviewable:end -->
2016-08-09 09:03:10 -05:00
Anthony Ramine
fc58cc01f4 Fix interpolation of CalcLengthOrPercentage (fixes #12765) 2016-08-09 14:47:38 +02:00
Alexandrov Sergey
9c8b3a6733 update tests expectations 2016-08-09 07:11:51 +03:00
Alexandrov Sergey
721b59a113 add test for splitted span with borders 2016-08-09 00:52:09 +03:00
bors-servo
3ae94fca70 Auto merge of #12742 - mrobinson:off-by-one-ng-2, r=pcwalton
Simplify and extend trans-stacking-context subpixel accumulation

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

<!-- Either: -->
- [x] 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. -->

Simplify the situations in which subpixels are accumulated, so that it
is only done for translation or identity transformation matrices. Also,
apply accumulated subpixels to more operations in PaintContext. This
fixes several pre-existing reftests and hopefully will eliminate
off-by-one errors in flaky reftests.

<!-- 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/12742)
<!-- Reviewable:end -->
2016-08-08 08:41:49 -05:00
bors-servo
a83fed2144 Auto merge of #12754 - stshine:no-divide-by-zero, r=pcwalton
Fix unexpected freeze of flex item

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

Fix the currently logic that a item will freeze if it should
grow(shrink) and its basesize is less(more) than its min(max) size. This
also fix the divide by zero error when an item should shrink but it has
zero length and zero min size.

---
<!-- 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] 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/12754)
<!-- Reviewable:end -->
2016-08-08 00:39:05 -05:00
Pu Xingyu
2c2c60e44d layout: Freeze flex item properly
Fix the currently logic that a item will freeze if it should
grow(shrink) and its basesize is less(more) than its min(max) size. Also
fix the divide by zero error when an item should shrink but it has zero
length and zero min size.
2016-08-08 10:34:02 +08:00
Emilio Cobos Álvarez
a3d1457809
Add test for #12749 2016-08-05 16:03:52 -07:00
bors-servo
0fc0db67c6 Auto merge of #12680 - Manishearth:basic-shape, r=SimonSapin
style: Add support for parsing and serialization of <basic-shape>s

Still WIP: I still need to use this somewhere and make serialization minimal. I'm not sure if I should do either in this PR.
The only other browser that handles basic shapes doesn't serialize correctly either (https://bugzilla.mozilla.org/show_bug.cgi?id=1290864), so that's not something we need to get done now.

As far as using this somewhere, I have the following options:

 - Merge this now, work on using it in stylo in a followup.
 - Just write extensive unit tests for parsing/serialization for now (stylo in a followup)
 - Use this for clip-path in stylo only (which I intend to do anyway, just not sure if I should do it in this PR)
 - Use this for clip-path in Servo (I'd rather not do this; this would be a huge change requiring a lot more layout knowledge than I currently have)

Thoughts? Review? @SimonSapin @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/12680)
<!-- Reviewable:end -->
2016-08-05 06:27:24 -05:00
Manish Goregaokar
234219cd84 Address review comments 2016-08-05 16:58:38 +05:30
Martin Robinson
4aabbf33d4 Simplify and extend trans-stacking-context subpixel accumulation
Simplify the situations in which subpixels are accumulated, so that it
is only done for translation or identity transformation matrices. Also,
apply accumulated subpixels to more operations in PaintContext. This
fixes several pre-existing reftests and hopefully will eliminate
off-by-one errors in flaky reftests.

Fixes #10881.
2016-08-05 13:25:37 +02:00
Jeena Lee
543262b5d3 Enable wpt tests for Request and Response APIs 2016-08-04 10:47:35 -07:00
Josh Matthews
f152bc3b06 Implement Window.postMessage for same-origin windows. 2016-08-04 11:52:26 +02:00
bors-servo
1837fcbedd Auto merge of #11318 - mitchhentges:1471-cache-tag-name, r=nox
Compute tag_name a maximum of once per document owner

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 --faster` does not report any errors
- [X] These changes fix #1471 (github issue number if applicable).

Either:
- [X] These changes do not require tests because no new functionality was added, just a reorganization and caching of existing functionality

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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11318)
<!-- Reviewable:end -->
2016-08-04 02:27:20 -05:00