[webkit-reviews] review granted: [Bug 195053] [iOS] Programmatic paste access should be granted when copying and pasting within the same origin : [Attachment 363009] First pass

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 1 14:00:54 PST 2019


Ryosuke Niwa <rniwa at webkit.org> has granted Wenson Hsieh
<wenson_hsieh at apple.com>'s request for review:
Bug 195053: [iOS] Programmatic paste access should be granted when copying and
pasting within the same origin
https://bugs.webkit.org/show_bug.cgi?id=195053

Attachment 363009: First pass

https://bugs.webkit.org/attachment.cgi?id=363009&action=review




--- Comment #4 from Ryosuke Niwa <rniwa at webkit.org> ---
Comment on attachment 363009
  --> https://bugs.webkit.org/attachment.cgi?id=363009
First pass

View in context: https://bugs.webkit.org/attachment.cgi?id=363009&action=review

r=me. Please be sure to fix WPE build failure before landing.

> Source/WebCore/dom/DOMPasteAccess.h:28
> +#import <wtf/Forward.h>

We should be using #include instead. That's why WPE isn't happy.

> Source/WebCore/page/Frame.cpp:686
> +	   return response != DOMPasteAccessResponse::DeniedForGesture;

I think we should use a switch and explicitly list all values.
Otherwise, we could miss updating this location when we add a new kind of
denial.

> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:5032
> +    NSIndexSet *indices = [NSIndexSet
indexSetWithIndexesInRange:NSMakeRange(0, [pasteboard numberOfItems])];

Use auto?

> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:5033
> +    NSArray<NSData *> *allCustomData = [pasteboard
dataForPasteboardType:@(WebCore::PasteboardCustomData::cocoaType())
inItemSet:indices];

Ditto.

> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:5037
> +    BOOL foundAtLeastOneMatchingIdentifier;

Huh, does objective-C always initialize BOOL to NO?


More information about the webkit-reviews mailing list