Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c6c7a1adfa417b5a065e2891b5c64a6484369b1c
      
https://github.com/WebKit/WebKit/commit/c6c7a1adfa417b5a065e2891b5c64a6484369b1c
  Author: Carlos Alberto Lopez Perez <[email protected]>
  Date:   2026-03-26 (Thu, 26 Mar 2026)

  Changed paths:
    A LayoutTests/fast/events/wheel/wheel-event-on-empty-svg-expected.txt
    A LayoutTests/fast/events/wheel/wheel-event-on-empty-svg.html
    M Source/WebCore/rendering/RenderReplaced.cpp

  Log Message:
  -----------
  REGRESSION(309010@main): Wheel events not dispatched to empty SVG root element
https://bugs.webkit.org/show_bug.cgi?id=309779

Reviewed by Nikolas Zimmermann.

309010@main removed the #if ENABLE(INTERACTION_REGIONS_IN_EVENT_REGION) guard 
in RenderReplaced::paint,
applying unconditionally the logic that was previously guarded under that 
macro. And the issue is that
this logic has an "else if" that makes the two branches mutually exclusive: 
either call paintReplaced()
to register the SVG children in the event region, or register the own SVG root.

For a non-empty SVG this works correctly because paintReplaced() iterates over 
children and each child
registers itself. But for an empty SVG without filters, paintReplaced() returns 
early without
registering anything.

So, the combination of these two means that, for an empty SVG root without 
filters, nothing ever gets
added to the event region, making the element invisible to the event system, so 
wheel and scroll events
over it are silently dropped.

Test: fast/events/wheel/wheel-event-on-empty-svg.html

* LayoutTests/fast/events/wheel/wheel-event-on-empty-svg-expected.txt: Added.
* LayoutTests/fast/events/wheel/wheel-event-on-empty-svg.html: Added.
* Source/WebCore/rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::paint):

Canonical link: https://commits.webkit.org/310013@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to