1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:07:34 +00:00

LibWeb: Add non-const version of paintable_box() in DOM::Node

This commit is contained in:
Aliaksandr Kalenik 2023-08-07 00:59:23 +02:00 committed by Andreas Kling
parent 6868ace8f4
commit c985a1b2af
5 changed files with 16 additions and 6 deletions

View file

@ -134,14 +134,14 @@ Painting::PaintableBox* EventHandler::paint_root()
{
if (!m_browsing_context->active_document())
return nullptr;
return const_cast<Painting::PaintableBox*>(m_browsing_context->active_document()->paintable_box());
return m_browsing_context->active_document()->paintable_box();
}
Painting::PaintableBox const* EventHandler::paint_root() const
{
if (!m_browsing_context->active_document())
return nullptr;
return const_cast<Painting::PaintableBox*>(m_browsing_context->active_document()->paintable_box());
return m_browsing_context->active_document()->paintable_box();
}
bool EventHandler::handle_mousewheel(CSSPixelPoint position, unsigned button, unsigned buttons, unsigned int modifiers, int wheel_delta_x, int wheel_delta_y)