Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e0920635653c6fe929aed595fc8a1d78e49be504
      
https://github.com/WebKit/WebKit/commit/e0920635653c6fe929aed595fc8a1d78e49be504
  Author: Taher Ali <[email protected]>
  Date:   2026-06-10 (Wed, 10 Jun 2026)

  Changed paths:
    M Source/WebCore/rendering/svg/legacy/LegacyRenderSVGPath.cpp

  Log Message:
  -----------
  Skip strokeWidth resolution when no markers and no zero-length caps need it
https://bugs.webkit.org/show_bug.cgi?id=316571
rdar://179038624

Reviewed by Simon Fraser.

LegacyRenderSVGPath::adjustStrokeBoundingBoxForMarkersAndZeroLengthLinecaps
unconditionally computed strokeWidth() before the two branches that use it.
For <path>s with no markers and stroke="none", both branches are no-ops and
the resolved width is discarded.

This fixes a real-world perf issue. On content with many marker-less,
stroke="none" paths, the wasted strokeWidth() call accounts for ~60% of
time spent in this function.

We add an early return when neither branch will fire.

* Source/WebCore/rendering/svg/legacy/LegacyRenderSVGPath.cpp:
(WebCore::LegacyRenderSVGPath::adjustStrokeBoundingBoxForMarkersAndZeroLengthLinecaps
 const):

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



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

Reply via email to