Title: [291731] trunk/Source
- Revision
- 291731
- Author
- cdu...@apple.com
- Date
- 2022-03-22 18:27:54 -0700 (Tue, 22 Mar 2022)
Log Message
Use ASCIILiteral in a few more places where it is useful
https://bugs.webkit.org/show_bug.cgi?id=238235
Reviewed by Geoffrey Garen.
Source/_javascript_Core:
* runtime/FunctionExecutable.cpp:
(JSC::FunctionExecutable::toStringSlow):
Source/WebCore:
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::setValueCommon):
* platform/animation/TimingFunction.cpp:
(WebCore::TimingFunction::cssText const):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (291730 => 291731)
--- trunk/Source/_javascript_Core/ChangeLog 2022-03-23 00:58:41 UTC (rev 291730)
+++ trunk/Source/_javascript_Core/ChangeLog 2022-03-23 01:27:54 UTC (rev 291731)
@@ -1,3 +1,13 @@
+2022-03-22 Chris Dumez <cdu...@apple.com>
+
+ Use ASCIILiteral in a few more places where it is useful
+ https://bugs.webkit.org/show_bug.cgi?id=238235
+
+ Reviewed by Geoffrey Garen.
+
+ * runtime/FunctionExecutable.cpp:
+ (JSC::FunctionExecutable::toStringSlow):
+
2022-03-21 Yusuke Suzuki <ysuz...@apple.com>
[JSC] Change Date.parse to stop returning numbers with fractional part
Modified: trunk/Source/_javascript_Core/runtime/FunctionExecutable.cpp (291730 => 291731)
--- trunk/Source/_javascript_Core/runtime/FunctionExecutable.cpp 2022-03-23 00:58:41 UTC (rev 291730)
+++ trunk/Source/_javascript_Core/runtime/FunctionExecutable.cpp 2022-03-23 01:27:54 UTC (rev 291731)
@@ -145,7 +145,7 @@
switch (parseMode()) {
case SourceParseMode::GeneratorWrapperFunctionMode:
case SourceParseMode::GeneratorWrapperMethodMode:
- functionHeader = "function* ";
+ functionHeader = "function* "_s;
break;
case SourceParseMode::NormalFunctionMode:
@@ -159,7 +159,7 @@
case SourceParseMode::AsyncGeneratorBodyMode:
case SourceParseMode::AsyncFunctionBodyMode:
case SourceParseMode::AsyncArrowFunctionBodyMode:
- functionHeader = "function ";
+ functionHeader = "function "_s;
break;
case SourceParseMode::ArrowFunctionMode:
@@ -169,16 +169,16 @@
case SourceParseMode::AsyncFunctionMode:
case SourceParseMode::AsyncMethodMode:
- functionHeader = "async function ";
+ functionHeader = "async function "_s;
break;
case SourceParseMode::AsyncArrowFunctionMode:
- functionHeader = "async ";
+ functionHeader = "async "_s;
break;
case SourceParseMode::AsyncGeneratorWrapperFunctionMode:
case SourceParseMode::AsyncGeneratorWrapperMethodMode:
- functionHeader = "async function* ";
+ functionHeader = "async function* "_s;
break;
}
Modified: trunk/Source/WebCore/ChangeLog (291730 => 291731)
--- trunk/Source/WebCore/ChangeLog 2022-03-23 00:58:41 UTC (rev 291730)
+++ trunk/Source/WebCore/ChangeLog 2022-03-23 01:27:54 UTC (rev 291731)
@@ -1,5 +1,17 @@
2022-03-22 Chris Dumez <cdu...@apple.com>
+ Use ASCIILiteral in a few more places where it is useful
+ https://bugs.webkit.org/show_bug.cgi?id=238235
+
+ Reviewed by Geoffrey Garen.
+
+ * html/HTMLTextAreaElement.cpp:
+ (WebCore::HTMLTextAreaElement::setValueCommon):
+ * platform/animation/TimingFunction.cpp:
+ (WebCore::TimingFunction::cssText const):
+
+2022-03-22 Chris Dumez <cdu...@apple.com>
+
Add URL::stringWithoutFragmentIdentifier() overload which returns a String instead of a StringView
https://bugs.webkit.org/show_bug.cgi?id=238221
Modified: trunk/Source/WebCore/html/HTMLTextAreaElement.cpp (291730 => 291731)
--- trunk/Source/WebCore/html/HTMLTextAreaElement.cpp 2022-03-23 00:58:41 UTC (rev 291730)
+++ trunk/Source/WebCore/html/HTMLTextAreaElement.cpp 2022-03-23 01:27:54 UTC (rev 291731)
@@ -395,7 +395,7 @@
// Code elsewhere normalizes line endings added by the user via the keyboard or pasting.
// We normalize line endings coming from _javascript_ here.
String normalizedValue = newValue.isNull() ? emptyString() : newValue;
- normalizedValue.replace("\r\n", "\n");
+ normalizedValue.replace("\r\n"_s, "\n"_s);
normalizedValue.replace('\r', '\n');
// Return early because we don't want to move the caret or trigger other side effects
Modified: trunk/Source/WebCore/platform/animation/TimingFunction.cpp (291730 => 291731)
--- trunk/Source/WebCore/platform/animation/TimingFunction.cpp 2022-03-23 00:58:41 UTC (rev 291730)
+++ trunk/Source/WebCore/platform/animation/TimingFunction.cpp 2022-03-23 01:27:54 UTC (rev 291731)
@@ -198,13 +198,13 @@
if (m_type == TimingFunction::CubicBezierFunction) {
auto& function = downcast<CubicBezierTimingFunction>(*this);
if (function.x1() == 0.25 && function.y1() == 0.1 && function.x2() == 0.25 && function.y2() == 1.0)
- return "ease";
+ return "ease"_s;
if (function.x1() == 0.42 && !function.y1() && function.x2() == 1.0 && function.y2() == 1.0)
- return "ease-in";
+ return "ease-in"_s;
if (!function.x1() && !function.y1() && function.x2() == 0.58 && function.y2() == 1.0)
- return "ease-out";
+ return "ease-out"_s;
if (function.x1() == 0.42 && !function.y1() && function.x2() == 0.58 && function.y2() == 1.0)
- return "ease-in-out";
+ return "ease-in-out"_s;
return makeString("cubic-bezier(", function.x1(), ", ", function.y1(), ", ", function.x2(), ", ", function.y2(), ')');
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes