Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(801)

Issue 553453002: PDF Viewer - Show context menu for links on right click (Closed)

Created:
6 years, 3 months ago by Nikhil
Modified:
6 years, 3 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

PDF Viewer - Show context menu for links on right click Currently context menu for page is shown when right clicked on links in the pdf. This happens because an empty string is returned as url to ContextMenuClientImpl::showContextMenu() from plugin. The reason for above is that GetLinkAtPosition() isn't passing a point in page coordinates to GetCharIndex() and GetCharIndex() expects the point to be in page coordinate. This means that when the document is zoomed or scrolled and right click is done then it doesn't work. This patch updates the point passed to GetCharIndex() to be in page coordinates by factoring in current position and zoom level. BUG=148665 Committed: https://crrev.com/47ddc0fca1e5944965866ac55844515a28d2d022 Cr-Commit-Position: refs/heads/master@{#294256}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Review feedback (update GetLinkAtPosition()) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -1 line) Patch
M pdf/pdfium/pdfium_engine.cc View 1 1 chunk +4 lines, -1 line 0 comments Download

Messages

Total messages: 18 (4 generated)
Nikhil
PTAL at my proposed solution to show context menu for links when right click is ...
6 years, 3 months ago (2014-09-06 10:17:16 UTC) #2
raymes
It looks like the root of the problem here is that GetLinkAtPosition() isn't passing a ...
6 years, 3 months ago (2014-09-08 01:25:38 UTC) #3
raymes
BTW, thanks for looking at this! It's a pretty nasty bug and no one has ...
6 years, 3 months ago (2014-09-08 01:26:15 UTC) #4
Vitaly Buka (NO REVIEWS)
lgtm
6 years, 3 months ago (2014-09-08 01:33:26 UTC) #5
Nikhil
Thanks for the quick review! I've updated both the patch and the CL description. PTAL. ...
6 years, 3 months ago (2014-09-08 05:59:13 UTC) #6
Nikhil
I forgot to update that I tested this manually and context menu is coming properly. ...
6 years, 3 months ago (2014-09-08 06:01:49 UTC) #7
Nikhil
raymes@, thestig@ - Could you please take a look at this for OWNERS review? Thanks!
6 years, 3 months ago (2014-09-10 05:55:03 UTC) #8
Lei Zhang
lgtm
6 years, 3 months ago (2014-09-10 19:18:52 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/n.bansal@samsung.com/553453002/20001
6 years, 3 months ago (2014-09-10 19:20:33 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: android_chromium_gn_compile_rel on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_chromium_gn_compile_rel/builds/14195) android_clang_dbg_recipe on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_clang_dbg_recipe/builds/3501) android_dbg_tests_recipe ...
6 years, 3 months ago (2014-09-10 19:33:07 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/n.bansal@samsung.com/553453002/20001
6 years, 3 months ago (2014-09-10 21:31:36 UTC) #15
raymes
On 2014/09/10 21:31:36, I haz the power (commit-bot) wrote: > CQ is trying da patch. ...
6 years, 3 months ago (2014-09-10 23:20:50 UTC) #16
commit-bot: I haz the power
Committed patchset #2 (id:20001) as 97ff1b6eec06722188945c7446c161da4f249a26
6 years, 3 months ago (2014-09-10 23:26:08 UTC) #17
commit-bot: I haz the power
6 years, 3 months ago (2014-09-10 23:29:05 UTC) #18
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/47ddc0fca1e5944965866ac55844515a28d2d022
Cr-Commit-Position: refs/heads/master@{#294256}

Powered by Google App Engine
This is Rietveld 408576698