mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 23:09:08 +00:00
AK: Rename downcast<T> => verify_cast<T>
This makes it much clearer what this cast actually does: it will VERIFY that the thing we're casting is a T (using is<T>()).
This commit is contained in:
parent
6215a9c2cb
commit
ee3a73ddbb
Notes:
sideshowbarker
2024-07-18 11:34:11 +09:00
Author: https://github.com/awesomekling
Commit: ee3a73ddbb
61 changed files with 262 additions and 262 deletions
|
@ -84,7 +84,7 @@ RefPtr<HTMLTableSectionElement> HTMLTableElement::t_head()
|
|||
{
|
||||
for (auto* child = first_child(); child; child = child->next_sibling()) {
|
||||
if (is<HTMLTableSectionElement>(*child)) {
|
||||
auto table_section_element = &downcast<HTMLTableSectionElement>(*child);
|
||||
auto table_section_element = &verify_cast<HTMLTableSectionElement>(*child);
|
||||
if (table_section_element->tag_name() == TagNames::thead)
|
||||
return table_section_element;
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ DOM::ExceptionOr<void> HTMLTableElement::set_t_head(HTMLTableSectionElement& the
|
|||
if (is<HTMLTableCaptionElement>(*child))
|
||||
continue;
|
||||
if (is<HTMLTableColElement>(*child)) {
|
||||
auto table_col_element = &downcast<HTMLTableColElement>(*child);
|
||||
auto table_col_element = &verify_cast<HTMLTableColElement>(*child);
|
||||
if (table_col_element->tag_name() == TagNames::colgroup)
|
||||
continue;
|
||||
}
|
||||
|
@ -141,7 +141,7 @@ NonnullRefPtr<HTMLTableSectionElement> HTMLTableElement::create_t_head()
|
|||
if (is<HTMLTableCaptionElement>(*child))
|
||||
continue;
|
||||
if (is<HTMLTableColElement>(*child)) {
|
||||
auto table_col_element = &downcast<HTMLTableColElement>(*child);
|
||||
auto table_col_element = &verify_cast<HTMLTableColElement>(*child);
|
||||
if (table_col_element->tag_name() == TagNames::colgroup)
|
||||
continue;
|
||||
}
|
||||
|
@ -168,7 +168,7 @@ RefPtr<HTMLTableSectionElement> HTMLTableElement::t_foot()
|
|||
{
|
||||
for (auto* child = first_child(); child; child = child->next_sibling()) {
|
||||
if (is<HTMLTableSectionElement>(*child)) {
|
||||
auto table_section_element = &downcast<HTMLTableSectionElement>(*child);
|
||||
auto table_section_element = &verify_cast<HTMLTableSectionElement>(*child);
|
||||
if (table_section_element->tag_name() == TagNames::tfoot)
|
||||
return table_section_element;
|
||||
}
|
||||
|
@ -228,7 +228,7 @@ NonnullRefPtr<HTMLTableSectionElement> HTMLTableElement::create_t_body()
|
|||
if (!is<HTMLElement>(*child))
|
||||
continue;
|
||||
if (is<HTMLTableSectionElement>(*child)) {
|
||||
auto table_section_element = &downcast<HTMLTableSectionElement>(*child);
|
||||
auto table_section_element = &verify_cast<HTMLTableSectionElement>(*child);
|
||||
if (table_section_element->tag_name() == TagNames::tbody) {
|
||||
// We have found an element which is a <tbody> we'll insert after this
|
||||
child_to_append_after = child->next_sibling();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue