⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 269823 in webkit


Ignore:
Timestamp:
Nov 15, 2020, 12:56:23 AM (6 years ago)
Author:
commit-queue@webkit.org
Message:

Font::platformBoundsForGlyph() should provide a boundingRect pointer to CTFontGetBoundingRectsForGlyphs()
https://bugs.webkit.org/show_bug.cgi?id=218812

Patch by Julian Gonzalez <julian_a_gonzalez@apple.com> on 2020-11-15
Reviewed by Ryosuke Niwa.

Provide a zero CGRect boundingRect pointer in two places where the count argument
to CTFontGetBoundingRectsForGlyphs() is already 1.

No new tests, no behavior changes.

  • platform/graphics/coretext/FontCoreText.cpp:

(WebCore::Font::platformBoundsForGlyph const):
(WebCore::Font::isProbablyOnlyUsedToRenderIcons const):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r269822 r269823  
     12020-11-15  Julian Gonzalez  <julian_a_gonzalez@apple.com>
     2
     3        Font::platformBoundsForGlyph() should provide a boundingRect pointer to CTFontGetBoundingRectsForGlyphs()
     4        https://bugs.webkit.org/show_bug.cgi?id=218812
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Provide a zero CGRect boundingRect pointer in two places where the count argument
     9        to CTFontGetBoundingRectsForGlyphs() is already 1.
     10
     11        No new tests, no behavior changes.
     12
     13        * platform/graphics/coretext/FontCoreText.cpp:
     14        (WebCore::Font::platformBoundsForGlyph const):
     15        (WebCore::Font::isProbablyOnlyUsedToRenderIcons const):
     16
    1172020-11-14  Simon Fraser  <simon.fraser@apple.com>
    218
  • trunk/Source/WebCore/platform/graphics/coretext/FontCoreText.cpp

    r267112 r269823  
    700700{
    701701    FloatRect boundingBox;
    702     boundingBox = CTFontGetBoundingRectsForGlyphs(m_platformData.ctFont(), platformData().orientation() == FontOrientation::Vertical ? kCTFontOrientationVertical : kCTFontOrientationHorizontal, &glyph, 0, 1);
     702    CGRect emptyRect;
     703    boundingBox = CTFontGetBoundingRectsForGlyphs(m_platformData.ctFont(), platformData().orientation() == FontOrientation::Vertical ? kCTFontOrientationVertical : kCTFontOrientationHorizontal, &glyph, &emptyRect, 1);
    703704    boundingBox.setY(-boundingBox.maxY());
    704705    if (m_syntheticBoldOffset)
     
    744745    CGGlyph lowercaseAGlyph;
    745746    if (CTFontGetGlyphsForCharacters(platformFont, &lowercaseACharacter, &lowercaseAGlyph, 1)) {
    746         if (!CGRectIsEmpty(CTFontGetBoundingRectsForGlyphs(platformFont, kCTFontOrientationDefault, &lowercaseAGlyph, nullptr, 1)))
     747        CGRect emptyRect;
     748        if (!CGRectIsEmpty(CTFontGetBoundingRectsForGlyphs(platformFont, kCTFontOrientationDefault, &lowercaseAGlyph, &emptyRect, 1)))
    747749            return false;
    748750    }
Note: See TracChangeset for help on using the changeset viewer.