| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
So far the memory reporter aggregates reports from all processes, and
runs the system reporter only in the main process. Instead it is
desirable to have per-process reports. We do so by:
- creating a ProcessReports struct that holds includes the pid in
addition to the reports themselves.
- running the system memory reporter also in content processes.
- updating the about:memory page to create one report per process, and
add useful information like the pid and the urls loaded in a given
process.
<!-- 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

Signed-off-by: webbeef <me@webbeef.org>
|
|
|
|
|
|
|
|
|
|
| |
1. Implement `WebDriverCommand::DeleteCookie`
2. Remove unnecessary clone for `WebDriverCommand::GetNamedCookie`
Fixes: #36287
---------
Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Remove `EmbedderMethods::get_user_agent_string`. This is now part of
the `Preferences` data structure, which should allow it to be
per-`WebView` in the future.
- Remove `EmbedderMethods::get_version_string`. This was used to include
some data along with WebRender captures about the Servo version. This
isn't really necessary and it was done to replace code in the past
that output the WebRender version, so also isn't what the original
code did. I think we can just remove this entirely.
The idea with these changes is that `EmbedderMethods` can be removed
in a followup and the rest of the methods can be added to
`ServoDelegate`. These two methods are ones that cannot be added to a
delegate as they are used during `Servo` initialization.
Testing: There is currently no testing for libservo. These changes are
meant
as preparation for adding a suite of `WebView` unit tests.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Create config_dir if none exist for caching
Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
* remove specialized behaviour for ohos; copy prefs.json if necessary
Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
* downgrade the log to trace verbosity
Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
* update wpt-test
Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
---------
Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Use 2024 style edition
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Reformat all code
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
---------
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#35564)
Rework the `WebViewDelegate::intercept_web_resource_load` into
`WebViewDelegate::load_web_resource` and clean up internal messaging.
The main thing here is adding objects which manage the response to these
delegate methods. Now we have `WebResourceLoad` and
`InterceptedWebResourceLoad` which make it much harder to misuse the
API.
In addition, the internal messaging for this is cleaned up. Canceling
and finishing the load are unrelated to the HTTP body so they are no
longer subtypes of an HttpBodyData message. Processing of messages is
made a bit more efficient by collecting all body chunks in a vector and
only flattening the chunks at the end.
Finally, "interceptor" is a much more common spelling than "intercepter"
so I've gone ahead and made this change everywhere.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Implement WebResourceRequested Event on the Embedder Layer
Signed-off-by: zhuhaichao518 <zhuhaichao518@gmail.com>
* fix and add test
Signed-off-by: zhuhaichao518 <zhuhaichao518@gmail.com>
* resolve comments
Signed-off-by: zhuhaichao518 <zhuhaichao518@gmail.com>
* remove sample code in webview
Signed-off-by: zhuhaichao518 <zhuhaichao518@gmail.com>
* remove typo
Signed-off-by: zhuhaichao518 <zhuhaichao518@gmail.com>
* ./mach format
Signed-off-by: zhuhaichao518 <zhuhaichao518@gmail.com>
* fix test fail caused by interception message
Signed-off-by: zhuhaichao518 <zhuhaichao518@gmail.com>
* update impl for is_for_main_frame
Signed-off-by: zhuhaichao518 <zhuhaichao518@gmail.com>
---------
Signed-off-by: zhuhaichao518 <zhuhaichao518@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Flatten and simplify Servo's preferences code. In addition, have both
preferences and options passed in as arguments to `Servo::new()` and
make sure not to use the globally set preferences in `servoshell` (as
much as possible now).
Instead of a complex procedural macro to generate preferences, just
expose a very simple derive macro that adds string based getters and
setters.
- All command-line parsing is moved to servoshell.
- There is no longer the concept of a missing preference.
- Preferences no longer have to be part of the resources bundle because
they now have reasonable default values.
- servoshell specific preferences are no longer part of the preferences
exposed by the Servo API.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* add minimal implementation of fetchParams and fetch controller for cancellation support
fix something
removing fetch params from http network or cache fetch due to implementation difficult
Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>
* run formatter
Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>
* fix incorrect spec implementation and add comments with related step number and description
Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>
* fix double borrow issue
Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>
* remove unused code from FetchParams
Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>
* add workaround for double mutable borrow error
Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>
* remove unnecessary comments, move import and format
Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>
* fix comments that state spec instructions
Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>
* update comment
Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>
* refactor tests
Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>
* refactor tests
Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>
---------
Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>
Co-authored-by: lazypassion <25536767+lazypassion@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#34883)
Instead of creating an IPC channel for every fetch, allow cancelling
fetches based on the `RequestId` of the original request. This requires
that `RequestId`s be UUIDs so that they are unique between processes
that might communicating with the resource process.
In addition, the resource process loop now keeps a `HashMap` or `Weak`
handles to cancellers and cleans them up.
This allows for creating mutiple `FetchCanceller`s in `script` for a
single fetch request, allowing integration of the media and video
elements to integrate with the `Document` canceller list -- meaning
these fetches also get cancelled when the `Document` unloads.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Update all network-related dependencies to the latest versions:
* rustls
* hyper
* http
* headers
* tungstenite
* async-tungstenite
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* net: Fix panics with 1xx responses in WPT tests.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* net: Use reported response length when calculating available ranges.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* net: Remove unreachable match arm.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* net: Clean up commented fragments in blob and file handlers.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* net: Remove unreachable match arm.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* net: Fix clippy warning.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* net: Cleanup.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* net: Fix up unit tests for dependency upgrades.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Update aws-lc-sys to fix Windows builds.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* net: Use ring instead of aws-lc-sys.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* embedding: Require embedder to initialize a rustls CryptoProvider.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Disable aws-lc-rs pending OhOS build fixes.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
---------
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* prompt user to get their credentials
Signed-off-by: Lloyd Massiah artmis9@protonmail.com
move credential prompt to a function
Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>
* add prompt for step 15.4
Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>
* add new prompt definition for user credentials
Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>
* remove default implementation for HttpState which allowed making the embedder_proxy non-optional
- default implementation was only used in tests so created an alternative create_http_state function
Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>
add credentials to authentication cache
Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>
* add tests that are successful for the happy path
Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>
* add test for user cancels prompt and user inputs incorrect credentials, and refactor shared code between tests
Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>
* handle error when setting username and password in Url and ran formatting
Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>
renaming test functions
Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>
* change authentication flag to false for proxy authentication. The spec doesn't specify that the flag should be true, and the flag is by default false
Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>
* clean up test code a bit
Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>
* add skeleton implementation to support open harmony and android
Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>
* update warning message to include Android
Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>
* fix build error for OH os and Android
Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>
* remove unused import to fix warning
Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>
---------
Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>
Co-authored-by: lazypassion <25536767+lazypassion@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add prefs to limit threadpool sizes
Add preferences to control the size of threadpools,
so that we can easily reduce the amount of runtime
threads and test which pools benefit from more
threads.
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* Add pref for Webrender threadpool
Add a preference to limit the size of the webrender threadpool.
Note: WebRender by default calls hooks which register the threads with
a profiler instance that the embedder can register with webrender.
Servo currently doesn't register such a profiler with webrender,
but in the future we might also want to profile the
webrender threadpool.
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
---------
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
|
|
|
| |
Signed-off-by: webbeef <me@webbeef.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#32861)
This changes updates to the new version of the `cookie` crate in Servo
which no longer uses the old `time@0.1` data types. This requires using
a new version of `time` while we transition off of the old one. This is
the first step in that process.
In addition, the overloading of the `cookie::Cookie` name was causing a
great deal of confusion, so I've renamed the Servo wrapper to
`ServoCookie` like we do with `ServoUrl`.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
| |
* net: use the same tokio runtime in websocket loader
#31648
* readability
* license
|
|
|
|
|
| |
* Add missing thread name when spawning
* Update namings
|
|
|
|
|
| |
* clippy: fix warnings in `components/net`
* fix: review comments
|
|
|
|
|
|
|
| |
* clippy: fix some warnings in components/net
* fix: review comments
* fix: tidy
|
|
|
|
|
| |
* strict imports formatting
* Reformat all imports
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change replaces OpenSSL with rustls and also the manually curated
CA certs file with webpki-roots (effectively the same thing, but as a
crate).
Generally speaking the design of the network stack is the same. Changes:
- Code around certificate overrides needed to be refactored to work with
rustls so the various thread-safe list of certificates is refactored
into `CertificateErrorOverrideManager`
- hyper-rustls takes care of setting ALPN protocols for HTTP requests,
so for WebSockets this is moved to the WebSocket code.
- The safe set of cypher suites is chosen, which seem to correspond to
the "Modern" configuration from [1]. This can be adjusted later.
- Instead of passing a string of PEM CA certificates around, an enum is
used that includes parsed Certificates (or the default which reads
them from webpki-roots).
- Code for starting up an SSL server for testing is cleaned up a little,
due to the fact that the certificates need to be overriden explicitly
now. This is due to the fact that the `webpki` crate is more stringent
with self-signed certificates than SSL (CA certificates cannot used as
end-entity certificates). [2]
1. https://wiki.mozilla.org/Security/Server_Side_TLS
2. https://github.com/briansmith/webpki/issues/114
Fixes #7888.
Fixes #13749.
Fixes #26835.
Fixes #29291.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
certs.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
and various small improvements
|
|
|
|
|
|
|
|
|
|
|
| |
The purpose of this commit is to ensure that the Response object has
access to Timing updates as previously the Response object simply
stored a ResourceFetchTiming struct so updates on ResourceFetchTiming
that were not explicitly done on the Response would not be passed down.
The references to ServoArc are added because Response uses
servo_arc::Arc rather than std::sync::Arc as is used elsewhere. So,
we've switched those other places to servo_arc::Arc instead of switching
Response to std::sync::Arc.
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Use a threadpool for fetch
<!-- 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 #22768 (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/22769)
<!-- Reviewable:end -->
|
| | |
|
|/ |
|
| |
|