Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 883d57d213040747f441fc61e3f86c4fa65401d5
      
https://github.com/WebKit/WebKit/commit/883d57d213040747f441fc61e3f86c4fa65401d5
  Author: Ahmad Saleem <[email protected]>
  Date:   2026-03-23 (Mon, 23 Mar 2026)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/symmetric-largeop-expected.txt
    M LayoutTests/platform/glib/mathml/opentype/large-operators-expected.txt
    M LayoutTests/platform/glib/mathml/opentype/opentype-stretchy-expected.txt
    M LayoutTests/platform/ios/mathml/opentype/opentype-stretchy-expected.txt
    M LayoutTests/platform/mac/mathml/opentype/opentype-stretchy-expected.txt
    M Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp

  Log Message:
  -----------
  [MathML] Symmetric non-stretchy largeop operators should center around math 
axis
https://bugs.webkit.org/show_bug.cgi?id=308413
rdar://170905663

Reviewed by Frédéric Wang.

This patch aligns WebKit with Gecko / Firefox and Blink / Chromium.

Non-stretchy large operators with symmetric="true" were incorrectly placed
on the baseline instead of being centered around the math axis. The
verticalStretchedOperatorShift() only computed shifts for stretchy operators.

This patch restructures the baseline shift logic in firstLineBaseline() to
follow the spec structure from 
https://w3c.github.io/mathml-core/#layout-of-operators:
first handling stretchy vertical operators, then largeop symmetric operators.
The shift formula uses the spec's definition directly:
shift = (ascent - descent - 2 * axisHeight) / 2.

* Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::firstLineBaseline const):
* 
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/symmetric-largeop-expected.txt:
 Progression
* LayoutTests/platform/glib/mathml/opentype/large-operators-expected.txt: 
Rebaseline
* LayoutTests/platform/glib/mathml/opentype/opentype-stretchy-expected.txt: 
Ditto
* LayoutTests/platform/ios/mathml/opentype/opentype-stretchy-expected.txt: Ditto
* LayoutTests/platform/mac/mathml/opentype/opentype-stretchy-expected.txt: Ditto

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



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

Reply via email to