Skip to content

Test wheel scrolling in WebView(content:) and mark phase 1 done - #8

Merged
colemancda merged 2 commits into
masterfrom
feature/web-view-wheel-test
Nov 23, 2026
Merged

colemancda merged 2 commits into
masterfrom
feature/web-view-wheel-test

Conversation

@colemancda

Copy link
Copy Markdown
Member

Closes out phase 1 of the plan: the last thing it asked for, scrolling with the wheel, now has a test. The plan marks the phase done.

The wheel test

WebViewTests.scrollsThePageWithTheWheel hosts WebView(content:) over a 5,000-point page in a Cacao ViewGraph, then sends wheel input through graph.externalScroll:

  • One notch toward the user scrolls the page down by exactly one notch (WebInput.notch, 40 points).
  • One notch the other way scrolls it back to 0.

It reads window.scrollY from the page itself, so it checks the whole path: Cacao's scroll routing to the surface, WebInput's mapping, and WPE's scrolling.

The plan

Testing

On aarch64 Debian 13, Swift 6.4.2, WPE 2.48.3 (LinuxAppRuntime's development image):

  • WebViewTests passed three runs in a row, and all 62 tests pass.
  • ExampleWeb, bundled with AppRuntime's guest.py for linux-arm64, ran in LinuxAppRuntime's linux-app-host from master. A screenshot 10 seconds in shows swift.org drawn in the WebView, the address field at https://www.swift.org/ after the redirect, and the page's title in the app's UI.
  • Not tested: x86_64, and a wheel event from a real SDL window rather than one sent into the view graph. The headless runner has no way to inject input; getting SDL's wheel into the view graph is covered by Cacao's own tests.

A notch through Cacao's view graph moves the page by a notch's points, and
one the other way brings it back.
ExampleWeb runs in linux-app-host over this package, and the wheel scrolls.
@colemancda
colemancda merged commit 76c5e41 into master Nov 23, 2026
@colemancda
colemancda deleted the feature/web-view-wheel-test branch November 23, 2026 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant