This breaks linting on other targets that include skia headers that do
ifdef checks on SK_VULKAN.
This reverts commit 25d8fa5a79cb0228e639601822598ada49695ff6.
This re-lands #21163, which was reverted in #21513
Now that flutter/flutter#67359 has landed, this change will no longer cause spaces (and other shortcuts) to be ignored in text fields if there is no action associated with the intent, even if there is a shortcut key mapping to an intent.
Here's the original PR description:
This switches from using dispatchKeyEvent to using dispatchKeyEventPreIme so that keys can be intercepted before they reach the IME and be handled by the framework.
It also now intercepts key events sent to InputConnection.sendKeyEvent, as some IMEs do (e.g. the Hacker's Keyboard), and sends the to Flutter before sending them to the IME (which it now only does if they are not handled by the framework).
This fixes the problem where pressing TAB on a hardware keyboard sends the tab to both the text field and to the focus traversal system.
Note that we still can't intercept all keystrokes given to a soft keyboard, only those which the soft keyboard decides to send to InputConnection.sendKeyEvent.
* Workaround for canvas element lacking support for 3d setTransform
* update golden test
* Add webkit workaround
* Implement DOM rendering for perspective
* cleanup
* update goldens lock
* Add check for shader and filtermask for dom use
* Fix svg viewBox. Move zIndex check to bitmap canvas
* Fix null check warning
* Fix scene_builder zIndex=-1 test to force canvas usage
* Add blendmode handling for DOM mode
* Update maxdiff and golden locks
* Remove unused import
* Add drawcolor/drawpaint test. Fix bounds for drawColor/drawPaint
* update golden locks
* adjust drawColor for dpr
* Update test to use canvas
* Fix toDataUrl NNBD
* Update Picture.toImage to use canvas to obstain image data
* Remove write:true from golden calls
* Add fill-rule for _pathToSvgElement
* Update golden locks
* Fix sceneBuilder pushClip / add missing clipBehaviour
* Fix test now that clipping works correctly
* move overflow handling for tests into DOMClip.addOverflow
* Add clipRect to test to keep render inside bitmap canvas area
* Update compositing test, fix drawColor coordinates
* update golden locks
* Skip test for matchGolden infra fail
* update golden lock
* merge
* update maxdiff for text over canvas
* update golden diff
* update paint spread bounds maxdiff
* update paint spread maxDiff
When linting flutter/vulkan/vulkan_window.cc, the call to
GrDirectContext::MakeVulkan is undefined when SK_VULKAN is not defined,
triggering a lint error.
Bug: https://github.com/flutter/flutter/issues/68331
This implements the Gtk hooks required to support multi-step input
methods on Linux. This builds on the support for composing regions
(preedit region in Gtk terminology) added to TextInputModel in
https://github.com/flutter/engine/pull/21682.
Specifically, the following changes are included:
1. Add handler for TextInput.setMarkedTextRegion framework messages: On
any change to the EditableText in the framework, this message is sent
which provides an updated rect (in the local co-ordinates of the
EditableText) for the composing region. If not in composing mode, the
cursor rect is sent.
2. Add handler for TextInput.setEditableSizeAndTransform framework messages:
On any change to the RenderObject underlying the EditableText, an
updated size for the full EditableText widget, as well as an affine
transform matrix from local co-ordinates to Flutter root co-ordinates is
sent.
3. On either of the above messages, we use the transformed composing
rect to compute the cursor position in Gtk window co-ordinates and
inform Gtk, so that it can position any system IM composing window
correctly for on-the-spot composing, such as is used when inputting
Japanese text.
4. Adds handlers for preedit-start, preedit-changed, and preedit-end
signals from Gtk. These are passed on to the TextInputModel.
5. Updates the preedit-commit handler to commit the composing region to
the text or, if not composing, insert new text at the cursor.
6. Updates the handler for TextInput.setEditingState framework messages
to extract the composing range base and extent and pass these on to
TextInputModel.
7. Updates update_editing_state function to set composing base and
extent on text input state updates sent to the framework.
This PR fixes a few small memory leaks in FlTextInputPlugin. All three cases
are creating temporary FlValue instances for lookups and comparison without
ever releasing them.