[webkit-changes] [WebKit/WebKit] 680a7f: Serialize WebCore::Color instead of NSColor, UICol...

Alex Christensen noreply at github.com
Fri Nov 3 18:13:13 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 680a7f767aa71c286ee1fbf97a660f130e042acc
      https://github.com/WebKit/WebKit/commit/680a7f767aa71c286ee1fbf97a660f130e042acc
  Author: Alex Christensen <achristensen at apple.com>
  Date:   2023-11-03 (Fri, 03 Nov 2023)

  Changed paths:
    M Source/WebCore/editing/cocoa/AttributedString.h
    M Source/WebCore/editing/cocoa/AttributedString.mm
    M Source/WebKit/Shared/Cocoa/WebCoreArgumentCodersCocoa.serialization.in

  Log Message:
  -----------
  Serialize WebCore::Color instead of NSColor, UIColor, and CGColorRef in AttributedStrings
https://bugs.webkit.org/show_bug.cgi?id=264133
rdar://117889443

Reviewed by Brady Eidson.

NSAttributedStrings generated by WebKit and PDFs can have colors as attributes.  We need to keep the
CGColorRefs and UIColor/NSColors separate so the NSAttributedStrings have the same attribute types on
both sides of IPC, but we should serialize them as a WebCore::Color instead of a RetainPtr so we can
work towards removing RetainPtr serialization.

* Source/WebCore/editing/cocoa/AttributedString.h:
* Source/WebCore/editing/cocoa/AttributedString.mm:
(WebCore::toNSObject):
(WebCore::extractValue):
* Source/WebKit/Shared/Cocoa/WebCoreArgumentCodersCocoa.serialization.in:

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




More information about the webkit-changes mailing list