Commit graph

9908 commits

Author SHA1 Message Date
Manish Goregaokar
bc9cbc87ba Move gecko_* into style::gecko
Prepping for the next stage where most of geckolib/ is popped in here
2016-09-24 19:25:59 +05:30
Manish Goregaokar
c6787458d9 Move gecko_bindings and gecko_string_cache into the style crate 2016-09-24 19:25:55 +05:30
bors-servo
89804bb251 Auto merge of #13396 - jdm:FormData_iterable, r=jdm
Added FormData Iterable

Implement FormData's iterator
Rebased from #13104.

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #13020
- [X] There are tests for these changes (It adds `./mach test-wpt tests/wpt/web-platform-tests/XMLHttpRequest/formdata-foreach.html`)

Notice: Our `FormData` is implemented by `HashMap` ,  which is different from [Gecko's array implementation](3c6ff93c8f/dom/base/FormData.h (L160)). So our `FormData`'s iterator order is different from Gecko's, as there is no way to keep our key's original insertion order.

<!-- 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/13396)
<!-- Reviewable:end -->
2016-09-24 03:54:18 -05:00
bors-servo
1632320722 Auto merge of #13389 - servo:js, r=emilio
Update js.

<!-- 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/13389)
<!-- Reviewable:end -->
2016-09-24 02:46:25 -05:00
bors-servo
1d5a05d112 Auto merge of #13388 - servo:deadlock, r=emilio
Avoid a possible deadlock in main_fetch's synchronous code.

On playpen, similar code caused a deadlock on 1.11 stable, and worked fine
on nightly 1.13; it seems safer to avoid the pattern entirely.

<!-- 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/13388)
<!-- Reviewable:end -->
2016-09-24 01:44:09 -05:00
bors-servo
28bce69d24 Auto merge of #13386 - Manishearth:style-testing, r=emilio
Run style tests with all properties included

This turns on all properties (including stylo-only ones) when the style unit tests are compiled. This lets us test the parsing of gecko-only properties.

These tests can't go in tests/stylo since this introduces dependencies on `Gecko_*` symbols. This method lets us test parsing and serialization of geckolib properties compiled in Servo mode (e.g. using Servo atoms, Servo URLs)

r? @emilio

<!-- 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/13386)
<!-- Reviewable:end -->
2016-09-24 00:36:28 -05:00
bors-servo
2ba804e6db Auto merge of #13361 - Mylainos:issue-13350, r=Wafflespeanut
Report tidy error for space after (

<!-- Please describe your changes on the following line: -->
Add report in tidy for code which have a space after the `(` like `some_function( argument)`

---
<!-- 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 #13350 (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/13361)
<!-- Reviewable:end -->
2016-09-23 22:16:57 -05:00
bors-servo
28ebab4398 Auto merge of #13354 - schuster:input-text-style, r=pcwalton
Style input-text pseudo with user-agent CSS

This changes the input-text pseudo-element to be styled with user-agent CSS rather than having a hard-coded style, as part of #8570

---
<!-- 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: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because they're a refactoring 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="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13354)
<!-- Reviewable:end -->
2016-09-23 21:08:19 -05:00
bors-servo
5a85425815 Auto merge of #13312 - 6112:flush-style-cache, r=emilio
Flush style sharing cache on parent mismatch.

Fixes #12913. No new tests were added, but we should at least make sure existing tests still pass.

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

<!-- 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/13312)
<!-- Reviewable:end -->
2016-09-23 18:20:03 -05:00
bors-servo
63b1d1993d Auto merge of #13393 - servo:libcxx, r=larsbergstrom
Update dependencies to use libc++ on OS X

<!-- 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/13393)
<!-- Reviewable:end -->
2016-09-23 16:41:34 -05:00
Anthony Ramine
1e176a2a9f Update dependencies to use libc++ on OS X 2016-09-23 16:31:53 +02:00
Chiu-Hsiang Hsu
652c578e15 Added FormData Iterable 2016-09-23 10:19:11 -04:00
Nikhil Shagrithaya
9d378ceb74 use .set_tokenlist_attribute to set rel content attribute in SetRel
Removed .ini files expecting crashes
2016-09-23 17:36:59 +00:00
Hugo Thiessard
0ac212afb1 Issue #13350 Report tidy error for space after ( 2016-09-23 14:01:58 +02:00
Manish Goregaokar
919bf17e51 Run style with all properties enabled 2016-09-23 15:10:40 +05:30
bors-servo
06f7a642cf Auto merge of #13356 - jeenalee:mozmap-headers, r=jdm
Support OpenEndedDictionary (Mozmap) in the Headers

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

