Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a0e77e4c971777e49cceb1d5b37f4dfbe9ce7dcf
      
https://github.com/WebKit/WebKit/commit/a0e77e4c971777e49cceb1d5b37f4dfbe9ce7dcf
  Author: Ahmad Saleem <[email protected]>
  Date:   2026-10-13 (Tue, 13 Oct 2026)

  Changed paths:
    M Source/WebCore/svg/PatternAttributes.h
    M Source/WebCore/svg/SVGSVGElement.h
    M Source/WebCore/svg/SVGTransformValue.h
    M Source/WebCore/svg/animation/SVGSMILElement.h

  Log Message:
  -----------
  Reduce padding in several SVG classes
https://bugs.webkit.org/show_bug.cgi?id=327321
rdar://189860903

Reviewed by Chris Dumez.

Reorder members to remove padding holes. This saves 8 bytes per object in each 
class:

PatternAttributes: 216 -> 208 bytes. Move m_patternTransform and
m_patternContentElement ahead of m_preserveAspectRatio. The 2-byte
m_preserveAspectRatio, the two 1-byte SVGUnitType members and the bool
bitfields now share the final 8-byte slot.

SVGSMILElement: 448 -> 440 bytes. Move m_documentOrderIndex next to
m_lastRepeat. This fills the 4-byte hole that used to follow it after
m_timeContainer.

SVGSVGElement: 424 -> 416 bytes. Move m_useCurrentView and
m_ignoresPreserveAspectRatioForSVGImage after m_currentScale. This fills
the hole after the float instead of leaving 6 bytes of padding after the
two bools.

SVGTransformValue: 32 -> 24 bytes. Put m_matrix before m_type so that
m_type, m_angle and m_rotationCenter pack together after the pointer.

The sizes are the same on GCC, Clang and Clang with the MSVC ABI.

No behavior change.

* Source/WebCore/svg/PatternAttributes.h:
* Source/WebCore/svg/SVGSVGElement.h:
* Source/WebCore/svg/SVGTransformValue.h:
(WebCore::SVGTransformValue::SVGTransformValue):
* Source/WebCore/svg/animation/SVGSMILElement.h:

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



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

Reply via email to