mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
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> |
||
---|---|---|
.. | ||
baseline-source-first-001.html.ini | ||
baseline-source-first-002.html.ini | ||
baseline-source-first-003.html.ini | ||
baseline-source-first-textarea-001.tentative.html.ini | ||
baseline-source-first-textarea-002.tentative.html.ini | ||
baseline-source-first-textarea-003.tentative.html.ini | ||
baseline-source-last-001.html.ini | ||
baseline-source-last-002.html.ini | ||
baseline-source-last-003.html.ini | ||
baseline-source-last-textarea-002.tentative.html.ini | ||
baseline-source-last-textarea-003.tentative.html.ini | ||
baseline-source-no-interpolation.html.ini | ||
baseline-source-vertical-align.html.ini |