Changeset 205405 in webkit


Ignore:
Timestamp:
Sep 3, 2016 7:52:33 AM (8 years ago)
Author:
commit-queue@webkit.org
Message:

Use ASCIILiteral in some more places
https://bugs.webkit.org/show_bug.cgi?id=161557

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-09-03
Reviewed by Darin Adler.

Source/JavaScriptCore:

  • runtime/TypeSet.h:

(JSC::StructureShape::setConstructorName):

Source/WebCore:

  • Modules/indexeddb/IDBDatabaseException.cpp:

(WebCore::IDBDatabaseException::getErrorName):
(WebCore::IDBDatabaseException::getErrorDescription):

  • Modules/websockets/WebSocket.cpp:

(WebCore::WebSocket::binaryType):

  • css/FontFace.cpp:

(WebCore::FontFace::stretch):
(WebCore::FontFace::unicodeRange):
(WebCore::FontFace::featureSettings):

  • html/canvas/WebGLRenderingContextBase.cpp:
  • html/parser/HTMLPreloadScanner.cpp:

(WebCore::TokenPreloadScanner::initiatorFor):

  • loader/FormSubmission.cpp:

(WebCore::FormSubmission::Attributes::parseEncodingType):

  • page/SecurityOrigin.cpp:

(WebCore::SecurityOrigin::toRawString):

  • platform/graphics/cg/ImageBufferCG.cpp:

(WebCore::CGImageToDataURL):
(WebCore::ImageBuffer::toDataURL):
(WebCore::ImageDataToDataURL):

  • svg/graphics/SVGImage.cpp:

(WebCore::SVGImage::filenameExtension):

