Title: [205405] trunk/Source
Revision
205405
Author
[email protected]
Date
2016-09-03 07:52:33 -0700 (Sat, 03 Sep 2016)

Log Message

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

Patch by Joseph Pecoraro <[email protected]> on 2016-09-03
Reviewed by Darin Adler.

Source/_javascript_Core:

* 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):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (205404 => 205405)


--- trunk/Source/_javascript_Core/ChangeLog	2016-09-03 14:44:59 UTC (rev 205404)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-09-03 14:52:33 UTC (rev 205405)
@@ -1,3 +1,13 @@
+2016-09-03  Joseph Pecoraro  <[email protected]>
+
+        Use ASCIILiteral in some more places
+        https://bugs.webkit.org/show_bug.cgi?id=161557
+
+        Reviewed by Darin Adler.
+
+        * runtime/TypeSet.h:
+        (JSC::StructureShape::setConstructorName):
+
 2016-09-01  Michael Saboff  <[email protected]>
 
         Import Chakra tests to JSC

Modified: trunk/Source/_javascript_Core/runtime/TypeSet.h (205404 => 205405)


--- trunk/Source/_javascript_Core/runtime/TypeSet.h	2016-09-03 14:44:59 UTC (rev 205404)
+++ trunk/Source/_javascript_Core/runtime/TypeSet.h	2016-09-03 14:52:33 UTC (rev 205405)
@@ -62,7 +62,7 @@
     String stringRepresentation();
     String toJSONString() const;
     Ref<Inspector::Protocol::Runtime::StructureDescription> inspectorRepresentation();
-    void setConstructorName(String name) { m_constructorName = (name.isEmpty() ? "Object" : name); }
+    void setConstructorName(String name) { m_constructorName = (name.isEmpty() ? ASCIILiteral("Object") : name); }
     String constructorName() { return m_constructorName; }
     void setProto(PassRefPtr<StructureShape> shape) { m_proto = shape; }
     void enterDictionaryMode();

Modified: trunk/Source/WebCore/ChangeLog (205404 => 205405)


--- trunk/Source/WebCore/ChangeLog	2016-09-03 14:44:59 UTC (rev 205404)
+++ trunk/Source/WebCore/ChangeLog	2016-09-03 14:52:33 UTC (rev 205405)
@@ -1,3 +1,33 @@
+2016-09-03  Joseph Pecoraro  <[email protected]>
+
+        Use ASCIILiteral in some more places
+        https://bugs.webkit.org/show_bug.cgi?id=161557
+
+        Reviewed by Darin Adler.
+
+        * 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):
+
 2016-09-03  Chris Dumez  <[email protected]>
 
         Object.preventExtensions(window) should throw a TypeError

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseException.cpp (205404 => 205405)


--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseException.cpp	2016-09-03 14:44:59 UTC (rev 205404)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseException.cpp	2016-09-03 14:52:33 UTC (rev 205405)
@@ -91,7 +91,7 @@
     const IDBDatabaseExceptionNameDescription* entry = getErrorEntry(ec);
     ASSERT(entry);
     if (!entry)
-        return "UnknownError";
+        return ASCIILiteral("UnknownError");
 
     return entry->name;
 }
@@ -101,7 +101,7 @@
     const IDBDatabaseExceptionNameDescription* entry = getErrorEntry(ec);
     ASSERT(entry);
     if (!entry)
-        return "Unknown error.";
+        return ASCIILiteral("Unknown error.");
 
     return entry->description;
 }

Modified: trunk/Source/WebCore/Modules/websockets/WebSocket.cpp (205404 => 205405)


