Build fixes.
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 May 2015 02:59:37 +0000 (02:59 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 May 2015 02:59:37 +0000 (02:59 +0000)
Source/WebCore:

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper doAXRTFForRange:]):
* editing/cocoa/HTMLConverter.mm:
(HTMLConverter::_addMarkersToList):
* platform/mac/PasteboardMac.mm:
(WebCore::writeFileWrapperAsRTFDAttachment):
* platform/mac/PlatformPasteboardMac.mm:
(WebCore::PlatformPasteboard::setTypes):
Pass empty arrays and dictionaries instead of nil.

* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintSliderThumb):
Pass the document view to the AppKit paint method.

Source/WebKit/mac:

* Misc/WebNSPasteboardExtras.mm:
(-[NSPasteboard _web_writeFileWrapperAsRTFDAttachment:]):
* WebView/WebHTMLView.mm:
(-[WebHTMLView _writeSelectionWithPasteboardTypes:toPasteboard:cachedAttributedString:]):
(-[WebHTMLView _selectionStartFontAttributesAsRTF]):
* WebView/WebPDFView.mm:
(-[WebPDFView writeSelectionWithPasteboardTypes:toPasteboard:]):
Pass empty arrays and dictionaries instead of nil.

* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):
Use the regular init method.

Source/WebKit2:

* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:processPool:configuration:webView:]):
Use the regular init method.

* UIProcess/mac/WKSharingServicePickerDelegate.mm:
(-[WKSharingServicePickerDelegate sharingService:didShareItems:]):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::handleSelectionServiceClick):
Pass empty dictionaries instead of nil.

Tools:

* TestWebKitAPI/Tests/mac/HTMLCollectionNamedItem.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/mac/HTMLFormCollectionNamedItem.mm:
(TestWebKitAPI::TEST):
Add casts.

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

18 files changed:
Source/WebCore/ChangeLog
Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
Source/WebCore/editing/cocoa/HTMLConverter.mm
Source/WebCore/platform/mac/PasteboardMac.mm
Source/WebCore/platform/mac/PlatformPasteboardMac.mm
Source/WebCore/rendering/RenderThemeMac.mm
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/Misc/WebNSPasteboardExtras.mm
Source/WebKit/mac/WebView/WebHTMLView.mm
Source/WebKit/mac/WebView/WebPDFView.mm
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/mac/WKView.mm
Source/WebKit2/UIProcess/mac/WKSharingServicePickerDelegate.mm
Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/mac/HTMLCollectionNamedItem.mm
Tools/TestWebKitAPI/Tests/mac/HTMLFormCollectionNamedItem.mm

index d4f855bb9023ace072abb12e03c258917bb0359b..5b4d17f81713be9209e17a3da6105072027df149 100644 (file)
@@ -1,3 +1,21 @@
+2015-05-07  Anders Carlsson  <andersca@apple.com>
+
+        Build fixes.
+
+        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+        (-[WebAccessibilityObjectWrapper doAXRTFForRange:]):
+        * editing/cocoa/HTMLConverter.mm:
+        (HTMLConverter::_addMarkersToList):
+        * platform/mac/PasteboardMac.mm:
+        (WebCore::writeFileWrapperAsRTFDAttachment):
+        * platform/mac/PlatformPasteboardMac.mm:
+        (WebCore::PlatformPasteboard::setTypes):
+        Pass empty arrays and dictionaries instead of nil.
+
+        * rendering/RenderThemeMac.mm:
+        (WebCore::RenderThemeMac::paintSliderThumb):
+        Pass the document view to the AppKit paint method.
+
 2015-05-07  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
 
         Purge PassRefPtr in WebCore/html - 3
index 3d1b76cf14555b12c8f5debea058cca6de099062..13546787ea59c16c16491d8b4bd5862de76dfce4 100644 (file)
@@ -3482,7 +3482,7 @@ static RenderObject* rendererForView(NSView* view)
 - (NSData*)doAXRTFForRange:(NSRange)range
 {
     NSAttributedString* attrString = [self doAXAttributedStringForRange:range];
-    return [attrString RTFFromRange: NSMakeRange(0, [attrString length]) documentAttributes: nil];
+    return [attrString RTFFromRange: NSMakeRange(0, [attrString length]) documentAttributes:@{ }];
 }
 
 - (id)accessibilityAttributeValue:(NSString*)attribute forParameter:(id)parameter
index 71de33cf1f4707ceaf39627dcdcd141562b389a5..23bb5da9f26c1c8e9d3d339831fa161e011717a4 100644 (file)
@@ -2144,9 +2144,9 @@ void HTMLConverter::_addMarkersToList(NSTextList *list, NSRange range)
                     [newStyle addTabStop:tab];
                     [tab release];
 #if PLATFORM(IOS)
-                    tab = [[PlatformNSTextTab alloc] initWithTextAlignment:NSTextAlignmentNatural location:listLocation options:nil];
+                    tab = [[PlatformNSTextTab alloc] initWithTextAlignment:NSTextAlignmentNatural location:listLocation options:@{ }];
 #else
-                    tab = [[PlatformNSTextTab alloc] initWithTextAlignment:NSNaturalTextAlignment location:listLocation options:nil];
+                    tab = [[PlatformNSTextTab alloc] initWithTextAlignment:NSNaturalTextAlignment location:listLocation options:@{ }];
 #endif
                     [newStyle addTabStop:tab];
                     [tab release];
