Skip to content

css: Determine effective touch-action from the touched element chain; Only apply to spec-allowed elements - #47821

Closed
yezhizhen wants to merge 7 commits into
servo:mainfrom
yezhizhen:touch-multi
Closed

yezhizhen wants to merge 7 commits into
servo:mainfrom
yezhizhen:touch-multi

Conversation

@yezhizhen

@yezhizhen yezhizhen commented Sep 5, 2026 •

Copy link
Copy Markdown
Member
  1. Compute the effective value by intersecting the touched element's touch-action with its ancestors up to the first scroll container, by inject accumulated restriction into hit-test tag, then combine it with the scroll node's own value in the compositor.
  2. Make sure touch-action does not apply to non-replaced inline elements, table rows, row groups, column groups, and columns

Testing:

  1. Only new passing, no new failure.
  2. Updated outdated spec url for a test.

Fixes: #47737
Fixes: #47801

@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Sep 5, 2026
@yezhizhen

yezhizhen commented Sep 5, 2026 •

Copy link
Copy Markdown
Member Author

I tried to do "Only apply to spec-allowed elements" here as well, as we were passing

  • /pointerevents/pointerevent_touch-action-table-none-test_touch.html
  • /pointerevents/pointerevent_touch-action-span-none-test_touch.html
    false positively. If we only do first part, these would go from PASS to FAIL.

This can be reviewed commit by commit.

@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

🤖 Opened new upstream WPT pull request (web-platform-tests/wpt#62483) with upstreamable changes.

@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

✍ Updated existing upstream WPT pull request (web-platform-tests/wpt#62483) title and body.

@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#62483).

@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#62483).

@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#62483).

@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

✍ Updated existing upstream WPT pull request (web-platform-tests/wpt#62483) title and body.

1 similar comment
@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

✍ Updated existing upstream WPT pull request (web-platform-tests/wpt#62483) title and body.

@yezhizhen yezhizhen added the T-ohos Do a try run on OpenHarmony label Sep 7, 2026
@github-actions github-actions Bot removed the T-ohos Do a try run on OpenHarmony label Sep 7, 2026
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

🔨 Triggering try run (#34081372171) for OpenHarmony

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

⚠️ Try run (#34081372171) succeeded with failures of jobs that don't block the Merge Queue. Please check the workflow run for details.

pull Bot pushed a commit to AmirulAndalib/servo that referenced this pull request Sep 7, 2026
…servo#47852)

This should fix the WebDriver Out of Bound Error for Safari
([run](https://staging.wpt.fyi/results/pointerevents?diff&filter=ADC&run_id=5422356349583360&run_id=4684953817186304)),
and prevent it from happening for Servo after
servo#47821. Right now Servo only FAIL but
not ERROR as it ignores `touch-action: none` under certain circumstances
(servo#47737) and scrolls the viewport.

Firefox/Chromium passed without the change as they don't always use
800x600 except for reftests. The approach we take is similar to
web-platform-tests/wpt#48994.

The reason I open this in Servo is that it impacts
servo#47821.

Testing: Screenshot verified with Firefox/Edge.
| Before | After |
| -------- | -------- |
| <img width="1249" height="943" alt="image"
src="https://github.com/user-attachments/assets/6cd472a4-236e-40ea-961e-1bf298eec1dc"
/> | <img width="1244" height="938" alt="image"
src="https://github.com/user-attachments/assets/60687f38-2c42-4a31-b60c-0c442b6a0f3e"
/> |

Fixes: web-platform-tests/wpt#62481

Signed-off-by: Euclid Ye <[email protected]>
@yezhizhen yezhizhen added the T-linux-wpt Do a try run of the WPT label Sep 8, 2026
@github-actions github-actions Bot removed the T-linux-wpt Do a try run of the WPT label Sep 8, 2026
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

🔨 Triggering try run (#34182728596) for Linux (WPT)

@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#62483).

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

⚠️ Try run (#34182728596) failed!

Signed-off-by: Euclid Ye <[email protected]>
@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#62483).

@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

✍ Updated existing upstream WPT pull request (web-platform-tests/wpt#62483) title and body.

RichardTjokroutomo pushed a commit to RichardTjokroutomo/servo that referenced this pull request Oct 6, 2026
…servo#47852)

This should fix the WebDriver Out of Bound Error for Safari
([run](https://staging.wpt.fyi/results/pointerevents?diff&filter=ADC&run_id=5422356349583360&run_id=4684953817186304)),
and prevent it from happening for Servo after
servo#47821. Right now Servo only FAIL but
not ERROR as it ignores `touch-action: none` under certain circumstances
(servo#47737) and scrolls the viewport.

Firefox/Chromium passed without the change as they don't always use
800x600 except for reftests. The approach we take is similar to
web-platform-tests/wpt#48994.

The reason I open this in Servo is that it impacts
servo#47821.

Testing: Screenshot verified with Firefox/Edge.
| Before | After |
| -------- | -------- |
| <img width="1249" height="943" alt="image"
src="https://github.com/user-attachments/assets/6cd472a4-236e-40ea-961e-1bf298eec1dc"
/> | <img width="1244" height="938" alt="image"
src="https://github.com/user-attachments/assets/60687f38-2c42-4a31-b60c-0c442b6a0f3e"
/> |

Fixes: web-platform-tests/wpt#62481

Signed-off-by: Euclid Ye <[email protected]>
@yezhizhen

Copy link
Copy Markdown
Member Author

Trying to redo this with current main.

@yezhizhen yezhizhen closed this Nov 30, 2026
@yezhizhen
yezhizhen deleted the touch-multi branch November 30, 2026 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-awaiting-review There is new code that needs to be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

touch-action should not be applied to all elements touch-action on non-scrollable elements is not intersected properly

3 participants