mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 18:47:44 +00:00
LibWeb: Check paintable of target against null in mousewheel handling
This commit is contained in:
parent
ae7a0c43a9
commit
670bbf24e5
1 changed files with 9 additions and 9 deletions
|
@ -163,6 +163,7 @@ bool EventHandler::handle_mousewheel(CSSPixelPoint position, unsigned button, un
|
||||||
if (auto result = target_for_mouse_position(position); result.has_value())
|
if (auto result = target_for_mouse_position(position); result.has_value())
|
||||||
paintable = result->paintable;
|
paintable = result->paintable;
|
||||||
|
|
||||||
|
if (paintable) {
|
||||||
auto* containing_block = paintable->containing_block();
|
auto* containing_block = paintable->containing_block();
|
||||||
while (containing_block) {
|
while (containing_block) {
|
||||||
if (containing_block->is_user_scrollable()) {
|
if (containing_block->is_user_scrollable()) {
|
||||||
|
@ -172,7 +173,6 @@ bool EventHandler::handle_mousewheel(CSSPixelPoint position, unsigned button, un
|
||||||
containing_block = containing_block->containing_block();
|
containing_block = containing_block->containing_block();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (paintable) {
|
|
||||||
paintable->handle_mousewheel({}, position, buttons, modifiers, wheel_delta_x, wheel_delta_y);
|
paintable->handle_mousewheel({}, position, buttons, modifiers, wheel_delta_x, wheel_delta_y);
|
||||||
|
|
||||||
auto node = dom_node_for_event_dispatch(*paintable);
|
auto node = dom_node_for_event_dispatch(*paintable);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue