Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4bb39a4d8cca917eb651c9481345be436f7fb75b
      
https://github.com/WebKit/WebKit/commit/4bb39a4d8cca917eb651c9481345be436f7fb75b
  Author: Ahmad Saleem <[email protected]>
  Date:   2026-05-08 (Fri, 08 May 2026)

  Changed paths:
    A 
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-combining-default-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-combining-default.html
    M 
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-combining-expected.txt
    M Source/WebCore/mathml/MathMLOperatorElement.cpp

  Log Message:
  -----------
  [MathML] Add support for multiple-char operators
https://bugs.webkit.org/show_bug.cgi?id=124828
rdar://170907545

Reviewed by Frédéric Wang Nélar.

Per the MathML Core specification [1], the algorithm to determine the
category of an operator only recognizes content with UTF-16 length 1 or
2. For length 2, if the second character is U+0338 COMBINING LONG SOLIDUS
OVERLAY or U+20D2 COMBINING LONG VERTICAL LINE OVERLAY, the first
character is used for dictionary lookup. These are the only two-character
combining forms in the operator dictionary.

Previously, parseOperatorChar() only handled single code points via
convertToSingleCodePoint(), which returned nullopt for two-character
operators like "≠" ("=" + U+0338), causing them to fall back to default
spacing instead of using the base character's dictionary properties.

Operators that are not recognized (unsupported combining character or
three or more characters) fall through to the Default category, whose
lspace and rspace are both 0.2777777777777778em (5/18em) [2]. This
matches WebKit's existing struct defaults in
MathMLOperatorDictionary::Property, so no implementation change was
needed; the new test asserts this spec-correct value by comparing the
total operator width against a reference with explicit lspace="0"
rspace="0".

[1] 
https://w3c.github.io/mathml-core/#dfn-algorithm-to-determine-the-category-of-an-operator
[2] https://w3c.github.io/mathml-core/#operator-dictionary-categories-values

* 
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-combining-expected.txt:
 Progression
* 
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-combining-default-expected.txt:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-combining-default.html:
 Added.
* Source/WebCore/mathml/MathMLOperatorElement.cpp:
(WebCore::MathMLOperatorElement::parseOperatorChar):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to