Commit graph

509 commits

Author SHA1 Message Date
Anthony Ramine
707f8f881e Make TransitionEvent::new take a &Window 2017-01-21 14:32:34 +01:00
Anthony Ramine
0f244d6948 Mark the page source as loaded only after parsing is done 2017-01-19 16:17:14 +01:00
Anthony Ramine
70ed3e7006 Remove ScriptThread::parsing_complete 2017-01-17 14:24:37 +01:00
bors-servo
2fb9a345d6 Auto merge of #15016 - prampey:doc-deactivate, r=cbrewster
Documents now fully deactivate when a freeze message is sent

<!-- Please describe your changes on the following line: -->
Documents now fully deactivate when a freeze message is sent

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because minimal 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/15016)
<!-- Reviewable:end -->
2017-01-13 14:15:44 -08:00
Prudhvi Rampey
584f72d63b Documents now fully deactivate when a freeze message is sent 2017-01-14 01:12:21 +05:30
Alan Jeffrey
611f3b38a1 Remove reflow status from browsing context. 2017-01-12 15:06:31 -06:00
Imanol Fernandez
c5705bff50 WebVR API Implementation, r=larsbergstrom 2017-01-09 12:44:39 +01:00
Alan Jeffrey
7c2de62124 Implement browsing context discarding. 2017-01-05 21:12:57 +00:00
Alan Jeffrey
78c87ea8d7 Implement discarding Document objects to reclaim space. 2017-01-04 11:29:31 +00:00
bors-servo
885d152e92 Auto merge of #14647 - servo:current-global, r=jdm
Support the 'current' global object.

<!-- 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/14647)
<!-- Reviewable:end -->
2016-12-29 01:38:19 -08:00
Emilio Cobos Álvarez
eaf69c29ec
script: Simplify ScriptMemoryFailsafe::drop. 2016-12-25 19:18:29 +01:00
Emilio Cobos Álvarez
755697d6bb
script: Use more idiomatic code for resize handling.
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2016-12-25 19:18:24 +01:00
Ms2ger
ec5d08c887 Pass the Document's origin to its constructor.
CC #10963.
2016-12-23 11:15:46 +01:00
Josh Matthews
8ca387c0e0 Warn when a timer event is processed for a discarded document. 2016-12-22 18:56:06 -05:00
bors-servo
0c56499bdc Auto merge of #14589 - servo:harden-script, r=jdm+Ms2ger
Reduce calls into arbitrary code with the ScriptThread::documents borrow held.

<!-- 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/14589)
<!-- Reviewable:end -->
2016-12-16 08:53:27 -08:00
Josh Matthews
14d8ae2478 Add a tidy check for problematic match cases in script_thread.rs 2016-12-16 11:52:45 -05:00
Alan Jeffrey
9be4fd56ce Removed util. 2016-12-14 18:04:37 -06:00
Ms2ger
a74cbbeb1a Reduce calls into arbitrary code with the ScriptThread::documents borrow held. 2016-12-14 18:05:30 +01:00
Anthony Ramine
1327ebd52f Remove HeapGCValue
It could be used to have mutable JSVal fields without GC barriers.
With the removal of that trait, MutHeap and MutNullableHeap can respectively
be replaced by MutJS and MutNullableJS.
2016-12-12 10:47:54 -10:00
Jansen Jan
55f0e56224 Add support for fullscreen #10102 2016-12-09 11:45:50 +01:00
Corey Farwell
449f6337d4 Rename Reflectable to DomObject.
Fixes https://github.com/servo/servo/issues/8473.
2016-12-08 08:50:35 -10:00
Anthony Ramine
c1bdd3d5ce Properly mark application/xhtml+xml documents as XML
For this to work, we must remove the unimplemented!() call
in Element::parse_fragment because all the tests rely on
setting innerHTML.
2016-12-01 11:55:16 +01:00
Ms2ger
b86965f394 Implement synchronous about:blank loading.
Based on initial work by jdm in <https://github.com/servo/servo/pull/8600>.
2016-11-30 11:26:35 +01:00
Ms2ger
14459e2211 Store the layout-to-constellation sender in the script thread.
This will allow the script thread to spawn layout threads independently.
2016-11-30 01:24:46 +01:00
Alan Jeffrey
fb6cefcb78 When a script thread looks for a current layout thread, it should look in the incomplete loads. 2016-11-23 08:32:53 -06:00
Alan Jeffrey
7ae19c07f0 Share script threads per-tab and per-eTLD+1. 2016-11-22 15:02:00 -06:00
bors-servo
bbc821607a Auto merge of #14173 - asajeffrey:script-thread-stores-top-level-frame-id, r=paulrouget
Report panics using the top-level frame id rather than the pipeline id

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

