Commit graph

9277 commits

Author SHA1 Message Date
David Raifaizen
3831c0650c Adding support for correct shorthand serialization 2016-08-16 22:28:51 -04: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
fc12841cd3
style: Remove the block that explicitly checked for the style attribute, since now it's useless. 2016-08-16 10:58:17 -07: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
bors-servo
c386a3c881 Auto merge of #12815 - emilio:stylo-atoms, r=bholley
stylo: Use atoms as the pseudo-element back-end.

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

A bit of work left, and we can uber-optimize this (left comments, will fill follow-ups), but this is a decent refactor so I thought I'd rather get some feedback on it.

r? @bholley (not formally yet, maybe, but some feedback is appreciated).

---
<!-- 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] These changes do not require tests because geckolib only...

<!-- 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/12815)
<!-- Reviewable:end -->
2016-08-16 12:50:29 -05:00
bors-servo
e5391554e0 Auto merge of #12893 - servo:glutinup, r=metajack
Update glutin.

<!-- 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/12893)
<!-- Reviewable:end -->
2016-08-16 11:10:11 -05:00
Ms2ger
028918da4a Update glutin. 2016-08-16 14:03:12 +02: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
Emilio Cobos Álvarez
babb2b7160
stylo: Remove misleading comments re. break-before and break-after.
They're alias, and the deprecated property is page-break-xxx, not break-xxx.
2016-08-15 22:59:54 -07:00
Emilio Cobos Álvarez
6bce4c8c20
stylo: Use Arc::get_mut().unwrap() instead of make_mut.
It's infallible, so no point in using make_mut.
2016-08-15 22:59:35 -07:00
Emilio Cobos Álvarez
010bce128b
stylo: We have an Atom back-end now. 2016-08-15 22:58:33 -07:00
Emilio Cobos Álvarez
d612d9f5ef
stylo: Convert pseudo-elements to an Atom wrapper. 2016-08-15 22:58:33 -07:00
Emilio Cobos Álvarez
b1091dff58
stylo: Regenerate the world. 2016-08-15 22:58:32 -07: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
41296d20b9 Auto merge of #12849 - Coder206:gfxWarnings, r=Wafflespeanut
Fix GFX Warnings

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

- [ ] 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/12849)
<!-- Reviewable:end -->
2016-08-14 12:48:06 -05:00
Patrick Trottier
dd7daf2861 Fix GFX Warnings
Corrections to GFX Warnings Fix
2016-08-14 11:19:29 -04:00
bors-servo
27d082e577 Auto merge of #12854 - nox:impl-trait, r=jdm
Use impl Trait syntax for Node::child_elements

<!-- 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/12854)
<!-- Reviewable:end -->
2016-08-14 08:26:21 -05: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
Emilio Cobos Álvarez
40c04b4c6b
style: Correcly track whether calc values support viewport sizes. 2016-08-14 01:37:28 -07:00
Emilio Cobos Álvarez
b1fca78cba
layout: Mark correctly parents of dirty elements. 2016-08-14 01:37:28 -07: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
Eric Anholt
a21bbb78c4 webgl: Fix a typo in VertexAttrib1fv handling.
The VertexAttrib[234]fv compare to the same size as in their function
name.  This wasn't noticed becacuse this function isn't connected from
the .webidl yet.
2016-08-13 17:25:32 -07:00
Michael Howell
0809809c23 Add test for #11818 2016-08-13 16:48:54 -07:00
Anthony Ramine
9c8a810d6e Use impl Trait syntax for Node::child_elements 2016-08-13 22:38:02 +02:00
bors-servo
882872897e Auto merge of #12851 - jeenalee:request, r=nox
Fix step 31 of the Request constructor.

<!-- Please describe your changes on the following line: -->
This PR fixes the step 31 of the Request constructor to fill Request's Headers object and rethrow any exceptions. Additionally, it removes unnecessary line breaks, comments, and redundant function.

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because this PR does not change the behavior of the Request constructor.

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

In addition to fixing step 31 of the Request constructor, this
commit also:
- remove `get_current_url` function, and use `net_request::request`'s
built-in `current_url` method
- clean up unnecessary line breaks and comments

