Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS: Add @available check at macOS 12 workaround #54784

Merged
merged 1 commit into from
Aug 26, 2024

Conversation

cbracken
Copy link
Member

@cbracken cbracken commented Aug 26, 2024

Use default mouse event handling behaviour on macOS 13.3.1 onwards. This has two positive effects:

  • Avoids the workaround on newer macOS versions where it's unnecessary, thereby giving us confidence that the underlying AppKit issue is fixed and the whole method can later be removed.
  • Will be caught by tooling when we drop support for versions of macOS prior to the fixed version.

Issue: flutter/flutter#154063
Issue: flutter/flutter#115015

No tests modified since there is no semantic change, either on versions of macOS where the issue is fixed (and thus the default event handler is correct) or on versions where it is not (and we still use the workaround).

Re-tested manually with the reduced transparency setting on macOS 14.6.1.

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 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.

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

@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, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!).

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. The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group.

@stuartmorgan
Copy link
Contributor

No tests modified since there is no semantic change

Won't the tests you added for this workaround fail if run on 13.3+?

@cbracken
Copy link
Member Author

Based on the presubmit

No tests modified since there is no semantic change

Won't the tests you added for this workaround fail if run on 13.3+?

Based on the presubmit... yes 😂 Looks like I got some more conditionalising to do.

Use default mouse event handling behaviour on macOS 13.3.1 onwards. This has two positive effects:

* Avoids the workaround on newer macOS versions where it's unnecessary, thereby giving us confident that the underlying AppKit issue is fixed.
* Will be caught by tooling when we drop support for versions of macOS prior to the fixed version.

Issue: flutter/flutter#154063
Issue: flutter/flutter#115015

No tests modified since there is no semantic change, either on versions of macOS where the issue is fixed (and thus the default event handler is correct) or on versions where it is not (and we still use the workaround).

Re-tested manually with the reduced transparency setting on macOS 14.6.1.
@cbracken
Copy link
Member Author

cbracken commented Aug 26, 2024

Conditionalification complete. At least one of various ways I could have done it.

No need for a test exemption cause I've now updated the test.

Copy link
Member

@jmagman jmagman left a comment

Choose a reason for hiding this comment

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

Thanks for following up on this!

@cbracken cbracken added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 26, 2024
@auto-submit auto-submit bot merged commit 8b59622 into flutter:main Aug 26, 2024
29 checks passed
@cbracken cbracken deleted the at-available-check branch August 26, 2024 22:08
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 27, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 27, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Aug 27, 2024
…154172)

flutter/engine@b41ca79...7d751ac

2024-08-27 [email protected] Roll Skia from 9460a3136627 to 7d9054c4317d (1 revision) (flutter/engine#54799)
2024-08-27 [email protected] Roll Fuchsia Test Scripts from oGxqx29_HA1eEBnt9... to vIJGWtHj4Rdku9Ayv... (flutter/engine#54800)
2024-08-27 [email protected] Store a set of layers per view. (flutter/engine#54793)
2024-08-27 [email protected] Roll Skia from 56b353d1674a to 9460a3136627 (2 revisions) (flutter/engine#54798)
2024-08-27 49699333+dependabot[bot]@users.noreply.github.com Bump google/osv-scanner-action from 1.8.3 to 1.8.4 (flutter/engine#54797)
2024-08-27 [email protected] Roll Skia from 78ebd463a911 to 56b353d1674a (1 revision) (flutter/engine#54795)
2024-08-27 [email protected] Use TRUE/FALSE consistently for gboolean values. (flutter/engine#54768)
2024-08-27 [email protected] Roll Skia from c9f157b2cc4c to 78ebd463a911 (1 revision) (flutter/engine#54792)
2024-08-26 [email protected] Roll Skia from 50378c58b60c to c9f157b2cc4c (2 revisions) (flutter/engine#54790)
2024-08-26 [email protected] Disable impeller cmake test until it is fixed (flutter/engine#54788)
2024-08-26 [email protected] macOS: Add @available check at macOS 12 workaround (flutter/engine#54784)
2024-08-26 [email protected] Roll Skia from a05dbd2a60f0 to 50378c58b60c (7 revisions) (flutter/engine#54789)
2024-08-26 [email protected] macOS: Do not archive/upload FlutterMacOS.dSYM to cloud (flutter/engine#54787)

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

To file a bug in Flutter: 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
Buchimi pushed a commit to Buchimi/flutter that referenced this pull request Sep 2, 2024
…lutter#154172)

flutter/engine@b41ca79...7d751ac

2024-08-27 [email protected] Roll Skia from 9460a3136627 to 7d9054c4317d (1 revision) (flutter/engine#54799)
2024-08-27 [email protected] Roll Fuchsia Test Scripts from oGxqx29_HA1eEBnt9... to vIJGWtHj4Rdku9Ayv... (flutter/engine#54800)
2024-08-27 [email protected] Store a set of layers per view. (flutter/engine#54793)
2024-08-27 [email protected] Roll Skia from 56b353d1674a to 9460a3136627 (2 revisions) (flutter/engine#54798)
2024-08-27 49699333+dependabot[bot]@users.noreply.github.com Bump google/osv-scanner-action from 1.8.3 to 1.8.4 (flutter/engine#54797)
2024-08-27 [email protected] Roll Skia from 78ebd463a911 to 56b353d1674a (1 revision) (flutter/engine#54795)
2024-08-27 [email protected] Use TRUE/FALSE consistently for gboolean values. (flutter/engine#54768)
2024-08-27 [email protected] Roll Skia from c9f157b2cc4c to 78ebd463a911 (1 revision) (flutter/engine#54792)
2024-08-26 [email protected] Roll Skia from 50378c58b60c to c9f157b2cc4c (2 revisions) (flutter/engine#54790)
2024-08-26 [email protected] Disable impeller cmake test until it is fixed (flutter/engine#54788)
2024-08-26 [email protected] macOS: Add @available check at macOS 12 workaround (flutter/engine#54784)
2024-08-26 [email protected] Roll Skia from a05dbd2a60f0 to 50378c58b60c (7 revisions) (flutter/engine#54789)
2024-08-26 [email protected] macOS: Do not archive/upload FlutterMacOS.dSYM to cloud (flutter/engine#54787)

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

To file a bug in Flutter: 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects: desktop autosubmit Merge PR when tree becomes green via auto submit App platform-macos
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants