⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 291731 in webkit


Ignore:
Timestamp:
Mar 22, 2022, 6:27:54 PM (5 years ago)
Author:
Chris Dumez
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/JavaScriptCore:

  • runtime/FunctionExecutable.cpp:

(JSC::FunctionExecutable::toStringSlow):

Source/WebCore:

  • html/HTMLTextAreaElement.cpp:

(WebCore::HTMLTextAreaElement::setValueCommon):

  • platform/animation/TimingFunction.cpp:

(WebCore::TimingFunction::cssText const):

Location:
trunk/Source
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r291603 r291731  
     12022-03-22  Chris Dumez  <cdumez@apple.com>
     2
     3        Use ASCIILiteral in a few more places where it is useful
     4        https://bugs.webkit.org/show_bug.cgi?id=238235
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        * runtime/FunctionExecutable.cpp:
     9        (JSC::FunctionExecutable::toStringSlow):
     10
    1112022-03-21  Yusuke Suzuki  <ysuzuki@apple.com>
    212
  • trunk/Source/JavaScriptCore/runtime/FunctionExecutable.cpp

    r288815 r291731  
    146146    case SourceParseMode::GeneratorWrapperFunctionMode:
    147147    case SourceParseMode::GeneratorWrapperMethodMode:
    148         functionHeader = "function* ";
     148        functionHeader = "function* "_s;
    149149        break;
    150150
    … …  
    160160    case SourceParseMode::AsyncFunctionBodyMode:
    161161    case SourceParseMode::AsyncArrowFunctionBodyMode:
    162         functionHeader = "function ";
     162        functionHeader = "function "_s;
    163163        break;
    164164
    … …  
    170170    case SourceParseMode::AsyncFunctionMode:
    171171    case SourceParseMode::AsyncMethodMode:
    172         functionHeader = "async function ";
     172        functionHeader = "async function "_s;
    173173        break;
    174174
    175175    case SourceParseMode::AsyncArrowFunctionMode:
    176         functionHeader = "async ";
     176        functionHeader = "async "_s;
    177177        break;
    178178
    179179    case SourceParseMode::AsyncGeneratorWrapperFunctionMode:
    180180    case SourceParseMode::AsyncGeneratorWrapperMethodMode:
    181         functionHeader = "async function* ";
     181        functionHeader = "async function* "_s;
    182182        break;
    183183    }
  • trunk/Source/WebCore/ChangeLog

    r291730 r291731  
     12022-03-22  Chris Dumez  <cdumez@apple.com>
     2
     3        Use ASCIILiteral in a few more places where it is useful
     4        https://bugs.webkit.org/show_bug.cgi?id=238235
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        * html/HTMLTextAreaElement.cpp:
     9        (WebCore::HTMLTextAreaElement::setValueCommon):
     10        * platform/animation/TimingFunction.cpp:
     11        (WebCore::TimingFunction::cssText const):
     12
    1132022-03-22  Chris Dumez  <cdumez@apple.com>
    214
  • trunk/Source/WebCore/html/HTMLTextAreaElement.cpp

    r291396 r291731  
    396396    // We normalize line endings coming from JavaScript here.
    397397    String normalizedValue = newValue.isNull() ? emptyString() : newValue;
    398     normalizedValue.replace("\r\n", "\n");
     398    normalizedValue.replace("\r\n"_s, "\n"_s);
    399399    normalizedValue.replace('\r', '\n');
    400400
  • trunk/Source/WebCore/platform/animation/TimingFunction.cpp

    r282751 r291731  
    199199        auto& function = downcast<CubicBezierTimingFunction>(*this);
    200200        if (function.x1() == 0.25 && function.y1() == 0.1 && function.x2() == 0.25 && function.y2() == 1.0)
    201             return "ease";
     201            return "ease"_s;
    202202        if (function.x1() == 0.42 && !function.y1() && function.x2() == 1.0 && function.y2() == 1.0)
    203             return "ease-in";
     203            return "ease-in"_s;
    204204        if (!function.x1() && !function.y1() && function.x2() == 0.58 && function.y2() == 1.0)
    205             return "ease-out";
     205            return "ease-out"_s;
    206206        if (function.x1() == 0.42 && !function.y1() && function.x2() == 0.58 && function.y2() == 1.0)
    207             return "ease-in-out";
     207            return "ease-in-out"_s;
    208208        return makeString("cubic-bezier(", function.x1(), ", ", function.y1(), ", ", function.x2(), ", ", function.y2(), ')');
    209209    }
Note: See TracChangeset for help on using the changeset viewer.