--- trunk/Source/WebCore/Modules/websockets/WebSocket.cpp	2016-09-03 14:44:59 UTC (rev 205404)
+++ trunk/Source/WebCore/Modules/websockets/WebSocket.cpp	2016-09-03 14:52:33 UTC (rev 205405)
@@ -453,9 +453,9 @@
 {
     switch (m_binaryType) {
     case BinaryTypeBlob:
-        return "blob";
+        return ASCIILiteral("blob");
     case BinaryTypeArrayBuffer:
-        return "arraybuffer";
+        return ASCIILiteral("arraybuffer");
     }
     ASSERT_NOT_REACHED();
     return String();

Modified: trunk/Source/WebCore/css/FontFace.cpp (205404 => 205405)


--- trunk/Source/WebCore/css/FontFace.cpp	2016-09-03 14:44:59 UTC (rev 205404)
+++ trunk/Source/WebCore/css/FontFace.cpp	2016-09-03 14:52:33 UTC (rev 205405)
@@ -316,7 +316,7 @@
 
 String FontFace::stretch() const
 {
-    return "normal";
+    return ASCIILiteral("normal");
 }
 
 String FontFace::unicodeRange() const
@@ -323,7 +323,7 @@
 {
     const_cast<CSSFontFace&>(m_backing.get()).updateStyleIfNeeded();
     if (!m_backing->ranges().size())
-        return "U+0-10FFFF";
+        return ASCIILiteral("U+0-10FFFF");
     RefPtr<CSSValueList> values = CSSValueList::createCommaSeparated();
     for (auto& range : m_backing->ranges())
         values->append(CSSUnicodeRangeValue::create(range.from, range.to));
@@ -340,7 +340,7 @@
 {
     const_cast<CSSFontFace&>(m_backing.get()).updateStyleIfNeeded();
     if (!m_backing->featureSettings().size())
-        return "normal";
+        return ASCIILiteral("normal");
     RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
     for (auto& feature : m_backing->featureSettings())
         list->append(CSSFontFeatureValue::create(FontFeatureTag(feature.tag()), feature.value()));

Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp (205404 => 205405)


--- trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp	2016-09-03 14:44:59 UTC (rev 205404)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp	2016-09-03 14:52:33 UTC (rev 205405)
@@ -4873,17 +4873,17 @@
     {
         switch (error) {
         case GraphicsContext3D::INVALID_ENUM:
-            return "INVALID_ENUM";
+            return ASCIILiteral("INVALID_ENUM");
         case GraphicsContext3D::INVALID_VALUE:
-            return "INVALID_VALUE";
+            return ASCIILiteral("INVALID_VALUE");
         case GraphicsContext3D::INVALID_OPERATION:
-            return "INVALID_OPERATION";
+            return ASCIILiteral("INVALID_OPERATION");
         case GraphicsContext3D::OUT_OF_MEMORY:
-            return "OUT_OF_MEMORY";
+            return ASCIILiteral("OUT_OF_MEMORY");
         case GraphicsContext3D::INVALID_FRAMEBUFFER_OPERATION:
-            return "INVALID_FRAMEBUFFER_OPERATION";
+            return ASCIILiteral("INVALID_FRAMEBUFFER_OPERATION");
         case GraphicsContext3D::CONTEXT_LOST_WEBGL:
-            return "CONTEXT_LOST_WEBGL";
+            return ASCIILiteral("CONTEXT_LOST_WEBGL");
         default:
             return String::format("WebGL ERROR(%04x)", error);
         }

Modified: trunk/Source/WebCore/html/parser/HTMLPreloadScanner.cpp (205404 => 205405)


--- trunk/Source/WebCore/html/parser/HTMLPreloadScanner.cpp	2016-09-03 14:44:59 UTC (rev 205404)
+++ trunk/Source/WebCore/html/parser/HTMLPreloadScanner.cpp	2016-09-03 14:52:33 UTC (rev 205405)
@@ -74,13 +74,13 @@
     switch (tagId) {
     case TagId::Source:
     case TagId::Img:
-        return "img";
+        return ASCIILiteral("img");
     case TagId::Input:
-        return "input";
+        return ASCIILiteral("input");
     case TagId::Link:
-        return "link";
+        return ASCIILiteral("link");
     case TagId::Script:
-        return "script";
+        return ASCIILiteral("script");
     case TagId::Unknown:
     case TagId::Style:
     case TagId::Base:
@@ -88,10 +88,10 @@
     case TagId::Meta:
     case TagId::Picture:
         ASSERT_NOT_REACHED();
-        return "unknown";
+        return ASCIILiteral("unknown");
     }
     ASSERT_NOT_REACHED();
-    return "unknown";
+    return ASCIILiteral("unknown");
 }
 
 class TokenPreloadScanner::StartTagScanner {

Modified: trunk/Source/WebCore/loader/FormSubmission.cpp (205404 => 205405)


--- trunk/Source/WebCore/loader/FormSubmission.cpp	2016-09-03 14:44:59 UTC (rev 205404)
+++ trunk/Source/WebCore/loader/FormSubmission.cpp	2016-09-03 14:52:33 UTC (rev 205405)
@@ -92,10 +92,10 @@
 String FormSubmission::Attributes::parseEncodingType(const String& type)
 {
     if (equalLettersIgnoringASCIICase(type, "multipart/form-data"))
-        return "multipart/form-data";
+        return ASCIILiteral("multipart/form-data");
     if (equalLettersIgnoringASCIICase(type, "text/plain"))
-        return "text/plain";
-    return "application/x-www-form-urlencoded";
+        return ASCIILiteral("text/plain");
+    return ASCIILiteral("application/x-www-form-urlencoded");
 }
 
 void FormSubmission::Attributes::updateEncodingType(const String& type)

Modified: trunk/Source/WebCore/page/SecurityOrigin.cpp (205404 => 205405)


--- trunk/Source/WebCore/page/SecurityOrigin.cpp	2016-09-03 14:44:59 UTC (rev 205404)
+++ trunk/Source/WebCore/page/SecurityOrigin.cpp	2016-09-03 14:52:33 UTC (rev 205405)
@@ -465,7 +465,7 @@
 String SecurityOrigin::toRawString() const
 {
     if (m_protocol == "file")
-        return "file://";
+        return ASCIILiteral("file://");
 
     StringBuilder result;
     result.reserveCapacity(m_protocol.length() + m_host.length() + 10);

Modified: trunk/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp (205404 => 205405)


--- trunk/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp	2016-09-03 14:44:59 UTC (rev 205404)
+++ trunk/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp	2016-09-03 14:52:33 UTC (rev 205405)
@@ -490,7 +490,7 @@
 
     RetainPtr<CFMutableDataRef> data = "" 0));
     if (!CGImageEncodeToData(image, uti.get(), quality, data.get()))
-        return "data:,";
+        return ASCIILiteral("data:,");
 
     Vector<char> base64Data;
     base64Encode(CFDataGetBytePtr(data.get()), CFDataGetLength(data.get()), base64Data);
@@ -515,12 +515,12 @@
         // JPEGs don't have an alpha channel, so we have to manually composite on top of black.
         premultipliedData = getPremultipliedImageData(IntRect(IntPoint(0, 0), logicalSize()));
         if (!premultipliedData)
-            return "data:,";
+            return ASCIILiteral("data:,");
 
         RetainPtr<CGDataProviderRef> dataProvider;
         dataProvider = adoptCF(CGDataProviderCreateWithData(0, premultipliedData->data(), 4 * logicalSize().width() * logicalSize().height(), 0));
         if (!dataProvider)
-            return "data:,";
+            return ASCIILiteral("data:,");
 
         image = adoptCF(CGImageCreate(logicalSize().width(), logicalSize().height(), 8, 32, 4 * logicalSize().width(),
                                     sRGBColorSpaceRef(), kCGBitmapByteOrderDefault | kCGImageAlphaNoneSkipLast,
@@ -556,7 +556,7 @@
         // JPEGs don't have an alpha channel, so we have to manually composite on top of black.
         size_t size = 4 * source.width() * source.height();
         if (!premultipliedData.tryReserveCapacity(size))
-            return "data:,";
+            return ASCIILiteral("data:,");
 
         premultipliedData.resize(size);
         unsigned char *buffer = premultipliedData.data();
@@ -580,7 +580,7 @@
     RetainPtr<CGDataProviderRef> dataProvider;
     dataProvider = adoptCF(CGDataProviderCreateWithData(0, data, 4 * source.width() * source.height(), 0));
     if (!dataProvider)
-        return "data:,";
+        return ASCIILiteral("data:,");
 
     RetainPtr<CGImageRef> image;
     image = adoptCF(CGImageCreate(source.width(), source.height(), 8, 32, 4 * source.width(),

Modified: trunk/Source/WebCore/svg/graphics/SVGImage.cpp (205404 => 205405)


--- trunk/Source/WebCore/svg/graphics/SVGImage.cpp	2016-09-03 14:44:59 UTC (rev 205404)
+++ trunk/Source/WebCore/svg/graphics/SVGImage.cpp	2016-09-03 14:52:33 UTC (rev 205405)
@@ -422,7 +422,7 @@
 
 String SVGImage::filenameExtension() const
 {
-    return "svg";
+    return ASCIILiteral("svg");
 }
 
 bool isInSVGImage(const Element* element)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to