Bug 229496 - Add an unprefixed version of the CSS text-align: -webkit-match-parent value
Summary: Add an unprefixed version of the CSS text-align: -webkit-match-parent value
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brent Fulgham
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-08-25 08:00 PDT by Simon Pieters (:zcorpan)
Modified: 2021-12-09 15:32 PST (History)
19 users (show)

See Also:


Attachments
WIP Patch (4.42 KB, patch)
2021-12-08 15:00 PST, Brent Fulgham
no flags Details | Formatted Diff | Diff
Patch (9.19 KB, patch)
2021-12-08 16:09 PST, Brent Fulgham
no flags Details | Formatted Diff | Diff
Patch (8.95 KB, patch)
2021-12-09 11:58 PST, Brent Fulgham
no flags Details | Formatted Diff | Diff
Patch for landing (8.04 KB, patch)
2021-12-09 13:59 PST, Brent Fulgham
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Pieters (:zcorpan) 2021-08-25 08:00:34 PDT
What steps will reproduce the problem?
1. Open URL: data:text/html,<!doctype%20html><div%20dir=rtl><div%20dir=ltr%20style="text-align:%20match-parent">This%20should%20be%20right-aligned

Demo markup:
<!doctype html><div dir=rtl><div dir=ltr style="text-align: match-parent">This should be right-aligned

What is the expected result?
text-align: match-parent should be supported, as defined in https://drafts.csswg.org/css-text/#valdef-text-align-match-parent

What happens instead?
text-align: match-parent is not supported. However, a vendor-prefixed value text-align: -webkit-match-parent is supported.

The prefixed variant should be removed (unless it is found to be required for web compat, in which case add it to https://compat.spec.whatwg.org ).

Other browsers:
Chromium is like WebKit.
Gecko supports unprefixed 'match-parent', and does not support any prefixed variant.

Also see https://github.com/whatwg/html/pull/6989
Comment 1 Simon Pieters (:zcorpan) 2021-08-30 15:09:13 PDT
wpt test added in https://github.com/web-platform-tests/wpt/pull/30178
Comment 2 Radar WebKit Bug Importer 2021-09-01 08:01:28 PDT
<rdar://problem/82628618>
Comment 3 Brent Fulgham 2021-12-08 15:00:34 PST
Created attachment 446432 [details]
WIP Patch
Comment 4 Brent Fulgham 2021-12-08 16:09:56 PST
Created attachment 446451 [details]
Patch
Comment 5 Brent Fulgham 2021-12-09 11:58:11 PST
Created attachment 446582 [details]
Patch
Comment 6 Darin Adler 2021-12-09 13:37:03 PST
Comment on attachment 446582 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=446582&action=review

> Source/WebCore/rendering/style/RenderStyleConstants.h:732
> -    End,
> +    End

Should not change this; trailing comma is harmless, and I even prefer it.
Comment 7 Brent Fulgham 2021-12-09 13:56:24 PST
Comment on attachment 446582 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=446582&action=review

>> Source/WebCore/rendering/style/RenderStyleConstants.h:732
>> +    End
> 
> Should not change this; trailing comma is harmless, and I even prefer it.

Ok -- I'll revert that bit.
Comment 8 Brent Fulgham 2021-12-09 13:59:09 PST
Created attachment 446602 [details]
Patch for landing
Comment 9 EWS 2021-12-09 14:48:37 PST
Committed r286803 (245043@main): <https://commits.webkit.org/245043@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 446602 [details].