Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 67220c25b6f2bf4c1263d2ca2c1a5afa694ef7ee
      
https://github.com/WebKit/WebKit/commit/67220c25b6f2bf4c1263d2ca2c1a5afa694ef7ee
  Author: Zak Ridouh <[email protected]>
  Date:   2026-02-06 (Fri, 06 Feb 2026)

  Changed paths:
    M Source/WebCore/platform/graphics/opentype/OpenTypeMathData.cpp
    M Source/WebCore/platform/graphics/opentype/OpenTypeMathData.h
    M Source/WebCore/rendering/mathml/MathOperator.cpp
    M Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp
    M Source/WebCore/rendering/mathml/RenderMathMLFraction.cpp
    M Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp
    M Source/WebCore/rendering/mathml/RenderMathMLScripts.cpp
    M Source/WebCore/rendering/mathml/RenderMathMLUnderOver.cpp
    M Source/WebCore/style/StyleBuilderCustom.h

  Log Message:
  -----------
  Convert OpenTypeMathData::MathConstant to a scoped enum class
https://bugs.webkit.org/show_bug.cgi?id=307045
rdar://169688253

Reviewed by Sammy Gill.

Use enum class with uint8_t underlying type. Update all call sites
to use OpenTypeMathData::MathConstant::ConstantName syntax.

Use std::to_underlying() in OpenTypeMathData.cpp for array indexing
and arithmetic operations where the enum values are used as indices
into the MATH table constants array.

This provides stronger type safety by preventing implicit conversions
to integers and avoids polluting the enclosing namespace with 57
enumerator names.

* Source/WebCore/platform/graphics/opentype/OpenTypeMathData.h:
(): Deleted.
* Source/WebCore/rendering/mathml/MathOperator.cpp:
(WebCore::MathOperator::calculateDisplayStyleLargeOperator):
* Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp:
(WebCore::axisHeight):
* Source/WebCore/rendering/mathml/RenderMathMLFraction.cpp:
(WebCore::RenderMathMLFraction::defaultLineThickness const):
(WebCore::RenderMathMLFraction::fractionParameters const):
(WebCore::RenderMathMLFraction::stackParameters const):
* Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp:
(WebCore::RenderMathMLRoot::horizontalParameters):
(WebCore::RenderMathMLRoot::verticalParameters):
* Source/WebCore/rendering/mathml/RenderMathMLScripts.cpp:
(WebCore::RenderMathMLScripts::spaceAfterScript):
(WebCore::RenderMathMLScripts::verticalParameters const):
* Source/WebCore/rendering/mathml/RenderMathMLUnderOver.cpp:
(WebCore::RenderMathMLUnderOver::verticalParameters const):
* Source/WebCore/style/StyleBuilderCustom.h:
(WebCore::Style::BuilderCustom::determineMathDepthScale):

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



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

Reply via email to