mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Auto merge of #20707 - gterzian:embedder_handling_of_prompts_and_alerts_2, r=payl
Embedder handling of prompts and alerts <!-- Please describe your changes on the following line: --> Allow embedder to allow alerts and prompts, but via constellation forwarding messages from script. --- <!-- 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 build-geckolib` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #19992 (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/20707) <!-- Reviewable:end -->
This commit is contained in:
commit
f6762d54e2
32 changed files with 413 additions and 375 deletions
|
@ -16,7 +16,6 @@ doctest = false
|
|||
base64 = "0.6"
|
||||
brotli = "1.0.6"
|
||||
cookie = "0.10"
|
||||
compositing = {path = "../compositing"}
|
||||
devtools_traits = {path = "../devtools_traits"}
|
||||
embedder_traits = { path = "../embedder_traits" }
|
||||
flate2 = "1"
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use compositing::compositor_thread::{EmbedderMsg, EmbedderProxy};
|
||||
use embedder_traits::{EmbedderMsg, EmbedderProxy, FilterPattern};
|
||||
use ipc_channel::ipc::{self, IpcSender};
|
||||
use mime_guess::guess_mime_type_opt;
|
||||
use net_traits::blob_url_store::{BlobBuf, BlobURLStoreError};
|
||||
use net_traits::filemanager_thread::{FileManagerResult, FileManagerThreadMsg, FileOrigin, FilterPattern};
|
||||
use net_traits::filemanager_thread::{FileManagerResult, FileManagerThreadMsg, FileOrigin};
|
||||
use net_traits::filemanager_thread::{FileManagerThreadError, ReadFileProgress, RelativePos, SelectedFile};
|
||||
use servo_config::prefs::PREFS;
|
||||
use std::collections::HashMap;
|
||||
|
@ -220,7 +220,7 @@ impl FileManagerStore {
|
|||
multiple_files: bool,
|
||||
embedder_proxy: EmbedderProxy) -> Option<Vec<String>> {
|
||||
let (ipc_sender, ipc_receiver) = ipc::channel().expect("Failed to create IPC channel!");
|
||||
let msg = EmbedderMsg::SelectFiles(patterns, multiple_files, ipc_sender);
|
||||
let msg = (None, EmbedderMsg::SelectFiles(patterns, multiple_files, ipc_sender));
|
||||
|
||||
embedder_proxy.send(msg);
|
||||
match ipc_receiver.recv() {
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
extern crate base64;
|
||||
extern crate brotli;
|
||||
extern crate compositing;
|
||||
extern crate cookie as cookie_rs;
|
||||
extern crate devtools_traits;
|
||||
extern crate embedder_traits;
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
//! A thread that takes a URL and streams back the binary data.
|
||||
use compositing::compositor_thread::EmbedderProxy;
|
||||
use connector::{create_http_connector, create_ssl_client};
|
||||
use cookie;
|
||||
use cookie_rs;
|
||||
use cookie_storage::CookieStorage;
|
||||
use devtools_traits::DevtoolsControlMsg;
|
||||
use embedder_traits::EmbedderProxy;
|
||||
use embedder_traits::resources::{self, Resource};
|
||||
use fetch::cors_cache::CorsCache;
|
||||
use fetch::methods::{CancellationListener, FetchContext, fetch};
|
||||
|
|
|
@ -3,10 +3,11 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use create_embedder_proxy;
|
||||
use embedder_traits::FilterPattern;
|
||||
use ipc_channel::ipc;
|
||||
use net::filemanager_thread::FileManager;
|
||||
use net_traits::blob_url_store::BlobURLStoreError;
|
||||
use net_traits::filemanager_thread::{FilterPattern, FileManagerThreadMsg, FileManagerThreadError, ReadFileProgress};
|
||||
use net_traits::filemanager_thread::{FileManagerThreadMsg, FileManagerThreadError, ReadFileProgress};
|
||||
use servo_config::prefs::{PrefValue, PREFS};
|
||||
use std::fs::File;
|
||||
use std::io::Read;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
#![cfg(test)]
|
||||
|
||||
extern crate compositing;
|
||||
extern crate cookie as cookie_rs;
|
||||
extern crate devtools_traits;
|
||||
extern crate embedder_traits;
|
||||
|
@ -35,8 +34,8 @@ mod mime_classifier;
|
|||
mod resource_thread;
|
||||
mod subresource_integrity;
|
||||
|
||||
use compositing::compositor_thread::{EmbedderProxy, EventLoopWaker};
|
||||
use devtools_traits::DevtoolsControlMsg;
|
||||
use embedder_traits::{EmbedderProxy, EventLoopWaker};
|
||||
use embedder_traits::resources::{self, Resource};
|
||||
use hyper::server::{Handler, Listening, Server};
|
||||
use net::connector::create_ssl_client;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue