[webkit-reviews] review granted: [Bug 230799] Stop parsing font palette things that we can't implement : [Attachment 440471] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 7 15:06:43 PDT 2021

Simon Fraser (smfr) <simon.fraser at apple.com> has granted Myles C. Maxfield
<mmaxfield at apple.com>'s request for review:
Bug 230799: Stop parsing font palette things that we can't implement

Attachment 440471: Patch


--- Comment #15 from Simon Fraser (smfr) <simon.fraser at apple.com> ---
Comment on attachment 440471
  --> https://bugs.webkit.org/attachment.cgi?id=440471

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

> Source/WebCore/css/StyleRule.cpp:333
> +StyleRuleFontPaletteValues::StyleRuleFontPaletteValues(const AtomString&
name, const AtomString& fontFamily, std::optional<FontPaletteIndex>&&
basePalette, Vector<FontPaletteValues::OverriddenColor>&& overrideColors)

I never know if r-value references are better for small types.

> Source/WebCore/css/StyleRule.h:184
> +    const std::optional<FontPaletteIndex>& basePalette() const

Probably still fine to return by value.

> Source/WebCore/css/parser/CSSParserImpl.cpp:702
> +	       key = pair.key().value<unsigned>();

Just declare key on this line.

> Source/WebCore/css/parser/CSSPropertyParser.cpp:4860
> +	   RefPtr<CSSPrimitiveValue> key = consumeInteger(range, 0);


More information about the webkit-reviews mailing list