mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 09:00:22 +00:00
WebContent: Handle user prompts in the Take Screenshot endpoint
This is a spec issue, and WPT relies on this behavior.
This commit is contained in:
parent
f4111ef1e1
commit
3afd88330b
Notes:
github-actions[bot]
2024-11-06 09:51:24 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/3afd88330bd Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2178
1 changed files with 19 additions and 15 deletions
|
@ -2409,6 +2409,9 @@ Messages::WebDriverClient::TakeScreenshotResponse WebDriverConnection::take_scre
|
|||
// 1. If session's current top-level browsing context is no longer open, return error with error code no such window.
|
||||
TRY(ensure_current_top_level_browsing_context_is_open());
|
||||
|
||||
// FIXME: Spec issue: We must handle user prompts in this endpoint, just like we do in Take Element Screenshot.
|
||||
// https://github.com/w3c/webdriver/issues/1678
|
||||
handle_any_user_prompts([this]() {
|
||||
auto* document = current_top_level_browsing_context()->active_document();
|
||||
auto window = document->window();
|
||||
|
||||
|
@ -2428,6 +2431,7 @@ Messages::WebDriverClient::TakeScreenshotResponse WebDriverConnection::take_scre
|
|||
// 3. Return success with data encoded string.
|
||||
async_driver_execution_complete(move(encoded_string));
|
||||
}));
|
||||
});
|
||||
|
||||
return JsonValue {};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue