Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 29664d3ed4b0da9bb0516ee614f66ef18e2e1cfd
      
https://github.com/WebKit/WebKit/commit/29664d3ed4b0da9bb0516ee614f66ef18e2e1cfd
  Author: Chris Dumez <[email protected]>
  Date:   2026-04-04 (Sat, 04 Apr 2026)

  Changed paths:
    M Source/WebCore/platform/graphics/FontCascade.cpp
    M Source/WebCore/platform/graphics/FontCascade.h
    M Tools/TestWebKitAPI/Tests/WebCore/FontCascade.cpp

  Log Message:
  -----------
  Minor FontCascade cleanups: remove unused widthForCharacterInRun and fix 
operator==
https://bugs.webkit.org/show_bug.cgi?id=311476

Reviewed by Vitor Roriz and Anne van Kesteren.

Remove widthForCharacterInRun() which has no callers.

In operator==, after confirming m_fonts pointers are equal, the
check `!m_fonts || !other.m_fonts` was redundant since both are the
same pointer. Simplified to `if (!m_fonts) return true` so that two
FontCascades with matching descriptions but no fonts are correctly
considered equal, rather than returning false and falling through
to dereference null.

* Source/WebCore/platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::operator== const):
(WebCore::FontCascade::widthForCharacterInRun const): Deleted.
* Source/WebCore/platform/graphics/FontCascade.h:
* Tools/TestWebKitAPI/Tests/WebCore/FontCascade.cpp:
(TestWebKitAPI::TEST(FontCascadeTest, EqualityWithNullFonts)):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to