At the moment, we report panics from script and layout using the root pipeline id. Once we are sharing more script threads, there won't be a root pipeline id any more. The plan is only to share script threads in the same tab, so there will be a top-level frame id that all the pipelines have in common. This PR reports panics using that top-level frame id.

This mostly makes a difference to the browser API: rather than targeting a `mozbrowsererror` event at the root iframe of the script thread that panicked, it targets it at the containing mozbrowser iframe.

---
<!-- 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 we don't test crash reporting

<!-- 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/14173)
<!-- Reviewable:end -->
2016-11-21 15:51:59 -06:00
Rahul Sharma
114c491111 Initial work on job queues for service workers 2016-11-22 01:29:37 +05:30
bors-servo
ac6a2681ae Auto merge of #14274 - stshine:servo-url-index, r=emilio
Implement range index with the Position enum on ServoUrl

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

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

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/14274)
<!-- Reviewable:end -->
2016-11-20 12:35:14 -06:00
Pu Xingyu
0818b44459 Implement range index with the Position enum on ServoUrl 2016-11-18 17:46:36 +08:00
Pu Xingyu
91f3d4f474 Remove redundant url clones
They are now redundant since now document.url() returns a struct rather
than a reference.
2016-11-18 12:39:22 +08:00
Pu Xingyu
9863149043 Move fragment navigation into Document object
Move the `check_and_scroll_fragment()` method into Document, make the
mothod set the fragment of url after navigation, and use the
`perform_a_scroll()` method to scroll rather than an individual
method. Also removes the broken `Window.fragment` fields.
2016-11-18 12:33:30 +08:00
Alan Jeffrey
c228a4cf03 Report errors using the top-level frame id rather than the pipeline id. 2016-11-17 18:08:24 -06:00
Emilio Cobos Álvarez
913c874cb5
Urlmageddon: Use refcounted urls more often. 2016-11-17 18:34:23 +01:00
Alan Jeffrey
c91ef86a20 Storage notifications routed via the constellation. 2016-11-15 09:57:12 -06:00
Anthony Ramine
15e8e92540 Reorganise ServoParser
Free-standing fonctions parse_html and friends are now static methods
on ServoParser, and the HTML and XML tokenizers have been moved to private
submodules.
2016-11-14 10:21:07 +01:00
Keith Yeung
72cb856e31 Properly implement TaskSource for NetworkingTaskSource 2016-11-11 14:50:42 -08:00
Alan Jeffrey
0e7ffafbe1 Script thread lifetime is now managed by the constellation. 2016-11-09 01:29:25 +00:00
bors-servo
d1b7f19410 Auto merge of #14013 - asajeffrey:script-thread-no-root-document, r=jdm
Script thread with no root document

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

This PR removes the single root document from the script thread, and replaces it by a lookup table from `PipelineId`s to `Document`s. This is needed if we're going to share script threads, as per #633.

The last commit is the one that matters, the ones before are #13646.

cc @jdm @Ms2ger @ConnorGBrewster
---
<!-- 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/14013)
<!-- Reviewable:end -->
2016-11-08 11:31:33 -06:00
Alan Jeffrey
90e9c910f4 Replace script thread root browsing context by a collection of documents. 2016-11-08 10:48:58 -06:00
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