Bug 218812 - Font::platformBoundsForGlyph() should provide a boundingRect pointer to CTFontGetBoundingRectsForGlyphs()
Summary: Font::platformBoundsForGlyph() should provide a boundingRect pointer to CTFon...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-11-11 11:02 PST by Julian Gonzalez
Modified: 2020-11-18 10:59 PST (History)
6 users (show)

See Also:


Attachments
Patch (2.64 KB, patch)
2020-11-11 11:30 PST, Julian Gonzalez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Julian Gonzalez 2020-11-11 11:02:22 PST
Pass a pointer to a stack-allocated boundingRect to CTFontGetBoundingRectsForGlyphs() in Font::platformBoundsForGlyph().

Also take a look at Font::isProbablyOnlyUsedToRenderIcons(), as it has the same issue.

<rdar://problem/70738704>
Comment 1 Julian Gonzalez 2020-11-11 11:30:04 PST
Created attachment 413843 [details]
Patch
Comment 2 EWS 2020-11-15 00:56:45 PST
Committed r269823: <https://trac.webkit.org/changeset/269823>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 413843 [details].
Comment 3 Darin Adler 2020-11-15 15:52:39 PST
Comment on attachment 413843 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=413843&action=review

> Source/WebCore/ChangeLog:9
> +        Provide a zero CGRect boundingRect pointer in two places where the count argument
> +        to CTFontGetBoundingRectsForGlyphs() is already 1.

The code below provides an *uninitialized* CGRect, not a zero CGRect. Do we need a zero CGRect?
Comment 4 Julian Gonzalez 2020-11-18 10:59:06 PST
Good catch, it is just a plain struct. I will add code to zero this.