Skip to content

fix a PlatformView gesture bug - #84257

Merged
fluttergithubbot merged 2 commits into
flutter:masterfrom
xu-baolin:0609view
Jun 11, 2021
Merged

fluttergithubbot merged 2 commits into
flutter:masterfrom
xu-baolin:0609view

Conversation

@xu-baolin

@xu-baolin xu-baolin commented Jun 9, 2021 •

Copy link
Copy Markdown
Member

Continue work of #82013

Fixes #69431

@flutter-dashboard flutter-dashboard Bot added the framework flutter/packages/flutter repository. See also f: labels. label Jun 9, 2021
@google-cla google-cla Bot added the cla: yes label Jun 9, 2021
@xu-baolin

Copy link
Copy Markdown
Member Author

CC @blasten @dkwingsmt

@blasten
blasten self-requested a review June 9, 2021 16:26
_pointerData(ui.PointerChange.move, const Offset(10, 10), pointer: 1, kind: PointerDeviceKind.touch),
_pointerData(ui.PointerChange.remove, const Offset(10, 10), pointer: 1, kind: PointerDeviceKind.touch),
]));
async.flushMicrotasks();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

does this test need to expect something?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

According to the original issue, it does not need to expect anything, but only not throw any errors. I usually include the following line for such cases:

// Passes if no crashes.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

pointerProperties.clear();
usedAndroidPointerIds.clear();
downTimeMillis = null;
_remove(event.pointer);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

a comment would be helpful: "pointer cancel is handled like pointer up. Normally, the difference is that pointer cancel doesn't perform any action, but in this case neither up or cancel perform any action".


}, skip: isBrowser); // TODO(yjbanov): fails on Web with obscured stack trace: https://github.com/flutter/flutter/issues/42770

// Regression test for https://github.com/flutter/flutter/issues/69431

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

did you confirm that reverting the changes in platform_views.dart causes this test to fail?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes,this can reproduce the issue.

@blasten blasten left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

@Piinks Piinks added e: device-specific Only manifests on certain devices f: gestures flutter/packages/flutter/gestures repository. labels Jun 10, 2021
@xu-baolin

Copy link
Copy Markdown
Member Author

Try to land to the master branch.

@xster

xster commented Jun 11, 2021

Copy link
Copy Markdown
Contributor

Awesome work! Thank you @xu-baolin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

e: device-specific Only manifests on certain devices f: gestures flutter/packages/flutter/gestures repository. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[engine] Three (or more) finger gestures on certain widgets make app unusable

6 participants