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

Conversation

@cbracken
Copy link
Member

@cbracken cbracken commented Dec 1, 2021

When performing an accessibilty scroll, the default scroll distance is
kSmallScrollIncrement (40 pixels). This value is then multiplied by the
system scale factor, as set in the display settings drop-down in the Windows
system settings.

When we imported the AX tree from Chromium, we hard-coded the system
scale factor to 1.0 due to a fair amount of abstraction of the scale
factor lookup in their code. This fills it back in.

Issue: flutter/flutter#78798

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.

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

@flutter-dashboard

This comment has been minimized.

@cbracken
Copy link
Member Author

cbracken commented Dec 1, 2021

This code is a very thin veneer on Win32 APIs that aren't conveniently mockable. I did break out the enum -> float conversion function so I could move this to a utils file and write a test for that one function.

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

@cbracken
Copy link
Member Author

cbracken commented Dec 1, 2021

Yanked it out into its own utility in third_party/accessibility/base/win/display.h and added a test. I kind of expect we'll eventually want something like this in shell/platform/windows anyway so makes sense to break it out.

When performing an accessibilty scroll, the default scroll distance is
kSmallScrollIncrement (40 pixels). This value is then multiplied by the
system scale factor, as set in the display settings drop-down in the Windows
system settings.

When we imported the AX tree from Chromium, we hard-coded the system
scale factor to 1.0 due to a fair amount of abstraction of the scale
factor lookup in their code. This fills it back in.

Issue: flutter/flutter#78798
@cbracken cbracken merged commit abf6c34 into flutter:main Dec 1, 2021
@cbracken cbracken deleted the scale-factor branch December 1, 2021 20:32
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 1, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 1, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 2, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 2, 2021
zanderso pushed a commit to flutter/flutter that referenced this pull request Dec 2, 2021
* 9b200e1 Roll Dart SDK from 9f61c2487bbd to 3a963ff14181 (7 revisions) (flutter/engine#30011)

* fada035 Use WindowInfoTracker.Companion.getOrCreate instead of the short version (flutter/engine#30012)

* d280475 Non painting platform views (flutter/engine#30003)

* b420c16 [macOS] MacOS Keyboard properly handles multi-char characters (flutter/engine#30005)

* 0a6098b [Win32, keyboard] Fix dead key events that don't have the dead key mask (flutter/engine#30004)

* 8ac9366 Fix sceneElement analysis error (flutter/engine#30038)

* 5ad06c2 Share the io_manager between parent and spawn engine (flutter/engine#29915)

* 69be405 Run Dart VM tasks on the engine's ConcurrentMessageLoop instead the VM's separate thread pool. (flutter/engine#29819)

* c85a129 Roll Dart SDK from 3a963ff14181 to 8bb2e56ec900 (4 revisions) (flutter/engine#30045)

* abf6c34 Eliminate hardcoded scale factor in a11y scroll (flutter/engine#30013)

* d184d9b Roll Skia from fa183572bfd3 to d3399178196e (17 revisions) (flutter/engine#30047)

* 476ed30 Roll web_installers simulators package (flutter/engine#30035)

* 62113c4 Revert dart to 9f61c2487bbd (flutter/engine#30056)
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.

2 participants