Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 118979af8764d1ab6c19241970eedda69f8bf3ad
      
https://github.com/WebKit/WebKit/commit/118979af8764d1ab6c19241970eedda69f8bf3ad
  Author: Vitor Roriz <[email protected]>
  Date:   2026-03-11 (Wed, 11 Mar 2026)

  Changed paths:
    M Source/WebCore/platform/graphics/FontCascade.cpp
    M Source/WebCore/platform/graphics/WidthIterator.cpp
    M Source/WebCore/platform/graphics/WidthIterator.h

  Log Message:
  -----------
  WidthIterator: Encapsulate glyph bound computation into GlyphBounds
https://bugs.webkit.org/show_bug.cgi?id=309615
rdar://172229841

Reviewed by Sammy Gill.

Group glyph bounds data members into a GlyphBounds struct with a single
computeIfNeeded method.

The two bounds computation blocks in advanceInternal had
no reason to be separated as all the necessary input
is available at the same point.

Also, rename firstGlyphOverflow/lastGlyphOverflow to
firstGlyphLeftOverflowX/lastGlyphRightOverflowX to clarify overflow direction.

* Source/WebCore/platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::width):
* Source/WebCore/platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::GlyphBounds::computeIfNeeded):
(WebCore::WidthIterator::WidthIterator):
(WebCore::WidthIterator::advanceInternal):
* Source/WebCore/platform/graphics/WidthIterator.h:
(WebCore::WidthIterator::maxGlyphBoundingBoxY const):
(WebCore::WidthIterator::minGlyphBoundingBoxY const):
(WebCore::WidthIterator::firstGlyphOverflowX const):
(WebCore::WidthIterator::lastGlyphOverflowX const):

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



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

Reply via email to