Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
0953c69
fix: Skip updating selection range during composition
koji-1009 Jan 13, 2025
3e19c27
Apply suggestions from code review
koji-1009 Mar 21, 2025
347faf1
test: Add test case
koji-1009 Mar 21, 2025
043a852
Update engine/src/flutter/lib/web_ui/test/engine/text_editing_test.dart
koji-1009 Mar 21, 2025
984d3f5
test: Fix test case
koji-1009 Mar 21, 2025
bbd217b
Update engine/src/flutter/lib/web_ui/lib/src/engine/text_editing/text…
koji-1009 Apr 7, 2025
3886c3b
Apply suggestions from code review
koji-1009 Apr 14, 2025
3387efa
remove: sync main
koji-1009 Apr 15, 2025
cae5264
fix: Disable shift + arrow key on web platform
koji-1009 Apr 15, 2025
53d4f90
test: Add test cases
koji-1009 Apr 15, 2025
4a70b0a
refactor: sort
koji-1009 Apr 15, 2025
96041b1
test: Remove unsupported shortcuts test
koji-1009 Apr 15, 2025
0f1b383
Revert "test: Remove unsupported shortcuts test"
koji-1009 Apr 16, 2025
256b691
Revert "refactor: sort"
koji-1009 Apr 16, 2025
b4c0c91
Revert "test: Add test cases"
koji-1009 Apr 16, 2025
b8b83f6
Revert "fix: Disable shift + arrow key on web platform"
koji-1009 Apr 16, 2025
56576be
fix: Reflecting the composing process to Japanese text input
koji-1009 Apr 17, 2025
26a2640
test: Fix test case
koji-1009 Apr 18, 2025
85715ed
test: Add unit test
koji-1009 Apr 18, 2025
a5a8d7d
Revert "test: Add unit test"
koji-1009 Apr 22, 2025
317d1cf
test: Add unit test
koji-1009 Apr 23, 2025
abc3526
fix: Support partically selected style
koji-1009 Apr 28, 2025
1d37d47
test: Update unit test
koji-1009 Apr 28, 2025
1b23ee0
feat: Hold composingBase
koji-1009 May 16, 2025
ece4d52
test: Add unit test
koji-1009 May 16, 2025
fe51d20
fix: unit test
koji-1009 May 17, 2025
6d52b03
fix: Support home and end key
koji-1009 May 24, 2025
f060af9
refactor: Fix type and rename
koji-1009 May 30, 2025
d70db66
refactor: Remove line
koji-1009 May 31, 2025
d8b1720
Merge branch 'master' into fix/web_composing_range
koji-1009 May 31, 2025
1eb4915
chore: run test
koji-1009 May 31, 2025
cb6c360
Merge branch 'master' into fix/web_composing_range
koji-1009 Jun 1, 2025
8a48530
Merge branch 'master' into fix/web_composing_range
koji-1009 Jun 2, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test: Fix test case
  • Loading branch information
koji-1009 committed May 31, 2025
commit 984d3f5989e970991a8c4c89a6f10eed8e1c6cf4
114 changes: 9 additions & 105 deletions engine/src/flutter/lib/web_ui/test/engine/text_editing_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2194,121 +2194,25 @@ Future<void> testMain() async {
hideKeyboard();
});

test('Supports composition changes with shift arrow selection in Japanese IME', () {
final DefaultTextEditingStrategy editingStrategy = DefaultTextEditingStrategy(textEditing);

test('Do not update composingBase and composingExtent while composing Text', () {
showKeyboard(inputType: 'text');
editingStrategy.composingText = 'へんかん';
// 'text' is input as a composing target
Comment thread
koji-1009 marked this conversation as resolved.
Outdated
editingStrategy!.composingText = 'test';
sendFrameworkMessage(
codec.encodeMethodCall(
const MethodCall('TextInput.setEditingState', <String, dynamic>{
'text': 'へんかん',
'text': 'test',
'selectionBase': 4,
'selectionExtent': 4,
'composingBase': 0,
'composingExtent': 4,
}),
),
);
checkInputEditingState(textEditing!.strategy.domElement, 'へんかん', 4, 4);

// text composition is started
sendFrameworkMessage(
codec.encodeMethodCall(
const MethodCall('TextInput.setEditingState', <String, dynamic>{
'text': '変換',
'selectionBase': 0,
'selectionExtent': 2,
'composingBase': 0,
'composingExtent': 2,
}),
),
);
checkInputEditingState(textEditing!.strategy.domElement, '変換', 0, 2);

// shift + ←
sendFrameworkMessage(
codec.encodeMethodCall(
const MethodCall('TextInput.setEditingState', <String, dynamic>{
'text': '変化ん',
'selectionBase': 0,
'selectionExtent': 2,
'composingBase': -1,
'composingExtent': -1,
}),
),
);
checkInputEditingState(textEditing!.strategy.domElement, '変化ん', 0, 2);

// shift + ←
sendFrameworkMessage(
codec.encodeMethodCall(
const MethodCall('TextInput.setEditingState', <String, dynamic>{
'text': '変かん',
'selectionBase': 0,
'selectionExtent': 1,
'composingBase': -1,
'composingExtent': -1,
}),
),
);
checkInputEditingState(textEditing!.strategy.domElement, '変かん', 0, 1);

// shift + ←
sendFrameworkMessage(
codec.encodeMethodCall(
const MethodCall('TextInput.setEditingState', <String, dynamic>{
'text': 'へんかん',
'selectionBase': 0,
'selectionExtent': 1,
'composingBase': -1,
'composingExtent': -1,
'selectionExtent': 0,
}),
),
);
checkInputEditingState(textEditing!.strategy.domElement, 'へんかん', 0, 1);

// shift + →
sendFrameworkMessage(
codec.encodeMethodCall(
const MethodCall('TextInput.setEditingState', <String, dynamic>{
'text': '変かん',
'selectionBase': 0,
'selectionExtent': 1,
'composingBase': -1,
'composingExtent': -1,
}),
),
);
checkInputEditingState(textEditing!.strategy.domElement, '変かん', 0, 1);
// 'text' is composed as Japanese, and baseOffset and extentOffset are updated
Comment thread
koji-1009 marked this conversation as resolved.
Outdated
final EditingState editingState = EditingState(text: 'test', baseOffset: 0, extentOffset: 1);
editingStrategy!.setEditingState(editingState);

// shift + →
sendFrameworkMessage(
codec.encodeMethodCall(
const MethodCall('TextInput.setEditingState', <String, dynamic>{
'text': '変化ん',
'selectionBase': 0,
'selectionExtent': 2,
'composingBase': -1,
'composingExtent': -1,
}),
),
);
checkInputEditingState(textEditing!.strategy.domElement, '変化ん', 0, 2);

// shift + →
sendFrameworkMessage(
codec.encodeMethodCall(
const MethodCall('TextInput.setEditingState', <String, dynamic>{
'text': '変換',
'selectionBase': 0,
'selectionExtent': 2,
'composingBase': 0,
'composingExtent': 2,
}),
),
);
checkInputEditingState(textEditing!.strategy.domElement, '変換', 0, 2);
checkInputEditingState(textEditing!.strategy.domElement, 'test', 0, 4);
});

test('Supports deletion at inverted selection', () async {
Expand Down