mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 19:38:12 +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
61 changed files with 262 additions and 262 deletions
|
@ -75,7 +75,7 @@ void InlineFormattingContext::run(Box&, LayoutMode layout_mode)
|
|||
containing_block().for_each_child([&](auto& child) {
|
||||
VERIFY(child.is_inline());
|
||||
if (is<Box>(child) && child.is_absolutely_positioned()) {
|
||||
layout_absolutely_positioned_element(downcast<Box>(child));
|
||||
layout_absolutely_positioned_element(verify_cast<Box>(child));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -181,14 +181,14 @@ void InlineFormattingContext::run(Box&, LayoutMode layout_mode)
|
|||
void InlineFormattingContext::dimension_box_on_line(Box& box, LayoutMode layout_mode)
|
||||
{
|
||||
if (is<ReplacedBox>(box)) {
|
||||
auto& replaced = downcast<ReplacedBox>(box);
|
||||
auto& replaced = verify_cast<ReplacedBox>(box);
|
||||
replaced.set_width(compute_width_for_replaced_element(replaced));
|
||||
replaced.set_height(compute_height_for_replaced_element(replaced));
|
||||
return;
|
||||
}
|
||||
|
||||
if (box.is_inline_block()) {
|
||||
auto& inline_block = const_cast<BlockBox&>(downcast<BlockBox>(box));
|
||||
auto& inline_block = const_cast<BlockBox&>(verify_cast<BlockBox>(box));
|
||||
|
||||
if (inline_block.computed_values().width().is_undefined_or_auto()) {
|
||||
auto result = calculate_shrink_to_fit_widths(inline_block);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue