Diff
Modified: trunk/Source/WTF/ChangeLog (292298 => 292299)
--- trunk/Source/WTF/ChangeLog 2022-04-04 17:33:28 UTC (rev 292298)
+++ trunk/Source/WTF/ChangeLog 2022-04-04 17:37:06 UTC (rev 292299)
@@ -1,3 +1,13 @@
+2022-04-04 Chris Dumez <[email protected]>
+
+ Drop mostly unused String(const LChar*) constructor
+ https://bugs.webkit.org/show_bug.cgi?id=238716
+
+ Reviewed by Geoffrey Garen.
+
+ * wtf/text/WTFString.cpp:
+ * wtf/text/WTFString.h:
+
2022-04-04 Cathie Chen <[email protected]>
REGRESSION(r291797): [wk1] 5 contain-intrinsic-size* tests are constant text failures
Modified: trunk/Source/WTF/wtf/text/WTFString.cpp (292298 => 292299)
--- trunk/Source/WTF/wtf/text/WTFString.cpp 2022-04-04 17:33:28 UTC (rev 292298)
+++ trunk/Source/WTF/wtf/text/WTFString.cpp 2022-04-04 17:37:06 UTC (rev 292299)
@@ -67,12 +67,6 @@
}
// Construct a string with Latin-1 data, from a null-terminated source.
-String::String(const LChar* nullTerminatedString)
-{
- if (nullTerminatedString)
- m_impl = StringImpl::create(nullTerminatedString);
-}
-
String::String(const char* nullTerminatedString)
{
if (nullTerminatedString)
Modified: trunk/Source/WTF/wtf/text/WTFString.h (292298 => 292299)
--- trunk/Source/WTF/wtf/text/WTFString.h 2022-04-04 17:33:28 UTC (rev 292298)
+++ trunk/Source/WTF/wtf/text/WTFString.h 2022-04-04 17:37:06 UTC (rev 292299)
@@ -81,7 +81,6 @@
WTF_EXPORT_PRIVATE String(const char* characters, unsigned length);
// Construct a string with latin1 data, from a null-terminated source.
- WTF_EXPORT_PRIVATE String(const LChar* characters);
WTF_EXPORT_PRIVATE String(const char* characters);
// Construct a string referencing an existing StringImpl.
Modified: trunk/Source/WebCore/platform/graphics/opengl/ExtensionsGLOpenGLCommon.cpp (292298 => 292299)
--- trunk/Source/WebCore/platform/graphics/opengl/ExtensionsGLOpenGLCommon.cpp 2022-04-04 17:33:28 UTC (rev 292298)
+++ trunk/Source/WebCore/platform/graphics/opengl/ExtensionsGLOpenGLCommon.cpp 2022-04-04 17:37:06 UTC (rev 292299)
@@ -215,7 +215,7 @@
GLint numExtensions = 0;
::glGetIntegerv(GL_NUM_EXTENSIONS, &numExtensions);
for (GLint i = 0; i < numExtensions; ++i)
- m_availableExtensions.add(glGetStringi(GL_EXTENSIONS, i));
+ m_availableExtensions.add(reinterpret_cast<const char*>(glGetStringi(GL_EXTENSIONS, i)));
if (!m_availableExtensions.contains("GL_ARB_texture_storage"_s)) {
GLint majorVersion;
Modified: trunk/Tools/ChangeLog (292298 => 292299)
--- trunk/Tools/ChangeLog 2022-04-04 17:33:28 UTC (rev 292298)
+++ trunk/Tools/ChangeLog 2022-04-04 17:37:06 UTC (rev 292299)
@@ -1,3 +1,15 @@
+2022-04-04 Chris Dumez <[email protected]>
+
+ Drop mostly unused String(const LChar*) constructor
+ https://bugs.webkit.org/show_bug.cgi?id=238716
+
+ Reviewed by Geoffrey Garen.
+
+ * TestWebKitAPI/Tests/WTF/StringOperators.cpp:
+ (TestWebKitAPI::TEST):
+ * TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm:
+ (TestWebKitAPI::TEST):
+
2022-04-04 Elliott Williams <[email protected]>
[XCBuild] WebKitLegacy's "Migrated headers" script does not emit task information
Modified: trunk/Tools/TestWebKitAPI/Tests/WTF/StringOperators.cpp (292298 => 292299)
--- trunk/Tools/TestWebKitAPI/Tests/WTF/StringOperators.cpp 2022-04-04 17:33:28 UTC (rev 292298)
+++ trunk/Tools/TestWebKitAPI/Tests/WTF/StringOperators.cpp 2022-04-04 17:37:06 UTC (rev 292299)
@@ -260,10 +260,10 @@
ASSERT_EQ(static_cast<unsigned>(4), concatenation16.length());
ASSERT_TRUE(concatenation16 == String(ucharArray));
- LChar lcharArray[] = { 't', 'e', 's', 't', '\0' };
- String concatenation8 = lcharArray + emptyString;
+ LChar lcharArray[] = { 't', 'e', 's', 't' };
+ String concatenation8 = String(lcharArray, 4) + emptyString;
ASSERT_EQ(static_cast<unsigned>(4), concatenation8.length());
- ASSERT_TRUE(concatenation8 == String(lcharArray));
+ ASSERT_TRUE(concatenation8 == String(lcharArray, 4));
}
} // namespace TestWebKitAPI
Modified: trunk/Tools/TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm (292298 => 292299)
--- trunk/Tools/TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm 2022-04-04 17:33:28 UTC (rev 292298)
+++ trunk/Tools/TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm 2022-04-04 17:37:06 UTC (rev 292299)
@@ -234,8 +234,8 @@
EXPECT_FALSE(url3.isValid());
EXPECT_STREQ([[url3 absoluteString] UTF8String], "%C3%82%C2%B6");
- std::array<LChar, 3> latin1 { 0xC2, 0xB6, 0x00 };
- WTF::URL url4 { String(latin1.data()) };
+ std::array<LChar, 2> latin1 { 0xC2, 0xB6 };
+ WTF::URL url4 { String(latin1.data(), 2) };
EXPECT_FALSE(url4.isValid());
EXPECT_TRUE(url4.string().is8Bit());
EXPECT_STREQ([[url4 absoluteString] UTF8String], "%C3%82%C2%B6");