haikuwebkit/LayoutTests/editing/input
Wenson Hsieh 0beedb8d2d [iOS] Composition text is not initially highlighted when typing in text fields using Pinyin keyboard
https://bugs.webkit.org/show_bug.cgi?id=223563
<rdar://problem/75564516>

Reviewed by Antti Koivisto.

Source/WebCore:

When enabling line layout integration, composition highlights on iOS don't appear when typing an input string
using the Pinyin keyboard for the first time. This is because the text renderer for the inserted composition
text does not contain inline text boxes when painting the composition text on iOS, so the marked text painting
codepath is never triggered.

On macOS, this isn't an issue because the process of setting the composition changes the selection, which then
changes the highlight state of the `RenderText`, which subsequently calls into `ensureLineBoxes()`. However,
since selections are drawn using UIKit in the UI process on iOS, we don't end up ensuring that inline text boxes
are constructed for the inserted text.

To address this, we follow macOS behavior by ensuring line box construction on the rendered composition text
when setting the composition.

Test: editing/input/composition-underline-in-search-field.html

* editing/Editor.cpp:
(WebCore::Editor::setComposition):

LayoutTests:

Add a test to verify that marked text underlines show up in search fields.

* editing/input/composition-underline-in-search-field-expected-mismatch.html: Added.
* editing/input/composition-underline-in-search-field.html: Added.

Canonical link: https://commits.webkit.org/235598@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274796 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-22 20:58:24 +00:00
..
cocoa Text input autocorrect="off" attribute ignored on Mac 2020-08-11 19:45:57 +00:00
ios Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
resources
attributed-substring-from-range-lines-expected.txt
attributed-substring-from-range-lines.html
caret-at-the-edge-of-contenteditable-expected.png
caret-at-the-edge-of-contenteditable.html
caret-at-the-edge-of-input-expected.png
caret-at-the-edge-of-input.html
composition-highlights-expected.html Composition highlight rects should be rounded and inset 2020-02-12 23:16:52 +00:00
composition-highlights.html Composition highlight rects should be rounded and inset 2020-02-12 23:16:52 +00:00
composition-underline-color-expected-mismatch.html
composition-underline-color.html
composition-underline-in-search-field-expected-mismatch.html [iOS] Composition text is not initially highlighted when typing in text fields using Pinyin keyboard 2021-03-22 20:58:24 +00:00
composition-underline-in-search-field.html [iOS] Composition text is not initially highlighted when typing in text fields using Pinyin keyboard 2021-03-22 20:58:24 +00:00
composition-underline-rtl-expected.html
composition-underline-rtl.html
delete-text-in-composition-expected.txt
delete-text-in-composition.html
div-first-child-rule-input-expected.txt
div-first-child-rule-input.html
div-first-child-rule-textarea-expected.txt
div-first-child-rule-textarea.html
editable-container-with-word-wrap-normal-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
editable-container-with-word-wrap-normal.html
emacs-ctrl-o.html
focus-change-with-marked-text-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
focus-change-with-marked-text.html
ime-composition-clearpreedit-expected.txt
ime-composition-clearpreedit.html
insert-wrapping-space-in-textarea-expected.txt
insert-wrapping-space-in-textarea.html
marked-text-appearance-expected-mismatch.html
marked-text-appearance.html
option-page-up-down-expected.txt
option-page-up-down.html
page-up-down-scrolls-expected.txt
page-up-down-scrolls.html
password-echo-passnode-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
password-echo-passnode.html
password-echo-passnode2-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
password-echo-passnode2.html
password-echo-passnode3-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
password-echo-passnode3.html
password-echo-textnode-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
password-echo-textnode.html
paste-linebreak-into-initially-hidden-textarea-expected.txt
paste-linebreak-into-initially-hidden-textarea.html
paste-text-ending-with-interchange-newline-expected.txt
paste-text-ending-with-interchange-newline.html
press-tab-during-ime-composition-expected.txt
press-tab-during-ime-composition.html
reveal-caret-of-multiline-contenteditable-expected.png
reveal-caret-of-multiline-contenteditable.html
reveal-caret-of-multiline-input-expected.png
reveal-caret-of-multiline-input.html
reveal-caret-of-transformed-input-scrollable-parent-expected.txt
reveal-caret-of-transformed-input-scrollable-parent.html
reveal-caret-of-transformed-multiline-input-expected.txt
reveal-caret-of-transformed-multiline-input.html
reveal-contenteditable-on-input-vertically-expected.txt
reveal-contenteditable-on-input-vertically.html
reveal-contenteditable-on-paste-vertically-expected.txt
reveal-contenteditable-on-paste-vertically.html
reveal-edit-on-input-vertically-expected.txt
reveal-edit-on-input-vertically.html
reveal-edit-on-paste-vertically-expected.txt
reveal-edit-on-paste-vertically.html
scroll-to-edge-if-line-break-at-end-of-document-contenteditable-expected.txt
scroll-to-edge-if-line-break-at-end-of-document-contenteditable.html
scroll-to-edge-if-line-break-at-end-of-document-textarea-expected.txt
scroll-to-edge-if-line-break-at-end-of-document-textarea.html
scroll-to-edge-if-paragraph-separator-at-end-of-document-contenteditable-expected.txt
scroll-to-edge-if-paragraph-separator-at-end-of-document-contenteditable.html
scroll-viewport-page-up-down-expected.txt
scroll-viewport-page-up-down.html
search-field-crash-in-designmode-expected.txt
search-field-crash-in-designmode.html
select-all-clear-input-method-expected.txt
select-all-clear-input-method.html Selection API: Update more tests that depend on WebKit's legacy non-standard behavior to set up the selection 2020-09-23 15:50:44 +00:00
set-value-on-input-and-delete-expected.txt
set-value-on-input-and-delete.html
set-value-on-input-and-forward-delete-expected.txt
set-value-on-input-and-forward-delete.html
set-value-on-input-and-type-input-expected.txt
set-value-on-input-and-type-input.html
set-value-on-input-and-type-textarea-expected.txt
set-value-on-input-and-type-textarea.html
setting-input-value-cancel-ime-composition-expected.txt
setting-input-value-cancel-ime-composition.html
style-change-during-input-expected.txt
style-change-during-input.html