index 661971e7570a062c1efbc5bfe0655d6bf8d49daa..a0f113dc6a6c2c1dd90dd4d174f09983daf9ddfc 100644 (file)
@@ -246,7 +246,7 @@ static void writeFileWrapperAsRTFDAttachment(NSFileWrapper *wrapper, const Strin
     NSAttributedString *string = [NSAttributedString attributedStringWithAttachment:attachment];
     [attachment release];
 
-    NSData *RTFDData = [string RTFDFromRange:NSMakeRange(0, [string length]) documentAttributes:nil];
+    NSData *RTFDData = [string RTFDFromRange:NSMakeRange(0, [string length]) documentAttributes:@{ }];
     if (!RTFDData)
         return;
 
index bc75a609582c89054122332e8f6e29000b8c4e92..e82299ffc9a5bf8c6241c186e63c0a888a32d343 100644 (file)
@@ -126,7 +126,7 @@ long PlatformPasteboard::addTypes(const Vector<String>& pasteboardTypes)
 long PlatformPasteboard::setTypes(const Vector<String>& pasteboardTypes)
 {
     if (pasteboardTypes.isEmpty())
-        return [m_pasteboard.get() declareTypes:nil owner:nil];
+        return [m_pasteboard declareTypes:@[] owner:nil];
 
     RetainPtr<NSMutableArray> types = adoptNS([[NSMutableArray alloc] init]);
     for (size_t i = 0; i < pasteboardTypes.size(); ++i)
index 13e1f1ed2d596776f9dbd51d08706275169b5427..f02ddbe4f5afc8f3b5684d85a522216fb3b5f04e 100644 (file)
@@ -1542,11 +1542,13 @@ bool RenderThemeMac::paintSliderThumb(const RenderObject& o, const PaintInfo& pa
     else
         m_isSliderThumbHorizontalPressed = pressed;
 
+    NSView *view = documentViewFor(o);
+
     if (pressed != oldPressed) {
         if (pressed)
-            [sliderThumbCell startTrackingAt:NSPoint() inView:nil];
+            [sliderThumbCell startTrackingAt:NSPoint() inView:view];
         else
-            [sliderThumbCell stopTracking:NSPoint() at:NSPoint() inView:nil mouseIsUp:YES];
+            [sliderThumbCell stopTracking:NSPoint() at:NSPoint() inView:view mouseIsUp:YES];
     }
 
     FloatRect bounds = r;
@@ -1566,7 +1568,7 @@ bool RenderThemeMac::paintSliderThumb(const RenderObject& o, const PaintInfo& pa
         paintInfo.context->translate(-unzoomedRect.x(), -unzoomedRect.y());
     }
 
-    [sliderThumbCell drawInteriorWithFrame:unzoomedRect inView:documentViewFor(o)];
+    [sliderThumbCell drawInteriorWithFrame:unzoomedRect inView:view];
     [sliderThumbCell setControlView:nil];
 
     return false;
index 2c1d9e27928dfd559b7302d408b16584c75c1eea..d2369ba07671a7cd37bab3ce353c41d29e2aeb3c 100644 (file)
@@ -1,3 +1,20 @@
+2015-05-07  Anders Carlsson  <andersca@apple.com>
+
+        Build fixes.
+
+        * Misc/WebNSPasteboardExtras.mm:
+        (-[NSPasteboard _web_writeFileWrapperAsRTFDAttachment:]):
+        * WebView/WebHTMLView.mm:
+        (-[WebHTMLView _writeSelectionWithPasteboardTypes:toPasteboard:cachedAttributedString:]):
+        (-[WebHTMLView _selectionStartFontAttributesAsRTF]):
+        * WebView/WebPDFView.mm:
+        (-[WebPDFView writeSelectionWithPasteboardTypes:toPasteboard:]):
+        Pass empty arrays and dictionaries instead of nil.
+
+        * WebView/WebView.mm:
+        (-[WebView _commonInitializationWithFrameName:groupName:]):
+        Use the regular init method.
+
 2015-05-07  Said Abou-Hallawa  <sabouhallawa@apple.com>
 
         Fix iPhone 6 iOS simulator Build.
index f80b5204bc4eb971896209671da31659a58ee08e..7e8d74caf61e88b064417ca33fd187a601210258 100644 (file)
@@ -194,7 +194,7 @@ static NSArray *_writableTypesForImageWithArchive (void)
     NSAttributedString *string = [NSAttributedString attributedStringWithAttachment:attachment];
     [attachment release];
     
-    NSData *RTFDData = [string RTFDFromRange:NSMakeRange(0, [string length]) documentAttributes:nil];
+    NSData *RTFDData = [string RTFDFromRange:NSMakeRange(0, [string length]) documentAttributes:@{ }];
     [self setData:RTFDData forType:NSRTFDPboardType];
 }
 
index fa4bd602873c6f4903a007140d5ee5c1d1f54220..4eda2068e743bd418421457f96e4395f8c41d528 100644 (file)
@@ -1118,7 +1118,7 @@ static NSURL* uniqueURLWithRelativePart(NSString *relativePart)
         if (attributedString == nil) {
             attributedString = [self selectedAttributedString];
         }        
-        NSData *RTFDData = [attributedString RTFDFromRange:NSMakeRange(0, [attributedString length]) documentAttributes:nil];
+        NSData *RTFDData = [attributedString RTFDFromRange:NSMakeRange(0, [attributedString length]) documentAttributes:@{ }];
         [pasteboard setData:RTFDData forType:NSRTFDPboardType];
     }        
     if ([types containsObject:NSRTFPboardType]) {
@@ -1126,7 +1126,7 @@ static NSURL* uniqueURLWithRelativePart(NSString *relativePart)
             attributedString = [self selectedAttributedString];
         if ([attributedString containsAttachments])
             attributedString = attributedStringByStrippingAttachmentCharacters(attributedString);
-        NSData *RTFData = [attributedString RTFFromRange:NSMakeRange(0, [attributedString length]) documentAttributes:nil];
+        NSData *RTFData = [attributedString RTFFromRange:NSMakeRange(0, [attributedString length]) documentAttributes:@{ }];
         [pasteboard setData:RTFData forType:NSRTFPboardType];
     }
     
@@ -4680,7 +4680,7 @@ static PassRefPtr<KeyboardEvent> currentKeyboardEvent(Frame* coreFrame)
     Frame* coreFrame = core([self _frame]);
     NSAttributedString *string = [[NSAttributedString alloc] initWithString:@"x"
         attributes:coreFrame ? coreFrame->editor().fontAttributesForSelectionStart() : nil];
-    NSData *data = [string RTFFromRange:NSMakeRange(0, [string length]) documentAttributes:nil];
+    NSData *data = [string RTFFromRange:NSMakeRange(0, [string length]) documentAttributes:@{ }];
     [string release];
     return data;
 }
