servo/tests/wpt/meta/html/rendering/widgets
DK Liao 5df4c760d3
fix: Crashing due to input element hack (#36461)
This PR addresses a crash in text input element due to a hack to prevent
text input being trimmed.

The updated behavior will only add `zero width space` unicode character
to the node if there's no text content instead of adding it constantly.
Also by adding the same `zero width space` unicode character to text
area when there's no text content within will allow text area element to
properly display caret.

<img width="197" alt="截圖 2025-04-11 中午12 51 00"
src="https://github.com/user-attachments/assets/10bc7314-9aa3-49df-baac-ef26d39a96d8"
/>

This PR also addresses issues with multiple glyph runs:


https://github.com/user-attachments/assets/658db56f-b166-47ec-bc77-c6c13114d669

Testing: This PR is tested using:
- `./mach run -d 'data:text/html,<input id="input_element"
value="xxxxxxxxxxxxxxxxxxxx">'`
- `./mach run -d 'data:text/html,<textarea id="input_element"
value="xxxxxxxxxxxxxxxxxxxx">'`

without causing crashes, while the results should be covered by WPT
tests

Fixes: https://github.com/servo/servo/issues/36449

---------

Signed-off-by: DK Liao <dklassic@gmail.com>
2025-04-11 06:51:52 +00:00
..
appearance Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
button-layout fix: Crashing due to input element hack (#36461) 2025-04-11 06:51:52 +00:00
the-select-element Support single-value <select> elements (#35684) 2025-04-03 12:11:55 +00:00
baseline-alignment-and-overflow.tentative.html.ini Enable layout_grid_enabled pref for all tests (#36316) 2025-04-03 18:48:05 +00:00
field-sizing-input-number.html.ini layout: Add very basic support for showing text in input boxes (#32365) 2024-06-20 10:13:50 +00:00
field-sizing-input-text.html.ini Sync WPT with upstream (11-02-2024) (#31309) 2024-02-11 08:01:56 +00:00
field-sizing-select.html.ini Sync WPT with upstream (11-02-2024) (#31309) 2024-02-11 08:01:56 +00:00
field-sizing-textarea.html.ini Sync WPT with upstream (11-02-2024) (#31309) 2024-02-11 08:01:56 +00:00
input-checkbox-no-centering.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
input-checkbox-switch-indeterminate.tentative.html.ini Sync WPT with upstream (12-11-2023) (#30724) 2023-11-15 05:55:31 +00:00
input-checkbox-switch.tentative.html.ini Sync WPT with upstream (12-11-2023) (#30724) 2023-11-15 05:55:31 +00:00
input-checkbox-switch.tentative.window.js.ini Sync WPT with upstream (28-01-2024) (#31204) 2024-01-28 18:33:58 +00:00
input-checkbox-zero-size.html.ini Update web-platform-tests to revision b'f46bf6aa167e2838a8b93501a1a998ffde90d879' (#32581) 2024-06-23 06:21:30 +00:00
input-radio-no-centering.html.ini Run same tests for layout-2020 and layout-2013 (#30092) 2023-08-15 00:28:32 +00:00
input-text-size.html.ini Sync WPT with upstream (11-02-2024) (#31309) 2024-02-11 08:01:56 +00:00
textarea-cols-rows.html.ini Update web-platform-tests to revision b'c7076ab2397dd3dcf0bb93dc304d05be04cd2a47' (#33826) 2024-10-13 13:52:51 +00:00