More characters -> deprecatedCharacters (based on more EWS complaints)
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 2 Feb 2014 06:38:18 +0000 (06:38 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 2 Feb 2014 06:38:18 +0000 (06:38 +0000)
https://bugs.webkit.org/show_bug.cgi?id=128063

Reviewed by Anders Carlsson.

Source/WebCore:

* editing/SmartReplace.cpp:
(WebCore::addAllCodePoints):
(WebCore::getSmartSet):
* platform/win/WebCoreTextRenderer.cpp:
(WebCore::doDrawTextAtPoint):
Use deprecatedCharacters.

Source/WebKit2:

* Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
(WebKit::truncateToSingleLine): Use deprecatedCharacters.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@163258 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/editing/SmartReplace.cpp
Source/WebCore/platform/win/WebCoreTextRenderer.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp

index 7611d51..aa717eb 100644 (file)
@@ -1,5 +1,19 @@
 2014-02-01  Darin Adler  <darin@apple.com>
 
+        More characters -> deprecatedCharacters (based on more EWS complaints)
+        https://bugs.webkit.org/show_bug.cgi?id=128063
+
+        Reviewed by Anders Carlsson.
+
+        * editing/SmartReplace.cpp:
+        (WebCore::addAllCodePoints):
+        (WebCore::getSmartSet):
+        * platform/win/WebCoreTextRenderer.cpp:
+        (WebCore::doDrawTextAtPoint):
+        Use deprecatedCharacters.
+
+2014-02-01  Darin Adler  <darin@apple.com>
+
         Use deprecatedCharacters in a few more places (non-Mac-build sites found by EWS)
         https://bugs.webkit.org/show_bug.cgi?id=128042
 
index 034dbfe..75c7086 100644 (file)
@@ -40,7 +40,7 @@ namespace WebCore {
 
 static void addAllCodePoints(USet* smartSet, const String& string)
 {
-    const UChar* characters = string.characters();
+    const UChar* characters = string.deprecatedCharacters();
     for (size_t i = 0; i < string.length(); i++)
         uset_add(smartSet, characters[i]);
 }
@@ -56,7 +56,7 @@ static USet* getSmartSet(bool isPreviousCharacter)
         // Whitespace and newline (kCFCharacterSetWhitespaceAndNewline)
         UErrorCode ec = U_ZERO_ERROR;
         String whitespaceAndNewline = ASCIILiteral("[[:WSpace:] [\\u000A\\u000B\\u000C\\u000D\\u0085]]");
-        smartSet = uset_openPattern(whitespaceAndNewline.characters(), whitespaceAndNewline.length(), &ec);
+        smartSet = uset_openPattern(whitespaceAndNewline.deprecatedCharacters(), whitespaceAndNewline.length(), &ec);
         ASSERT(U_SUCCESS(ec));
 
         // CJK ranges
@@ -83,7 +83,7 @@ static USet* getSmartSet(bool isPreviousCharacter)
             // Punctuation (kCFCharacterSetPunctuation)
             UErrorCode ec = U_ZERO_ERROR;
             String punctuationClass = ASCIILiteral("[:P:]");
-            USet* icuPunct = uset_openPattern(punctuationClass.characters(), punctuationClass.length(), &ec);
+            USet* icuPunct = uset_openPattern(punctuationClass.deprecatedCharacters(), punctuationClass.length(), &ec);
             ASSERT(U_SUCCESS(ec));
             uset_addAll(smartSet, icuPunct);
             uset_close(icuPunct);
index 2b07207..4993c47 100644 (file)
@@ -51,7 +51,7 @@ static void doDrawTextAtPoint(GraphicsContext& context, const String& text, cons
 {
     FontCachePurgePreventer fontCachePurgePreventer;
 
-    TextRun run(text.characters(), text.length());
+    TextRun run(text.deprecatedCharacters(), text.length());
 
     context.setFillColor(color, ColorSpaceDeviceRGB);
     if (isOneLeftToRightRun(run))
@@ -64,12 +64,12 @@ static void doDrawTextAtPoint(GraphicsContext& context, const String& text, cons
 
         int beforeWidth;
         if (underlinedIndex > 0) {
-            TextRun beforeRun(text.characters(), underlinedIndex);
+            TextRun beforeRun(text.deprecatedCharacters(), underlinedIndex);
             beforeWidth = font.width(beforeRun);
         } else
             beforeWidth = 0;
 
-        TextRun underlinedRun(text.characters() + underlinedIndex, 1);
+        TextRun underlinedRun(text.deprecatedCharacters() + underlinedIndex, 1);
         int underlinedWidth = font.width(underlinedRun);
 
         IntPoint underlinePoint(point);
index f234614..c3937ab 100644 (file)
@@ -1,3 +1,13 @@
+2014-02-01  Darin Adler  <darin@apple.com>
+
+        More characters -> deprecatedCharacters (based on more EWS complaints)
+        https://bugs.webkit.org/show_bug.cgi?id=128063
+
+        Reviewed by Anders Carlsson.
+
+        * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
+        (WebKit::truncateToSingleLine): Use deprecatedCharacters.
+
 2014-02-01  Enrica Casucci  <enrica@apple.com>
 
         Speculative OSX build fix.
index 4715746..48da58d 100644 (file)
@@ -165,7 +165,7 @@ static String truncateToSingleLine(const String& string)
     String stringBuffer(StringImpl::createUninitialized(oldLength + 1, buffer));
 
     unsigned newLength = 0;
-    const UChar* start = string.characters();
+    const UChar* start = string.deprecatedCharacters();
     for (const UChar* c = start; c < start + oldLength; ++c) {
         if (*c != UChar('\n'))
             buffer[newLength++] = *c;