[webkit-reviews] review granted: [Bug 184271] [iOS] Paste is missing from callout bar when pasteboard only contains custom data : [Attachment 347440] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Aug 18 14:06:54 PDT 2018


Ryosuke Niwa <rniwa at webkit.org> has granted Wenson Hsieh
<wenson_hsieh at apple.com>'s request for review:
Bug 184271: [iOS] Paste is missing from callout bar when pasteboard only
contains custom data
https://bugs.webkit.org/show_bug.cgi?id=184271

Attachment 347440: Patch

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




--- Comment #12 from Ryosuke Niwa <rniwa at webkit.org> ---
Comment on attachment 347440
  --> https://bugs.webkit.org/attachment.cgi?id=347440
Patch

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

> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:2279
> +    auto& editorState = _page->editorState();

It looks like editorState() returns a new object each time?
In that case, I don't think it makes much sense to use auto&. Just use auto.

Also, if it were really returning a reference,
I'm afraid that the object could get destroyed by some of the code below.

> Tools/TestWebKitAPI/Tests/WebKitCocoa/PasteMixedContent.mm:260
> +TEST(PasteMixedContent, CopyAndPasteWithCustomPasteboardDataOnly)

I would have preferred to write a layout test for something like this but okay.


More information about the webkit-reviews mailing list