Commit graph

654 commits

Author SHA1 Message Date
Manish Goregaokar
611dc4bc70 Remove now-unnecessary must_root and allow(unrooted_must_root) annotations 2019-01-04 15:05:07 -08:00
Simon Sapin
be69f9c3e6 Rustfmt has changed its default style :/ 2018-12-28 13:17:47 +01:00
bors-servo
66223ee105
Auto merge of #22121 - gterzian:remove_constellation_block_in_navigation, r=paulrouget
Remove sync constellation -> embedder communication

<!-- 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: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #22042 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- 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/22121)
<!-- Reviewable:end -->
2018-12-26 01:53:20 -05:00
Gregory Terzian
eb82e781a3 implement windowproxy "delay-load-event-mode", and partially document "completely-loaded" 2018-12-23 17:39:13 +08:00
bors-servo
45e238938f
Auto merge of #22451 - kingdido999:send-idle-message-once, r=jdm
Avoid sending idle message more than once after a reflow is complete

<!-- Please describe your changes on the following line: -->
A boolean variable is introduced to prevent sending SetDocumentState idle message multiple times after a reflow is complete.

---
<!-- 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 #22410 (GitHub issue number if applicable)

<!-- Either: -->
- [x] These changes do not require tests because automated test is not possible.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- 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/22451)
<!-- Reviewable:end -->
2018-12-22 05:06:22 -05:00
Josh Matthews
14b0de30db Prevent JS execution and layout operations while DOM in inconsistent state. 2018-12-14 13:12:47 -05:00
Josh Matthews
231a37be24 Initial window sizes are mandatory. 2018-12-14 13:12:46 -05:00
kingdido999
1bd4f9572d Clean up 2018-12-13 12:12:24 -08:00
kingdido999
3b855b1329 Avoid sending idle message more than once after a reflow is complete 2018-12-13 10:53:31 -08:00
Josh Matthews
ed74b898a5 Cancel animations that affect nodes that do not participate in layout. 2018-12-10 08:59:17 -05:00
George Roman
6c458b04d2 Remove unused recycle argument from Document::unload 2018-11-30 18:08:08 +02:00
Manish Goregaokar
5413328be2 Update webrender 2018-11-27 17:33:13 -08:00
ddh
26007fddd3 refactored performance timing to align with updated spec
refactoring with ResourceFetchMetadata

implemented deprecated window.timing functionality

created ResourceTimingListener trait

fixed w3c links in navigation timing

updated include.ini to run resource timing tests on ci
2018-11-20 16:21:32 +00:00
Jan Andre Ikenmeyer
a1a14459c1
Update MPL license to https (part 3) 2018-11-19 14:47:12 +01:00
Bastien Orivel
9a7eeb349a Update crossbeam-channel to 0.3 2018-11-18 19:33:19 +01:00
Agustin Chiappe Berrini
75eb94afca Unify the task source and task canceller API
I moved away from the `Window` struct all the logic to handle task
sources, into a new struct called `TaskManager`. In a happy world, I'd
be able to just have there two functions, of the types:

```rust
fn task_source<T: TaskSource>(&self, name: TaskSourceName) -> Box<T>
fn task_source_with_canceller<T: TaskSource>(&self, name: TaskSourceName)
  -> (Box<T>, TaskSourceCanceller)
```

And not so much duplicated code. However, because TaskSource can't be a
trait object (because it has generic type parameters), that's not
possible. Instead, I decided to reduce duplicated logic through macros.

For reasons[1], I have to pass both the name of the function with
canceller and the name of the function without, as I'm not able to
concatenate them in the macro itself. I could probably use
`concat_idents` to create both types already defined and reduce the
amount of arguments by one, but that macro is nightly only. At the same
time, not being able to declare macros inside `impl` forces me to pass
`self` as an argument.

All this makes this solution more verbose than it would be ideally. It
does reduce duplication, but it doesn't reduce the size of the file.

[1](https://github.com/rust-lang/rust/issues/29599)
2018-11-14 06:36:44 -05:00
Agustin Chiappe Berrini
14bc8ab754 Implement TaskSource for HistoryTraversal
And remove the method in window that returns it, because it isn't used
so far.
2018-11-13 14:18:51 -05:00
Simon Sapin
9f977c5287 Remove useless use crate_name; imports.
A `crate_name::foo` path always works in 2018
2018-11-08 09:29:52 +01:00
Simon Sapin
2012be4a8b cargo fix --edition-idioms 2018-11-08 09:28:00 +01:00
Pyfisch
9e92eb205a Reorder imports 2018-11-06 22:35:07 +01:00
Pyfisch
cb07debcb6 Format remaining files 2018-11-06 22:30:31 +01:00
Simon Sapin
76e59a46d3 Sort use statements 2018-11-06 15:26:02 +01:00
Simon Sapin
45f7199eee cargo fix --edition 2018-11-06 15:26:02 +01:00
chansuke
7b3cf27c69 Add task source for media element 2018-10-10 22:15:37 +09:00
Fernando Jiménez Moreno
72b1df343e Move unsafe_no_jsmanaged_fields to trace 2018-10-08 16:12:01 +02:00
Víctor Manuel Jáquez Leal
781b3b712b Provide webrender_api::RenderApiSender to ScriptThread and DOM Window
This will allow the HTMLMediaElement later to get a handle to the
RenderApi for rendering video frames.

At a later time, all media handling should be moved to its own
thread/process that is communicated with via IPC. At that point this
can be removed again.

Original-patch-by: Sebastian Dröge <sebastian@centricular.com>
2018-10-08 16:11:59 +02:00
chansuke
c37a345dc9 Format script component 2018-09-19 17:40:47 -04:00
bors-servo
910cc23a6e
Auto merge of #21325 - gterzian:crossbeam_integration, r=SimonSapin,jdm
Replace mpsc with crossbeam-channel

Follow up on https://github.com/servo/servo/pull/19515

---

Selecting over multiple channels in `std::sync::mpsc` is not stable and likely never will be:

https://github.com/rust-lang/rust/issues/27800#issuecomment-260136777
> It seems the only thing keeping `mpsc_select` around is Servo.

crossbeam-channel is designed specifically to replace `std::sync::mpsc` and fix many of its shortcomings:
https://github.com/stjepang/rfcs-crossbeam/blob/channel/text/2017-11-09-channel.md

This is to be landed together with https://github.com/servo/ipc-channel/pull/183.

<!-- 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/21325)
<!-- Reviewable:end -->
2018-09-12 13:33:45 -04:00
bors-servo
9a83ab6297
Auto merge of #21280 - paavininanda:Update_the_image_data, r=jdm
Reacting to environment changes

