Commit graph

5368 commits

Author SHA1 Message Date
Ms2ger
d8203e6f6b Use mem::replace in take_pseudo_styles. 2016-10-12 09:22:58 +02: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
Keith Yeung
752c6e6019 Implement TransitionEvent 2016-10-11 12:47:17 -07:00
Anthony Ramine
3a547cc113 Generalise RootedVec::<JS<T>>::r as [JS<T>]::r 2016-10-11 19:44:33 +02:00
Anthony Ramine
45c9aa7487 Generalise RootedReference
It now becomes RootedReference<'root> and includes an associated type for
the return type of its 'r' method.

This removes the need for OptionalRootedReference.
2016-10-11 19:44:33 +02:00
Anthony Ramine
0b3ab875f4 Remove intrinsic Root::r() 2016-10-11 19:44:32 +02:00
bors-servo
51bcf516c8 Auto merge of #13677 - servo:media-fetch, r=Manishearth
Use the fetch stack for HTMLMediaElement.

<!-- 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/13677)
<!-- Reviewable:end -->
2016-10-11 11:10:39 -05:00
bors-servo
928e5ad1e5 Auto merge of #13675 - nox:servoparser, r=Ms2ger
Clean up the parsers into a single interface

<!-- 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/13675)
<!-- Reviewable:end -->
2016-10-11 10:16:23 -05:00
Anthony Ramine
4b813e0bdc Merge script::parse and script::dom::servoparser 2016-10-11 16:42:01 +02:00
Anthony Ramine
1405be6917 Unify ServoHTMLParser and ServoXMLParser in ServoParser 2016-10-11 15:08:37 +02:00
Anthony Ramine
609299e1e4 Add time profiling to ServoXMLParser::parse_sync 2016-10-11 15:03:25 +02:00
Anthony Ramine
1f23810a34 Introduce ServoParser::pipeline 2016-10-11 15:03:24 +02:00
Anthony Ramine
02162a8bda Move ParserContext to script::parse 2016-10-11 15:03:22 +02:00
Anthony Ramine
881f7f4de7 Move last chunk received logic to ServoParser 2016-10-11 15:03:21 +02:00
Anthony Ramine
e1a1bf46ca Move pending input logic to ServoParser 2016-10-11 15:00:11 +02:00
Anthony Ramine
27f245e6ae Introduce ServoParser::document 2016-10-11 14:51:00 +02:00
Anthony Ramine
ea27f9d5ec Introduce ServoParser
This is a common inline parent to ServoHTMLParser and ServoXMLParser.
2016-10-11 14:50:58 +02:00
Scott Trinh
5bdc8c806d Partial fix for #12415: expose WebGL interfaces 2016-10-11 06:33:04 -04:00
bors-servo
abcc4aeaf2 Auto merge of #13656 - bholley:existing_style, r=emilio
Refactor style logic to avoid direct access to the node data during the cascade

The new restyle architecture doesn't store these things in consistent places, so we need a more abstract API.

<!-- 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/13656)
<!-- Reviewable:end -->
2016-10-10 23:22:05 -05:00
Bobby Holley
bfbbef6ecd Remove borrow_data and mutate_data from TNode.
The new restyle architecture doesn't store these things in consistent
places, so we need a more abstract API.
2016-10-10 20:36:31 -07:00
Corey Farwell
eee990df2f Cleanup logic, remove unnecessary allocations in Request API. 2016-10-10 15:45:31 -04:00
Ms2ger
490fff2a7f Use the fetch stack for HTMLMediaElement. 2016-10-10 17:36:46 +02:00
Simon Sapin
0eed39c198 Move CSSStyleDeclaration.SetPropertyPriority logic to style 2016-10-10 16:48:23 +02:00
Simon Sapin
c740a76410 Move (some) CSSStyleDeclaration.SetProperty logic to style 2016-10-10 16:42:23 +02:00
Simon Sapin
bd4a4c38c8 Move CSSStyleDeclaration.RemoveProperty logic to style 2016-10-10 16:20:44 +02:00
Simon Sapin
fc6a536b3a Move CSSStyleDeclaration.GetPropertyPriority logic to style 2016-10-10 16:01:23 +02:00
Simon Sapin
bd37f4e694 Move CSSStyleDeclaration.GetPropertyValue logic to style 2016-10-10 15:54:24 +02:00
bors-servo
aab9d61025 Auto merge of #13665 - anholt:webgl-uniform-matrix-v, r=emilio
webgl: Implement uniformMatrix*fv.

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

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.

<!-- 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/13665)
<!-- Reviewable:end -->
2016-10-10 03:15:10 -05:00
bors-servo
39d3fce1af Auto merge of #13649 - servo:rustup, r=larsbergstrom
Update to Rust 1.14.0-nightly (19ac57926 2016-10-08)

