Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@moffatman
Copy link
Contributor

@moffatman moffatman commented Sep 22, 2022

Add a new discrete event type to represent a one-time zoom/scale, not as part of a wider gesture. Needed to support pinch-to-zoom on web as we cannot determine the start and end of a pinch, so it can't use PointerPanZoom system.

Part of flutter/flutter#112103

Sequence

  1. ui.PointerSignalKind forwards compatibility for scale flutter#112170
  2. This PR
  3. Add PointerScaleEvent and use in InteractiveViewer flutter#112172
  4. Send PointerSignalKind.scale events from web #36348

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides].
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See [testing the engine] for instructions on
    writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the [CLA].
  • All existing and new tests are passing.

Copy link
Contributor

@justinmc justinmc left a comment

Choose a reason for hiding this comment

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

This looks fine to me, but is there a reasonable test that we can add here or do we need a test exemption?

CC @mdebbar It would be nice to have someone who knows more about the web engine review this as well if you have time!

Copy link
Contributor

@dkwingsmt dkwingsmt left a comment

Choose a reason for hiding this comment

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

LGTM

@moffatman
Copy link
Contributor Author

moffatman commented Sep 27, 2022

This looks fine to me, but is there a reasonable test that we can add here or do we need a test exemption?

I just added it to the already-existing tests of PointerSignalEvent, it's only a one line change so not obvious. But that will test that it can be properly handled by the event converter.

@moffatman moffatman added the autosubmit Merge PR when tree becomes green via auto submit App label Sep 27, 2022
@auto-submit auto-submit bot merged commit 9055e71 into flutter:main Sep 27, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 27, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 27, 2022
Oleh-Sv pushed a commit to Oleh-Sv/engine that referenced this pull request Sep 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App embedder Related to the embedder API platform-android platform-web Code specifically for the web engine

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants