[webkit-reviews] review granted: [Bug 177801] Use blob URL when pasting RTFD instead of overriding DocumentLoader : [Attachment 322555] Fixed GTK+ builds
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Oct 4 00:39:07 PDT 2017
Wenson Hsieh <wenson_hsieh at apple.com> has granted Ryosuke Niwa
<rniwa at webkit.org>'s request for review:
Bug 177801: Use blob URL when pasting RTFD instead of overriding DocumentLoader
https://bugs.webkit.org/show_bug.cgi?id=177801
Attachment 322555: Fixed GTK+ builds
https://bugs.webkit.org/attachment.cgi?id=322555&action=review
--- Comment #5 from Wenson Hsieh <wenson_hsieh at apple.com> ---
Comment on attachment 322555
--> https://bugs.webkit.org/attachment.cgi?id=322555
Fixed GTK+ builds
View in context: https://bugs.webkit.org/attachment.cgi?id=322555&action=review
The general approach looks reasonable to me, but I'm not familiar with loading
code at all. Perhaps Chris would have some additional input here?
> Source/WebCore/ChangeLog:10
> + into the document using WebKit fake URL, and DocumentLoader was
overridden to return the appropraite
appropraite => appropriate
> Source/WebCore/editing/markup.cpp:128
> + if (element.attributeContainsURL(attribute) &&
!attribute.value().isEmpty()) {
How would this handle data: URLs, or app: URLs?
> Source/WebCore/editing/markup.cpp:131
> + changes.append(AttributeChange(&element,
attribute.name(), replacement));
Nit - { } initialization here?
> Tools/TestWebKitAPI/Tests/WebKitCocoa/PasteRTFD.mm:46
> + [[NSPasteboard generalPasteboard] declareTypes:[NSArray
arrayWithObject:NSRTFDPboardType] owner:nil];
Nit - this would probably be more succinct using @[] instead of +[NSArray
arrayWithObject]
> Tools/TestWebKitAPI/Tests/WebKitCocoa/PasteRTFD.mm:61
> + [[UIPasteboard generalPasteboard] setItems:@[[NSDictionary
dictionaryWithObject:data forKey:(NSString *)kUTTypeFlatRTFD]]];
Nit - this would probably be more succinct using @{} instead of +[NSDictionary
dictionaryWithObject]
> Tools/TestWebKitAPI/Tests/WebKitCocoa/PasteRTFD.mm:72
> + [webView paste:nil];
Did you mean to check that the editable root is empty after this?
More information about the webkit-reviews
mailing list