mirror of
https://github.com/servo/servo
synced 2026-04-26 01:25:32 +02:00
libservo: Merge file selection dialog into EmbedderControls (#39859)
in #39709, we introduced a single “form control” or “embedder control” delegate that requests the embedder’s input for <select> and <input type="color"> elements. this patch partially merges <input type="file"> elements into that new system, and renames “form controls” to “embedder controls” for consistency. internally we continue to use a separate code path where the embedder directly communicates with the file manager thread. subsequent work will make the messages asynchronous via the constellation and script thread, like other embedder controls. Testing: this is currently tricky to write an automated test for; we expect to write a WebDriver test for this once we make the communication asynchronous --------- Signed-off-by: delan azabani <dazabani@igalia.com> Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
@@ -50,7 +50,7 @@ use devtools_traits::{
|
||||
};
|
||||
use embedder_traits::user_content_manager::UserContentManager;
|
||||
use embedder_traits::{
|
||||
EmbedderControlId, EmbedderMsg, FocusSequenceNumber, FormControlResponse,
|
||||
EmbedderControlId, EmbedderControlResponse, EmbedderMsg, FocusSequenceNumber,
|
||||
JavaScriptEvaluationError, JavaScriptEvaluationId, MediaSessionActionType, Theme,
|
||||
ViewportDetails, WebDriverScriptCommand,
|
||||
};
|
||||
@@ -3904,7 +3904,7 @@ impl ScriptThread {
|
||||
fn handle_embedder_control_response(
|
||||
&self,
|
||||
id: EmbedderControlId,
|
||||
response: FormControlResponse,
|
||||
response: EmbedderControlResponse,
|
||||
can_gc: CanGc,
|
||||
) {
|
||||
let Some(document) = self.documents.borrow().find_document(id.pipeline_id) else {
|
||||
|
||||
Reference in New Issue
Block a user