<!-- 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
- [x] These changes fix a subset of #11416

<!-- Either: -->
- [x] These changes do not require tests because they will be added when the complete responsive images is complete

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- 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/21280)
<!-- Reviewable:end -->
2018-09-12 10:47:13 -04:00
Simon Sapin
2a996fbc8f Replace mpsc with crossbeam/servo channel, update ipc-channel
Co-authored-by: Gregory Terzian <gterzian@users.noreply.github.com>
2018-09-12 13:33:32 +08:00
paavininanda
2de300d49c Reacting to environment changes 2018-09-12 02:11:13 +05:30
Agustin Chiappe Berrini
5dd6e21c2e Add Websocket task source
According to the doc: https://html.spec.whatwg.org/multipage/web-sockets.html#network

The task source for all tasks queued in the websocket section are the
websocket task source, so this commit also updates those references to
use the appropriate one.
2018-09-08 17:01:27 -04:00
bors-servo
162826d6a9
Auto merge of #21583 - AgustinCB:add-task-source-name, r=jdm
Add task source name

Refactor `CommonScriptMsg::Task` to include `TaskSourceName`.

Sorry for the delay, between doing this after work and the time I spent trying to ramp up on the project, it took me a bit longer than I expected.

Test still don't pass in local, but they fail the same way on master, so I guess it's ok.

I may have forgotten something, I refactored mostly the stuff that the compiler complained about. Please let me know if I missed anything.

I tried to dump my thought process on the commit messages, so feel free to go commit by commit to understand context.

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

- [ ] There are tests for these changes OR
- [x] These changes do not require tests because it's mostly refactor, no new behavior added.

<!-- 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/21583)
<!-- Reviewable:end -->
2018-09-04 14:17:33 -04:00
Agustin Chiappe Berrini
e286fdcc53 Add the TaskSourceName to CommonScriptMsg::Task
Update QueuedTaskConversion and the TaskQueue to use it
2018-09-04 09:17:11 -04:00
Emilio Cobos Álvarez
5d8545d2b4
Fix other parts of the Servo build. 2018-09-03 13:09:10 +02:00
Simon Sapin
1333b6ee45 Fix the build for NLL
Test with `RUSTFLAGS="-Zborrowck=mir -Ztwo-phase-borrows" cargo build`

https://internals.rust-lang.org/t/help-us-get-non-lexical-lifetimes-nll-over-the-finish-line/7807/7
2018-08-24 17:49:58 +02:00
bors-servo
aac4a3485f
Auto merge of #21430 - Eijebong:ws-origin, r=jdm
Properly set the origin on websocket messages

<!-- 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/21430)
<!-- Reviewable:end -->
2018-08-22 15:53:26 -04:00
Alan Jeffrey
74c1e00d81 Upgraded to SM 60 2018-08-20 18:22:29 -04:00
Bastien Orivel
a1925aab52 Properly set the origin on websocket messages 2018-08-16 16:53:38 +02:00
Gregory Terzian
fee5428316 make auxiliary browsing-context script-closeable 2018-08-11 01:13:11 +02:00
Gregory Terzian
21bf5a3a4b implement opener, disowning 2018-08-11 01:13:11 +02:00
Gregory Terzian
f408b798c4 implement window.open, create auxiliary browsing context 2018-08-11 01:12:55 +02:00
Josh Matthews
7c32ad7c3d Revert "Fix the build for NLL"
This reverts commit d1733aa502.
2018-08-07 20:24:55 -04:00
Simon Sapin
d1733aa502 Fix the build for NLL
Test with `RUSTFLAGS="-Zborrowck=mir -Ztwo-phase-borrows" cargo build`

https://internals.rust-lang.org/t/help-us-get-non-lexical-lifetimes-nll-over-the-finish-line/7807/7
2018-08-08 00:09:56 +02:00
bors-servo
076198fe80
Auto merge of #21111 - gterzian:implement_document_load_cancellation, r=jdm
Implement document load cancellation

<!-- 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: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #19309 fix #21114 fix #21113 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- 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/21111)
<!-- Reviewable:end -->
2018-07-29 11:14:29 -04:00
Gregory Terzian
e67adfc290 use DOMTracker instead of WeakMediaQueryListVec 2018-07-29 16:42:59 +08:00
Gregory Terzian
ff62ca7c01 implement window.stop, improve aborting document load 2018-07-29 16:42:54 +08:00
Connor Brewster
61442cce4b Track hash changes in session history
Notify history changed on pushState and scroll to frag
2018-07-21 12:38:51 -06:00
Gregory Terzian
baef63becd use remote-event task source in EventSource 2018-07-13 13:56:46 +08:00
Gregory Terzian
671627e97e introduce "per task source" ignoring of tasks 2018-07-10 13:42:28 +08:00