In MakeSkSurfaceFromBackingStore and other places in embedder.cc, we
call a texture or framebuffer destruction callback without first
verifying it's non-null. This adds a check before such calls.
Currently fl_renderer_gl_create_backing_store() in the Linux GTK
embedder and ExternalTextureGL::PopulateTexture() in the Windows
embedder either explicitly or implicitly set a null destruction
callback.
This prevents a crash reported when running under OpenGL ES 2.0 reported
in https://github.com/flutter/flutter/issues/76881.
While this prevents the crash, it does not fix the underlying issue.
Corrects uses of setup as a verb to 'set up', leaves noun/noun-phrase
forms of setup as 'setup'. Also settles on 'teardown' as opposed to
tear-down for consistency across the codebase.
A few other minor comment/wording corrections.
This moves tooling related to the creation of the Android embedding
bundle CIPD package under tools/cipd. Having a single location for CIPD
package creation tooling avoids spreading these around the tree and aids
in discovery.
This does not change the path within the CIPD package repo, nor does it
change the path to which we download it via gclient as specified in the
DEPS file.
This will be followed by a patch to add a new Windows CIPD package
necessary for UWP builds.
This change fixes a bug in Korean input whereby WM_IME_COMPOSITION
messages of type GCS_RESULTSTR were assumed to end composing mode.
This change breaks out an additional handler for "commit composing text"
events. In Japanese/Chinese IMEs, these events typically occur on
selection of a candidate from the candidates list and are mostly
synonymous with an "end composing" event.
In Korean text input, there is no candidates list, but rather a
character is built up as keypresses are handled, and committed as soon
as the character is unambiguously complete; in other words, when either
space/return is pressed or a keypress is received that cannot be
interpreted as a modification of the character being composed and
therefore must be the first keystroke of a new character. In these
cases, we want to commit the previous character without ending the
composition.
To illustrate with an example:
1. User focuses on a text field and sets input mode to Hangul.
2. User presses 'ㄱ'. Composing region contains 'ㄱ'.
3. User presses 'ㅏ'. Composing region is updated to '가'.
4. User presses 'ㄴ'. Composing region is updated to '간'.
5. User presses 'ㅏ'. Result string '가' is committed. Composing region is
updated to '나'.
6. User presses 'ㄷ'. Composing string is updated to '낟'.
7. User presses 'ㅏ'. Result string '나' is committed. Composing region is
updated to '다'.
8. User presses space or enter. Result string '다' is committed.
Composing is ended.
On a non-Korean QWERTY keyboard the following key mappings serve to
perform the above input:
* r -> ㄱ
* k -> ㅏ
* s -> ㄴ
* e -> ㄷ
To support the above, we break out a separate "commit composing" method
and commit on WM_IME_COMPOSITION events of type GCS_RESULTSTR and end
composing on WM_IME_ENDCOMPOSITION events. Further, we eliminate the
workaround in the GCS_RESULTSTR handler for continued composition on
Chinese/Japanese IMEs now that we're no longer ending composition on
that event type.
Under shell/platform/windows, we have a mix of two naming schemes:
* foo_bar_win32.h
* win32_foo_bar.h
This renames files and identifiers to consistently use a Win32
suffix-based approach.
The handlers for the TextInput.setMarkedTextRect and
TextInput.setEditableSizeAndTransform in the win32 embedding deal in
Flutter root view co-ordinates. These need to be converted to window
co-ordinates before being passed to the TextInputManager, which deals in
Win32 window co-ordinates.
This fixes a bug wherein the IME candidates window for CJK input was
incorrectly positioned at display scales other than 100% in the OS
settings.
Fixes: https://github.com/flutter/flutter/issues/76902
This replaces the custom Obj-C TextInputModel implementation used on
macOS with the common C++ implementation used on Linux and Windows. Note
that as a side-effect, this change enables *some* direct IME input for
CJK input but full input will land in follow-up patches that land:
1. Add handling for TextInput.setMarkedTextRect message
2. Add handling for TextInput.setEditableSizeAndTransform message
3. Implement firstRectForCharacterRange:actualRange: using the above.
4. Add NSTextInputContext handling.