Title: [135802] trunk/Source/WebCore
Revision
135802
Author
msab...@apple.com
Date
2012-11-26 18:59:59 -0800 (Mon, 26 Nov 2012)

Log Message

HTML/XML parser helper unconsumeCharacters() can push back 8 bit text as 16 bit text
https://bugs.webkit.org/show_bug.cgi?id=103317

Reviewed by Oliver Hunt.

Changed to use the String directly from the StringBuilder instead of creating our own.
Used toStringPreserveCapacity() in case the caller may want to add to the StringBuilder
even though current callers don't.

No new tests. No change in functionality.

* xml/parser/CharacterReferenceParserInlines.h:
(WebCore::unconsumeCharacters):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (135801 => 135802)


--- trunk/Source/WebCore/ChangeLog	2012-11-27 02:25:46 UTC (rev 135801)
+++ trunk/Source/WebCore/ChangeLog	2012-11-27 02:59:59 UTC (rev 135802)
@@ -1,3 +1,19 @@
+2012-11-26  Michael Saboff  <msab...@apple.com>
+
+        HTML/XML parser helper unconsumeCharacters() can push back 8 bit text as 16 bit text
+        https://bugs.webkit.org/show_bug.cgi?id=103317
+
+        Reviewed by Oliver Hunt.
+
+        Changed to use the String directly from the StringBuilder instead of creating our own.
+        Used toStringPreserveCapacity() in case the caller may want to add to the StringBuilder
+        even though current callers don't.
+
+        No new tests. No change in functionality.
+
+        * xml/parser/CharacterReferenceParserInlines.h:
+        (WebCore::unconsumeCharacters):
+
 2012-11-26  Noel Gordon  <noel.gor...@gmail.com>
 
         PNG decode performance: avoid using frame buffer.setRGBA(x,y)

Modified: trunk/Source/WebCore/xml/parser/CharacterReferenceParserInlines.h (135801 => 135802)


--- trunk/Source/WebCore/xml/parser/CharacterReferenceParserInlines.h	2012-11-27 02:25:46 UTC (rev 135801)
+++ trunk/Source/WebCore/xml/parser/CharacterReferenceParserInlines.h	2012-11-27 02:59:59 UTC (rev 135802)
@@ -44,7 +44,7 @@
         source.push(consumedCharacters[0]);
         source.push(consumedCharacters[1]);
     } else
-        source.prepend(SegmentedString(String(consumedCharacters.characters(), consumedCharacters.length())));
+        source.prepend(SegmentedString(consumedCharacters.toStringPreserveCapacity()));
 }
 
 template <typename ParserFunctions>
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to