Changeset 106253 in webkit
- Timestamp:
- Jan 30, 2012 10:10:43 AM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r106217 r106253 1 2012-01-30 Michael Saboff <msaboff@apple.com> 2 3 WebCore decodeEscapeSequences unnecessarily converts 8 bit strings to 16 bit when decoding. 4 https://bugs.webkit.org/show_bug.cgi?id=76648 5 6 Reviewed by Geoffrey Garen. 7 8 Added a new overloaded append member that takes a String& argument, an offest 9 and a length to do direct sub string appending to a StringBuilder. 10 11 * wtf/text/StringBuilder.h: 12 (WTF::StringBuilder::append): 13 1 14 2012-01-29 Zoltan Herczeg <zherczeg@webkit.org> 2 15 -
trunk/Source/JavaScriptCore/wtf/text/StringBuilder.h
r105635 r106253 87 87 } 88 88 89 void append(const String& string, unsigned offset, unsigned length) 90 { 91 if (!string.length()) 92 return; 93 94 if ((offset + length) > string.length()) 95 return; 96 97 if (string.is8Bit()) 98 append(string.characters8() + offset, length); 99 else 100 append(string.characters16() + offset, length); 101 } 102 89 103 void append(const char* characters) 90 104 { -
trunk/Source/WebCore/ChangeLog
r106252 r106253 1 2012-01-30 Michael Saboff <msaboff@apple.com> 2 3 WebCore decodeEscapeSequences unnecessarily converts 8 bit strings to 16 bit when decoding. 4 https://bugs.webkit.org/show_bug.cgi?id=76648 5 6 Reviewed by Geoffrey Garen. 7 8 Using new overloaded append(String&, offset, length) member to build result string. 9 The new member properly handles 8/16 bit-ness of strings. 10 11 Functionality not changed, therefore no new tests. 12 13 * platform/text/DecodeEscapeSequences.h: 14 (WebCore::decodeEscapeSequences): 15 1 16 2012-01-30 Pavel Feldman <pfeldman@google.com> 2 17 -
trunk/Source/WebCore/platform/text/DecodeEscapeSequences.h
r105691 r106253 140 140 continue; 141 141 142 result.append(string .characters() +decodedPosition, encodedRunPosition - decodedPosition);142 result.append(string, decodedPosition, encodedRunPosition - decodedPosition); 143 143 result.append(decoded); 144 144 decodedPosition = encodedRunEnd; 145 145 } 146 result.append(string .characters() +decodedPosition, length - decodedPosition);146 result.append(string, decodedPosition, length - decodedPosition); 147 147 return result.toString(); 148 148 }
Note: See TracChangeset
for help on using the changeset viewer.