Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: cf4bf81285c4dce8d6c70947a9643101f4de16c8
      
https://github.com/WebKit/WebKit/commit/cf4bf81285c4dce8d6c70947a9643101f4de16c8
  Author: Ahmad Saleem <[email protected]>
  Date:   2025-12-31 (Wed, 31 Dec 2025)

  Changed paths:
    M Source/WebCore/svg/SVGLengthValue.cpp

  Log Message:
  -----------
  SVGLengthValue::setValueAsString avoids unnecessary String allocations
https://bugs.webkit.org/show_bug.cgi?id=304795
rdar://167357483

Reviewed by Nikolas Zimmermann.

Previously, the input StringView was eagerly converted to a String
before trimming and validation. This change keeps the value as a
StringView throughout parsing and only allocates when required by
CSSTokenizer.

This reduces allocations on hot SVG attribute parsing paths,
particularly for invalid or whitespace-only values.

This does not change our behavior, so no new tests.

* Source/WebCore/svg/SVGLengthValue.cpp:
(WebCore::SVGLengthValue::setValueAsString):

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



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

Reply via email to