Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 10b8dc99403e192b8b8a969079e2feb72dba51ac
https://github.com/WebKit/WebKit/commit/10b8dc99403e192b8b8a969079e2feb72dba51ac
Author: Ahmad Saleem <[email protected]>
Date: 2026-07-01 (Wed, 01 Jul 2026)
Changed paths:
M Source/WebCore/dom/DataTransferItemList.cpp
Log Message:
-----------
DataTransferItemList::didSetStringData recomputes convertToASCIILowercase()
instead of reusing cached value
https://bugs.webkit.org/show_bug.cgi?id=318311
rdar://181102368
Reviewed by Charlie Wolfe.
didSetStringData() computed lowercasedType from type.convertToASCIILowercase()
and then called type.convertToASCIILowercase() a second time when passing the
argument to removeStringItemOfLowercasedType(), redundantly recomputing the
lowercased string. Reuse the already-computed local instead.
Also capture lowercasedType by reference rather than by value in the
removeStringItemOfLowercasedType() findIf lambda, since the lambda runs
synchronously and the string outlives the call, avoiding an unnecessary
String ref-count churn.
No change in behavior.
* Source/WebCore/dom/DataTransferItemList.cpp:
(WebCore::removeStringItemOfLowercasedType):
(WebCore::DataTransferItemList::didSetStringData):
Canonical link: https://commits.webkit.org/316349@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications