Diff
Modified: trunk/Source/WebCore/ChangeLog (148992 => 148993)
--- trunk/Source/WebCore/ChangeLog 2013-04-23 21:18:36 UTC (rev 148992)
+++ trunk/Source/WebCore/ChangeLog 2013-04-23 21:24:57 UTC (rev 148993)
@@ -1,3 +1,21 @@
+2013-04-23 Benjamin Poulain <[email protected]>
+
+ Minor String usage fixes in WebCore/platform
+ https://bugs.webkit.org/show_bug.cgi?id=115021
+
+ Reviewed by Andreas Kling.
+
+ Use ASCIILiteral when possible + minor fixes.
+
+ * platform/ContentType.cpp:
+ (WebCore::ContentType::codecs):
+ * platform/ContentType.h:
+ (ContentType):
+ * platform/Decimal.cpp:
+ (WebCore::Decimal::toString):
+ * platform/KURL.cpp:
+ (WebCore::KURL::setProtocol):
+
2013-04-23 Dirk Schulze <[email protected]>
Pick up color and mat values in custom shaders
Modified: trunk/Source/WebCore/platform/ContentType.cpp (148992 => 148993)
--- trunk/Source/WebCore/platform/ContentType.cpp 2013-04-23 21:18:36 UTC (rev 148992)
+++ trunk/Source/WebCore/platform/ContentType.cpp 2013-04-23 21:24:57 UTC (rev 148993)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2006, 2008, 2013 Apple Inc. All rights reserved.
* Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
* Copyright (C) 2009 Google Inc. All rights reserved.
*
@@ -78,13 +78,13 @@
Vector<String> ContentType::codecs() const
{
- String codecsParameter = parameter("codecs");
+ String codecsParameter = parameter(ASCIILiteral("codecs"));
if (codecsParameter.isEmpty())
return Vector<String>();
Vector<String> codecs;
- codecsParameter.split(",", codecs);
+ codecsParameter.split(',', codecs);
for (size_t i = 0; i < codecs.size(); ++i)
codecs[i] = codecs[i].simplifyWhiteSpace();
Modified: trunk/Source/WebCore/platform/ContentType.h (148992 => 148993)
--- trunk/Source/WebCore/platform/ContentType.h 2013-04-23 21:18:36 UTC (rev 148992)
+++ trunk/Source/WebCore/platform/ContentType.h 2013-04-23 21:24:57 UTC (rev 148993)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2006, 2013 Apple Computer, Inc. All rights reserved.
* Copyright (C) 2009 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -35,7 +35,7 @@
public:
explicit ContentType(const String& type);
- String parameter (const String& parameterName) const;
+ String parameter(const String& parameterName) const;
String type() const;
Vector<String> codecs() const;
const String& raw() const { return m_type; }
Modified: trunk/Source/WebCore/platform/Decimal.cpp (148992 => 148993)
--- trunk/Source/WebCore/platform/Decimal.cpp 2013-04-23 21:18:36 UTC (rev 148992)
+++ trunk/Source/WebCore/platform/Decimal.cpp 2013-04-23 21:24:57 UTC (rev 148993)
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2012 Google Inc. All rights reserved.
+ * Copyright (C) 2013 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -945,10 +946,10 @@
{
switch (m_data.formatClass()) {
case EncodedData::ClassInfinity:
- return sign() ? "-Infinity" : "Infinity";
+ return sign() ? ASCIILiteral("-Infinity") : ASCIILiteral("Infinity");
case EncodedData::ClassNaN:
- return "NaN";
+ return ASCIILiteral("NaN");
case EncodedData::ClassNormal:
case EncodedData::ClassZero:
@@ -956,7 +957,7 @@
default:
ASSERT_NOT_REACHED();
- return "";
+ return emptyString();
}
StringBuilder builder;
Modified: trunk/Source/WebCore/platform/KURL.cpp (148992 => 148993)
--- trunk/Source/WebCore/platform/KURL.cpp 2013-04-23 21:18:36 UTC (rev 148992)
+++ trunk/Source/WebCore/platform/KURL.cpp 2013-04-23 21:24:57 UTC (rev 148993)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2007, 2008, 2011, 2012 Apple Inc. All rights reserved.
+ * Copyright (C) 2004, 2007, 2008, 2011, 2012, 2013 Apple Inc. All rights reserved.
* Copyright (C) 2012 Research In Motion Limited. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -700,7 +700,7 @@
return false;
if (!m_isValid) {
- parse(newProtocol + ":" + m_string);
+ parse(newProtocol + ':' + m_string);
return true;
}