Commit graph

111 commits

Author SHA1 Message Date
Josh Matthews
7bf2e19437 Make the net monitor panel in FF's devtools show meaningful output.
0) Advertise support for the network monitor in the initial protocol communication.
1) Only notify the developer tools server about the final request in an HTTP transaction.
2) Add timing information for connecting to the HTTP server and sending the HTTP request.
3) Reduce duplication between various networkEventUpdate structures by creating a helper function
that merges two JSON structures together. This also corrects the JSON structure so the devtools
client interprets the output correctly.
4) Calculate various header size fields correctly.
5) Remove unnecessary usize->u32 casts by making the appropriate fields usize.
6) Add header values to request and response header messages.
7) Support triggering page reloads via the devtools client.
2016-06-06 00:51:36 +01:00
Rahul Sharma
15a2064c0d implement related sw interface and register method 2016-06-02 04:09:39 +05:30
bors-servo
0594d58bc8 Auto merge of #11538 - Ms2ger:warnings, r=emilio
Fix some build warnings.

- [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

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11538)
<!-- Reviewable:end -->
2016-06-01 15:43:58 -05:00
bors-servo
3d7b17681d Auto merge of #11221 - izgzhen:blob-file-backend, r=Manishearth
Add file backend support for Blob and related

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy --faster` does not report any errors
- [x] These changes fix #10851, related to #11131
- [x] These changes do not require tests because the implementation is partial and can't work alone

1. Add new backend to `Blob` and a `BlobImpl` struct to abstract multiple backends
2. Rewrite most interfaces of `Blob` to accommodate the change
3. Change the `read` behaviour of `FileReader`, considering the case when blob is file-backed and not cached

The design is still immature, welcome comments!

- [x] I used `DOMRefCell` to cache the bytes in `BlobImpl`, is it sound?
- [x] The interfaces (like `BlobImpl::get_bytes`) handle requests in a default-to-empty way when the inner `DataSlice` is not cached. It might be possible to handle this condition better.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11221)
<!-- Reviewable:end -->
2016-06-01 05:09:21 -05:00
Ms2ger
46ea78e960 Fix some build warnings. 2016-06-01 10:35:45 +02:00
bors-servo
5d86b9b2ae Auto merge of #11480 - rafaqtro:local_b, r=emilio
rename

<!-- Please describe your changes on the following line: -->
rename of page_fetch_complete and handle_page_fetch_complete for page_headers_available and handle_page_headers_available .

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

<!-- Either: -->
- [ ] 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11480)
<!-- Reviewable:end -->
2016-06-01 00:15:51 -05:00
Zhen Zhang
43ad4ba585 Add file backend support for Blob and related
Changes include:
- Add BlobImpl to Blob, and related caching mechanism
- Expose ResourceThreads to document_loader, workerglobalscope, worker, and global
- Fix encode_multipart_form_data
- Other small fixes to accommodate the above changes
2016-06-01 09:47:07 +08:00
Rafael Quintero
71104c8619 rename of page_fetch_complete and handle_page_fetch_complete
rename

align
2016-05-31 17:27:59 -04:00
Patrick Walton
a86f77e36d script: Keep the DOM-side viewport up to date when scrolling happens in
WebRender.

This happens asynchronously, just as it does in non-WebRender mode.

This functionality is a prerequisite for doing proper display-list-based
hit testing in WebRender, since it moves the scroll offsets into Servo
(and, specifically, into the script thread, enabling iframe event
forwarding) instead of keeping them private to WebRender.

Requires servo/webrender_traits#55 and servo/webrender#277.

Partially addresses #11108.
2016-05-31 14:12:51 -07:00
Anthony Ramine
88f8a22269 Bump rust-mozjs for the safe Runtime::new (fixes #11512) 2016-05-31 14:54:19 +02:00
Ms2ger
b6a7895396 Add a missing JSAutoCompartment to javascript url handling. 2016-05-30 16:33:31 +02:00
bors-servo
3ec20d9cf5 Auto merge of #11472 - jdm:wip, r=mbrubeck
Report blank lines that follow an open brace

This automates something that I find myself frequently commenting on in PRs.

---
<!-- 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] 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11472)
<!-- Reviewable:end -->
2016-05-27 18:14:25 -05:00
Josh Matthews
3cb8af20c2 Remove empty lines following braces. 2016-05-27 13:32:05 -04:00
Ms2ger
e94f3d4fe0 Remove the LayoutChan type.
It is a pointless abstraction.
2016-05-27 15:33:04 +02:00
Cullen Rhodes
40acd24e8f Report use statements that use {} with only one entry 2016-05-27 10:18:44 +01:00
bors-servo
5a81470c4d Auto merge of #11372 - tschneidereit:parent-js-runtime-for-workers, r=nox
Pass a parent JS runtime when creating DOM Worker runtimes

This enables sharing data with the parent runtime, decreasing memory usage and startup time. Also contains an update to current rust-mozjs, because that's required for this to work.

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy --faster` does not report any errors
- [x] These changes don't fix a github issue

