[webkit-changes] [WebKit/WebKit] dcf98a: Add helper function to match identifiers and retur...

Sam Weinig noreply at github.com
Thu Nov 3 13:25:07 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: dcf98ac5a51f1c64283ce400354032109be95cef
      https://github.com/WebKit/WebKit/commit/dcf98ac5a51f1c64283ce400354032109be95cef
  Author: Sam Weinig <weinig at apple.com>
  Date:   2022-11-03 (Thu, 03 Nov 2022)

  Changed paths:
    M Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp

  Log Message:
  -----------
  Add helper function to match identifiers and return a corresponding enum mapped enum value for CSS property parser
https://bugs.webkit.org/show_bug.cgi?id=247326
rdar://101878937

Reviewed by Simon Fraser.

Utilize SortedArrayMap and two new helpers (consume/peekIdentUsingMapping) to
create a consistent pattern for mapping CSSValueIDs to enum values.

* Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::consumeIdentUsingMapping):
(WebCore::CSSPropertyParserHelpers::peekIdentUsingMapping):
(WebCore::CSSPropertyParserHelpers::parseColorContrastFunctionParameters):
(WebCore::CSSPropertyParserHelpers::consumeHueInterpolationMethod):
(WebCore::CSSPropertyParserHelpers::consumePrefixedRadialGradient):
(WebCore::CSSPropertyParserHelpers::consumeRadialGradient):
(WebCore::CSSPropertyParserHelpers::consumePrefixedLinearGradient):
(WebCore::CSSPropertyParserHelpers::consumeLinearGradient):

Canonical link: https://commits.webkit.org/256290@main




More information about the webkit-changes mailing list