Title: [163715] trunk/Source
Revision
163715
Author
m...@apple.com
Date
2014-02-08 10:35:17 -0800 (Sat, 08 Feb 2014)

Log Message

Source/WebCore: More (and more correct) iOS build fix after r163712.

* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(AXAttributedStringAppendText):
(-[WebAccessibilityObjectWrapper arrayOfTextForTextMarkers:attributed:]):
* page/ios/FrameIOS.mm:
(WebCore::Frame::wordsInCurrentParagraph):

Source/WebKit/mac: iOS build fix after r163712.

* WebCoreSupport/WebEditorClient.h:
* WebCoreSupport/WebEditorClient.mm:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (163714 => 163715)


--- trunk/Source/WebCore/ChangeLog	2014-02-08 18:06:45 UTC (rev 163714)
+++ trunk/Source/WebCore/ChangeLog	2014-02-08 18:35:17 UTC (rev 163715)
@@ -1,8 +1,18 @@
 2014-02-08  Dan Bernstein  <m...@apple.com>
 
-        iOS build fix after r163712
+        More (and more correct) iOS build fix after r163712.
 
+        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
+        (AXAttributedStringAppendText):
+        (-[WebAccessibilityObjectWrapper arrayOfTextForTextMarkers:attributed:]):
         * page/ios/FrameIOS.mm:
+        (WebCore::Frame::wordsInCurrentParagraph):
+
+2014-02-08  Dan Bernstein  <m...@apple.com>
+
+        iOS build fix after r163712.
+
+        * page/ios/FrameIOS.mm:
         (WebCore::Frame::indexCountOfWordPrecedingSelection):
         (WebCore::Frame::wordsInCurrentParagraph):
 

Modified: trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm (163714 => 163715)


--- trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm	2014-02-08 18:06:45 UTC (rev 163714)
+++ trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm	2014-02-08 18:35:17 UTC (rev 163715)
@@ -1530,17 +1530,17 @@
     }
 }
 
-static void AXAttributedStringAppendText(NSMutableAttributedString* attrString, Node* node, const UChar* chars, int length)
+static void AXAttributedStringAppendText(NSMutableAttributedString* attrString, Node* node, NSString *text)
 {
     // skip invisible text
     if (!node->renderer())
         return;
     
     // easier to calculate the range before appending the string
-    NSRange attrStringRange = NSMakeRange([attrString length], length);
+    NSRange attrStringRange = NSMakeRange([attrString length], [text length]);
     
     // append the string from this node
-    [[attrString mutableString] appendString:[NSString stringWithCharacters:chars length:length]];
+    [[attrString mutableString] appendString:text];
     
     // set new attributes
     AXAttributeStringSetStyle(attrString, node->renderer(), attrStringRange);
@@ -1602,7 +1602,7 @@
                 if (!listMarkerText.isEmpty()) 
                     [array addObject:[NSString stringWithCharacters:listMarkerText.deprecatedCharacters() length:listMarkerText.length()]];
                 // There was not an element representation, so just return the text.
-                [array addObject:[NSString stringWithCharacters:it.characters() length:it.length()]];
+                [array addObject:adoptNS([it.text().createNSStringWithoutCopying() copy]).get()];
             }
             else
             {
@@ -1610,13 +1610,13 @@
 
                 if (!listMarkerText.isEmpty()) {
                     NSMutableAttributedString* attrString = [[NSMutableAttributedString alloc] init];
-                    AXAttributedStringAppendText(attrString, node, listMarkerText.deprecatedCharacters(), listMarkerText.length());
+                    AXAttributedStringAppendText(attrString, node, listMarkerText);
                     [array addObject:attrString];
                     [attrString release];
                 }
                 
                 NSMutableAttributedString *attrString = [[NSMutableAttributedString alloc] init];
-                AXAttributedStringAppendText(attrString, node, it.characters(), it.length());
+                AXAttributedStringAppendText(attrString, node, it.text().createNSStringWithoutCopying().get());
                 [array addObject:attrString];
                 [attrString release];
             }

Modified: trunk/Source/WebCore/page/ios/FrameIOS.mm (163714 => 163715)


--- trunk/Source/WebCore/page/ios/FrameIOS.mm	2014-02-08 18:06:45 UTC (rev 163714)
+++ trunk/Source/WebCore/page/ios/FrameIOS.mm	2014-02-08 18:35:17 UTC (rev 163715)
@@ -191,14 +191,14 @@
                 if (isSpaceOrNewline(text[i]) || text[i] == 0xA0) {
                     int wordLength = i - startOfWordBoundary;
                     if (wordLength > 0) {
-                        RetainPtr<NSString> chunk = text.substring(startOfWordBoundary, wordLength).createNSStringWithoutCopying();
+                        RetainPtr<NSString> chunk = text.substring(startOfWordBoundary, wordLength).createNSString();
                         [words addObject:chunk.get()];
                     }
                     startOfWordBoundary += wordLength + 1;
                 }
             }
             if (startOfWordBoundary < length) {
-                RetainPtr<NSString> chunk = text.substring(startOfWordBoundary, length - startOfWordBoundary).createNSStringWithoutCopying();
+                RetainPtr<NSString> chunk = text.substring(startOfWordBoundary, length - startOfWordBoundary).createNSString();
                 [words addObject:chunk.get()];
             }
         }

Modified: trunk/Source/WebKit/mac/ChangeLog (163714 => 163715)


--- trunk/Source/WebKit/mac/ChangeLog	2014-02-08 18:06:45 UTC (rev 163714)
+++ trunk/Source/WebKit/mac/ChangeLog	2014-02-08 18:35:17 UTC (rev 163715)
@@ -1,3 +1,10 @@
+2014-02-08  Dan Bernstein  <m...@apple.com>
+
+        iOS build fix after r163712.
+
+        * WebCoreSupport/WebEditorClient.h:
+        * WebCoreSupport/WebEditorClient.mm:
+
 2014-02-08  Darin Adler  <da...@apple.com>
 
         Change TextIterator to use StringView, preparing to wean it from deprecatedCharacters

Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.h (163714 => 163715)


--- trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.h	2014-02-08 18:06:45 UTC (rev 163714)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.h	2014-02-08 18:35:17 UTC (rev 163715)
@@ -32,6 +32,7 @@
 #import <wtf/Forward.h>
 #import <wtf/RetainPtr.h>
 #import <wtf/Vector.h>
+#import <wtf/text/StringView.h>
 
 @class WebView;
 @class WebEditorUndoTarget;

Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm (163714 => 163715)


--- trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm	2014-02-08 18:06:45 UTC (rev 163714)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm	2014-02-08 18:35:17 UTC (rev 163715)
@@ -71,7 +71,6 @@
 #import <wtf/MainThread.h>
 #import <wtf/PassRefPtr.h>
 #import <wtf/RunLoop.h>
-#import <wtf/text/StringView.h>
 #import <wtf/text/WTFString.h>
 
 #if PLATFORM(IOS)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to