[webkit-reviews] review granted: [Bug 224718] [css-counter-styles] Parse @counter-style descriptors : [Attachment 426678] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 21 10:16:03 PDT 2021


Darin Adler <darin at apple.com> has granted Tyler Wilcock
<twilco.o at protonmail.com>'s request for review:
Bug 224718: [css-counter-styles] Parse @counter-style descriptors
https://bugs.webkit.org/show_bug.cgi?id=224718

Attachment 426678: Patch

https://bugs.webkit.org/attachment.cgi?id=426678&action=review




--- Comment #11 from Darin Adler <darin at apple.com> ---
Comment on attachment 426678
  --> https://bugs.webkit.org/attachment.cgi?id=426678
Patch

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

> Source/WebCore/css/CSSCounterStyleRule.cpp:201
> +    return makeString("@counter-style ", name(), " {", systemPrefix,
systemText, systemSuffix, symbolsPrefix, symbolsText, symbolsSuffix,
additiveSymbolsPrefix, additiveSymbolsText, additiveSymbolsSuffix,
negativePrefix, negativeText, negativeSuffix, prefixTextPrefix, prefixText,
prefixTextSuffix, suffixTextPrefix, suffixText, suffixTextSuffix, padPrefix,
padText, padSuffix, rangePrefix, rangeText, rangeSuffix, fallbackPrefix,
fallbackText, fallbackSuffix, speakAsPrefix, speakAsText, speakAsSuffix, " }");

It’s OK to have a single long line. Could also break this logically like this:

    return makeString("@counter-style ", name(), " {",
	systemPrefix, systemText, systemSuffix,
	symbolsPrefix, symbolsText, symbolsSuffix,
	...
	"  }"
    )

Or some variation on that format.

> LayoutTests/imported/w3c/ChangeLog:22
> +	   These <string> values serialize without quotes because WebKit's
representation
> +	   of custom identifiers is not a separate type, but instead overloaded
onto the
> +	   CSS_STRING type.  This means that during serialization time, WebKit
must guess
> +	   whether it is actually serializing a string (and include quotes if
so), or if
> +	   it's serializing a custom ident (leaving off quotes if so).

So we will fix this.


More information about the webkit-reviews mailing list