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

  Changed paths:
    M LayoutTests/TestExpectations
    M LayoutTests/mathml/presentation/dir-mo-expected.html
    R LayoutTests/mathml/presentation/mo-form-expected.html
    R LayoutTests/mathml/presentation/mo-form.html
    M LayoutTests/mathml/presentation/mo-lspace-rspace-expected.html
    M Source/WebCore/mathml/MathMLOperatorDictionary.cpp
    M Source/WebCore/mathml/MathMLOperatorElement.cpp
    M Source/WebCore/mathml/MathMLOperatorElement.h
    M Source/WebCore/mathml/MathMLRowElement.cpp

  Log Message:
  -----------
  [MathML Core] Update prefixs +/−/±/∓, prefix ∇ and infix ⋉ spacing in 
Operator Dictionary and fix dynamic case
https://bugs.webkit.org/show_bug.cgi?id=314477
rdar://176652211

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

This patch syncs outdated below entries with the MathML Core operator 
dictionary [1]:

    U+002B + Prefix: (0,1) -> (0,0)
    U+00B1 ± Prefix: (0,1) -> (0,0)
    U+2212 − Prefix: (0,1) -> (0,0)
    U+2213 ∓ Prefix: (0,1) -> (0,0)
    U+2207 ∇ Prefix: (2,1) -> (0,0)
    U+22C9 ⋉ Infix:  (4,4) -> (3,3)

MathMLRowElement::childrenChanged already invalidates each child operator's
cached dictionary property via setOperatorFormDirty(), but the old
implementation only cleared the cache; the operator's renderer was never
marked dirty, so the next layout saw "no layout needed" and painted the
stale pre-mutation spacing. Move setOperatorFormDirty() out-of-line and
mirror the attributeChanged(form) path: reset the operator-flag dirty bits
and call updateFromElement() + setNeedsLayoutAndPreferredWidthsUpdate() on
the renderer so the sibling-triggered form switch actually takes effect.

[1] https://www.w3.org/TR/mathml-core/#operator-dictionary-human

* LayoutTests/TestExpectations: Progressions
* Source/WebCore/mathml/MathMLOperatorDictionary.cpp:
* Source/WebCore/mathml/MathMLOperatorElement.cpp:
(WebCore::MathMLOperatorElement::setOperatorFormDirty):
* Source/WebCore/mathml/MathMLOperatorElement.h:

> Duplicate of `mo-form.html` from WPT:
* LayoutTests/mathml/presentation/mo-form-expected.html: Removed.
* LayoutTests/mathml/presentation/mo-form.html: Removed.

> Updated local test to new behavior (WPT coverage not for these scenarios):
* LayoutTests/mathml/presentation/dir-mo-expected.html:
* LayoutTests/mathml/presentation/mo-lspace-rspace-expected.html:

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



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

Reply via email to