Either:
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because the changes don't change any observable behavior

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11372)
<!-- Reviewable:end -->
2016-05-26 00:08:42 -05:00
bors-servo
edf121324e Auto merge of #11370 - Ms2ger:IterableContext, r=jdm
Remove the IterableContext trait.

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 --faster` 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.

It serves no purpose.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11370)
<!-- Reviewable:end -->
2016-05-25 22:42:31 -05:00
Ms2ger
4f893ee96e Remove ScriptThread::layout_to_constellation_chan.
Instead, pass it along in NewLayoutInfo when needed.
2016-05-25 15:41:01 +02:00
Ms2ger
4113eb6f72 Remove the script listener thread (fixes #11345).
We needed a separate thread in the chrome process because communication to the
compositor is done through a trait object, and cross-process virtual calls are
forbidden.

Also, the fact that these messages are ultimately handled by the compositor is
an implementation detail; conceptually, the relevant constellation is supposed
to handle these messages.

So instead, the script thread will now send the messages to the constellation,
which will ask the compositor to handle them.
2016-05-25 12:50:22 +02:00
bors-servo
586c0702a0 Auto merge of #11373 - servo:threadfactory, r=larsbergstrom
Use associated types to improve LayoutThreadFactory and ScriptThreadFactory.

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 --faster` 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.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11373)
<!-- Reviewable:end -->
2016-05-25 04:25:50 -05:00
Ms2ger
49d244d39c Use associated types to improve LayoutThreadFactory and ScriptThreadFactory. 2016-05-24 17:50:06 +02:00
Till Schneidereit
7536afff2a Pass a parent JS runtime when creating DOM Worker runtimes
This enables sharing data with the parent runtime, decreasing memory usage and startup time. Also contains an update to current rust-mozjs, because that's required for this to work.
2016-05-24 17:43:49 +02:00
Ms2ger
e7eee3b067 Remove the IterableContext trait.
It serves no purpose.
2016-05-24 16:01:33 +02:00
Ms2ger
a5139787de Stop storing CSS errors on the Document.
They are never read.
2016-05-24 14:41:38 +02:00
Anthony Ramine
cdc7bca944 Move DOMString back to script
This entirely removes the 'non-geckolib' feature of the util crate.
2016-05-24 10:54:57 +02:00
bors-servo
ef81e6982a Auto merge of #11338 - Ms2ger:compositor-refcell, r=nox
Take ScriptThread::compositor out of its RefCell.

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 --faster` 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.

There's no reason for it; IpcSender::send takes &self.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11338)
<!-- Reviewable:end -->
2016-05-23 19:16:12 -07:00
bors-servo
2063bde0a4 Auto merge of #11179 - asajeffrey:webdriver-resize-window, r=jgraham
Implemented webdriver SetWindowSize.

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

Either:
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because the new tests are in https://github.com/w3c/web-platform-tests/pull/3024

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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11179)
<!-- Reviewable:end -->
2016-05-23 02:53:48 -07:00
Ms2ger
2b014befd0 Take ScriptThread::compositor out of its RefCell.
There's no reason for it; IpcSender::send takes &self.
2016-05-23 11:31:18 +02:00
bors-servo
1a34137ac4 Auto merge of #10961 - creativcoder:custom_response_iface, r=jdm
adding interface for custom responses

Fixes #10960

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10961)
<!-- Reviewable:end -->
2016-05-21 01:12:54 -07:00
Alan Jeffrey
e2203f81d3 Made SetWindowSize synchronous. 2016-05-20 09:20:45 -05:00
Alan Jeffrey
5acf0f9a05 Implemented webdriver SetWindowSize. 2016-05-20 09:20:44 -05:00
Ms2ger
9ee8c33a8d Remove pointless phantom arguments to ScriptThreadFactory and LayoutThreadFactory. 2016-05-20 10:20:58 +02:00
Rahul Sharma
3766cd1673 adding interface for custom responses 2016-05-20 12:11:56 +05:30
Zhen Zhang
a51db4cfa8 Implement trait-based ResourceThreads and clean up related naming issues
Changes include:

- Introduce an IpcSend trait to abstract over a collection of IpcSenders
- Implement ResourceThreads collection to abstract the resource-related
  sub threads across the component
- Rename original ResourceThread and ControlMsg into an unifed CoreResource__
  to accommodate above changes and avoid confusions
2016-05-20 08:00:16 +08:00
Ms2ger
cc2b2b50a7 Remove ConstellationChan.
It's a pointless abstraction that propagates the obsolete chan terminology,
swaps the order in which the sender and receiver are returned, and hides a
source of panics.
2016-05-19 17:13:44 +02:00
bors-servo
96a86bd952 Auto merge of #11239 - jdm:time-profile, r=nox
Add timeline markers for HTTP requests, JS evaluation, and HTML parsing.

Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data:
- [ ] `./mach build -d` does not report any errors (didn't try to compile past a rustc upgrade on airplane wifi)
- [X] `./mach test-tidy --faster` does not report any errors
- [X] These changes fix #11218 (github issue number if applicable).

Either:
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because we don't have testing infrastructure for profiling.

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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11239)
<!-- Reviewable:end -->
2016-05-18 06:07:10 -07:00
Josh Matthews
9e8cf19e51 Add timeline markers for HTTP requests, JS evaluation, and HTML parsing. 2016-05-18 08:02:42 -05:00
Ms2ger
1ebe681d8d Report panics in web worker threads. 2016-05-18 12:30:10 +02:00
Ms2ger
735480c184 Stop using JSAutoRequest. 2016-05-13 15:34:38 +02:00
bors-servo
42141870e7 Auto merge of #10714 - KiChjang:user-interaction-task, r=Ms2ger
Implement user interaction task source

Part of #7959.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10714)
<!-- Reviewable:end -->
2016-05-12 09:00:14 -07:00
Connor Brewster
e50eb2a4d6 Addressed comment 2016-05-11 15:01:43 -06:00
Connor Brewster
9efd214b1e removed instances of &Root<BrowsingContext> 2016-05-11 13:21:16 -06:00
Connor Brewster
cbc5ca65a8 remove page and move functionality to browing context
Allow for adding history items

Fixed nested iframe test failure

Cleanup and small refactors

fixup
2016-05-11 12:46:59 -06:00
Keith Yeung
cc049515dc Implement user interaction task source 2016-05-11 10:12:25 -04:00
Josh Matthews
6123ce8649 Add logging for shutting down non-root pipelines in the script thread. 2016-05-11 08:34:49 -04:00
Josh Matthews
293d465c59 Make debug logging for tracing JS objects more informative. 2016-05-11 08:34:48 -04:00
Keith Yeung
12a96f7194 Rename DOM manipulation messages to tasks 2016-05-04 21:01:26 -04:00
bors-servo
944a8dc25a Auto merge of #10632 - szeged:bluetooth-ipc, r=jdm
WebBluetooth impementation

Update the current WebBluetooth implementation.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10632)
<!-- Reviewable:end -->
2016-05-04 08:06:06 -07:00
bors-servo
f9d9cd3aae Auto merge of #8454 - jdm:media, r=KiChjang
Implement basic <media> infrastructure

This gets us to the point where we can start playing with actually integrating rust-media to process the data received by the network request, as currently it's just ignored.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8454)
<!-- Reviewable:end -->
2016-05-03 16:42:46 -07:00
Josh Matthews
eae27adc4a Implement basic media resource selection and fetching. 2016-05-03 16:25:24 -04:00