index 2bb870cfcd9a631935bba677c38cc8b02353a47b..5e7bb14e9267f3859978331a97b25cf863c4ee39 100644 (file)
@@ -976,7 +976,7 @@ static BOOL isFrameInRange(WebFrame *frame, DOMRange *range)
     NSAttributedString *attributedString = [self selectedAttributedString];
     
     if ([types containsObject:NSRTFDPboardType]) {
-        NSData *RTFDData = [attributedString RTFDFromRange:NSMakeRange(0, [attributedString length]) documentAttributes:nil];
+        NSData *RTFDData = [attributedString RTFDFromRange:NSMakeRange(0, [attributedString length]) documentAttributes:@{ }];
         [pasteboard setData:RTFDData forType:NSRTFDPboardType];
     }        
     
@@ -984,7 +984,7 @@ static BOOL isFrameInRange(WebFrame *frame, DOMRange *range)
         if ([attributedString containsAttachments])
             attributedString = attributedStringByStrippingAttachmentCharacters(attributedString);
 
-        NSData *RTFData = [attributedString RTFFromRange:NSMakeRange(0, [attributedString length]) documentAttributes:nil];
+        NSData *RTFData = [attributedString RTFFromRange:NSMakeRange(0, [attributedString length]) documentAttributes:@{ }];
         [pasteboard setData:RTFData forType:NSRTFPboardType];
     }
     
