mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Add support for Upgrade request to a potentially trustworthy URL. (#34986)
* Add support for Upgrade request to a potentially trustworthy URL. Signed-off-by: Shubham Gupta <shubham13297@gmail.com> * script: Support inheritable insecure request policy in documents and workers. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Shubham Gupta <shubham13297@gmail.com> Signed-off-by: Josh Matthews <josh@joshmatthews.net> Co-authored-by: Shubham Gupta <shubham.gupta@chromium.org> Co-authored-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
parent
7b36f2beb3
commit
1e164738d8
57 changed files with 264 additions and 346 deletions
|
@ -4,6 +4,7 @@
|
|||
|
||||
use dom_struct::dom_struct;
|
||||
use mime::Mime;
|
||||
use net_traits::request::InsecureRequestsPolicy;
|
||||
use script_traits::DocumentActivity;
|
||||
use servo_url::{MutableOrigin, ServoUrl};
|
||||
|
||||
|
@ -41,6 +42,7 @@ impl XMLDocument {
|
|||
activity: DocumentActivity,
|
||||
source: DocumentSource,
|
||||
doc_loader: DocumentLoader,
|
||||
inherited_insecure_requests_policy: Option<InsecureRequestsPolicy>,
|
||||
) -> XMLDocument {
|
||||
XMLDocument {
|
||||
document: Document::new_inherited(
|
||||
|
@ -58,6 +60,7 @@ impl XMLDocument {
|
|||
None,
|
||||
Default::default(),
|
||||
false,
|
||||
inherited_insecure_requests_policy,
|
||||
),
|
||||
}
|
||||
}
|
||||
|
@ -74,6 +77,7 @@ impl XMLDocument {
|
|||
activity: DocumentActivity,
|
||||
source: DocumentSource,
|
||||
doc_loader: DocumentLoader,
|
||||
inherited_insecure_requests_policy: Option<InsecureRequestsPolicy>,
|
||||
) -> DomRoot<XMLDocument> {
|
||||
let doc = reflect_dom_object(
|
||||
Box::new(XMLDocument::new_inherited(
|
||||
|
@ -87,6 +91,7 @@ impl XMLDocument {
|
|||
activity,
|
||||
source,
|
||||
doc_loader,
|
||||
inherited_insecure_requests_policy,
|
||||
)),
|
||||
window,
|
||||
CanGc::note(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue