Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: dd0cc81543c22772b348b5d827c8f256437f1ca7
      
https://github.com/WebKit/WebKit/commit/dd0cc81543c22772b348b5d827c8f256437f1ca7
  Author: Lily Spiniolas <[email protected]>
  Date:   2025-11-25 (Tue, 25 Nov 2025)

  Changed paths:
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/dom/Document.h
    M Source/WebCore/dom/EventTarget.h
    M Source/WebCore/html/CheckboxInputType.cpp
    M Source/WebCore/html/HTMLInputElement.cpp
    M Source/WebCore/html/HTMLInputElement.h
    A Source/WebCore/html/HTMLInputElementInlines.h
    M Source/WebCore/html/InputType.cpp
    M Source/WebCore/html/RangeInputType.cpp
    M Source/WebCore/html/shadow/SliderThumbElement.cpp
    M Source/WebCore/html/shadow/SliderThumbElement.h
    M Source/WebCore/style/StyleAdjuster.cpp

  Log Message:
  -----------
  [Site Isolation] Touch event regions are missing for elements which have 
touch handlers but no JS listeners
https://bugs.webkit.org/show_bug.cgi?id=302689
rdar://164939029

Reviewed by Abrar Rahman Protyasha.

Switch controls, slider thumb elements, and elements with unaccelerated 
overflow scrolling all
require synchronous touch event handling but do not have JS listeners. The lack 
of JS listeners
results in us failing to generate touch event regions for these elements.

Fix this issue by introducing a new EventTargetFlag 
`HasInternalTouchEventHandling` which
is set for these elements. In addition to targeting elements based on JS 
listeners in
`Adjuster::computeEventListenerRegionTypes`, we now look for the new 
EventTargetFlag as well.
If present, we add synchronous event listener region types NonPassiveTouchStart,
NonPassiveTouchMove, NonPassiveTouchEnd, & NonPassiveTouchCancel.

In `SliderThumbElement` we no longer check if a renderer is present before 
registering for
touch events. Elements without a renderer will not get an event region in the 
first place.

* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/dom/Document.h:
* Source/WebCore/dom/EventTarget.h:
* Source/WebCore/html/CheckboxInputType.cpp:
(WebCore::CheckboxInputType::disabledStateChanged):
* Source/WebCore/html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::updateTouchEventHandler): Deleted.
* Source/WebCore/html/HTMLInputElement.h:
* Source/WebCore/html/HTMLInputElementInlines.h: Added.
(WebCore::HTMLInputElement::updateTouchEventHandler):
* Source/WebCore/html/InputType.cpp:
(WebCore::InputType::hasTouchEventHandler const):
* Source/WebCore/html/RangeInputType.cpp:
(WebCore::RangeInputType::createShadowSubtree):
* Source/WebCore/html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::willDetachRenderers):
(WebCore::SliderThumbElement::didAttachRenderers):
(WebCore::SliderThumbElement::registerForTouchEvents):
(WebCore::SliderThumbElement::unregisterForTouchEvents):
(WebCore::SliderThumbElement::hostDisabledStateChanged):
(WebCore::SliderThumbElement::shouldAcceptTouchEvents): Deleted.
* Source/WebCore/html/shadow/SliderThumbElement.h:
* Source/WebCore/style/StyleAdjuster.cpp:
(WebCore::Style::Adjuster::computeEventListenerRegionTypes):

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



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

Reply via email to