Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e1708f08916433fc8060af1c4bfacdebc23c4cdf
https://github.com/WebKit/WebKit/commit/e1708f08916433fc8060af1c4bfacdebc23c4cdf
Author: Vitor Roriz <[email protected]>
Date: 2026-02-17 (Tue, 17 Feb 2026)
Changed paths:
M Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp
M Source/WebCore/platform/graphics/FontCascade.cpp
M Source/WebCore/platform/graphics/FontCascade.h
M Source/WebCore/platform/graphics/FontCascadeFonts.cpp
M Source/WebCore/platform/graphics/FontCascadeFonts.h
Log Message:
-----------
Introduce TextShapingResult as result for layout*Text functions
https://bugs.webkit.org/show_bug.cgi?id=308000
rdar://170493502
Reviewed by Elika Etemad.
Refactor layoutText and related functions to return TextShapingResult
instead of using out-parameter. This is a better pattern now that
layoutText result is not only a glyph buffer. With that, we can also
align the returned type with what's stored in the CachedShapedText,
avoiding an intermediary wrapper.
* Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp:
(WebCore::CanvasRenderingContext2DBase::drawTextUnchecked):
* Source/WebCore/platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::layoutText const):
(WebCore::FontCascade::drawText const):
(WebCore::FontCascade::drawEmphasisMarks const):
(WebCore::FontCascade::displayListForTextRun const):
(WebCore::FontCascade::layoutSimpleText const):
(WebCore::FontCascade::layoutComplexText const):
(WebCore::FontCascade::lineSegmentsForIntersectionsWithRect const):
* Source/WebCore/platform/graphics/FontCascade.h:
* Source/WebCore/platform/graphics/FontCascadeFonts.cpp:
(WebCore::FontCascadeFonts::getOrCreateCachedShapedText):
* Source/WebCore/platform/graphics/FontCascadeFonts.h:
Canonical link: https://commits.webkit.org/307707@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications