[webkit-changes] [WebKit/WebKit] 7995dc: Produce 8 bit @font-face URL strings when possible

Cameron McCormack noreply at github.com
Wed Feb 22 18:48:23 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7995dcceaf8679a715336b9ee9ee4de7793976ac
      https://github.com/WebKit/WebKit/commit/7995dcceaf8679a715336b9ee9ee4de7793976ac
  Author: Cameron McCormack <heycam at apple.com>
  Date:   2023-02-22 (Wed, 22 Feb 2023)

  Changed paths:
    M Source/WebCore/css/parser/CSSPropertyParserWorkerSafe.cpp

  Log Message:
  -----------
  Produce 8 bit @font-face URL strings when possible
https://bugs.webkit.org/show_bug.cgi?id=252781
<rdar://problem/105801659>

Reviewed by Simon Fraser.

We can end up wasting memory storing @font-face URLs (which can be large data:
URLs) as 16 bit strings, if they appear in style sheet text stored as a 16 bit
string, even when the URL itself is 8 bit only.

This uses isAllASCII(), when really we could be checking for "is all
Latin-1", but there's an existing fast path for ASCII-checking.

* Source/WebCore/css/parser/CSSPropertyParserWorkerSafe.cpp:
(WebCore::CSSPropertyParserHelpersWorkerSafe::consumeFontFaceSrcURI):

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




More information about the webkit-changes mailing list