Commit graph

219 commits

Author SHA1 Message Date
Attila Dusnoki
e7e7c74c9e Webbluetooth Async behaviour 2016-11-08 13:27:56 +01:00
Raghav
26dac98546 Code review comments and upstream merge conflicts
Incorporated code review comments in components/net/http_loader.rs
Resolved merge conflicts in cargo.lock file. Updated ReferrerPolicy in
lib.rs
2016-11-04 11:18:22 -04:00
Ms2ger
277c6d0154 Move ReferrerPolicy to net_traits. 2016-11-04 10:43:37 +01:00
Raghav
c24aa56377 Network Security : Implement StrictOrigin and StrictOriginWhenCrossOrigin
Referer policy strict-origin and strict-origin-when-cross-origin changes have been implemented. Relevant unit test cases have been added. Enum for RefererPolicy has been added to hyper codebase and v 0.9.11 of hyper contains these changes.

This commit also contains changes related to upgrade of hyper from v0.9.10 to v0.9.11. Other dependencies changed are rayon, utils, num_cpus.
2016-11-04 03:17:04 -04:00
bors-servo
ce725c9475 Auto merge of #13646 - asajeffrey:script-lookup-iframes-by-frameid, r=ConnorGBrewster
Script lookup iframes by frameid

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

Lookup iframes by `FrameId` rather than `PipelineId`. This should make lookup much more reliable, since the frame id doesn't change.

cc @ConnorGBrewster @aneeshusa
---

<!-- 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 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/13646)

<!-- Reviewable:end -->
2016-11-03 18:11:05 -05:00
Alan Jeffrey
f3993d99b9 Lookup frames by frame_id, not pipeline_id. 2016-11-03 15:39:51 -05:00
bors-servo
738f0eb974 Auto merge of #14044 - servo:bluetooth, r=emilio
Split the bluetooth code out from the net crates.

<!-- 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/14044)
<!-- Reviewable:end -->
2016-11-03 15:04:43 -05:00
Ms2ger
4fbe415e80 Split the bluetooth code out from the net crates. 2016-11-03 16:45:07 +01:00
Simon Sapin
53b638c0e2 Update to string-cache 0.3 2016-11-03 16:23:05 +01:00
bors-servo
6ef46ab9e4 Auto merge of #13453 - metajack:media-query-list, r=jdm
Implement matchMedia and MediaQueryList

<!-- 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 #13376 (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. -->

Fixes #13376.

<!-- 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/13453)

<!-- Reviewable:end -->
2016-11-02 14:51:12 -05:00
Jack Moffitt
138a0480fe Implement matchMedia and MediaQueryList
Fixes #13376.
2016-11-02 13:40:22 -06:00
Ms2ger
623ab22468 Use fetch in ScriptThread.
I did not find the prose that defines the creation of the request in the HTML
standard (if it exists).
2016-11-02 09:25:57 +01:00
Ms2ger
1a96733417 Move WindowSizeType to script_traits. 2016-10-22 13:33:38 +02:00
Ms2ger
e97f06800e Move LoadData to script_traits. 2016-10-21 12:49:16 +02:00
bors-servo
bb271ef4af Auto merge of #13848 - mrobinson:remove-layers, r=glennw
Remove concept of Layers from Servo

<!-- 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: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because this PR should not change behavior.

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

Layers were a feature of the legacy drawing path. If we re-add them at
some point, it probably makes more sense to make them a product of
display list inspection.

This change also remove a bunch of dead painting code.

<!-- 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/13848)
<!-- Reviewable:end -->
2016-10-21 01:43:25 -05:00
Martin Robinson
ccb7ab926a Remove concept of Layers from Servo
Layers were a feature of the legacy drawing path. If we re-add them at
some point, it probably makes more sense to make them a product of
display list inspection.

This change also remove a bunch of dead painting code.
2016-10-21 08:38:34 +02:00
Bobby Holley
b493565cc1 Stop ticking animations on non-dirty nodes during traversal. 2016-10-20 19:25:04 -07:00
Glenn Watson
acfdfd2fa9 Remove old rendering backend.
This removes paint threads, rust-layers dependency, and changes
optional webrender types to be required.

The use_webrender option has been removed, however I've left
the "-w" command line option in place so that wpt
runner can continue to pass that. Once it's removed from there
we can also remove the -w option.

Once this stage is complete, it should be fine to change the
display list building code to generate webrender display
lists directly and avoid the conversion step.
2016-10-18 10:21:27 +10:00
bors-servo
740464df8a Auto merge of #13741 - servo:fetch-doc-unused, r=Manishearth
Remove some unused support for the legacy network stack in script.