<!-- 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/12851)
<!-- Reviewable:end -->
2016-08-13 15:26:15 -05:00
Jeena Lee
2693027727 Fix step 31 of the Request constructor.
In addition to fixing step 31 of the Request constructor, this
commit also:
- remove get_current_url function, and use net_request::request's
built-in current_url method
- clean up unnecessary line breaks and comments
2016-08-13 13:14:07 -07:00
Anthony Ramine
fc6faf72ee Update Rust to 1.12.0-nightly (1deb02ea6 2016-08-12) 2016-08-13 18:34:44 +02:00
Anthony Ramine
9f5122f487 Update image to 0.10.2 to silence some warnings 2016-08-13 17:18:11 +02:00
Anthony Ramine
f12fad7953 Remove rust_tenacious
We don't use it anymore since #11872.
2016-08-13 17:18:10 +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
bors-servo
7b1f75b605 Auto merge of #12831 - notriddle:master, r=Manishearth
Add a flag to dump the computed style values

I used this to trace #11818 to a style bug, rather than a layout bug.

---

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes do not fix any issues
- [X] These changes do not require tests because debugging

<!-- 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/12831)
<!-- Reviewable:end -->
2016-08-12 20:55:27 -05:00
bors-servo
11b853fbf1 Auto merge of #12834 - dtolnay:bound, r=nox
Remove #[serde(bound = "")] attributes

These were fixed in serde_codegen 0.8.0 by serde-rs/serde#456.

cc @nox

- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [x] These changes do not require tests because: the generated code continues to compile

<!-- 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/12834)
<!-- Reviewable:end -->
2016-08-12 19:01:28 -05:00
bors-servo
7a30eaae23 Auto merge of #12822 - servo:shared_library, r=Manishearth
Update shared_library.

<!-- 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/12822)
<!-- Reviewable:end -->
2016-08-12 18:10:03 -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
Michael Howell
ad4b9aab45 Rebuild the writing_mode with cached style reuse
Fixes #11818
2016-08-12 15:24:56 -07:00
David Tolnay
8e924c9858 Remove #[serde(bound = "")] attributes
These were fixed in serde_codegen 0.8.0 by serde-rs/serde#456.
2016-08-12 14:05:28 -07:00
Michael Howell
748a573917 Add a flag to dump the computed style values
I used this to trace #11818 to a style bug, rather than a layout bug.
2016-08-12 11:11:23 -07:00
Anthony Ramine
7ad51dcd7a Update serde to 0.8 (fixes #12659) 2016-08-12 18:37:27 +02:00
Ms2ger
9e8ea9b0b5 Update shared_library. 2016-08-12 10:54:12 +02:00
bors-servo
a22913569c Auto merge of #12795 - Wafflespeanut:word_spacing, r=Manishearth
Support 'word-spacing' for geckolib

**These changes haven't been tested yet!**

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors

- [ ] There are tests for these changes

<!-- 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/12795)
<!-- Reviewable:end -->
2016-08-11 22:02:01 -05: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
bors-servo
b7facf41cb Auto merge of #12790 - malisas:malisa-bytestring-generator, r=Ms2ger
Update bindings generator to support default ByteString values in a dictionary

<!-- Please describe your changes on the following line: -->
Update bindings generator to support default ByteString values in a dictionary.

---
<!-- 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 #12737 (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/12790)
<!-- Reviewable:end -->
2016-08-11 04:36:23 -05:00
bors-servo
9ffda4c7b3 Auto merge of #12669 - splav:inline_pseudo_elements_layout#12367, r=notriddle
Inline pseudo elements layout#12367

<!-- Please describe your changes on the following line: -->
This PR fixes ignored paddings and margins for inline pseudo elements.

---
<!-- 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 #12367 (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/12669)
<!-- Reviewable:end -->
2016-08-11 03:38:14 -05:00
Ms2ger
e99cb474f0 Update ordered-float. 2016-08-11 09:13:22 +02:00
Alexandrov Sergey
49b50e45a3 do not merge inline fragments if there is space in between 2016-08-11 10:11:11 +03:00