From a89bd1710cf2948ff4b087732f852cd731005242 Mon Sep 17 00:00:00 2001 From: hanpham32 Date: Mon, 9 Sep 2024 23:59:52 -0700 Subject: [PATCH] Revert "WebDriver: Partial Implementation of Element Clear Endpoint" This reverts commit df2c6c9c86bd434fb1ef08c569d02e84a079529f. --- .../Services/WebContent/WebDriverConnection.cpp | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/Userland/Services/WebContent/WebDriverConnection.cpp b/Userland/Services/WebContent/WebDriverConnection.cpp index 60d45c03edf6..3c5e04b77340 100644 --- a/Userland/Services/WebContent/WebDriverConnection.cpp +++ b/Userland/Services/WebContent/WebDriverConnection.cpp @@ -41,7 +41,6 @@ #include #include #include -#include #include #include #include @@ -1515,21 +1514,15 @@ Messages::WebDriverClient::ElementClickResponse WebDriverConnection::element_cli } // 12.5.2 Element Clear, https://w3c.github.io/webdriver/#dfn-element-clear -Messages::WebDriverClient::ElementClearResponse WebDriverConnection::element_clear(String const& element_id) +Messages::WebDriverClient::ElementClearResponse WebDriverConnection::element_clear(String const&) { dbgln("FIXME: WebDriverConnection::element_clear()"); - // 1. If element's innerHTML IDL attribute is an empty string do nothing and return. - auto* element = TRY(get_known_connected_element(element_id)); - if (!element) { - return Web::WebDriver::Error::from_code(Web::WebDriver::ErrorCode::NoSuchElement, "Element not found"); - } + // FIXME: 1. If element's innerHTML IDL attribute is an empty string do nothing and return. - // 2. Run the focusing steps for element. - Web::HTML::run_focusing_steps(element); + // FIXME: 2. Run the focusing steps for element. - // 3. Set element's innerHTML IDL attribute to an empty string. - TRY(element->set_inner_html(""sv)); + // FIXME: 3. Set element's innerHTML IDL attribute to an empty string. // FIXME: 4. Run the unfocusing steps for the element.