| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For a long time, `gfx_traits` has held a lot of things unrelated to graphics
and also unrelated to the `gfx` crate (which is mostly about fonts).
This is a cleanup which does a few things:
1. Move non `gfx` crate things out of `gfx_traits`. This is important in
order to prevent dependency cycles with a different integration between
layout, script, and fonts.
2. Rename the `msg` crate to `base`. It didn't really contain anything
to do with messages and instead mostly holds ids, which are used
across many different crates in Servo. This new crate will hold the
*rare* data types that are widely used.
Details:
- All BackgroundHangMonitor-related things from base to a new
`background_hang_monitor_api` crate.
- Moved `TraversalDirection` to `script_traits`
- Moved `Epoch`-related things from `gfx_traits` to `base`.
- Moved `PrintTree` to base. This should be widely useful in Servo.
- Moved `WebrenderApi` from `base` to `webrender_traits` and renamed it
to `WebRenderFontApi`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix the HTML event-loop: add a update the rendering task
add rendering task source
sketch structure to update the rendering
resize steps
composition events
fix warnings in rendering task source
refactor handling of composition events: put window and doc for pipeline on top
set script as user interacting in update the rendering task
fmt
add todos for other steps, put all compositor handling logic in one place
update the rendering: evaluate media queries and report changes
update the rendering: update animations and send events
update the rendering: run animation frames
update the rendering: order docs
put rendering related info on documents map
tidy
update the rendering: add issue numbers to todos
update the rendering: reflow as last step
update the rendering: add todo for top layer removals
note rendering opportunity when ticking animations for testing
fix double borrow crash in css/basic-transition
fix faster reversing of transitions test
undo ordering of docs
bypass not fully-active pipeline task throttling for rendering tasks
ensure tasks are dequed from task queue
prioritize update the rendering task
remove servo media stuff from set activity
tidy
debug
update the rendering: perform microtask checkpoint after task
tidy-up
only run evaluate media queries if resized
re-add evaluation of media queries for each rendering task, re-prioritize rendering tasks, re-add microtask checkpoint for all sequential messages
re-structure resize steps, and their interaction with evaluating media queries and reacting to environment changes
update the rendering: remove reflow call at the end
update webmessaging expectations
update to FAIL /html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-iframe-contentWindow.html
update to FAIL load-pageshow-events-window-open.html
add issue number for ordering of docs
nits
move batching of mouse move event to document info
nits
add doc for mouse move event index
reset mouse move event index when taking pending compositor events
fix replacing mouse move event
nits
* move update the rendering related data to document
* move re-taking of tasks to try_recv
* address nits
* change task queue try_recv into take_tasks_and_recv, with nits
* refactor process_pending_compositor_events
* when updating the rendering, return early if script cannot continue running
* use an instant for the last render opportunity time
* nits
* remove handle_tick_all_animations
* use a vec for pending resize and compositor events
* fix spec links
* Fix a few other nits before landing
---------
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* fix clippy problems in stylesheet
* fix clippy problems in task_manager
* fix clippy problems in task_queue
* fix clippy problems in task_queue
* fix clippy problems in file_reading
* fix clippy problems in dom_manipulation
* fix clippy problems in gamepad
* fix clippy problems in networking
* fix clippy problems in performance
* fix clippy problems in port_message
* fix clippy problems in port_message
* fix clippy problems in timer
* fix clippy problems in stylesheet
* fix clippy problems
* fix clippy problems
* fix clippy problems
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Create embedder event to send to constellation
* Handle gamepad message in constellation, send to script thread
* Handle GamepadEvent in script thread and dispatch event to document
* Add missing Clones, fix event
* Add gamepad task source
* Adjust GamepadIndex type, remove unused imports
* Add internal getter for gamepads list
* Update gamepad new methods
* Handle gamepad connect and disconnect events
* Proto will be none, no need for HandleObject
* Initialize buttons and axes to standard mapping
* Adjust update type index types
* Update GamepadButton update function
* Adjust Gamepad mapping comments to match spec, add update logic
* Amend comment
* Update button and axis inputs on Updated event
* Add GilRs as gamepad backend in servoshell
* Add spec links, queue gamepad updates on task source
* ./mach fmt
* Fix comment length
* Split out button init, update spec comments
* Move gamepad event handling from document to global
* Map and normalize axes/button values
* Use std::time for gamepad timestamp
* Adjust gamepad handling in event loop
* Move button press/touch check into map+normalize function
- Small change but is more in line with spec
* ./mach fmt
* Update comment spec links and warning messages
* Doc comments -> regular comments
* Add window event handlers for gamepad connect/disconnect
* Adjust gamepad disconnect behavior
* Add missing TODO's, adjust gamepad/gamepadbutton list methods and formatting
* Update button handling from gilrs, add comments
* Enable gamepad pref during WPT tests and update expectations
* Update WPT expectations in meta-legacy-layout
|
|
|
|
| |
This fixes many rustdoc errors that occur due to raw URLs in rustdoc
comments as well as unescaped Rust code that should be in backticks.
|
|
|
|
|
| |
* strict imports formatting
* Reformat all imports
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add `no_trace` option to JSTraceable derive
* NoTrace wrapper
* Port some types to no_trace schematics
* Fixing my unsafe mistakes (not tracing traceables)
* Add docs & safety guards for no_trace
Safety guards (trait shenanigans) guarantees safety usage of `no_trace`
* Port canvas_traits to no_trace
* Port servo_media to no_trace
* Port net_traits to no_trace
* Port style to no_trace
* Port webgpu to no_trace
* Port script_traits to no_trace
* Port canvas_traits, devtools_traits, embedder_traits, profile_traits to no_trace
* unrooted_must_root lint in seperate file
* Add trace_in_no_trace_lint as script_plugin
* Composable types in must_not_have_traceable
* Introduced HashMapTracedValues wrapper
* `HashMap<NoTrace<K>,V>`->`HashMapTracedValues<K,V>`
* Port rest of servo's types to no_trace
* Port html5ever, euclid, mime and http to no_trace
* Port remaining externals to no_trace
* Port webxr and Arc<Mutex<_>>
* Fix spelling in notrace doc
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Accept transfer argument for StructuredCloneData::write
Allow structured clone reads to return a boolean
Add Transferable trait
Add basic skeletons to MessagePort
Implement transfer and transfer-receiving steps on MessagePort
Use transfer and transfer_receive in StructuredClone callbacks
Implement MessageChannel
Freeze the array object for the MessageEvent ports attribute
Implement transfer argument on window.postMessage
Use ReentrantMutex instead for MessagePortInternal
Accept origin as a parameter in dispatch_jsval
Fix BorrowMut crash with pending_port_message
Detach port on closure and check for detached during transfer
Enable webmessaging tests
fix webidl
fix
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
| |
And remove the method in window that returns it, because it isn't used
so far.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Send>
We don't have `window` for `workers`. So, if we use `global.as_window()`
to get the DOMManipulationTaskSource, it will make worker panic.
Instead, we should get the DOMManipulationTaskSource from each own
thread.
Ref: https://github.com/servo/servo/pull/20755#discussion_r193557746
|
| |
|
| |
|
|
|
|
| |
Co-authored-by: Gregory Terzian <gterzian@users.noreply.github.com>
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Update QueuedTaskConversion and the TaskQueue to use it
|
| |
|
| |
|
|
|
|
| |
changed task sources to accept pipeline ids
|
|
|
|
| |
changed task macro to take pipeline info
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
http://www.robohornet.org gives a score of 101.36 on master,
and 102.68 with this PR. The latter is slightly better,
but probably within noise level.
So it looks like this PR does not affect DOM performance.
This is expected since `Box::new` is defined as:
```rust
impl<T> Box<T> {
#[inline(always)]
pub fn new(x: T) -> Box<T> {
box x
}
}
```
With inlining, it should compile to the same as box syntax.
|
|
|
|
|
| |
Having both TaskBox and TaskOnce allows us to remove the superfluous inner boxing
from CancellableTask<T>.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This removes the last remaining use of Task::run_with_script_thread
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The changes are:
* `*Runnable` -> `*Task`;
* `RunnableMsg` -> `Task`;
* `RunnableWrapper` -> `TaskCanceller`;
* `MainThreadRunnable` -> `MainThreadTask`;
* `wrap_runnable` -> `wrap_task`;
* `get_runnable_wrapper` -> `task_canceller`;
* `handler` -> `run`;
* `main_thread_handler` -> `run_with_script_thread`.
|
| |
|
|
|
|
| |
Just use a bare Runnable value.
|
|
|
|
| |
Just use a bare Runnable value.
|
| |
|
| |
|
|
|
|
|
|
| |
Ignoring :
- **generated**.rs
- python/tidy/servo_tidy_tests/rust_tidy.rs
|
| |
|
| |
|
| |
|
| |
|