{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/firefox-ios/pulls/comments/22828996","id":22828996,"diff_hunk":"@@ -0,0 +1,152 @@\n+/* This Source Code Form is subject to the terms of the Mozilla Public\n+* License, v. 2.0. If a copy of the MPL was not distributed with this\n+* file, You can obtain one at http://mozilla.org/MPL/2.0/. */\n+\n+import Foundation\n+import WebKit\n+import UIKit\n+\n+enum ElementType {\n+\n+    case ImageSrc(url:NSURL,location:CGRect)\n+    case hrefLink(url:NSURL,location:CGRect)\n+}\n+\n+protocol BrowserLongPressHandlerDelegate {\n+    func webView(webview: WKWebView, elementsDidLongPressed elements: [ElementType])\n+}\n+\n+class BrowserLongPressHandler: NSObject, UIGestureRecognizerDelegate {\n+\n+    let webView: WKWebView?","path":"Client/Frontend/Browser/BrowserLongPressHandler.swift","position":21,"original_position":21,"commit_id":"e51598d016acde142f60a8ae1cd89cb4c3d45290","original_commit_id":"e51598d016acde142f60a8ae1cd89cb4c3d45290","user":{"login":"thebnich","id":1093266,"avatar_url":"https://avatars.githubusercontent.com/u/1093266?v=3","gravatar_id":"","url":"https://api.github.com/users/thebnich","html_url":"https://github.com/thebnich","followers_url":"https://api.github.com/users/thebnich/followers","following_url":"https://api.github.com/users/thebnich/following{/other_user}","gists_url":"https://api.github.com/users/thebnich/gists{/gist_id}","starred_url":"https://api.github.com/users/thebnich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thebnich/subscriptions","organizations_url":"https://api.github.com/users/thebnich/orgs","repos_url":"https://api.github.com/users/thebnich/repos","events_url":"https://api.github.com/users/thebnich/events{/privacy}","received_events_url":"https://api.github.com/users/thebnich/received_events","type":"User","site_admin":false},"body":"This should be non-optional since it's being assigned in init() (and can never become nil after that). Also, please make this variable private since it's not used externally.","created_at":"2015-01-12T22:37:28Z","updated_at":"2015-01-12T22:37:28Z","html_url":"https://github.com/mozilla/firefox-ios/pull/61#discussion_r22828996","pull_request_url":"https://api.github.com/repos/mozilla/firefox-ios/pulls/61","_links":{"self":{"href":"https://api.github.com/repos/mozilla/firefox-ios/pulls/comments/22828996"},"html":{"href":"https://github.com/mozilla/firefox-ios/pull/61#discussion_r22828996"},"pull_request":{"href":"https://api.github.com/repos/mozilla/firefox-ios/pulls/61"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/firefox-ios/pulls/61","id":26534504,"html_url":"https://github.com/mozilla/firefox-ios/pull/61","diff_url":"https://github.com/mozilla/firefox-ios/pull/61.diff","patch_url":"https://github.com/mozilla/firefox-ios/pull/61.patch","issue_url":"https://api.github.com/repos/mozilla/firefox-ios/issues/61","number":61,"state":"open","locked":false,"title":"Bug 1109666 - Customize behavior when long-pressing a link","user":{"login":"codestergit","id":2842712,"avatar_url":"https://avatars.githubusercontent.com/u/2842712?v=3","gravatar_id":"","url":"https://api.github.com/users/codestergit","html_url":"https://github.com/codestergit","followers_url":"https://api.github.com/users/codestergit/followers","following_url":"https://api.github.com/users/codestergit/following{/other_user}","gists_url":"https://api.github.com/users/codestergit/gists{/gist_id}","starred_url":"https://api.github.com/users/codestergit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codestergit/subscriptions","organizations_url":"https://api.github.com/users/codestergit/orgs","repos_url":"https://api.github.com/users/codestergit/repos","events_url":"https://api.github.com/users/codestergit/events{/privacy}","received_events_url":"https://api.github.com/users/codestergit/received_events","type":"User","site_admin":false},"body":"Implement the long press tap on URL links.If link is valid find the CGRect of URL link in `WKWebView` and we can do lots of things with located links. Currently showing a custom action sheet like safari having options: \r\n1)Open Link\r\n2)Open link in new tab\r\n3)Add to Mozilla Reading list\r\n4)Copy the link in pasteboard \r\nPlease let me know your feedback or suggestions?","created_at":"2014-12-23T21:58:17Z","updated_at":"2015-01-12T22:37:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dd8e984131f0a7d975fa64e7b7c0d565f8072418","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/firefox-ios/pulls/61/commits","review_comments_url":"https://api.github.com/repos/mozilla/firefox-ios/pulls/61/comments","review_comment_url":"https://api.github.com/repos/mozilla/firefox-ios/pulls/comments/{number}","comments_url":"https://api.github.com/repos/mozilla/firefox-ios/issues/61/comments","statuses_url":"https://api.github.com/repos/mozilla/firefox-ios/statuses/e51598d016acde142f60a8ae1cd89cb4c3d45290","head":{"label":"codestergit:Bug-1109666-Can-we-customize-what-happens-when-you-long-press-a-link","ref":"Bug-1109666-Can-we-customize-what-happens-when-you-long-press-a-link","sha":"e51598d016acde142f60a8ae1cd89cb4c3d45290","user":{"login":"codestergit","id":2842712,"avatar_url":"https://avatars.githubusercontent.com/u/2842712?v=3","gravatar_id":"","url":"https://api.github.com/users/codestergit","html_url":"https://github.com/codestergit","followers_url":"https://api.github.com/users/codestergit/followers","following_url":"https://api.github.com/users/codestergit/following{/other_user}","gists_url":"https://api.github.com/users/codestergit/gists{/gist_id}","starred_url":"https://api.github.com/users/codestergit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codestergit/subscriptions","organizations_url":"https://api.github.com/users/codestergit/orgs","repos_url":"https://api.github.com/users/codestergit/repos","events_url":"https://api.github.com/users/codestergit/events{/privacy}","received_events_url":"https://api.github.com/users/codestergit/received_events","type":"User","site_admin":false},"repo":{"id":28290260,"name":"firefox-ios","full_name":"codestergit/firefox-ios","owner":{"login":"codestergit","id":2842712,"avatar_url":"https://avatars.githubusercontent.com/u/2842712?v=3","gravatar_id":"","url":"https://api.github.com/users/codestergit","html_url":"https://github.com/codestergit","followers_url":"https://api.github.com/users/codestergit/followers","following_url":"https://api.github.com/users/codestergit/following{/other_user}","gists_url":"https://api.github.com/users/codestergit/gists{/gist_id}","starred_url":"https://api.github.com/users/codestergit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codestergit/subscriptions","organizations_url":"https://api.github.com/users/codestergit/orgs","repos_url":"https://api.github.com/users/codestergit/repos","events_url":"https://api.github.com/users/codestergit/events{/privacy}","received_events_url":"https://api.github.com/users/codestergit/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/codestergit/firefox-ios","description":"Firefox for iOS","fork":true,"url":"https://api.github.com/repos/codestergit/firefox-ios","forks_url":"https://api.github.com/repos/codestergit/firefox-ios/forks","keys_url":"https://api.github.com/repos/codestergit/firefox-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codestergit/firefox-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codestergit/firefox-ios/teams","hooks_url":"https://api.github.com/repos/codestergit/firefox-ios/hooks","issue_events_url":"https://api.github.com/repos/codestergit/firefox-ios/issues/events{/number}","events_url":"https://api.github.com/repos/codestergit/firefox-ios/events","assignees_url":"https://api.github.com/repos/codestergit/firefox-ios/assignees{/user}","branches_url":"https://api.github.com/repos/codestergit/firefox-ios/branches{/branch}","tags_url":"https://api.github.com/repos/codestergit/firefox-ios/tags","blobs_url":"https://api.github.com/repos/codestergit/firefox-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codestergit/firefox-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codestergit/firefox-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/codestergit/firefox-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codestergit/firefox-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/codestergit/firefox-ios/languages","stargazers_url":"https://api.github.com/repos/codestergit/firefox-ios/stargazers","contributors_url":"https://api.github.com/repos/codestergit/firefox-ios/contributors","subscribers_url":"https://api.github.com/repos/codestergit/firefox-ios/subscribers","subscription_url":"https://api.github.com/repos/codestergit/firefox-ios/subscription","commits_url":"https://api.github.com/repos/codestergit/firefox-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/codestergit/firefox-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/codestergit/firefox-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/codestergit/firefox-ios/issues/comments/{number}","contents_url":"https://api.github.com/repos/codestergit/firefox-ios/contents/{+path}","compare_url":"https://api.github.com/repos/codestergit/firefox-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codestergit/firefox-ios/merges","archive_url":"https://api.github.com/repos/codestergit/firefox-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codestergit/firefox-ios/downloads","issues_url":"https://api.github.com/repos/codestergit/firefox-ios/issues{/number}","pulls_url":"https://api.github.com/repos/codestergit/firefox-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/codestergit/firefox-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/codestergit/firefox-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codestergit/firefox-ios/labels{/name}","releases_url":"https://api.github.com/repos/codestergit/firefox-ios/releases{/id}","created_at":"2014-12-21T06:10:18Z","updated_at":"2014-12-21T06:10:20Z","pushed_at":"2015-01-12T19:17:04Z","git_url":"git://github.com/codestergit/firefox-ios.git","ssh_url":"git@github.com:codestergit/firefox-ios.git","clone_url":"https://github.com/codestergit/firefox-ios.git","svn_url":"https://github.com/codestergit/firefox-ios","homepage":"","size":8561,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla:master","ref":"master","sha":"fb1e76df94a7544ec15b7f57cee1c5fd0518383a","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":26133979,"name":"firefox-ios","full_name":"mozilla/firefox-ios","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/firefox-ios","description":"Firefox for iOS","fork":false,"url":"https://api.github.com/repos/mozilla/firefox-ios","forks_url":"https://api.github.com/repos/mozilla/firefox-ios/forks","keys_url":"https://api.github.com/repos/mozilla/firefox-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/firefox-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/firefox-ios/teams","hooks_url":"https://api.github.com/repos/mozilla/firefox-ios/hooks","issue_events_url":"https://api.github.com/repos/mozilla/firefox-ios/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/firefox-ios/events","assignees_url":"https://api.github.com/repos/mozilla/firefox-ios/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/firefox-ios/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/firefox-ios/tags","blobs_url":"https://api.github.com/repos/mozilla/firefox-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/firefox-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/firefox-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/firefox-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/firefox-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/firefox-ios/languages","stargazers_url":"https://api.github.com/repos/mozilla/firefox-ios/stargazers","contributors_url":"https://api.github.com/repos/mozilla/firefox-ios/contributors","subscribers_url":"https://api.github.com/repos/mozilla/firefox-ios/subscribers","subscription_url":"https://api.github.com/repos/mozilla/firefox-ios/subscription","commits_url":"https://api.github.com/repos/mozilla/firefox-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/firefox-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/firefox-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/firefox-ios/issues/comments/{number}","contents_url":"https://api.github.com/repos/mozilla/firefox-ios/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/firefox-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/firefox-ios/merges","archive_url":"https://api.github.com/repos/mozilla/firefox-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/firefox-ios/downloads","issues_url":"https://api.github.com/repos/mozilla/firefox-ios/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/firefox-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/firefox-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/firefox-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/firefox-ios/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/firefox-ios/releases{/id}","created_at":"2014-11-03T19:07:02Z","updated_at":"2015-01-12T20:46:46Z","pushed_at":"2015-01-12T20:46:43Z","git_url":"git://github.com/mozilla/firefox-ios.git","ssh_url":"git@github.com:mozilla/firefox-ios.git","clone_url":"https://github.com/mozilla/firefox-ios.git","svn_url":"https://github.com/mozilla/firefox-ios","homepage":"","size":10043,"stargazers_count":2740,"watchers_count":2740,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":419,"mirror_url":null,"open_issues_count":13,"forks":419,"open_issues":13,"watchers":2740,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/firefox-ios/pulls/61"},"html":{"href":"https://github.com/mozilla/firefox-ios/pull/61"},"issue":{"href":"https://api.github.com/repos/mozilla/firefox-ios/issues/61"},"comments":{"href":"https://api.github.com/repos/mozilla/firefox-ios/issues/61/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/firefox-ios/pulls/61/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/firefox-ios/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/mozilla/firefox-ios/pulls/61/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/firefox-ios/statuses/e51598d016acde142f60a8ae1cd89cb4c3d45290"}}}}