LibWeb: Make DOM Node unique IDs strongly typed (and 64 bit)

This is strictly nicer than passing them around as i32 everywhere,
and by switching to i64 as the underlying type, ID allocation becomes as
simple as incrementing an integer.
This commit is contained in:
Andreas Kling 2024-10-20 10:37:44 +02:00 committed by Andreas Kling
commit 4fdb266077
Notes: github-actions[bot] 2024-10-20 11:43:23 +00:00
28 changed files with 227 additions and 189 deletions

View file

@ -1018,7 +1018,7 @@ Messages::WebDriverClient::GetActiveElementResponse WebDriverConnection::get_act
// 4. If active element is a non-null element, return success with data set to web element reference object for active element.
// Otherwise, return error with error code no such element.
if (active_element)
return ByteString::number(active_element->unique_id());
return ByteString::number(active_element->unique_id().value());
return Web::WebDriver::Error::from_code(Web::WebDriver::ErrorCode::NoSuchElement, "The current document does not have an active element"sv);
}