Bug 229496

Summary: Add an unprefixed version of the CSS text-align: -webkit-match-parent value
Product: WebKit Reporter: Simon Pieters (:zcorpan) <zcorpan>
Component: CSSAssignee: Brent Fulgham <bfulgham>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, changseok, cyb.ai.815, darin, esprehn+autocc, ews-watchlist, glenn, gyuyoung.kim, hi, joepeck, koivisto, kondapallykalyan, macpherson, menard, ntim, pangle, pdr, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.chromium.org/p/chromium/issues/detail?id=1243333
Attachments:
Description Flags
WIP Patch
none
Patch
none
Patch
none
Patch for landing none

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].