AK+Everywhere: Rename verify_cast to as

Follow-up to fc20e61e72.
This commit is contained in:
Timothy Flynn 2025-01-21 09:12:05 -05:00 committed by Tim Flynn
commit 85b424464a
Notes: github-actions[bot] 2025-01-21 16:49:39 +00:00
191 changed files with 574 additions and 574 deletions

View file

@ -48,7 +48,7 @@ Optional<String> NavigationHistoryEntry::url() const
{
// The url getter steps are:
// 1. Let document be this's relevant global object's associated Document.
auto& document = verify_cast<HTML::Window>(relevant_global_object(*this)).associated_document();
auto& document = as<HTML::Window>(relevant_global_object(*this)).associated_document();
// 2. If document is not fully active, then return the empty string.
if (!document.is_fully_active())
@ -73,7 +73,7 @@ String NavigationHistoryEntry::key() const
{
// The key of a NavigationHistoryEntry nhe is given by the return value of the following algorithm:
// 1. If nhe's relevant global object's associated Document is not fully active, then return the empty string.
auto& associated_document = verify_cast<HTML::Window>(relevant_global_object(*this)).associated_document();
auto& associated_document = as<HTML::Window>(relevant_global_object(*this)).associated_document();
if (!associated_document.is_fully_active())
return {};
@ -86,7 +86,7 @@ String NavigationHistoryEntry::id() const
{
// The ID of a NavigationHistoryEntry nhe is given by the return value of the following algorithm:
// 1. If nhe's relevant global object's associated Document is not fully active, then return the empty string.
auto& associated_document = verify_cast<HTML::Window>(relevant_global_object(*this)).associated_document();
auto& associated_document = as<HTML::Window>(relevant_global_object(*this)).associated_document();
if (!associated_document.is_fully_active())
return {};
@ -99,7 +99,7 @@ i64 NavigationHistoryEntry::index() const
{
// The index of a NavigationHistoryEntry nhe is given by the return value of the following algorithm:
// 1. If nhe's relevant global object's associated Document is not fully active, then return 1.
auto& this_relevant_global_object = verify_cast<HTML::Window>(relevant_global_object(*this));
auto& this_relevant_global_object = as<HTML::Window>(relevant_global_object(*this));
if (!this_relevant_global_object.associated_document().is_fully_active())
return -1;
@ -113,7 +113,7 @@ bool NavigationHistoryEntry::same_document() const
{
// The sameDocument getter steps are:
// 1. Let document be this's relevant global object's associated Document.
auto& document = verify_cast<HTML::Window>(relevant_global_object(*this)).associated_document();
auto& document = as<HTML::Window>(relevant_global_object(*this)).associated_document();
// 2. If document is not fully active, then return false.
if (!document.is_fully_active())
@ -128,7 +128,7 @@ WebIDL::ExceptionOr<JS::Value> NavigationHistoryEntry::get_state()
{
// The getState() method steps are:
// 1. If this's relevant global object's associated Document is not fully active, then return undefined.
auto& associated_document = verify_cast<HTML::Window>(relevant_global_object(*this)).associated_document();
auto& associated_document = as<HTML::Window>(relevant_global_object(*this)).associated_document();
if (!associated_document.is_fully_active())
return JS::js_undefined();