mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:48:12 +00:00
LibWeb: Remove hand-rolled is_foo() helpers in Layout::Node classes
This commit is contained in:
parent
3bb0cb2202
commit
07dd73c351
31 changed files with 39 additions and 82 deletions
|
@ -75,7 +75,7 @@ const Gfx::FloatRect LineBoxFragment::absolute_rect() const
|
|||
|
||||
int LineBoxFragment::text_index_at(float x) const
|
||||
{
|
||||
if (!layout_node().is_text())
|
||||
if (!is<TextNode>(layout_node()))
|
||||
return 0;
|
||||
auto& layout_text = downcast<TextNode>(layout_node());
|
||||
auto& font = layout_text.specified_style().font();
|
||||
|
@ -108,7 +108,7 @@ Gfx::FloatRect LineBoxFragment::selection_rect(const Gfx::Font& font) const
|
|||
auto selection = layout_node().root().selection().normalized();
|
||||
if (!selection.is_valid())
|
||||
return {};
|
||||
if (!layout_node().is_text())
|
||||
if (!is<TextNode>(layout_node()))
|
||||
return {};
|
||||
|
||||
const auto start_index = m_start;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue