<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>309019</bug_id>
          
          <creation_ts>2026-03-02 16:26:53 -0800</creation_ts>
          <short_desc>REGRESSION(308215@main): [iOS] imported/w3c/web-platform-tests/dom/events/scrolling/scrollend-event-fired-for-programmatic-scroll.html?include=root-scrollBy-auto is a flaky text failure</short_desc>
          <delta_ts>2026-04-02 15:06:51 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Scrolling</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=311235</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Diego De La Toba">d_delatoba</reporter>
          <assigned_to name="Diego De La Toba">d_delatoba</assigned_to>
          <cc>simon.fraser</cc>
    
    <cc>webkit-bot-watchers-bugzilla</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2186307</commentid>
    <comment_count>0</comment_count>
    <who name="Diego De La Toba">d_delatoba</who>
    <bug_when>2026-03-02 16:26:53 -0800</bug_when>
    <thetext>imported/w3c/web-platform-tests/dom/events/scrolling/scrollend-event-fired-for-programmatic-scroll.html?include=root-scrollBy-auto is a flaky text failure on iOS


HISTORY:
https://results.webkit.org/?suite=layout-tests&amp;test=imported%2Fw3c%2Fweb-platform-tests%2Fdom%2Fevents%2Fscrolling%2Fscrollend-event-fired-for-programmatic-scroll.html%3Finclude%3Droot-scrollBy-auto


DIFF:
--- /Volumes/Data/worker/Apple-iOS-26-Simulator-Release-WK2-Tests/build/layout-test-results/imported/w3c/web-platform-tests/dom/events/scrolling/scrollend-event-fired-for-programmatic-scroll_include=root-scrollBy-auto-expected.txt
+++ /Volumes/Data/worker/Apple-iOS-26-Simulator-Release-WK2-Tests/build/layout-test-results/imported/w3c/web-platform-tests/dom/events/scrolling/scrollend-event-fired-for-programmatic-scroll_include=root-scrollBy-auto-actual.txt
@@ -1,3 +1,3 @@
 
-PASS Tests scrollend event for calling scrollBy with behavior &apos;auto&apos; on root.
+FAIL Tests scrollend event for calling scrollBy with behavior &apos;auto&apos; on root. assert_equals: HTML.scrollBy scrollLeft expected 200 but got 0
 

DIFF URL:
https://build.webkit.org/results/Apple-iOS-26-Simulator-Release-WK2-Tests/308467%40main%20(1971)/imported/w3c/web-platform-tests/dom/events/scrolling/scrollend-event-fired-for-programmatic-scroll_include=root-scrollBy-auto-pretty-diff.html


REPRODUCTION:
I was able to reproduce on iOS 26.2 with the following:

run-webkit-tests --no-build --no-retry --no-show-results --exit-after-n-failures=1 --expect-pass --iterations=1000 --force --ios-simulator --release imported/w3c/web-platform-tests/dom/events/scrolling/scrollend-event-fired-for-programmatic-scroll.html

I am going to mark expectations as pass fail while this pends investigation</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2186308</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2026-03-02 16:26:58 -0800</bug_when>
    <thetext>&lt;rdar://problem/171569422&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2186310</commentid>
    <comment_count>2</comment_count>
    <who name="Diego De La Toba">d_delatoba</who>
    <bug_when>2026-03-02 16:33:25 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/59750</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2186313</commentid>
    <comment_count>3</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2026-03-02 16:35:30 -0800</bug_when>
    <thetext>Test gardening commit 308493@main (81731012a37e): &lt;https://commits.webkit.org/308493@main&gt;

Reviewed commits have been landed. Closing PR #59750 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2195750</commentid>
    <comment_count>4</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2026-03-31 17:31:04 -0700</bug_when>
    <thetext>This happens because we get into WebPage::updateVisibleContentRects() when ViewUpdateDispatcher::visibleContentRectUpdate() fires, which is unpredictable, and that does not go through the logic in RemoteScrollingCoordinator::scrollUpdateForNode() that suppresses user scrolls while a programmatic scroll response is pending.

The base issue here is that we lose the user/programmatic distinction for root scroller changes coming in via VisibleContentRects on iOS.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2196390</commentid>
    <comment_count>5</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2026-04-02 15:06:51 -0700</bug_when>
    <thetext>Even if we make ViewUpdateDispatcher more deterministic (pulling update rects at the start of each rendering update), things are still non-deterministic because of how the UI process batches `-[WKWebView _updateVisibleContentRects]` on a per CoreAnimation commit basis.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>