[webkit-changes] [WebKit/WebKit] c1a059: Normalize Latin-1 characters in `String#normalize(...

Nicolò Ribaudo noreply at github.com
Tue Feb 20 12:24:03 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c1a059873be72b0942c21d34a6431be396822a85
      https://github.com/WebKit/WebKit/commit/c1a059873be72b0942c21d34a6431be396822a85
  Author: Nicolò Ribaudo <nribaudo at igalia.com>
  Date:   2024-02-20 (Tue, 20 Feb 2024)

  Changed paths:
    M JSTests/es6/String.prototype_methods_String.prototype.normalize.js
    M Source/JavaScriptCore/runtime/StringPrototype.cpp

  Log Message:
  -----------
  Normalize Latin-1 characters in `String#normalize("NFKC")``
https://bugs.webkit.org/show_bug.cgi?id=269783

Reviewed by Alexey Proskuryakov.

The `String.prototype.normalize` implementation has a fast-path in
cases where normalization does not affect the string. It was incorrectly
assumed that NFKC does not affect 8-bit strings. The only normalization
that doesn't affect them is NFC.

* JSTests/es6/String.prototype_methods_String.prototype.normalize.js:
(test):
* Source/JavaScriptCore/runtime/StringPrototype.cpp:
(JSC::normalize):
(JSC::normalizationAffects8Bit): Deleted.

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



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


More information about the webkit-changes mailing list