summaryrefslogtreecommitdiff
path: root/Userland/Applications
diff options
context:
space:
mode:
authorTimothy Flynn <trflynn89@pm.me>2022-11-10 10:33:29 -0500
committerLinus Groh <mail@linusgroh.de>2022-11-10 17:02:11 +0000
commit30d6a73d0ee552ee889a8550b2c87cd7d10957ff (patch)
tree14fbfa8c35c7516767af5392ee9a84b6fa80bb49 /Userland/Applications
parent9dd62228c8a1a8cb68875381a05a20e765fd7d61 (diff)
downloadserenity-30d6a73d0ee552ee889a8550b2c87cd7d10957ff.zip
Browser+WebContent+WebDriver: Move Get Element Rect to WebContent
Diffstat (limited to 'Userland/Applications')
-rw-r--r--Userland/Applications/Browser/BrowserWindow.cpp4
-rw-r--r--Userland/Applications/Browser/WebDriverConnection.cpp11
-rw-r--r--Userland/Applications/Browser/WebDriverConnection.h1
-rw-r--r--Userland/Applications/Browser/WebDriverEndpoints.h1
-rw-r--r--Userland/Applications/Browser/WebDriverSessionClient.ipc1
5 files changed, 0 insertions, 18 deletions
diff --git a/Userland/Applications/Browser/BrowserWindow.cpp b/Userland/Applications/Browser/BrowserWindow.cpp
index e802f4e83f..987afc4013 100644
--- a/Userland/Applications/Browser/BrowserWindow.cpp
+++ b/Userland/Applications/Browser/BrowserWindow.cpp
@@ -611,10 +611,6 @@ void BrowserWindow::create_new_tab(URL url, bool activate)
active_tab().view().scroll_element_into_view(element_id);
};
- new_tab.webdriver_endpoints().on_get_element_rect = [this](i32 element_id) {
- return active_tab().view().get_element_rect(element_id);
- };
-
new_tab.webdriver_endpoints().on_is_element_enabled = [this](i32 element_id) {
return active_tab().view().is_element_enabled(element_id);
};
diff --git a/Userland/Applications/Browser/WebDriverConnection.cpp b/Userland/Applications/Browser/WebDriverConnection.cpp
index 16408f607a..541f3f1f88 100644
--- a/Userland/Applications/Browser/WebDriverConnection.cpp
+++ b/Userland/Applications/Browser/WebDriverConnection.cpp
@@ -146,17 +146,6 @@ void WebDriverConnection::scroll_element_into_view(i32 element_id)
}
}
-Messages::WebDriverSessionClient::GetElementRectResponse WebDriverConnection::get_element_rect(i32 element_id)
-{
- dbgln("WebDriverConnection: get_element_rect {}", element_id);
- if (auto browser_window = m_browser_window.strong_ref()) {
- auto& tab = browser_window->active_tab();
- if (tab.webdriver_endpoints().on_get_element_rect)
- return { tab.webdriver_endpoints().on_get_element_rect(element_id) };
- }
- return { {} };
-}
-
Messages::WebDriverSessionClient::IsElementEnabledResponse WebDriverConnection::is_element_enabled(i32 element_id)
{
dbgln("WebDriverConnection: is_element_enabled {}", element_id);
diff --git a/Userland/Applications/Browser/WebDriverConnection.h b/Userland/Applications/Browser/WebDriverConnection.h
index 12800a65bf..7e5007ecae 100644
--- a/Userland/Applications/Browser/WebDriverConnection.h
+++ b/Userland/Applications/Browser/WebDriverConnection.h
@@ -49,7 +49,6 @@ public:
virtual void add_cookie(Web::Cookie::ParsedCookie const&) override;
virtual void update_cookie(Web::Cookie::Cookie const&) override;
virtual void scroll_element_into_view(i32 element_id) override;
- virtual Messages::WebDriverSessionClient::GetElementRectResponse get_element_rect(i32 element_id) override;
virtual Messages::WebDriverSessionClient::IsElementEnabledResponse is_element_enabled(i32 element_id) override;
virtual Messages::WebDriverSessionClient::TakeScreenshotResponse take_screenshot() override;
virtual Messages::WebDriverSessionClient::TakeElementScreenshotResponse take_element_screenshot(i32 element_id) override;
diff --git a/Userland/Applications/Browser/WebDriverEndpoints.h b/Userland/Applications/Browser/WebDriverEndpoints.h
index 387a56dce0..7aed04734d 100644
--- a/Userland/Applications/Browser/WebDriverEndpoints.h
+++ b/Userland/Applications/Browser/WebDriverEndpoints.h
@@ -24,7 +24,6 @@ public:
~WebDriverEndpoints() = default;
Function<void(i32 element_id)> on_scroll_element_into_view;
- Function<Gfx::IntRect(i32 element_id)> on_get_element_rect;
Function<bool(i32 element_id)> on_is_element_enabled;
Function<Gfx::ShareableBitmap(i32 element_id)> on_take_element_screenshot;
Function<String()> on_serialize_source;
diff --git a/Userland/Applications/Browser/WebDriverSessionClient.ipc b/Userland/Applications/Browser/WebDriverSessionClient.ipc
index eae41548ef..5a358b9533 100644
--- a/Userland/Applications/Browser/WebDriverSessionClient.ipc
+++ b/Userland/Applications/Browser/WebDriverSessionClient.ipc
@@ -25,7 +25,6 @@ endpoint WebDriverSessionClient {
add_cookie(Web::Cookie::ParsedCookie cookie) =|
update_cookie(Web::Cookie::Cookie cookie) =|
scroll_element_into_view(i32 element_id) => ()
- get_element_rect(i32 element_id) => (Gfx::IntRect rect)
is_element_enabled(i32 element_id) => (bool enabled)
take_screenshot() => (Gfx::ShareableBitmap data)
take_element_screenshot(i32 element_id) => (Gfx::ShareableBitmap data)