| 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`.
|
|
|
|
|
|
|
| |
* Add ConstellationMsg::WebViewOpened
* Remove unused variants
* Send the message on first webview as well
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add multiple concurrent top-level browsing contexts
Co-authored-by: Delan Azabani <dazabani@igalia.com>
* Rename variables and comments
There are some variable and comments still use browser as names.
This commit renames them to webview.
* Update log message from web view to webview
* Revert offscreen_framebuffer_id rename
* Rename all web view to webview
* Cargo fmt
* Fix viewport/event/clear coordinates when multiview is disabled
* Only deprecate things when multiview is enabled
* Update WebViewManger with shown and invisible sets
Replace visible_webviews and native_window_is_visible with shown_webviews
and invisible_webviews. Add 4 more methods to set them accordingly. The
behavior of is_effectively_visible will return true if the wbview is in
shown_webviews set but not in invisible_webviews.
* Update variant behaviors
* Rename WebViewVisibilityChanged to MarkWebViewInvisible
* Fix unit test by marking id 3 visible again
* Update MarkWebViewInvisible and add UnmarkWebViewInvisible
* Update format and doc comments
* Clean up doc comments
* Address style and naming changes
* Rename UpdateWebView to UpdateFrameTreeForWebView
* constellation: send frame tree unconditionally over focus and feature
* Clarify shown and invisible sets in constellation WebViewManager
* Eliminate forward_to_constellation!()
* Actually remove the unused macro
* Don’t gate compositor changes on multiview feature flag
* Update todo in mouse event dispatch
* Pass all visible webview ids in a single ReadyToPresent message
* Fix compile and lint errors
* servoshell: fix gap between minibrowser toolbar and webview
* Fix failure in /_mozilla/mozilla/window_resizeTo.html
* Fix compile warnings
* Remove stray dbg!()
* Remove confusing “effectively visible” logic (see #31815, #31816)
* Allow embedder to show/hide/raise webviews without ipc
* Update root pipeline only when painting order actually changes
* Stop gating old focus and SetFrameTree behaviour behind Cargo feature
* Use webview_id and WebViewId in webview-related code
* Improve logging of webview-related embedder events
* Allow webview Show and Raise events to optionally hide all others
* Don’t do anything in response to WebViewPaintingOrder
* Remove WebViewPaintingOrder, since its payload is unreliable
* On MoveResizeWebView, only update root pipeline if rect changed
* Rename IOCompositor methods for clarity
* compositor: add event tracing; log webview ops even without ipc
* Add temporary debug logging
* Add more temporary debug logging
* Remove temporary logging in compositor
* Remove temporary debug logging
* Add temporary debug logging, but defer I/O until panic
* Capture a backtrace with each crash log entry
* Proper error handling without panicking in WebViewManager
* Clean up imports in constellation
---------
Co-authored-by: Delan Azabani <dazabani@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
| |
* Allow `too_many_arguments` for existing functions
* fix: Surround ASCII with code block in rustdoc
|
|
|
|
|
|
| |
Many things in Servo depend on `parking_lot`, so we can replace our
homegrown remutex with `parking_lot`'s version.
Fixes #12641.
|
|
|
|
| |
compositor (#31816)
|
|
|
|
| |
jniapi (#31815)
|
| |
|
|
|
|
|
|
|
| |
* clippy: fix assorted warnings in `components/`
* fix: new and default
* fix: review comments
|
|
|
|
|
| |
* clippy: fix warnings in components/constellation
* fix: review comments
|
|
|
|
|
| |
These tests don't seem to time out any longer and this mechanism is
probably better served by some sort of adjustment to `RUST_LOG` in the
WPT harness.
|
|
|
|
|
|
|
|
|
|
| |
We can use stable rust if we pass the unstable configuration as
command-line arguments to rustfmt itself. This prevents needing to
install an unstable rust toolchain.
The one downside here is that it doesn't seem that "ignore" is
supported so we have to start formatting the files in "third_party."
This shouldn't be a huge issue because we don't plan to check much more
rust code into those directories.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* script: Do not run layout in a thread
Instead of spawning a thread for layout that almost always runs
synchronously with script, simply run layout in the script thread.
This is a resurrection of #28708, taking just the bits that remove the
layout thread. It's a complex change and thus is just a first step
toward cleaning up the interface between script and layout. Messages are
still passed from script to layout via a `process()` method and script
proxies some messages to layout from other threads as well.
Big changes:
1. Layout is created in the script thread on Document load, thus every
live document is guaranteed to have a layout. This isn't completely
hidden in the interface, but we can safely `unwrap()` on a Document's
layout.
2. Layout configuration is abstracted away into a LayoutConfig struct
and the LayoutFactory is a struct passed around by the Constellation.
This is to avoid having to monomorphize the entire script thread
for each layout.
3. Instead of having the Constellation block on the layout thread to
figure out the current epoch and whether there are pending web fonts
loading, updates are sent synchronously to the Constellation when
rendering to a screenshot. This practically only used by the WPT.
A couple tests start to fail, which is probably inevitable since removing
the layout thread has introduced timing changes in "exit after load" and
screenshot behavior.
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
* Update test expectations
* Fix some issues found during review
* Clarify some comments
* Address review comments
---------
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
| |
These were identified with `cargo-marchete`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* constellation: focusing, closing, and native window visibility
* rename “browser” to “webview”, “unfocus” to “blur”
* remove native window visibility from constellation
* rename more “browser” to “webview”
* guard clauses
* don’t automatically focus when no webviews are focused
* comment spec steps for window.close()
* use format interpolation
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* fix formatting
* rename “Webview” to “WebView” in types and type parameters
* remove unused method
* fix libsimpleservo
---------
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
| |
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.
|
|
|
| |
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
|
|
|
| |
Signed-off-by: Lucas Fabián Montenegro <40044087+lucasMontenegro@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* constellation: notify embedder when events are hit-tested to browsers
* fix compile error in libsimpleservo
* impl From<&CompositorEvent> for CompositorEventVariant
* remove msg temporaries in Constellation::forward_event
* use single wildcard arm in EventDelivered case in handle_servo_events
|
|
|
|
|
|
|
| |
* constellation: clean up logging of pipelines and browsing contexts
* bring back sentence case; remove commented code
* fix more typos and wordings
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the start of the organization of types that are in their own
crates in order to break dependency cycles between other crates. The
idea here is that putting these packages into their own directory is the
first step toward cleaning them up. They have grown organically and it
is difficult to explain to new folks where to put new shared types. Many
of these crates contain more than traits or don't contain traits at all.
Notably, `script_traits` isn't touched because it is vendored from
Gecko. Eventually this will move to `third_party`.
|
| |
|
|
|
|
|
|
| |
The constellation forwards messages from other tasks to the compositor.
Mainly, these are passed to WebRender. This change updates the names of
these messages so it is clearer where they are coming from and where
they are going.
|
|
|
|
|
| |
* strict imports formatting
* Reformat all imports
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Upgrade vendored version of WebRender
* Patch WebRender: upgrade version of gleam
* Restore hit testing implementation
* Fix WebRender warnings
* Adapt Servo to new WebRender
* Update results
* Add a workaround for #30313
This slightly expands text boundaries in order to take into account the
fact that layout isn't measuring glyph boundaries.
|
|
|
|
|
|
|
|
|
|
|
| |
* remove extern crate
* Update components/script_plugins/lib.rs
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
---------
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* constellation: crash to a new “sad tab” page
* check in resources/crash.html
* use a separate enum variant instead of keying on reason
* fmt + tidy
* rename Resource::Crash to Resource::CrashHTML
* clean up crash page and add details (reason + backtrace)
* avoid repeating crash errors in script::script_thread warn log
* make new LoadData init more idiomatic
* clarify comments and new fields
* fix doc comment style
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix `mach test-wpt` to make crash tests work
There are two issues related to crash tests:
1. test-wpt is unable to find existing crash tests even when
called with --test-types=crashtests. The fix here is to
add crashtests to the default test suite types to python/wpt/run.py
2. When running in headless mode, crashes in style threads
don't cause servo to crash because the logic in constellation.rs
currently calls handle_panic only when the top-level browsing
context id is some value. Since style pool threads are shared,
they always generate Panic messages with None as top-level
browsing context id.
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* Send bactrace to stderr and capture it in test runner
Servo's panic hook writes backtraces to stdout. This
patch changes it so they are written to stderr.
The crash test executor for servo in WPT grouping formatter
was also not capturing the output correctly for crashtests
as the log events were being aggregated based on thread name
which doesn't seem to match correctly in case of crashtests.
This patch also fixes the log grouping logic to be based on
test name.
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* crashtests: update expectations for layout 2020
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* crashtests: update expectations for layout 2013
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* remove outdated & intemittent test expectations
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
---------
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
* [NFC] compositing: extract types into new compositing_traits crate
* [NFC] compositing: move InitialCompositorState back to compositing
* [NFC] compositing: rename Msg to CompositorMsg
* [NFC] compositing: revert changes to Cargo.toml features section
* [NFC] compositing: merge imports
|
|
|
|
|
|
|
| |
* Add taplo fmt config for toml fmt
* fmt toml files
* Add even-better-toml to extensions recommendations
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* remove event_loop_waker that is always None
* remove None event_loop_waker form InitialScriptState
* fix formatting
* remove None event_loop_waker from ScriptThread
* remove None EventLoopWaker from Window
* remove None and use of wake_after_send in webgl code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* winit: add minibrowser feature that depends on egui{,-winit}
* winit: carve out some space at the top of headed windows
* winit: minimal toolbar and egui/winit integration (but no painting)
* winit: try to paint with egui_glow (doesn’t work yet)
* winit: add comment about toolbar size
* Add framebuffer object, set it as glow's target
* compositing: clear only the viewport, not the whole framebuffer
* plumb the actual size of the egui toolbar to webrender
* fix formatting
* winit: fix crash when fbo is zero
* winit: don’t bother binding the framebuffer object
* winit: remove unsafe and get toolbar_height
* winit: location field should reflect the current top-level url
* [NFC] winit: move Minibrowser out of App::run
* winit: clean up toolbar height code
* winit: make App own the Minibrowser if any
* winit: make the go button work
* winit:make the location field reflect the current top-level url
* winit: allow enabling minibrowser from command line
* winit: tell compositor to repaint WR and flush when we repaint
* winit: fix bug where location field edits would get overridden
* winit: borrow the minibrowser once in App::handle_events
* winit: address todo about viewport origin coordinates
* winit: fix some minor problems with comments and errors
* winit: update location field once per HistoryChanged event
* winit: rename Window::set_toolbar_size to set_toolbar_height
* winit: take toolbar height into account in hit testing
* winit: pass egui only relevant CursorMoved events
* winit: scratch that, coalesce minibrowser updates instead
* ensure both minibrowser and WR are repainted on every frame
* compositing: only skip framebuffer clear in external present mode
* winit: destroy egui glow Painter when shutting down
* winit: clean up and fix license lint
* fix duplicate versions lint by downgrading bytemuck_derive
was egui_glow ^0.22.0 (0.22.0)
→ egui/bytemuck ^0.22.0 (0.22.0)
→ epaint/bytemuck ^0.22.0 (0.22.0)
→ bytemuck ^1.7.2 (1.13.1)
→ bytemuck_derive ^1.4 (1.4.1)
→ syn ^2.0.1 (2.0.28)
now lock has bytemuck_derive 1.4.0
→ syn ^1.0.99 (1.0.103)
* fix duplicate versions lint by disabling egui-winit/links
(we don’t need support for hyperlinks in our use of egui)
* squelch duplicate versions lint by excluding clipboard-win
* winit: fix compile warnings
* winit: make gleam an optional dependency under /minibrowser
* winit: remove cargo feature, since it’s not really optional
* winit: extract Minibrowser and related code to separate module
* winit: remove unnecessary trailing comma
* winit: simplify the ServoUrl serialisation optimisation
---------
Co-authored-by: atbrakhi <atbrakhi@igalia.com>
|
|
|
|
|
| |
The newer versions of WebRender move types around between `webrender` and
`webrender_api` and this will reduce the churn during the upgrade.
|
|
|
|
|
|
|
|
| |
This is a step toward upgrading WebRender, which will be upgraded and
patched in the `third_party` directory. This change vendors the current
private branch of WebRender that we use and adds a `patches` directory
which tracks the changes on top of the upstream WebRender commit
described by third_party/webrender/patches/head.
|
|
|
|
| |
This also removes the meta viewport support (which was implemented on top), but that also had a single test and is disabled everywhere, so I'm not too concerned, it can be implemented again if / when needed.
|
|
|
|
|
|
|
| |
This will ultimately make it simpler to update crate dependencies and
reduce duplicate when specifying requirements. Generally, this change
does not touch dependencies that are only used by a single crate. We
could consider moving them to workspace dependencies in the future.
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Move `FromScriptLogger` and `FromCompositorLogger` to seperate file
<!-- Please describe your changes on the following line: -->
This PR is an attempt to refactor the `constellation.rs` file in order to make it more readable. Starting the initiative with moving `FromScriptLogger` and `FromCompositorLogger` to a separate`logger.rs` file as they don't have any major dependency to be in the `constellation.rs` file itself.
Also noticed a broken link in `docs/HACKING_QUICKSTART.md` file. Adding the correct url.
---
<!-- 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 ___
<!-- 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. -->
|
| |
| |
| |
| |
| |
| |
| | |
Constellation seems to have lots of code that could be moved into
seperate files. `FromScriptLogger` and `FromCompositorLogger` seem
to qualify for that.
Moved FromScriptLogger and FromScriptLogger to logger file.
|
| | |
|
| | |
|
|/ |
|
|
|
|
|
|
| |
This change adds support for the <iframe> element to Layout 2020. In
addition, certain aspects of the implementation are made the same
between both layout systems.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Also updates raqote to latest with an upgrade of font-kit to 0.11
applied on as a patch
- Update lyon_geom to the latest version
Major change:
- All matrices are now stored in row major order. This means that
parameters to rotation functions no longer should be negated.
- `post_...()` functions are now named `then()`. `pre_transform()` is removed,
so `then()` is used and the order of operations changed.
|
| |
|
| |
|
|\
| |
| |
| |
| |
| | |
Update rustc to latest nightly.
None
|
| | |
|