Skip to content

Conversation

@hellohuanlin
Copy link
Contributor

@hellohuanlin hellohuanlin commented Dec 10, 2025

This is a follow up PR to this original PR.

The difference is the API - the original PR chooses Option 1 in the design doc, while this PR chooses Option 3.

Usage

To directly use flutter API, just pass in the policy when creating UiKitView widget.

UiKitView(
  ...
  gestureBlockingPolicy: UiKitViewGestureBlockingPolicy)
  ...
)

For plugins, we need to update plugins to use this new API.

WebView(
  ...
  gestureBlockingPolicy: UiKitViewGestureBlockingPolicy
) {
  return UiKitView(
    ..
    gestureBlockingPolicy: gestureBlockingPolicy
  )
}

For more information, refer to the old PR.

List which issues are fixed by this PR. You must list at least one issue. An issue is not required if the PR fixes something trivial like a typo.

#175099
#165787

If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

@github-actions github-actions bot added platform-ios iOS applications specifically framework flutter/packages/flutter repository. See also f: labels. engine flutter/engine related. See also e: labels. a: accessibility Accessibility, e.g. VoiceOver or TalkBack. (aka a11y) platform-fuchsia Fuchsia code specifically f: gestures flutter/packages/flutter/gestures repository. team-ios Owned by iOS platform team labels Dec 10, 2025
@hellohuanlin
Copy link
Contributor Author

I'm still fixing some tests, but this should be ready for review.

@hellohuanlin hellohuanlin marked this pull request as ready for review December 10, 2025 22:37
@hellohuanlin hellohuanlin requested a review from a team as a code owner December 10, 2025 22:37
@hellohuanlin hellohuanlin force-pushed the pv_hit_test_option_3_directly branch from c840bd8 to 467ab3f Compare December 11, 2025 22:45
Copy link
Contributor

@chunhtai chunhtai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hellohuanlin
Copy link
Contributor Author

hellohuanlin commented Dec 11, 2025

@loic-sharma updated all flutter::PointData& touch_began_location to flutter::PointData touch_began_location as suggested (removed &)

Copy link
Member

@loic-sharma loic-sharma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work!

@jmagman jmagman added the autosubmit Merge PR when tree becomes green via auto submit App label Dec 12, 2025
@auto-submit auto-submit bot added this pull request to the merge queue Dec 12, 2025
Merged via the queue into flutter:master with commit 87d1589 Dec 12, 2025
180 of 181 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Dec 12, 2025
@hellohuanlin hellohuanlin added the cp: beta cherry pick this pull request to beta release candidate branch label Dec 12, 2025
flutteractionsbot pushed a commit to flutteractionsbot/flutter that referenced this pull request Dec 12, 2025
flutter#179659)