Location:
trunk/Source
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r205387 r205405  
     12016-09-03  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Use ASCIILiteral in some more places
     4        https://bugs.webkit.org/show_bug.cgi?id=161557
     5
     6        Reviewed by Darin Adler.
     7
     8        * runtime/TypeSet.h:
     9        (JSC::StructureShape::setConstructorName):
     10
    1112016-09-01  Michael Saboff  <msaboff@apple.com>
    212
  • trunk/Source/JavaScriptCore/runtime/TypeSet.h

    r202364 r205405  
    6363    String toJSONString() const;
    6464    Ref<Inspector::Protocol::Runtime::StructureDescription> inspectorRepresentation();
    65     void setConstructorName(String name) { m_constructorName = (name.isEmpty() ? "Object" : name); }
     65    void setConstructorName(String name) { m_constructorName = (name.isEmpty() ? ASCIILiteral("Object") : name); }
    6666    String constructorName() { return m_constructorName; }
    6767    void setProto(PassRefPtr<StructureShape> shape) { m_proto = shape; }
  • trunk/Source/WebCore/ChangeLog

    r205404 r205405  
     12016-09-03  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Use ASCIILiteral in some more places
     4        https://bugs.webkit.org/show_bug.cgi?id=161557
     5
     6        Reviewed by Darin Adler.
     7
     8        * Modules/indexeddb/IDBDatabaseException.cpp:
     9        (WebCore::IDBDatabaseException::getErrorName):
     10        (WebCore::IDBDatabaseException::getErrorDescription):
     11        * Modules/websockets/WebSocket.cpp:
     12        (WebCore::WebSocket::binaryType):
     13        * css/FontFace.cpp:
     14        (WebCore::FontFace::stretch):
     15        (WebCore::FontFace::unicodeRange):
     16        (WebCore::FontFace::featureSettings):
     17        * html/canvas/WebGLRenderingContextBase.cpp:
     18        * html/parser/HTMLPreloadScanner.cpp:
     19        (WebCore::TokenPreloadScanner::initiatorFor):
     20        * loader/FormSubmission.cpp:
     21        (WebCore::FormSubmission::Attributes::parseEncodingType):
     22        * page/SecurityOrigin.cpp:
     23        (WebCore::SecurityOrigin::toRawString):
     24        * platform/graphics/cg/ImageBufferCG.cpp:
     25        (WebCore::CGImageToDataURL):
     26        (WebCore::ImageBuffer::toDataURL):
     27        (WebCore::ImageDataToDataURL):
     28        * svg/graphics/SVGImage.cpp:
     29        (WebCore::SVGImage::filenameExtension):
     30
    1312016-09-03  Chris Dumez  <cdumez@apple.com>
    232
  • trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseException.cpp

    r193428 r205405  
    9292    ASSERT(entry);
    9393    if (!entry)
    94         return "UnknownError";
     94        return ASCIILiteral("UnknownError");
    9595
    9696    return entry->name;
     
    102102    ASSERT(entry);
    103103    if (!entry)
    104         return "Unknown error.";
     104        return ASCIILiteral("Unknown error.");
    105105
    106106    return entry->description;
  • trunk/Source/WebCore/Modules/websockets/WebSocket.cpp

    r204127 r205405  
    454454    switch (m_binaryType) {
    455455    case BinaryTypeBlob:
    456         return "blob";
     456        return ASCIILiteral("blob");
    457457    case BinaryTypeArrayBuffer:
    458         return "arraybuffer";
     458        return ASCIILiteral("arraybuffer");
    459459    }
    460460    ASSERT_NOT_REACHED();
  • trunk/Source/WebCore/css/FontFace.cpp

    r201971 r205405  
    317317String FontFace::stretch() const
    318318{
    319     return "normal";
     319    return ASCIILiteral("normal");
    320320}
    321321
     
    324324    const_cast<CSSFontFace&>(m_backing.get()).updateStyleIfNeeded();
    325325    if (!m_backing->ranges().size())
    326         return "U+0-10FFFF";
     326        return ASCIILiteral("U+0-10FFFF");
    327327    RefPtr<CSSValueList> values = CSSValueList::createCommaSeparated();
    328328    for (auto& range : m_backing->ranges())
     
    341341    const_cast<CSSFontFace&>(m_backing.get()).updateStyleIfNeeded();
    342342    if (!m_backing->featureSettings().size())
    343         return "normal";
     343        return ASCIILiteral("normal");
    344344    RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
    345345    for (auto& feature : m_backing->featureSettings())
  • trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp

    r204618 r205405  
    48744874        switch (error) {
    48754875        case GraphicsContext3D::INVALID_ENUM:
    4876             return "INVALID_ENUM";
     4876            return ASCIILiteral("INVALID_ENUM");
    48774877        case GraphicsContext3D::INVALID_VALUE:
    4878             return "INVALID_VALUE";
     4878            return ASCIILiteral("INVALID_VALUE");
    48794879        case GraphicsContext3D::INVALID_OPERATION:
    4880             return "INVALID_OPERATION";
     4880            return ASCIILiteral("INVALID_OPERATION");
    48814881        case GraphicsContext3D::OUT_OF_MEMORY:
    4882             return "OUT_OF_MEMORY";
     4882            return ASCIILiteral("OUT_OF_MEMORY");
    48834883        case GraphicsContext3D::INVALID_FRAMEBUFFER_OPERATION:
    4884             return "INVALID_FRAMEBUFFER_OPERATION";
     4884            return ASCIILiteral("INVALID_FRAMEBUFFER_OPERATION");
    48854885        case GraphicsContext3D::CONTEXT_LOST_WEBGL:
    4886             return "CONTEXT_LOST_WEBGL";
     4886            return ASCIILiteral("CONTEXT_LOST_WEBGL");
    48874887        default:
    48884888            return String::format("WebGL ERROR(%04x)", error);
  • trunk/Source/WebCore/html/parser/HTMLPreloadScanner.cpp

    r201930 r205405  
    7575    case TagId::Source:
    7676    case TagId::Img:
    77         return "img";
     77        return ASCIILiteral("img");
    7878    case TagId::Input:
    79         return "input";
     79        return ASCIILiteral("input");
    8080    case TagId::Link:
    81         return "link";
     81        return ASCIILiteral("link");
    8282    case TagId::Script:
    83         return "script";
     83        return ASCIILiteral("script");
    8484    case TagId::Unknown:
    8585    case TagId::Style:
     
    8989    case TagId::Picture:
    9090        ASSERT_NOT_REACHED();
    91         return "unknown";
     91        return ASCIILiteral("unknown");
    9292    }
    9393    ASSERT_NOT_REACHED();
    94     return "unknown";
     94    return ASCIILiteral("unknown");
    9595}
    9696
  • trunk/Source/WebCore/loader/FormSubmission.cpp

    r204466 r205405  
    9393{
    9494    if (equalLettersIgnoringASCIICase(type, "multipart/form-data"))
    95         return "multipart/form-data";
     95        return ASCIILiteral("multipart/form-data");
    9696    if (equalLettersIgnoringASCIICase(type, "text/plain"))
    97         return "text/plain";
    98     return "application/x-www-form-urlencoded";
     97        return ASCIILiteral("text/plain");
     98    return ASCIILiteral("application/x-www-form-urlencoded");
    9999}
    100100
  • trunk/Source/WebCore/page/SecurityOrigin.cpp

    r204046 r205405  
    466466{
    467467    if (m_protocol == "file")
    468         return "file://";
     468        return ASCIILiteral("file://");
    469469
    470470    StringBuilder result;
  • trunk/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp

    r203631 r205405  
    491491    RetainPtr<CFMutableDataRef> data = adoptCF(CFDataCreateMutable(kCFAllocatorDefault, 0));
    492492    if (!CGImageEncodeToData(image, uti.get(), quality, data.get()))
    493         return "data:,";
     493        return ASCIILiteral("data:,");
    494494
    495495    Vector<char> base64Data;
     
    516516        premultipliedData = getPremultipliedImageData(IntRect(IntPoint(0, 0), logicalSize()));
    517517        if (!premultipliedData)
    518             return "data:,";
     518            return ASCIILiteral("data:,");
    519519
    520520        RetainPtr<CGDataProviderRef> dataProvider;
    521521        dataProvider = adoptCF(CGDataProviderCreateWithData(0, premultipliedData->data(), 4 * logicalSize().width() * logicalSize().height(), 0));
    522522        if (!dataProvider)
    523             return "data:,";
     523            return ASCIILiteral("data:,");
    524524
    525525        image = adoptCF(CGImageCreate(logicalSize().width(), logicalSize().height(), 8, 32, 4 * logicalSize().width(),
     
    557557        size_t size = 4 * source.width() * source.height();
    558558        if (!premultipliedData.tryReserveCapacity(size))
    559             return "data:,";
     559            return ASCIILiteral("data:,");
    560560
    561561        premultipliedData.resize(size);
     
    581581    dataProvider = adoptCF(CGDataProviderCreateWithData(0, data, 4 * source.width() * source.height(), 0));
    582582    if (!dataProvider)
    583         return "data:,";
     583        return ASCIILiteral("data:,");
    584584
    585585    RetainPtr<CGImageRef> image;
  • trunk/Source/WebCore/svg/graphics/SVGImage.cpp

    r204246 r205405  
    423423String SVGImage::filenameExtension() const
    424424{
    425     return "svg";
     425    return ASCIILiteral("svg");
    426426}
    427427
Note: See TracChangeset for help on using the changeset viewer.