This PR will support OpenEndedDictionary (based on MozMap implementation from #13332) in the Headers API.

---
<!-- 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 #11897  (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/13356)
<!-- Reviewable:end -->
2016-09-23 04:40:21 -05:00
Ms2ger
47ebc748d8 Update js. 2016-09-23 09:53:12 +02:00
Ms2ger
ccfd977076 Avoid a possible deadlock in main_fetch's synchronous code.
On playpen, similar code caused a deadlock on 1.11 stable, and worked fine
on nightly 1.13; it seems safer to avoid the pattern entirely.
2016-09-23 09:36:02 +02:00
bors-servo
fb52bb7c8d Auto merge of #13228 - Manishearth:uncompute, r=heycam
Add uncompute functionality (WIP)

As discussed in Taipei we plan to do animations in Stylo on the Rust side. For cascading properly, we need to "uncompute" these,
i.e. convert them into a cascadeable specified value which when computed gets us the same thing again.

This patch starts work on this. Before writing uncompute code for everything, I'd like to check that this is an acceptable amount of mako magic,
and that the general design is okay (to avoid having to rewrite everything once it's done).

Preliminary r? @SimonSapin @birtles

<!-- 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/13228)
<!-- Reviewable:end -->
2016-09-22 23:14:48 -05:00
Manish Goregaokar
d81c6af59c Add from_computed_value() function for converting computed values to specified 2016-09-23 09:44:32 +05:30
Manish Goregaokar
153ec64c15 Rename SpecifiedExplicitSize to ExplicitSize 2016-09-23 09:44:31 +05:30
Jeena Lee
3b75d223f1 Enable OpenEndedDictionary in Headers
Expected wpt results are updated as well.
2016-09-22 15:01:34 -07:00
bors-servo
2b1a39c2ae Auto merge of #12830 - jdm:promises, r=Ms2ger
Implement promise bindings

This implements support for using Promises in WebIDL, executing promise callbacks in batches (equivalent to running all enqueued jobs from a setTimeout(0)), and attaching native callbacks to promise objects. This is the combined work of myself, @dati91, and @mmatyas based on the following prior work in Gecko:
* Codegen.py
* Promise.webidl
* Promise.cpp/Promise.h
* PromiseNativeHandler.h

This does not implement microtasks per #4283. This allows us to make progress on testing code that requires the use of Promises right now; the microtasks work is more complicated, but also largely orthogonal to implement.

Requires https://github.com/servo/mozjs/pull/89, https://github.com/servo/rust-mozjs/pull/287, and https://github.com/servo/rust-mozjs/pull/294.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #4282
- [X] 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/12830)
<!-- Reviewable:end -->
2016-09-22 15:23:23 -05:00
Josh Matthews
e9c0606454 Remove maybe_ prefix from Promise methods. 2016-09-22 16:21:23 -04:00
Josh Matthews
498ccd41e8 Support an equivalent of Trusted<T> for Rc<Promise> objects named TrustedPromise. 2016-09-22 16:16:59 -04:00
Josh Matthews
27d44c8d10 Add a simple API to reject promises with DOM error values. 2016-09-22 16:16:58 -04:00
Josh Matthews
ae81ab3972 Create meaningful tests for native promise handlers. 2016-09-22 16:16:56 -04:00
Josh Matthews
57b3ccd38c Support promises in workers. 2016-09-22 16:16:55 -04:00
Josh Matthews
ef501603bf Ensure Promise "reflector" is not GCed before the Rust object. 2016-09-22 16:16:54 -04:00
Josh Matthews
f89355b85d Add integration tests for interacting with promises from native code. 2016-09-22 16:16:53 -04:00
Josh Matthews
ab168204ed Support native promise callbacks. 2016-09-22 16:16:52 -04:00
Josh Matthews
7ba3172ce0 Useful APIs for resolving/rejecting from native code. 2016-09-22 16:16:51 -04:00
Mátyás Mustoha
fd778b4240 Enqueue promise jobs from SpiderMonkey callbacks, and execute them in batches. Implement native Promise APIs.
Add SpiderMonkey hooks for enqueuing promise jobs. Start porting various native Promise APIs.
2016-09-22 16:16:49 -04:00
Josh Matthews
a1091772ec Implement binding support for returning and accepting Promises in WebIDL. 2016-09-22 16:16:48 -04:00
bors-servo
d74f6adf54 Auto merge of #13066 - mskrzypkows:htmlselect_index, r=KiChjang
Implement indexed access on select elements

