1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:17:44 +00:00

Browser+WebContent+WebDriver: Move Get Element Rect to WebContent

This commit is contained in:
Timothy Flynn 2022-11-10 10:33:29 -05:00 committed by Linus Groh
parent 9dd62228c8
commit 30d6a73d0e
16 changed files with 65 additions and 79 deletions

View file

@ -708,8 +708,7 @@ Web::WebDriver::Response Client::handle_get_element_rect(Vector<StringView> cons
{
dbgln_if(WEBDRIVER_DEBUG, "Handling GET /session/<session_id>/element/<element_id>/rect");
auto* session = TRY(find_session_with_id(parameters[0]));
auto result = TRY(session->get_element_rect(parameters[1]));
return make_json_value(result);
return session->web_content_connection().get_element_rect(parameters[1]);
}
// 12.4.8 Is Element Enabled, https://w3c.github.io/webdriver/#dfn-is-element-enabled