<!-- 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/13741)
<!-- Reviewable:end -->
2016-10-13 09:55:00 -05:00
Ms2ger
d0323e3a50 Remove DocumentLoader::pipeline. 2016-10-13 11:10:39 +02:00
Alan Jeffrey
a6d83a38e5 Setting a devtools timeline marker may fail, due to pipeline lookup failure. 2016-10-12 12:56:23 -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
Anthony Ramine
0b3ab875f4 Remove intrinsic Root::r() 2016-10-11 19:44:32 +02: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
02162a8bda Move ParserContext to script::parse 2016-10-11 15:03:22 +02: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
Anthony Ramine
c66cf46bee Make the closure in flush_promise_jobs return a Root<GlobalScope> 2016-10-06 21:35:59 +02:00
Anthony Ramine
4d9347d5b3 Introduce GlobalScope::enqueue_promise_job 2016-10-06 21:35:53 +02:00
Anthony Ramine
2ee073053a Make PromiseJobQueue::enqueue take a &GlobalScope 2016-10-06 21:35:53 +02:00
Anthony Ramine
6e3be6d894 Introduce GlobalScope::flush_promise_jobs 2016-10-06 21:35:52 +02:00
Anthony Ramine
44ca9f3d71 Make TaskSource::queue take a &GlobalScope 2016-10-06 21:35:52 +02:00
Anthony Ramine
ca8c6fb072 Make RunnableWrapper store an Option<Arc<AtomicBool>>
This makes WorkerGlobalScope::get_runnable_wrapper not panic anymore
when the worker is a ServiceWorkerGlobalScope.
2016-10-06 21:35:51 +02:00
Anthony Ramine
991801488c Move timers to GlobalScope 2016-10-06 21:35:51 +02:00
Anthony Ramine
5d8979237b Make devtools::handle_evaluate_js take a &GlobalScope 2016-10-06 21:35:50 +02:00
Anthony Ramine
9c04eb60bd Move JS evaluation functions to GlobalScope 2016-10-06 21:35:50 +02:00
Anthony Ramine
de846f25a6 Make create_scope_things take a &GlobalScope 2016-10-06 21:35:48 +02:00
Anthony Ramine
27f100b1d4 Introduce GlobalScope::pipeline_id 2016-10-06 20:59:13 +02:00
Anthony Ramine
d7c2da450b Introduce GlobalScope::live_devtools_updates 2016-10-06 20:59:10 +02:00
Alan Jeffrey
99fd08f832 Removed the session history from BrowsingContext. 2016-10-05 13:18:35 -05:00
Anthony Ramine
dd5c527689 Replace ScriptHelpers by GlobalRef methods 2016-10-03 11:42:21 +02:00
Josh Matthews
57b3ccd38c Support promises in workers. 2016-09-22 16:16:55 -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
Connor Brewster
e9b2f1b916 Replace current session entry for reloads 2016-09-19 14:23:03 -05:00
bors-servo
0ec4ea4ee1 Auto merge of #12910 - creativcoder:swsender, r=jdm
Implement postMessage for ServiceWorkers

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

Fixes #12773
r? @jdm

Changes:
* Implements `postMessage` on `ServiceWorker` object.
* Removes unused channels from sw and their scopes.
* Fixes a crash when calling `scope.script_chan()` in sw-scopes event handling.

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

<!-- Either: -->
- [X] There are tests for these changes at `tests/html/service-worker`

<!-- 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/12910)
<!-- Reviewable:end -->
2016-09-15 08:34:22 -05:00
Aneesh Agrawal
56fbfd46a4 Excise SubpageId and use only PipelineIds
SubpageId was originally introduced in 2013 to help iframes keep track of
their associated (children) pipelines. However, since each pipeline
already has a PipelineId, and those are unique, those are sufficient
to keep track of children.
2016-09-13 15:37:38 -04:00
Aneesh Agrawal
b9b25b6f82 Consistently use parent_pipeline_id
Instead of containing_pipeline_id, use parent_pipeline_id because it is
more clear that it refers to the immediate parent.
2016-09-13 15:24:13 -04:00
Aneesh Agrawal
9d097e7d15 Use fn pipeline_id consistently, not fn pipeline
Consistently use the name 'pipeline_id' to refer to a function that
returns an (optional) PipelineId.

This was prompted by discovering both fn pipeline and fn pipeline_id
doing the same job in htmliframeelement.rs.

Note that there is fn pipeline in components/compositing/compositor.rs,
but that actually returns an Option<&CompositionPipeline>, not any kind
of PipelineId.
2016-09-13 15:17:40 -04:00
UK992
93a103ba73 Reorder use statements 2016-09-09 04:55:19 +02:00