mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
LibWeb: Remove unnecessary const_casts from TextPaintable
This commit is contained in:
committed by
Andreas Kling
parent
cbe78454fc
commit
e7add9abc6
@@ -36,7 +36,7 @@ TextPaintable::DispatchEventOfSameName TextPaintable::handle_mousedown(Badge<Eve
|
||||
if (!label)
|
||||
return DispatchEventOfSameName::No;
|
||||
const_cast<Layout::Label*>(label)->handle_mousedown_on_label({}, position, button);
|
||||
const_cast<HTML::Navigable&>(*navigable()).event_handler().set_mouse_event_tracking_paintable(this);
|
||||
navigable()->event_handler().set_mouse_event_tracking_paintable(this);
|
||||
return DispatchEventOfSameName::Yes;
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ TextPaintable::DispatchEventOfSameName TextPaintable::handle_mouseup(Badge<Event
|
||||
return DispatchEventOfSameName::No;
|
||||
|
||||
const_cast<Layout::Label*>(label)->handle_mouseup_on_label({}, position, button);
|
||||
const_cast<HTML::Navigable&>(*navigable()).event_handler().set_mouse_event_tracking_paintable(nullptr);
|
||||
navigable()->event_handler().set_mouse_event_tracking_paintable(nullptr);
|
||||
return DispatchEventOfSameName::Yes;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user