Title: [168607] trunk/Source/WebCore
- Revision
- 168607
- Author
- [email protected]
- Date
- 2014-05-11 21:54:34 -0700 (Sun, 11 May 2014)
Log Message
Do not create a temporary string to append the SVGLength's unit
https://bugs.webkit.org/show_bug.cgi?id=132807
Reviewed by Geoffrey Garen.
* svg/SVGLength.cpp:
(WebCore::lengthTypeToString):
The caller just append the string to a number string. The function
lengthTypeToString() was creating a new WTF::String from scratch,
copied the characters to make a new string, and destroyed the WTF::String.
Instead, just append the string literal.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (168606 => 168607)
--- trunk/Source/WebCore/ChangeLog 2014-05-12 04:23:12 UTC (rev 168606)
+++ trunk/Source/WebCore/ChangeLog 2014-05-12 04:54:34 UTC (rev 168607)
@@ -1,3 +1,18 @@
+2014-05-11 Benjamin Poulain <[email protected]>
+
+ Do not create a temporary string to append the SVGLength's unit
+ https://bugs.webkit.org/show_bug.cgi?id=132807
+
+ Reviewed by Geoffrey Garen.
+
+ * svg/SVGLength.cpp:
+ (WebCore::lengthTypeToString):
+ The caller just append the string to a number string. The function
+ lengthTypeToString() was creating a new WTF::String from scratch,
+ copied the characters to make a new string, and destroyed the WTF::String.
+
+ Instead, just append the string literal.
+
2014-05-11 Yusuke Suzuki <[email protected]>
CSS JIT: reduce cost of computing backtracking height
Modified: trunk/Source/WebCore/svg/SVGLength.cpp (168606 => 168607)
--- trunk/Source/WebCore/svg/SVGLength.cpp 2014-05-12 04:23:12 UTC (rev 168606)
+++ trunk/Source/WebCore/svg/SVGLength.cpp 2014-05-12 04:54:34 UTC (rev 168607)
@@ -54,7 +54,7 @@
return static_cast<SVGLengthType>(type);
}
-static inline String lengthTypeToString(SVGLengthType type)
+static inline const char* lengthTypeToString(SVGLengthType type)
{
switch (type) {
case LengthTypeUnknown:
@@ -81,7 +81,7 @@
}
ASSERT_NOT_REACHED();
- return String();
+ return "";
}
inline SVGLengthType stringToLengthType(const UChar*& ptr, const UChar* end)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes