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
+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
- (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
[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];
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;
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)
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;
paintInfo.context->translate(-unzoomedRect.x(), -unzoomedRect.y());
}
- [sliderThumbCell drawInteriorWithFrame:unzoomedRect inView:documentViewFor(o)];
+ [sliderThumbCell drawInteriorWithFrame:unzoomedRect inView:view];
[sliderThumbCell setControlView:nil];
return false;
+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.
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];
}
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]) {
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];
}
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;
}
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];
}
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];
}
}
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];
+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
}
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];
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);
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();
+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
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
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