<!-- Please describe your changes on the following line: -->
Added methods for indexed access on select: SetLength, Length, Item, IndexedGetter

---
<!-- 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 #11763 (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/13066)
<!-- Reviewable:end -->
2016-09-22 13:14:27 -05:00
bors-servo
b86420d693 Auto merge of #13351 - servo:rustup, r=Ms2ger
Update Cargo and Rust

<!-- 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/13351)
<!-- Reviewable:end -->
2016-09-22 12:10:05 -05:00
bors-servo
f09595e8af Auto merge of #13337 - ofekd:implement-webgl-isEnabled, r=emilio
Implement WebGLRenderingContext::isEnabled

Implemented WebGLRenderingContext::isEnabled

- Please note the return value of the implementation, not sure about returning `false` on `InvalidEnum`.
- the `webgl/conformance-1.0.3/conformance/state/gl-enable-enum-test.html` wpt test is disabled on linux but was enabled on my machine and run to validate expectations.
- the `/webgl/conformance-1.0.3/conformance/context/methods.html` test is disabled everywhere. Enabling and running on my machine showed incorrect expectations beyond `isEnabled`. The test was temporarily edited to test just for `isEnabled` and it ran successfully.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #13040

- [X] There are tests for these changes (please read details above)
- [ ] These changes do not require tests because _____

<!-- 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/13337)
<!-- Reviewable:end -->
2016-09-22 11:05:55 -05:00
Manish Goregaokar
2f69e7ff8c Use ComputedValueAsSpecified wherever possible 2016-09-22 18:45:34 +05:30
bors-servo
efdd94a2b6 Auto merge of #13331 - mrobinson:background-repeat, r=emilio
Add support for background-repeat: space and round

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

Add support for new background-repeat modes and upgrade Euclid, which now has support for basic arithmetic with Size2D.

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

This adds support for more background-repeat modes using the legacy
rasterization backend.

<!-- 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/13331)
<!-- Reviewable:end -->
2016-09-22 06:37:10 -05:00
Martin Robinson
68ae97fd0e Add support for background-repeat: space and round
This adds support for more background-repeat modes using the legacy
rendering backend.
2016-09-22 13:20:08 +02:00
Ofek
ee149cdac7 implement WebGLRenderingContext::isEnabled 2016-09-22 13:44:35 +03:00
Maciej Skrzypkowski
670693ba7e Implement indexed access on select elements
refs #11763
2016-09-22 09:17:15 +02:00
bors-servo
73b2963509 Auto merge of #13333 - splav:JS-setters-fix#13327, r=jdm
fix JS IndexedGetter and NamedSetter bindings generation

<!-- Please describe your changes on the following line: -->
Fix JS IndexedGetter and NamedSetter bindings generation.

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because the test will be in PR for #13129 as currently these setters are used by nobody.

<!-- 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/13333)
<!-- Reviewable:end -->
2016-09-22 01:36:25 -05:00
Jonathan Schuster
8500f3c8b8 Style input-text pseudo with user-agent CSS 2016-09-21 21:21:32 -04:00
bors-servo
614e9ca840 Auto merge of #13172 - bholley:display_enum, r=emilio
stylo: avoid traversing non element/text nodes in style and layout

r? @emilio

<!-- 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/13172)
<!-- Reviewable:end -->
2016-09-21 19:59:52 -05:00
bors-servo
f357afc94a Auto merge of #12472 - KiChjang:use-fetch-in-script, r=jdm
Use fetch infrastructure to load external scripts

Fixes  #9186.

<!-- 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/12472)
<!-- Reviewable:end -->
2016-09-21 18:49:33 -05:00
bors-servo
ecb44e748b Auto merge of #13269 - emilio:new-bindgen, r=Manishearth
stylo: Use the bindgen rewrite to generate the bindings.

<!-- 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] These changes do not require tests because stylo ci is not there yet.

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

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/13269)
<!-- Reviewable:end -->
2016-09-21 17:46:01 -05:00
Keith Yeung
6fbd2aa5b7 Avoid deadlock in main_fetch 2016-09-21 14:26:09 -07:00
Keith Yeung
07c9cfecec Add FetchMetadata and update corresponding methods 2016-09-21 14:26:03 -07:00
Emilio Cobos Álvarez
52aa87bc33
Regen bindings and build fixes. 2016-09-21 21:52:43 +02:00