[webkit-reviews] review granted: [Bug 194271] Allow pages to trigger programmatic paste from script on iOS : [Attachment 361398] Part 1 (v2)
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Feb 7 19:14:31 PST 2019
Ryosuke Niwa <rniwa at webkit.org> has granted Wenson Hsieh
<wenson_hsieh at apple.com>'s request for review:
Bug 194271: Allow pages to trigger programmatic paste from script on iOS
https://bugs.webkit.org/show_bug.cgi?id=194271
Attachment 361398: Part 1 (v2)
https://bugs.webkit.org/attachment.cgi?id=361398&action=review
--- Comment #18 from Ryosuke Niwa <rniwa at webkit.org> ---
Comment on attachment 361398
--> https://bugs.webkit.org/attachment.cgi?id=361398
Part 1 (v2)
View in context: https://bugs.webkit.org/attachment.cgi?id=361398&action=review
> Source/WebCore/page/Frame.cpp:679
> + case DOMPasteAccessPolicy::Pending: {
It's odd that this state is called pending because there was no pending
request.
How about something like DOMPasteAccessPolicy::NotRequestedYet or
DOMPasteAccessPolicy::None?
> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:4866
> + const CGFloat maximumElementWidth = 300;
> + const CGFloat maximumElementHeight = 120;
> + if (elementRect.isEmpty() || elementRect.width() > maximumElementWidth
|| elementRect.height() > maximumElementHeight) {
> + const CGFloat interactionLocationMargin = 10;
These values seems somewhat arbitrary. Why are these values picked?
We should probably explain it in a comment or in the change log.
More information about the webkit-reviews
mailing list