Bug 229082

Summary: Unprefix -webkit-mask and longhand forms
Product: WebKit Reporter: Sam Sneddon [:gsnedders] <gsnedders>
Component: CSSAssignee: Matt Woodrow <mattwoodrow>
Status: RESOLVED FIXED    
Severity: Normal CC: changseok, clopez, dino, esprehn+autocc, ews-watchlist, fmalita, glenn, gyuyoung.kim, joepeck, koivisto, kondapallykalyan, krit, macpherson, menard, parvu, pdr, sabouhallawa, schenney, sergio, simon.fraser, webkit-bug-importer, youennf, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=229370
Bug Depends on: 229899, 229900, 229903, 229915, 229917    
Bug Blocks: 95389, 217522    
Attachments:
Description Flags
Work in progress patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch none

Description Sam Sneddon [:gsnedders] 2021-08-13 10:47:24 PDT
For some of these the value keywords have changed (e.g. from margin to margin-box), and notably Chrome doesn't yet support it prefixed.  Nevertheless, Firefox does support the unprefixed form and there are a (small) number of WPT tests that rely on this.
Comment 1 Radar WebKit Bug Importer 2021-08-20 10:48:46 PDT
<rdar://problem/82176660>
Comment 2 Simon Fraser (smfr) 2021-10-21 11:11:35 PDT
I have a patch for part of this.
Comment 3 Simon Fraser (smfr) 2021-11-17 14:22:45 PST
Created attachment 444576 [details]
Work in progress patch
Comment 4 Matt Woodrow 2021-11-24 17:40:24 PST
Created attachment 445116 [details]
Patch
Comment 5 Matt Woodrow 2021-11-25 13:14:37 PST
Created attachment 445152 [details]
Patch
Comment 6 Matt Woodrow 2021-11-25 16:25:27 PST
Created attachment 445161 [details]
Patch
Comment 7 Matt Woodrow 2021-11-28 14:16:42 PST
Created attachment 445242 [details]
Patch
Comment 8 Antti Koivisto 2021-12-07 04:44:59 PST
Comment on attachment 445242 [details]
Patch

looks like you need to do some more rebasing
Comment 9 Antti Koivisto 2021-12-07 04:59:21 PST
Comment on attachment 445242 [details]
Patch

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

> Source/WebCore/css/CSSComputedStyleDeclaration.cpp:4458
> +size_t ComputedStyleExtractor::getLayerCount(CSSPropertyID property)
> +{
> +    ASSERT(property == CSSPropertyBackground || property == CSSPropertyMask);
> +    if (!styledElement())
> +        return 0;

I already see this code in trunk so I suppose it is not really part of this change?

We don't start function names with 'get', this should be called layerCount/countLayers/countLayersForProperty or similar. There are functions in this file that don't follow the rule, that's not a reason to add new code like that. Also some of them are like that because they are exposed in CSSOM.

> Source/WebCore/css/CSSComputedStyleDeclaration.cpp:4476
> +Ref<CSSValueList> ComputedStyleExtractor::getFillLayerPropertyShorthandValue(CSSPropertyID property, const StylePropertyShorthand& propertiesBeforeSlashSeparator, const StylePropertyShorthand& propertiesAfterSlashSeparator, CSSPropertyID lastLayerProperty)
> +{
> +    ASSERT(property == CSSPropertyBackground || property == CSSPropertyMask);
> +    size_t layerCount = getLayerCount(property);

This too
Comment 10 Matt Woodrow 2021-12-08 11:52:51 PST
Created attachment 446401 [details]
Patch
Comment 11 Matt Woodrow 2021-12-08 19:19:41 PST
Created attachment 446485 [details]
Patch
Comment 12 EWS 2021-12-09 12:23:50 PST
Committed r286795 (245035@main): <https://commits.webkit.org/245035@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 446485 [details].
Comment 13 Brent Fulgham 2022-07-13 15:05:50 PDT
*** Bug 121432 has been marked as a duplicate of this bug. ***
Comment 14 Tim Nguyen (:ntim) 2023-08-29 23:49:22 PDT
*** Bug 137294 has been marked as a duplicate of this bug. ***
Comment 15 Tim Nguyen (:ntim) 2023-08-29 23:49:42 PDT
*** Bug 137292 has been marked as a duplicate of this bug. ***