-
Notifications
You must be signed in to change notification settings - Fork 6k
Fix missing shcore.dll error on Windows 7 #30699
Conversation
Since shcore.dll is not available on Windows 7, we can't directly link against it. Instead, we perform a runtime lookup of the DLL and the symbol we need and cache a pointer to it. On systems (such as Windows 7) where the DLL is unavailable, we return a scale factor of 100%. Expected behaviour is identical to before, except that since we no longer directly link against shcore.dll, we no longer crash when running on Windows 7. Issue: flutter/flutter#95376
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* 1f60bfc Fix missing shcore.dll error on Windows 7 (flutter/engine#30699) * 4c30367 Roll Fuchsia Mac SDK from G04Sc3__F... to WjrtT4DAB... (flutter/engine#30700) * 2bf6b01 Migrate keyboard_key_handler_unittests to keyboard_win32_unittests (flutter/engine#30615) * ed6868f Update //third_party/glfw from Aug 2016 to Jan 2019 (revision 78e6a006) (flutter/engine#30609) * 7fae72a Roll Skia from 88c5af7ecd72 to 8e6b60f27da3 (3 revisions) (flutter/engine#30703) * b01a5a9 Roll Fuchsia Mac SDK from WjrtT4DAB... to fSRFvvC1c... (flutter/engine#30705) * 63f9190 Roll Skia from 8e6b60f27da3 to f5853ff6525b (1 revision) (flutter/engine#30706) * 7467eac Roll Skia from f5853ff6525b to db2b8eb98f14 (1 revision) (flutter/engine#30708) * 936c3a0 Roll Skia from db2b8eb98f14 to 426f7b5ad606 (2 revisions) (flutter/engine#30710) * 9524ec8 Roll Skia from 426f7b5ad606 to a5d4541ae556 (3 revisions) (flutter/engine#30712) * e8bb686 Roll Skia from a5d4541ae556 to 96e4053be7a5 (3 revisions) (flutter/engine#30714) * d301340 Roll Skia from 96e4053be7a5 to ce49ff6520fa (4 revisions) (flutter/engine#30715) * 38a007d Roll Dart SDK from f59531cc2973 to 5f2c54513b7d (13 revisions) (flutter/engine#30716) * 305dcd5 Roll Skia from ce49ff6520fa to 73657689b6cb (5 revisions) (flutter/engine#30718) * d930dce [web] allow customizing Ahem URL using FontManifest.json (flutter/engine#30719) * a0bbfeb Roll Skia from 73657689b6cb to 72412a86725a (3 revisions) (flutter/engine#30721) * d53b3c2 Fix aot builds in the dart_runner for fuchsia (flutter/engine#30722) * 56816a0 Roll Skia from 72412a86725a to 2f3891bf76f3 (1 revision) (flutter/engine#30723) * 496e055 Roll Dart SDK from 5f2c54513b7d to 8a8fb0972646 (1 revision) (flutter/engine#30725) * 685d220 Bump Robolectric to 4.7.3 (flutter/engine#30437) * f8a8276 Roll Fuchsia Mac SDK from fSRFvvC1c... to cSwk_StnQ... (flutter/engine#30727) * 594238c Revert Dart SDK to f59531cc2973 (flutter/engine#30729)
@devoncarew @itsjustkevin this patch should be cherry-picked to the 2.10 release. |
…0918) * Impl and test (#30488) * Fix missing shcore.dll error on Windows 7 (#30699) * Remove glitch when displaying platform views (#30724) * Win32: Fix Korean text input (#30805) Fixes an issue with Korean IMEs wherein a text input state update may be sent to the framework that misleads the framework into assuming that IME composing has ended. When inputting Korean text, characters are built up keystroke by keystroke until the point that either: * the user presses space/enter to terminate composing and commit the character, or; * the user presses a key such that the character currently being composed cannot be modified further, and the IME determines that the user has begun composing the next character. The following is an example sequence of events for the latter case: 1. User presses ㅂ. GCS_COMPSTR event received with ㅂ. Embedder sends state update to framework. 2. User presses ㅏ. GCS_COMPSTR event received with 바. Embedder sends state update to framework. 3. User presses ㄴ. GCS_COMPSTR event received with 반. Embedder sends state update to framework. 4. User presses ㅏ. At this point, the current character being composed (반) cannot be modified in a meaningful way, and the IME determines that the user is typing 바 followed by 나. GCS_RESULTSTR event received with 바, immediately followed by GCS_COMPSTR event with 나. In step 4, we previously sent two events to the framework, one immediately after the other: * GCS_RESULTSTR triggers the text input model to commit the current composing region to the string under edit. This causes the composing region to collapse to an empty range. * GCS_COMPSTR triggers the text input model to insert the new composing character and set the composing region to that character. Conceptually, this is an atomic operation. The fourth keystroke causes the 반 character to be broken into two (바 and ㄴ) and the latter to be modified to 나. From the user's point of view, as well as from the IME's point of view, the user has NOT stopped composing, and the composing region has simply moved on to the next character. Flutter has no concept of whether the user is composing or not other that whether a non-empty composing region exists. As such, sending a state update after the GCS_RESULTSTR event misleads the framework into believing that composing has ended. This triggers a serious bug: Text fields with input formatters applied do not perform input formatting updates while composing is active; instead they wait until composing has ended to apply any formatting. The previous behaviour would thus trigger input formatters to be applied each time the user input caused a new character to be input. This has the add-on negative effect that once formatting has been applied, it sends an update back to the embedder so that the native OS text input state can be updated. However, since the GCS_RESULTSTR event is _immediately_ followed by a GCS_COMPSTR, the state has changed in the meantime, and the embedder is left processing an update (the intermediate state sent after the GCS_RESULTSTR) which is now out of date (i.e. missing the new state from the GCS_COMPSTR event). Since GCS_RESULTR events are always immediately followed by a subsequent GCS_COMPSTR (in the case where composing continues) or a WM_IME_ENDCOMPOSITION (in the case where composing is finished), and because the event handlers for both of those send updated state to the framework, this change eliminates sending the (intermediate) state in response to GCS_COMPSTR events. Issue: flutter/flutter#96209 (full fix) Issue: flutter/flutter#88645 (partial fix) * Ensure that PlatformViewIOS does not call into Shell semantics APIs during destruction (#30835) * Ensure that PlatformViewIOS does not call into Shell semantics APIs during destruction (#30835) Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com> Co-authored-by: Chris Bracken <chris@bracken.jp> Co-authored-by: Emmanuel Garcia <egarciad@google.com> Co-authored-by: Jason Simmons <jason-simmons@users.noreply.github.com>
Since shcore.dll is not available on Windows 7, we can't directly link
against it. Instead, we perform a runtime lookup of the DLL and the
symbol we need and cache a pointer to it. On systems (such as Windows 7)
where the DLL is unavailable, we return a scale factor of 100%.
Expected behaviour is identical to before, except that since we no
longer directly link against shcore.dll, we no longer crash when running
on Windows 7. We do not currently have Windows 7 testing on the bots due
due to its status as tested by the community,
but if we do add Windows 7 bots, our launch test is sufficient to catch
this.
The issue this fixes was introduced in: #30013
Issue: flutter/flutter#95376
Pre-launch Checklist
writing and running engine tests.
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.