Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e2e6e3b758f6e8966f8a3d05b5b6234eea60dea5
https://github.com/WebKit/WebKit/commit/e2e6e3b758f6e8966f8a3d05b5b6234eea60dea5
Author: Brandon Stewart <[email protected]>
Date: 2025-12-09 (Tue, 09 Dec 2025)
Changed paths:
M Source/WebInspectorUI/UserInterface/Base/MIMETypeUtilities.js
M Source/WebInspectorUI/UserInterface/Base/Utilities.js
M Source/WebInspectorUI/UserInterface/Controllers/HARBuilder.js
M Source/WebInspectorUI/UserInterface/Models/Cookie.js
M Source/WebInspectorUI/UserInterface/Models/Gradient.js
M Source/WebInspectorUI/UserInterface/Test/TestHarness.js
Log Message:
-----------
Web Inspector: Replace deprecated String.prototype.substr with substring and
at for single parameters
https://bugs.webkit.org/show_bug.cgi?id=303832
rdar://problem/166140736
Reviewed by Devin Rousso.
String.prototype.substr is deprecated (Annex B) and should be replaced
with modern alternatives.
Using at in places with negative values, and using substring in places we can
prove will never be below 0.
Only handling the single parameter case, because the two parameter function
calls have different syntax:
String.prototype.substr ( start, length )
String.prototype.slice ( start, end )
* Source/WebInspectorUI/UserInterface/Base/MIMETypeUtilities.js:
(WI.fileExtensionForFilename):
* Source/WebInspectorUI/UserInterface/Base/Utilities.js:
(get return):
* Source/WebInspectorUI/UserInterface/Controllers/HARBuilder.js:
(WI.HARBuilder.port):
* Source/WebInspectorUI/UserInterface/Models/Cookie.js:
(WI.Cookie.parseSetCookieResponseHeader):
* Source/WebInspectorUI/UserInterface/Models/Gradient.js:
(WI.Gradient.stopsWithComponents):
* Source/WebInspectorUI/UserInterface/Test/TestHarness.js:
(TestHarness.sanitizeURL):
(TestHarness.sanitizeStackFrame):
Canonical link: https://commits.webkit.org/304181@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications