Bug 241164 - text-align: match-parent on root handles direction incorrectly
Summary: text-align: match-parent on root handles direction incorrectly
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Nguyen (:ntim)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-05-31 17:15 PDT by Kiet Ho
Modified: 2022-06-01 22:07 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Tim Nguyen (:ntim) 2022-05-31 19:48:48 PDT
We do use the direction of the parent, which is effectively why it's wrong for the WPT: https://webkit-search.igalia.com/webkit/rev/00d01db2338b1568d39aa439334f39f0353d0b00/Source/WebCore/style/StyleBuilderConverter.h#617-622

There's no parent in the WPT, so it should just behave like `text-align: start`.
Comment 2 Kiet Ho 2022-05-31 19:51:18 PDT
(In reply to Tim Nguyen (:ntim) from comment #1)
> We do use the direction of the parent, which is effectively why it's wrong
> for the WPT:
> https://webkit-search.igalia.com/webkit/rev/
> 00d01db2338b1568d39aa439334f39f0353d0b00/Source/WebCore/style/
> StyleBuilderConverter.h#617-622
> 
> There's no parent in the WPT, so it should just behave like `text-align:
> start`.

I see what you mean now - I didn't want to give this a generic "failing WPT test" title, but I also didn't do any digging into the root cause, so I just named it according to my best guess.
Comment 3 Tim Nguyen (:ntim) 2022-06-01 05:51:23 PDT
Pull request: https://github.com/WebKit/WebKit/pull/1208
Comment 4 EWS 2022-06-01 22:06:16 PDT
Committed r295120 (251211@main): <https://commits.webkit.org/251211@main>

Reviewed commits have been landed. Closing PR #1208 and removing active labels.
Comment 5 Radar WebKit Bug Importer 2022-06-01 22:07:15 PDT
<rdar://problem/94266878>