[webkit-changes] [WebKit/WebKit] dc989b: [Cocoa] objectForEqualityCheck() is no longer nece...

Myles C. Maxfield noreply at github.com
Fri Aug 25 18:21:17 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: dc989b3ef737547949c45f39dc996f0850fe862f
      https://github.com/WebKit/WebKit/commit/dc989b3ef737547949c45f39dc996f0850fe862f
  Author: Myles C. Maxfield <mmaxfield at apple.com>
  Date:   2023-08-25 (Fri, 25 Aug 2023)

  Changed paths:
    M Source/WebCore/platform/graphics/FontPlatformData.h
    M Source/WebCore/platform/graphics/coretext/FontPlatformDataCoreText.cpp
    M Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm

  Log Message:
  -----------
  [Cocoa] objectForEqualityCheck() is no longer necessary
https://bugs.webkit.org/show_bug.cgi?id=260744
rdar://114474905

Reviewed by Cameron McCormack.

We originally used objectForEqualityCheck() because CFEqual() on fonts was a shallow
pointer comparison. It is possible to generate 2 different font objects (with different
addresses) which represent the same font, so we handled this by generating a derived
object (a "reference URL") for each font, and compared that instead. However, CFEqual()
now performs a deep comparison on fonts on all Cocoa OSes we ship on.

No test because there is no behavior change.

* Source/WebCore/platform/graphics/FontPlatformData.h:
* Source/WebCore/platform/graphics/coretext/FontPlatformDataCoreText.cpp:
(WebCore::FontPlatformData::objectForEqualityCheck): Deleted.
(WebCore::FontPlatformData::objectForEqualityCheck const): Deleted.
* Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm:
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):

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




More information about the webkit-changes mailing list