Title: [271715] trunk/Source/WebCore
- Revision
- 271715
- Author
- commit-qu...@webkit.org
- Date
- 2021-01-21 14:56:43 -0800 (Thu, 21 Jan 2021)
Log Message
zero and rename boundingRect pointer in Font::platformBoundsForGlyph() to CTFontGetBoundingRectsForGlyphs()
https://bugs.webkit.org/show_bug.cgi?id=219177
Patch by Julian Gonzalez <julian_a_gonza...@apple.com> on 2021-01-21
Reviewed by Darin Adler.
Zero and rename a CGRect struct in two places where the count argument
to CTFontGetBoundingRectsForGlyphs() is already 1.
Thanks to Darin Adler for pointing out this issue.
No new tests, no behavior changes.
* platform/graphics/coretext/FontCoreText.cpp:
(WebCore::Font::platformBoundsForGlyph const):
(WebCore::Font::isProbablyOnlyUsedToRenderIcons const):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (271714 => 271715)
--- trunk/Source/WebCore/ChangeLog 2021-01-21 22:55:23 UTC (rev 271714)
+++ trunk/Source/WebCore/ChangeLog 2021-01-21 22:56:43 UTC (rev 271715)
@@ -1,3 +1,20 @@
+2021-01-21 Julian Gonzalez <julian_a_gonza...@apple.com>
+
+ zero and rename boundingRect pointer in Font::platformBoundsForGlyph() to CTFontGetBoundingRectsForGlyphs()
+ https://bugs.webkit.org/show_bug.cgi?id=219177
+
+ Reviewed by Darin Adler.
+
+ Zero and rename a CGRect struct in two places where the count argument
+ to CTFontGetBoundingRectsForGlyphs() is already 1.
+ Thanks to Darin Adler for pointing out this issue.
+
+ No new tests, no behavior changes.
+
+ * platform/graphics/coretext/FontCoreText.cpp:
+ (WebCore::Font::platformBoundsForGlyph const):
+ (WebCore::Font::isProbablyOnlyUsedToRenderIcons const):
+
2021-01-21 Sam Weinig <wei...@apple.com>
Remove explicit clamp to SRGB for Lab colors on CG platforms that support wide color
Modified: trunk/Source/WebCore/platform/graphics/coretext/FontCoreText.cpp (271714 => 271715)
--- trunk/Source/WebCore/platform/graphics/coretext/FontCoreText.cpp 2021-01-21 22:55:23 UTC (rev 271714)
+++ trunk/Source/WebCore/platform/graphics/coretext/FontCoreText.cpp 2021-01-21 22:56:43 UTC (rev 271715)
@@ -699,8 +699,8 @@
FloatRect Font::platformBoundsForGlyph(Glyph glyph) const
{
FloatRect boundingBox;
- CGRect emptyRect;
- boundingBox = CTFontGetBoundingRectsForGlyphs(m_platformData.ctFont(), platformData().orientation() == FontOrientation::Vertical ? kCTFontOrientationVertical : kCTFontOrientationHorizontal, &glyph, &emptyRect, 1);
+ CGRect ignoredRect = { };
+ boundingBox = CTFontGetBoundingRectsForGlyphs(m_platformData.ctFont(), platformData().orientation() == FontOrientation::Vertical ? kCTFontOrientationVertical : kCTFontOrientationHorizontal, &glyph, &ignoredRect, 1);
boundingBox.setY(-boundingBox.maxY());
if (m_syntheticBoldOffset)
boundingBox.setWidth(boundingBox.width() + m_syntheticBoldOffset);
@@ -744,8 +744,8 @@
UniChar lowercaseACharacter = 'a';
CGGlyph lowercaseAGlyph;
if (CTFontGetGlyphsForCharacters(platformFont, &lowercaseACharacter, &lowercaseAGlyph, 1)) {
- CGRect emptyRect;
- if (!CGRectIsEmpty(CTFontGetBoundingRectsForGlyphs(platformFont, kCTFontOrientationDefault, &lowercaseAGlyph, &emptyRect, 1)))
+ CGRect ignoredRect = { };
+ if (!CGRectIsEmpty(CTFontGetBoundingRectsForGlyphs(platformFont, kCTFontOrientationDefault, &lowercaseAGlyph, &ignoredRect, 1)))
return false;
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes