mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +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:
@@ -41,7 +41,7 @@ bool CSSStyleDeclarationWrapper::put(const JS::PropertyName& name, JS::Value val
|
||||
return false;
|
||||
|
||||
ScopeGuard style_invalidation_guard = [&] {
|
||||
auto& declaration = downcast<CSS::ElementInlineCSSStyleDeclaration>(impl());
|
||||
auto& declaration = verify_cast<CSS::ElementInlineCSSStyleDeclaration>(impl());
|
||||
if (auto* element = declaration.element())
|
||||
element->invalidate_style();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user