Bug 285257

Summary: text-box-trim accumulation fails when updating the CSS dynamically
Product: WebKit Reporter: mic.gallego
Component: Layout and RenderingAssignee: alan <zalan>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, koivisto, ntim, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
video
none
Patch
none
[fast-cq]Patch none

mic.gallego
Reported 2024-12-30 22:30:19 PST
Created attachment 473720 [details] video Hi, According to this issue (https://github.com/w3c/csswg-drafts/issues/5426) when the text-box: trim-both is set on a parent, it should trim start on the first element, and trim end on the last element. This is what I am experiencing on Safari (both stable and nightly) but only on initial load. If I update the CSS in the inspector, then the output end up incorrect, with the second element having it's start being trimmed. Please see the attach video (on initial load it is correct, but incorrect when you update it).
Attachments
video (13.79 MB, video/quicktime)
2024-12-30 22:30 PST, mic.gallego
no flags
Patch (20.04 KB, patch)
2025-01-05 13:04 PST, alan
no flags
[fast-cq]Patch (19.91 KB, patch)
2025-01-06 07:48 PST, alan
no flags
Radar WebKit Bug Importer
Comment 1 2025-01-05 12:57:48 PST
alan
Comment 2 2025-01-05 13:03:51 PST
Thank you for filing this bug report on text-box!
alan
Comment 3 2025-01-05 13:04:55 PST
Tim Nguyen (:ntim)
Comment 4 2025-01-05 16:24:28 PST
Comment on attachment 473782 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=473782&action=review > LayoutTests/imported/w3c/web-platform-tests/css/css-inline/text-box-trim/text-box-trim-set-dynamically-expected.html:4 > +<link rel="match" href="text-box-trim-set-dynamically-ref.html"> ditto > LayoutTests/imported/w3c/web-platform-tests/css/css-inline/text-box-trim/text-box-trim-set-dynamically-ref.html:4 > +<link rel="match" href="text-box-trim-set-dynamically-ref.html"> You can remove the link[rel=match] from the ref/expected files.
alan
Comment 5 2025-01-06 07:48:40 PST
Created attachment 473808 [details] [fast-cq]Patch
EWS
Comment 6 2025-01-06 11:57:07 PST
Committed 288480@main (bbbde60e23e9): <https://commits.webkit.org/288480@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 473808 [details].
Note You need to log in before you can comment on or make changes to this bug.