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 Jun 28, 2021

iPadOS 13.4 introduced improved cursor support, including native support for more pointer "buttons" than the default. There is also a change needed to the framework to avoid adding the default button to iPad right-clicks (link tba).

flutter/flutter#55809

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@moffatman moffatman changed the title [incomplete] Support right-clicking on iPadOS Support right-clicking on iPadOS Jul 1, 2021
@chinmaygarde
Copy link
Member

cc @gaaclarke

Copy link
Member

@gaaclarke gaaclarke left a comment

Choose a reason for hiding this comment

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

Outstanding contribution, thanks! I just have a few nits/questions, otherwise LGTM.

self.continueAfterFailure = NO;
}

#ifdef __IPHONE_15_0
Copy link
Member

Choose a reason for hiding this comment

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

I don't think you want conditional compilation here, you want runtime checks like you have below.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure this will compile on Xcode 12 without this conditional, since supportsPointerInteraction was only introduced in the Xcode 13 beta.

Copy link
Member

@gaaclarke gaaclarke Jul 2, 2021

Choose a reason for hiding this comment

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

If you want to do that use #if (defined (__IPHONE_15_0) && __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_15_0) then. We don't just care that the SDK has it, but that the target platform has it.

edit: nevermind, LGTM, sdk version is the same thing as running environment for tests.

Copy link
Member

Choose a reason for hiding this comment

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

A comment wouldn't hurt, a runtime check with respondsToSelector would be a bit more apparent and easier to maintain, but a comment will be good enough.


#ifdef __IPHONE_15_0
- (void)testPointerButtons {
if (@available(iOS 15, *)) {
Copy link
Member

Choose a reason for hiding this comment

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

How come this is asking for iOS 15 when the implementation check is for iOS 13.4?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

While the pointer/trackpad features on iPad came out in iPadOS 13.4, synthesizing those events in XCTest wasn't supported until this year's new Xcode/iPadOS beta releases.

Copy link
Member

Choose a reason for hiding this comment

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

You aren't synthesizing any events here though, right? At the least please add a comment, preferably one that points to the API that is being used that requires ios 15.

Copy link
Member

@gaaclarke gaaclarke left a comment

Choose a reason for hiding this comment

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

I'm going to approve this and trust you to put the comments in the code so someone else can just hit the merge button. I'll be out of office for awhile and don't want you to get blocked or have to go through review again.

@gaaclarke
Copy link
Member

Or better yet, I have a spare moment. I'll land this and just do the quick clean up in a follow up PR so that you're off the hook. Thanks for the contribution.

@gaaclarke gaaclarke merged commit cb1c312 into flutter:master Jul 2, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 2, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 2, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 2, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 2, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 2, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 2, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 3, 2021
bdero pushed a commit to flutter/flutter that referenced this pull request Jul 3, 2021
* e94ed1c [web] skip overlay test on Safari (flutter/engine#27114)

* 6b92842 Roll Skia from 1c467774e56e to e9ab391765c7 (1 revision) (flutter/engine#27143)

* 0977906 Update goldens test for Thai. (flutter/engine#27144)

* 4ec5781 [web] replace browser-related conditional logic with BrowserEnvironment (flutter/engine#27084)

* 05ce70e enable DisplayList by default (flutter/engine#27130)

* e3357d2 Roll Fuchsia Mac SDK from jzKy-rCeR... to oiyYFMOd3... (flutter/engine#27145)

* cb1c312 Support right-clicking on iPadOS (flutter/engine#27019)

* 4ac4e5c Roll Fuchsia Linux SDK from 4MLcvcjCH... to QbIpQIqxK... (flutter/engine#27146)

* e6250f7 Roll Skia from e9ab391765c7 to 04d79fc59488 (1 revision) (flutter/engine#27148)

* 2dacffa Revert "enable DisplayList by default (#27130)" (flutter/engine#27153)
@gw280 gw280 removed the needs tests label Jul 20, 2021
moffatman added a commit to moffatman/engine that referenced this pull request Aug 5, 2021
naudzghebre pushed a commit to naudzghebre/engine that referenced this pull request Sep 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants