From 995f3db3848b9f6b6661b0738b7308d925147c50 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Thu, 3 Nov 2022 12:51:44 -0400 Subject: LibWebView+WebConent: Add an IPC to get an element's absolute rect --- Userland/Libraries/LibWebView/OutOfProcessWebView.cpp | 5 +++++ Userland/Libraries/LibWebView/OutOfProcessWebView.h | 1 + 2 files changed, 6 insertions(+) (limited to 'Userland/Libraries/LibWebView') diff --git a/Userland/Libraries/LibWebView/OutOfProcessWebView.cpp b/Userland/Libraries/LibWebView/OutOfProcessWebView.cpp index 59e4ece875..151ba6f264 100644 --- a/Userland/Libraries/LibWebView/OutOfProcessWebView.cpp +++ b/Userland/Libraries/LibWebView/OutOfProcessWebView.cpp @@ -560,6 +560,11 @@ String OutOfProcessWebView::get_element_tag_name(i32 element_id) return client().get_element_tag_name(element_id); } +Gfx::IntRect OutOfProcessWebView::get_element_rect(i32 element_id) +{ + return client().get_element_rect(element_id); +} + void OutOfProcessWebView::set_content_filters(Vector filters) { client().async_set_content_filters(filters); diff --git a/Userland/Libraries/LibWebView/OutOfProcessWebView.h b/Userland/Libraries/LibWebView/OutOfProcessWebView.h index eb95879329..6b8b90a14a 100644 --- a/Userland/Libraries/LibWebView/OutOfProcessWebView.h +++ b/Userland/Libraries/LibWebView/OutOfProcessWebView.h @@ -71,6 +71,7 @@ public: String get_computed_value_for_element(i32 element_id, String const& property_name); String get_element_text(i32 element_id); String get_element_tag_name(i32 element_id); + Gfx::IntRect get_element_rect(i32 element_id); void set_content_filters(Vector); void set_proxy_mappings(Vector proxies, HashMap mappings); -- cgit v1.2.3