Initial support for parsing syntax strings.
Created attachment 463918 [details] Patch
<rdar://problem/103075062>
Comment on attachment 463918 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=463918&action=review > Source/WebCore/css/parser/CSSPropertySyntax.cpp:86 > + auto string = syntax.stripWhiteSpace(); This should be using a function that strips the appropriate definition of space for CSS, not String::stripWhiteSpace, which strips all Unicode whitespace. I’m guessing the stripLeadingAndTrailingHTMLSpaces function is the right one to use. Once nice thing about that is that it returns a StringView and so it’s more efficient. > Source/WebCore/css/parser/CSSPropertySyntax.h:51 > + AtomString ident { }; No need for the braces here. > Source/WebCore/css/parser/CSSPropertySyntax.h:56 > + static Definition parse(const String&); I suggest this take a StringView, unless there’s some reason it can’t.
Created attachment 463920 [details] Patch for landing
Created attachment 463921 [details] Patch for landing
> No need for the braces here. Some compilers fail when initialising the struct without providing the field value if it does not have braces. We talked about this in some earlier bug. But maybe those compilers are no longer relevant?
Created attachment 463922 [details] Patch for landing
> This should be using a function that strips the appropriate definition of > space for CSS, not String::stripWhiteSpace, which strips all Unicode > whitespace. I’m guessing the stripLeadingAndTrailingHTMLSpaces function is > the right one to use. Once nice thing about that is that it returns a > StringView and so it’s more efficient. Moved this inside the parsing callback so it can use proper isCSSSpace skipping.
Created attachment 463923 [details] Patch for landing
Created attachment 463924 [details] Patch for landing
Created attachment 463928 [details] Patch for landing
Committed 257525@main (be0b82ecc746): <https://commits.webkit.org/257525@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 463928 [details].
*** Bug 192325 has been marked as a duplicate of this bug. ***