<!-- 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/13649)
<!-- Reviewable:end -->
2016-10-09 20:12:38 -05: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
Anthony Ramine
1854566683 Update to Rust 1.14.0-nightly (19ac57926 2016-10-08)
A cargo bump and a switch to serde_derive is needed to do this rustup.
2016-10-09 18:53:47 +02:00
Emilio Cobos Álvarez
d7e2b40484
webgl: Honor ArrayBuffer or ArrayBufferView in bufferData and bufferSubData. 2016-10-09 13:23:39 +02:00
Emilio Cobos Álvarez
f985a73cae
webgl: Handle both sequences and typed arrays, managing the type error ourselves.
This is a step with multiple intentions:

 * Be correct.
 * Unlock tests that are blocking @anholt.
 * Ease the transition to typed arrays once the changes by @Ms2ger start rolling
   in, since I expect the amount of test expectations to update to be
   non-trivial.
2016-10-09 12:41:13 +02:00
Emilio Cobos Álvarez
602246a14c
script: Mark as unsafe multiple array_buffer_view_to_xxx functions that take a raw JSObject pointer. 2016-10-09 12:32:37 +02:00
Emilio Cobos Álvarez
ea8f115b8c
webgl: A few fixes regarding the nullability of WebGL parameters. 2016-10-09 12:32:37 +02:00
Bobby Holley
c72fffa8f8 Move children_to_process to layout.
We don't need this for Gecko, and it's hard to implement in that case because
there's nowhere obvious to put it (we don't plan to create TSDs for non-dirty
nodes, and non-dirty nodes can have dirty children which require the
children_to_process atomic). There are various solutions here, but punting is
the easiest.

We'll need to rethink this if/when we need to do a bottom-up traversal for
Gecko.
2016-10-08 18:20:45 -07:00
bors-servo
9d3fc76463 Auto merge of #13633 - glennw:forward-touch-events, r=mbrubeck
Send touch events to root pipeline, and allow forwarding to iframes.

Instead of letting the compositor try to find the correct scroll
layer for a touch event, switch touch events to work the same way
that mouse events do.

Touch events are now dispatched to the root pipeline, and then
forwarded to child iframes as required.

<!-- 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/13633)
<!-- Reviewable:end -->
2016-10-07 19:07:24 -05:00
bors-servo
dad3b4785a Auto merge of #13589 - splav:SVGElement#12974, r=pcwalton,Ms2ger
Support SVG element

<!-- Please describe your changes on the following line: -->
minimal SVG element implementation
---
<!-- 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 #12974 (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/13589)
<!-- Reviewable:end -->
2016-10-07 17:40:13 -05:00
Glenn Watson
291af9d115 Send touch events to root pipeline, and allow forwarding to iframes.
Instead of letting the compositor try to find the correct scroll
layer for a touch event, switch touch events to work the same way
that mouse events do.

Touch events are now dispatched to the root pipeline, and then
forwarded to child iframes as required.
2016-10-08 06:00:00 +10:00
bors-servo
d01a866215 Auto merge of #13498 - asajeffrey:script-iframe-stores-frameid, r=glennw
IFrame elements now manage FrameIds rather than the constellation.

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

This PR stores the FrameId as well as the PipelineId in an html iframe. The iframes are now responsible for creating frame ids, not the constellation.

This is the first step in fixing #633, because it means we know the frame id of each script thread when it is created. It also means we can share the frame id, for example using it in the debugger.

cc @jdm, @ConnorGBrewster and @ejpbruel.

---
<!-- 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 it's a refactoring.

<!-- 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/13498)
<!-- Reviewable:end -->
2016-10-07 14:54:31 -05:00
Alan Jeffrey
f53408df80 IFrame elements now manage FrameIds rather than the constellation. 2016-10-07 14:11:32 -05:00
yoyo930021
980c644a83 Make URLSearchParams iterable.
Fixes #13022.
Fixes #13077.
2016-10-07 17:35:54 +02:00
bors-servo
a6e4b5bb86 Auto merge of #13596 - nox:inline, r=Ms2ger
Get rid of dom::bindings::global

Globals in that PR are now represented by the fake IDL interface `GlobalScope`.

<!-- 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/13596)
<!-- Reviewable:end -->
2016-10-07 07:52:09 -05:00
Anthony Ramine
d8e92bb271 Rename Reflectable::global_scope to global 2016-10-06 21:36:41 +02:00
Anthony Ramine
b6bbd41e11 Remove GlobalRoot and GlobalRef 2016-10-06 21:36:00 +02:00
Anthony Ramine
c66cf46bee Make the closure in flush_promise_jobs return a Root<GlobalScope> 2016-10-06 21:35:59 +02:00
Anthony Ramine
996fd284e2 Use global_scope_from_context in TestBinding::PromiseNativeHandler 2016-10-06 21:35:59 +02:00
Anthony Ramine
00e66a777a Make workers' interrupt_callback use GlobalScope 2016-10-06 21:35:59 +02:00
Anthony Ramine
907781eb75 Remove Reflectable::global 2016-10-06 21:35:58 +02:00