index 1deeee25db1e20b344e9d6e61656d52fea3069f2..f920f97b46d43bc671e69af0f0e3501f6d0d3140 100644 (file)
@@ -907,7 +907,7 @@ static void WebKitInitializeGamepadProviderIfNecessary()
     }
 
     if (Class gestureClass = NSClassFromString(@"NSImmediateActionGestureRecognizer")) {
-        RetainPtr<NSImmediateActionGestureRecognizer> recognizer = adoptNS([(NSImmediateActionGestureRecognizer *)[gestureClass alloc] initWithTarget:nil action:NULL]);
+        RetainPtr<NSImmediateActionGestureRecognizer> recognizer = adoptNS([(NSImmediateActionGestureRecognizer *)[gestureClass alloc] init]);
         _private->immediateActionController = [[WebImmediateActionController alloc] initWithWebView:self recognizer:recognizer.get()];
         [recognizer setDelegate:_private->immediateActionController];
         [recognizer setDelaysPrimaryMouseButtonEvents:NO];
index e7798a2ead8dca870f719f2ed782a27cbb1e8797..57563b3221fc20d62335179487100948815b4bdc 100644 (file)
@@ -1,3 +1,17 @@
+2015-05-07  Anders Carlsson  <andersca@apple.com>
+
+        Build fixes.
+
+        * UIProcess/API/mac/WKView.mm:
+        (-[WKView initWithFrame:processPool:configuration:webView:]):
+        Use the regular init method.
+
+        * UIProcess/mac/WKSharingServicePickerDelegate.mm:
+        (-[WKSharingServicePickerDelegate sharingService:didShareItems:]):
+        * WebProcess/WebPage/mac/WebPageMac.mm:
+        (WebKit::WebPage::handleSelectionServiceClick):
+        Pass empty dictionaries instead of nil.
+
 2015-05-07  Chris Dumez  <cdumez@apple.com>
 
         ASSERTION when pasting text into the WebInspector console
index 0ac34e5dd3c7a47097bb05063ece175da988caff..e04540b4b0fd5d27a98ebe762703b176adfc2f9d 100644 (file)
@@ -3845,7 +3845,7 @@ static NSString *pathWithUniqueFilenameForPath(NSString *path)
     }
 
     if (Class gestureClass = NSClassFromString(@"NSImmediateActionGestureRecognizer")) {
-        _data->_immediateActionGestureRecognizer = adoptNS([(NSImmediateActionGestureRecognizer *)[gestureClass alloc] initWithTarget:nil action:NULL]);
+        _data->_immediateActionGestureRecognizer = adoptNS([(NSImmediateActionGestureRecognizer *)[gestureClass alloc] init]);
         _data->_immediateActionController = adoptNS([[WKImmediateActionController alloc] initWithPage:*_data->_page view:self recognizer:_data->_immediateActionGestureRecognizer.get()]);
         [_data->_immediateActionGestureRecognizer setDelegate:_data->_immediateActionController.get()];
         [_data->_immediateActionGestureRecognizer setDelaysPrimaryMouseButtonEvents:NO];
index c61a6657f331e6cc67568ef5a38c60c0236ba776..1a8d810a873f64033690104c110c498d25ccddba 100644 (file)
     id item = [items objectAtIndex:0];
 
     if ([item isKindOfClass:[NSAttributedString class]]) {
-        NSData *data = [item RTFDFromRange:NSMakeRange(0, [item length]) documentAttributes:nil];
+        NSData *data = [item RTFDFromRange:NSMakeRange(0, [item length]) documentAttributes:@{ }];
         dataReference = IPC::DataReference(static_cast<const uint8_t*>([data bytes]), [data length]);
 
         types.append(NSPasteboardTypeRTFD);
index 97484916db07e1fb845d21aec2095b9b4be82bcb..58bdf0133e5c4abec8a156c72e2378cab479699c 100644 (file)
@@ -1050,7 +1050,7 @@ void WebPage::handleSelectionServiceClick(FrameSelection& selection, const Vecto
     if (!attributedSelection)
         return;
 
-    NSData *selectionData = [attributedSelection RTFDFromRange:NSMakeRange(0, [attributedSelection length]) documentAttributes:nil];
+    NSData *selectionData = [attributedSelection RTFDFromRange:NSMakeRange(0, [attributedSelection length]) documentAttributes:@{ }];
     IPC::DataReference data = IPC::DataReference(reinterpret_cast<const uint8_t*>([selectionData bytes]), [selectionData length]);
     bool isEditable = selection.selection().isContentEditable();
 
index 0335d90f25e82a4fa82123b230d50e72c59c2d34..6c6501e38a4d2a9ab64b8669c1eeb3d11476daf8 100644 (file)
@@ -1,3 +1,13 @@
+2015-05-07  Anders Carlsson  <andersca@apple.com>
+
+        Build fixes.
+
+        * TestWebKitAPI/Tests/mac/HTMLCollectionNamedItem.mm:
+        (TestWebKitAPI::TEST):
+        * TestWebKitAPI/Tests/mac/HTMLFormCollectionNamedItem.mm:
+        (TestWebKitAPI::TEST):
+        Add casts.
+
 2015-05-07  Filip Pizlo  <fpizlo@apple.com>
 
         GC has trouble with pathologically large array allocations
index c1fd8d62a363db7da9e73a7e1ce73d054b5afdee..973bd16e69a359e3f9afb9de476b92530fde8763 100644 (file)
@@ -63,18 +63,18 @@ TEST(WebKit1, HTMLCollectionNamedItemTest)
     DOMDocument *document = webView.get().mainFrameDocument;
     RetainPtr<DOMHTMLCollection> collection = [[document body] children];
 
-    EXPECT_EQ([collection.get() length], (unsigned)4);
-    EXPECT_WK_STREQ([[collection.get() item:0] value], @"firstItem");
-    EXPECT_WK_STREQ([[collection.get() item:1] value], @"secondItem");
-    EXPECT_WK_STREQ([[collection.get() namedItem:@"idForTwoTextFields"] value], @"firstItem");
-    EXPECT_WK_STREQ([[collection.get() item:1] value], @"secondItem");
-    EXPECT_WK_STREQ([[collection.get() item:0] value], @"firstItem");
+    EXPECT_EQ([collection length], (unsigned)4);
+    EXPECT_WK_STREQ([(DOMHTMLInputElement *)[collection item:0] value], @"firstItem");
+    EXPECT_WK_STREQ([(DOMHTMLInputElement *)[collection item:1] value], @"secondItem");
+    EXPECT_WK_STREQ([(DOMHTMLInputElement *)[collection namedItem:@"idForTwoTextFields"] value], @"firstItem");
+    EXPECT_WK_STREQ([(DOMHTMLInputElement *)[collection item:1] value], @"secondItem");
+    EXPECT_WK_STREQ([(DOMHTMLInputElement *)[collection item:0] value], @"firstItem");
 
-    EXPECT_WK_STREQ([(DOMHTMLElement*)[collection.get() item:2] title], @"thirdItem");
-    EXPECT_WK_STREQ([(DOMHTMLElement*)[collection.get() item:3] title], @"fourthItem");
-    EXPECT_WK_STREQ([(DOMHTMLElement*)[collection.get() namedItem:@"nameForTwoImages"] title], @"thirdItem");
-    EXPECT_WK_STREQ([(DOMHTMLElement*)[collection.get() item:3] title], @"fourthItem");
-    EXPECT_WK_STREQ([(DOMHTMLElement*)[collection.get() item:2] title], @"thirdItem");
+    EXPECT_WK_STREQ([(DOMHTMLElement *)[collection item:2] title], @"thirdItem");
+    EXPECT_WK_STREQ([(DOMHTMLElement *)[collection item:3] title], @"fourthItem");
+    EXPECT_WK_STREQ([(DOMHTMLElement *)[collection namedItem:@"nameForTwoImages"] title], @"thirdItem");
+    EXPECT_WK_STREQ([(DOMHTMLElement *)[collection item:3] title], @"fourthItem");
+    EXPECT_WK_STREQ([(DOMHTMLElement *)[collection item:2] title], @"thirdItem");
 }
 
 } // namespace TestWebKitAPI
index 8d669998322456218d15556d8b2d15f0c4f1397c..2f5d68c2053d2006b827ef417a1aff87c68cceb2 100644 (file)
@@ -65,11 +65,11 @@ TEST(WebKit1, HTMLFormCollectionNamedItemTest)
     RetainPtr<DOMHTMLCollection> collection = [form elements];
 
     EXPECT_EQ([collection.get() length], (unsigned)2);
-    EXPECT_WK_STREQ([[collection.get() item:0] value], @"firstItem");
-    EXPECT_WK_STREQ([[collection.get() item:1] value], @"secondItem");
-    EXPECT_WK_STREQ([[collection.get() namedItem:@"nameForTwoTextFields"] value], @"firstItem");
-    EXPECT_WK_STREQ([[collection.get() item:1] value], @"secondItem");
-    EXPECT_WK_STREQ([[collection.get() item:0] value], @"firstItem");
+    EXPECT_WK_STREQ([(DOMHTMLInputElement *)[collection item:0] value], @"firstItem");
+    EXPECT_WK_STREQ([(DOMHTMLInputElement *)[collection item:1] value], @"secondItem");
+    EXPECT_WK_STREQ([(DOMHTMLInputElement *)[collection namedItem:@"nameForTwoTextFields"] value], @"firstItem");
+    EXPECT_WK_STREQ([(DOMHTMLInputElement *)[collection item:1] value], @"secondItem");
+    EXPECT_WK_STREQ([(DOMHTMLInputElement *)[collection item:0] value], @"firstItem");
 }
 
 } // namespace TestWebKitAPI