Bug 232830 - Re-use isCSSWideKeyword in CSSVariableParser.cpp & CSSPropertyParser.cpp
Summary: Re-use isCSSWideKeyword in CSSVariableParser.cpp & CSSPropertyParser.cpp
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Nguyen (:ntim)
URL:
Keywords: InRadar
Depends on:
Blocks: 224816
  Show dependency treegraph
 
Reported: 2021-11-08 12:02 PST by Tim Nguyen (:ntim)
Modified: 2021-11-09 14:18 PST (History)
9 users (show)

See Also:


Attachments
Patch (2.44 KB, patch)
2021-11-08 12:09 PST, Tim Nguyen (:ntim)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Nguyen (:ntim) 2021-11-08 12:02:51 PST
Sub-set of bug 224816
Comment 1 Tim Nguyen (:ntim) 2021-11-08 12:09:20 PST
Created attachment 443584 [details]
Patch
Comment 2 Antti Koivisto 2021-11-08 23:46:53 PST
Comment on attachment 443584 [details]
Patch

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

> Source/WebCore/css/parser/CSSPropertyParser.cpp:4568
> -        CSSValueID id = m_range.peek().id();
> -        if (id == CSSValueInherit || id == CSSValueInitial || id == CSSValueRevert)
> +        if (isCSSWideKeyword(m_range.peek().id()))

Can we make a test for this?
Comment 3 Tim Nguyen (:ntim) 2021-11-09 00:12:16 PST
(In reply to Antti Koivisto from comment #2)
> Comment on attachment 443584 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=443584&action=review
> 
> > Source/WebCore/css/parser/CSSPropertyParser.cpp:4568
> > -        CSSValueID id = m_range.peek().id();
> > -        if (id == CSSValueInherit || id == CSSValueInitial || id == CSSValueRevert)
> > +        if (isCSSWideKeyword(m_range.peek().id()))
> 
> Can we make a test for this?

I don't see any easily extendable test in https://github.com/web-platform-tests/wpt/tree/master/css/css-properties-values-api unfortunately, or similar test for the matter.
Comment 4 EWS 2021-11-09 00:16:00 PST
Committed r285483 (244007@main): <https://commits.webkit.org/244007@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 443584 [details].
Comment 5 Radar WebKit Bug Importer 2021-11-09 00:17:21 PST
<rdar://problem/85191933>
Comment 6 Darin Adler 2021-11-09 14:18:07 PST
Comment on attachment 443584 [details]
Patch

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

>>> Source/WebCore/css/parser/CSSPropertyParser.cpp:4568
>>> +        if (isCSSWideKeyword(m_range.peek().id()))
>> 
>> Can we make a test for this?
> 
> I don't see any easily extendable test in https://github.com/web-platform-tests/wpt/tree/master/css/css-properties-values-api unfortunately, or similar test for the matter.

Is this a behavior change, because we now check for "unset" as well? But not testable?