[webkit-changes] [WebKit/WebKit] 9a0185: Support border/padding/margin on RenderMathMLOperator

Frédéric Wang noreply at github.com
Wed Jul 10 13:59:39 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9a01858119398922a3baa934a4eb225786d15cda
      https://github.com/WebKit/WebKit/commit/9a01858119398922a3baa934a4eb225786d15cda
  Author: Frédéric Wang <fwang at igalia.com>
  Date:   2024-07-10 (Wed, 10 Jul 2024)

  Changed paths:
    M LayoutTests/TestExpectations
    M Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp

  Log Message:
  -----------
  Support border/padding/margin on RenderMathMLOperator
https://bugs.webkit.org/show_bug.cgi?id=276357

Reviewed by Rob Buis.

This patch adds support for border/padding/margin on `<mo>` elements
for which useMathOperator() returns true and therefore uses use
special layout and painting instead of deferring to RenderMathMLToken.

* LayoutTests/TestExpectations: Mark borders/paddings/margins reftests
  for largeop/stretchy operators as passing.
* Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::stretchTo): Include borders/paddings in
  logical width/height.
(WebCore::RenderMathMLOperator::computePreferredLogicalWidths): Include
  borders/paddings in preferred width. Children are text nodes, no need
  to consider margins.
(WebCore::RenderMathMLOperator::layoutBlock): Include borders/paddings
  for in logical width/height. Also call recomputeLogicalWidth() to set
  the inline margins on the element (block margins are handled by the
  parent). Children are text nodes, no need to consider margins for them.
(WebCore::RenderMathMLOperator::firstLineBaseline const):
  Include border/padding in the ascent.
(WebCore::RenderMathMLOperator::paint): Shift painting by the left/top
  border/padding.

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



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


More information about the webkit-changes mailing list