This is a follow up PR to [this original
PR](flutter#177859).

The difference is the API - the original PR chooses Option 1 [in the
design
doc](https://docs.google.com/document/d/1ag4drAdJsR7y-rQZkqJWc6tOQ4qCbflQSGyoxsSC6MM/edit?tab=t.0),
while this PR chooses Option 3.

## Usage

To directly use flutter API, just pass in the policy when creating
UiKitView widget.

```
UiKitView(
  ...
  gestureBlockingPolicy: UiKitViewGestureBlockingPolicy)
  ...
)
```

For plugins, we need to update plugins to use this new API. 

```
WebView(
  ...
  gestureBlockingPolicy: UiKitViewGestureBlockingPolicy
) {
  return UiKitView(
    ..
    gestureBlockingPolicy: gestureBlockingPolicy
  )
}
```
For more information, refer to [the old
PR](flutter#177859).



*List which issues are fixed by this PR. You must list at least one
issue. An issue is not required if the PR fixes something trivial like a
typo.*


flutter#175099
flutter#165787

*If you had to change anything in the [flutter/tests] repo, include a
link to the migration guide as per the [breaking change policy].*

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 12, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 12, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 12, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 12, 2025
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Dec 12, 2025
flutter/flutter@e25d71b...6e1aa82

2025-12-12 [email protected] Add documentation for what to do when bumping the minimum sdk version supported by flutter (flutter/flutter#179795)
2025-12-12 [email protected] Roll Skia from ee08571bbf67 to e66816c3645e (2 revisions) (flutter/flutter#179792)
2025-12-12 [email protected] Roll Packages from 36383d6 to 0ac7a03 (1 revision) (flutter/flutter#179793)
2025-12-12 [email protected] Roll Fuchsia Linux SDK from QssSL8DkxIbMvf89C... to fppT9ZrwbFx7iYrIh... (flutter/flutter#179785)
2025-12-12 [email protected] Roll Skia from 4251aa7454da to ee08571bbf67 (1 revision) (flutter/flutter#179783)
2025-12-12 [email protected] Roll Skia from 344ff9c41fb6 to 4251aa7454da (2 revisions) (flutter/flutter#179779)
2025-12-12 [email protected] Fix draggable scrollable sheet example drag speed is off  (flutter/flutter#179179)
2025-12-12 [email protected] [ios][pv] accept/reject gesture based on hitTest (with new widget API) (flutter/flutter#179659)
2025-12-12 [email protected] Roll Skia from 7ad91f64b468 to 344ff9c41fb6 (1 revision) (flutter/flutter#179774)
2025-12-12 [email protected] [fuchsia] temporarily disable touch-input-test due to the flakiness (flutter/flutter#179747)
2025-12-12 [email protected] Roll Skia from 979b7ae09145 to 7ad91f64b468 (6 revisions) (flutter/flutter#179770)
2025-12-12 [email protected] Exit with code 1 when calling `flutter build` without arguments (flutter/flutter#175900)
2025-12-12 [email protected] [ Tool ] Assemble: "Improper" validation error when dealing with base64 encoded dart-define value  (flutter/flutter#178737)
2025-12-12 98614782+auto-submit[bot]@users.noreply.github.com Reverts "[ Analysis ] Added initial implementation of the `flutter_analyzer_plugin` (#175679)" (flutter/flutter#179766)
2025-12-11 [email protected] Add 3.38.5 changelog (flutter/flutter#179750)
2025-12-11 [email protected] Roll Dart SDK from 3d4b989bdc41 to 9a65db770758 (2 revisions) (flutter/flutter#179746)
2025-12-11 [email protected] fix: fresh install of windows support (flutter/flutter#179720)
2025-12-11 [email protected] [ Analysis ] Added initial implementation of the `flutter_analyzer_plugin` (flutter/flutter#175679)
2025-12-11 [email protected] Roll Skia from d570e2317110 to 979b7ae09145 (4 revisions) (flutter/flutter#179742)
2025-12-11 [email protected] chore: linux fuchsia tests are flaking (flutter/flutter#179744)
2025-12-11 [email protected] Roll Packages from 74a5a53 to 36383d6 (4 revisions) (flutter/flutter#179740)
2025-12-11 [email protected] Revert "Android implementation of content sizing" (flutter/flutter#179698)
2025-12-11 [email protected] [skia] Disable legacy image decoders (flutter/flutter#179277)
2025-12-11 [email protected] Roll Skia from deb0153719dd to d570e2317110 (2 revisions) (flutter/flutter#179734)
2025-12-11 [email protected] Roll Dart SDK from dbcb567e2432 to 3d4b989bdc41 (1 revision) (flutter/flutter#179733)
2025-12-11 [email protected] Roll Fuchsia Linux SDK from u5vxWTRT0HlxOP5_r... to QssSL8DkxIbMvf89C... (flutter/flutter#179729)
2025-12-11 [email protected] Roll Skia from 59c6cad539f7 to deb0153719dd (2 revisions) (flutter/flutter#179721)
2025-12-11 [email protected] Roll Dart SDK from 077062c5e515 to dbcb567e2432 (2 revisions) (flutter/flutter#179715)
2025-12-11 [email protected] Use kPreventOverdraw for arcs with overlapping stroke caps (flutter/flutter#179312)
2025-12-11 [email protected] Roll Skia from e61cc6d073fd to 59c6cad539f7 (22 revisions) (flutter/flutter#179714)
2025-12-10 [email protected] Reland: Add framework-side hitTestBehavior support to Semantics (#178817) (flutter/flutter#179352)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
hellohuanlin added a commit to hellohuanlin/flutter that referenced this pull request Dec 15, 2025
github-merge-queue bot pushed a commit that referenced this pull request Dec 16, 2025
#179895)

…dget API) (#179659)"

This reverts commit 87d1589.

*Replace this paragraph with a description of what this PR is changing
or adding, and why. Consider including before/after screenshots.*

We found a quick fix ([PR
here](#179908)), so revert it and
revisit `hitTest` later.

*List which issues are fixed by this PR. You must list at least one
issue. An issue is not required if the PR fixes something trivial like a
typo.*

NA

*If you had to change anything in the [flutter/tests] repo, include a
link to the migration guide as per the [breaking change policy].*

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: accessibility Accessibility, e.g. VoiceOver or TalkBack. (aka a11y) cp: beta cherry pick this pull request to beta release candidate branch engine flutter/engine related. See also e: labels. f: gestures flutter/packages/flutter/gestures repository. framework flutter/packages/flutter repository. See also f: labels. platform-fuchsia Fuchsia code specifically platform-ios iOS applications specifically platform-web Web applications specifically team-ios Owned by iOS platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants