[webkit-changes] [WebKit/WebKit] ef2295: Use GlyphData.isValid() consistently for checking ...

fantasai noreply at github.com
Mon Nov 6 16:47:15 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ef2295446d89276b712fcd8eee2494c622c5ee18
      https://github.com/WebKit/WebKit/commit/ef2295446d89276b712fcd8eee2494c622c5ee18
  Author: Elika Etemad <fantasai.bugs at inkedblade.net>
  Date:   2023-11-06 (Mon, 06 Nov 2023)

  Changed paths:
    M Source/WebCore/platform/graphics/FontCascade.cpp
    M Source/WebCore/platform/graphics/FontCascadeFonts.cpp
    M Source/WebCore/platform/graphics/FontRanges.cpp
    M Source/WebCore/platform/graphics/GlyphPage.h

  Log Message:
  -----------
  Use GlyphData.isValid() consistently for checking whether GlyphData is valid.
https://bugs.webkit.org/show_bug.cgi?id=264130
rdar://117905809

Reviewed by Tim Nguyen.

Replace GlyphData validity checks using .glyph and .font directly with .isValid().
Make .isValid() return false even if .glyph is non-zero and .font is null
(which should never happen) since a .font null check isn't expensive anyway.

* Source/WebCore/platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::fontForCombiningCharacterSequence const):
* Source/WebCore/platform/graphics/FontCascadeFonts.cpp:
(WebCore::FontCascadeFonts::GlyphPageCacheEntry::setGlyphDataForCharacter):
(WebCore::FontCascadeFonts::glyphDataForSystemFallback):
(WebCore::FontCascadeFonts::glyphDataForVariant):
(WebCore::FontCascadeFonts::glyphDataForCharacter):
* Source/WebCore/platform/graphics/FontRanges.cpp:
(WebCore::FontRanges::glyphDataForCharacter const):
* Source/WebCore/platform/graphics/GlyphPage.h:
(WebCore::GlyphData::isValid const):

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




More information about the webkit-changes mailing list