Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e222b940921b873bfcb23b09f42cffc19c7a695f
https://github.com/WebKit/WebKit/commit/e222b940921b873bfcb23b09f42cffc19c7a695f
Author: Chris Dumez <[email protected]>
Date: 2026-01-08 (Thu, 08 Jan 2026)
Changed paths:
M Source/WebCore/css/CSSSelector.h
M Source/WebCore/css/CSSSelectorList.cpp
Log Message:
-----------
Use move constructor instead of memcpy() for CSSSelector in CSSSelectorList
constructor
https://bugs.webkit.org/show_bug.cgi?id=305025
Reviewed by Darin Adler.
Use move constructor instead of memcpy() for CSSSelector in the
CSSSelectorList constructor.
This tested as performance neutral on Speedometer.
It also reduces help get rid of one use of `WTF_ALLOW_UNSAFE_BUFFER_USAGE`.
* Source/WebCore/css/CSSSelector.h:
(WebCore::CSSSelector::CSSSelector):
Introduce move constructor.
(WebCore::CSSSelector::operator=):
Introduce corresponding move assignment operator for completeness but it
is not required at the moment.
(WebCore::CSSSelector::~CSSSelector):
Drop some unnecessary data member resetting in the destructor. The object
is being destroyed anyway.
* Source/WebCore/css/CSSSelectorList.cpp:
(WebCore::CSSSelectorList::CSSSelectorList):
Rely on new move constructor instead of memcpy().
Canonical link: https://commits.webkit.org/305269@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications