Issue metadata
Sign in to add a comment
|
MacViewsBrowser: Drags initiated from the download shelf never release capture
Reported by
aiman.an...@etouch.net,
Jul 13
|
||||||||||||||||||||||
Issue descriptionChrome version: 69.0.3489.0 (Official Build)Revision 66d7b6411564744a0d3589943331a0a7db096a3d-refs/branch-heads/3489@{#1}(64-bit) OS: Mac (10.12.6,10.13.1,10.13.6,10.14) Pre-Condition: 1. Install PDF Viewer Extension from https://chrome.google.com/webstore/detail/pdf-viewer/oemmndcbldboiebfnladdacbdfmadadm?utm_source=chrome-ntp-icon 2. Enable 'Use Views browser windows instead of Cocoa' flag from chrome://flags and relaunch the browser. Test URL: http://cb.vu/unixtoolbox.pdf What steps will reproduce the problem? 1. Launch chrome and navigate to the above URL. 2. Download the pdf from download icon in pdf toolbar. 3. Drag the downloaded pdf file from download-shelf to new tab. 4. On that tab click on 'Choose File' and observe. Actual: Unnecessary duplicate tab opens instead of 'Choose file' overlay. Expected: Choose file overlay should open. This is a Non-regression issue seen from M-67 series build #67.0.3381.0 Note: Issue is not seen on Linux (14.04 LTS),Windows(7,8,8.1,10) OS. Issue is also seen on Stable #67.0.3396.99, Beta #68.0.3440.59,Dev #69.0.3486.0. Thank You!
,
Jul 16
This is not a Internals > PDF issue, since this happening when using a third party extension not the built-in PDF viewer.. Changing to Platform>Extensions, since it appears to be related to how permissions for extensions work.
,
Jul 20
[Extensions Triage] Do you see the issue without 'Use Views browser windows instead of Cocoa' on Mac?
,
Jul 20
Interesting. This seems like it's mostly WAI - the PDF viewer extension shouldn't be able to see file URLs unless it's enabled in the chrome://extensions page. But I wouldn't have expected that to be dependent on mac views, or only reproducible on mac and not Linux. Do we have some magic to handle drag-and-dropping PDF files differently on different platforms? +Rob, does this seem like a bug or WAI to you?
,
Jul 21
This bug report does not complain about seeing the URL. The extension being able to observe the file:-URL is expected, the logic is here: https://github.com/mozilla/pdf.js/blob/7e139776692789fee4b2cedb443715665c5adebe/extensions/chromium/pdfHandler.js#L171-L195 The bug is that clicking on the file chooser causes a new tab to open. Are there any errors in the JavaScript console?
,
Jul 23
Hi @ Karandeep, Retested issue in latest Canary build #70.0.3500.0 on Mac OS and the issue can be reproduced only when 'Use Views browser windows instead of Cocoa' flag is enabled. Unable to reproduce the same issue if flag is disabled. Attaching below the screen-cast of both the (with and without flag) behaviours. Thank you..!
,
Jul 23
Adding MacViews per #6.
,
Jul 24
Triage: Sending to tapted@ for initial investigation. This does not affect all webui's, so P2.
,
Jul 26
,
Jul 31
it looks like the download shelf (+sdy?) thinks a drag is still in progress after mouse release. So clicking "Choose file" does a repeated "release", triggering a second drop. The widget isn't releasing capture. This is meant to happen in views::DragDropClientMac::StartDragAndDrop() (+spqchan) DownloadItemView overrides View::OnMouseDragged() but doesn't call view::DoDrag -> RunShellDrag() -> StartDragDrop Instead it calls DragDownloadItem(), which we still use the Cocoa implementation for rather than the implementation in drag_download_item_views.cc (+ellyjones) the version in download_item_drag_mac.mm doesn't know it needs to release capture. We can tweak the download shelf to release it manually. That results in https://chromium-review.googlesource.com/1156192 +tags since this seems fairly fundamental.
,
Jul 31
This is an M69 merge candidate.
,
Jul 31
"RBS" as this is P1 and need for M69 per comment #11.
,
Jul 31
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c2174d8b05d5e7002579e0dc8ac6f65d1279f222 commit c2174d8b05d5e7002579e0dc8ac6f65d1279f222 Author: Trent Apted <tapted@chromium.org> Date: Tue Jul 31 21:00:27 2018 MacViewsBrowser: Release capture before starting the native download shelf drag. Normally drags initiated via views::View::ProcessMouseDragged() complete in views::View::DoDrag() once exceeding their drag distance threshold. However, DownloadItemView doesn't set a views::DragController or override View::GetDragOperations(). Instead, it runs its own drag in an override of View::OnMouseDragged(). This drag code path isn't aware of the Widget::SetCapture() call done in Widget::OnMouseEvent(), which needs to be released before an OS-level drag can take place. Usually this is done by views::DragDropClientMac, which gets skipped. To fix, ensure the custom OS-level drag codepath in download_item_drag_mac.mm releases capture instead. Bug: 863377 Change-Id: Ib2f7c80a00dd3b38fe5a98475bddb4e595f3f83c Reviewed-on: https://chromium-review.googlesource.com/1156192 Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org> Commit-Queue: Trent Apted <tapted@chromium.org> Cr-Commit-Position: refs/heads/master@{#579563} [modify] https://crrev.com/c2174d8b05d5e7002579e0dc8ac6f65d1279f222/chrome/browser/ui/cocoa/download/download_item_drag_mac.mm
,
Aug 1
Pls request a merge to M69 once CL listed at #13 looks good in canary and safe to merge. Thank you.
,
Aug 2
,
Aug 2
The NextAction date has arrived: 2018-08-02
,
Aug 2
Update: Rechecked the above issue on Mac (10.12.6,10.13.1,10.13.6,10.14) using latest canary build 70.0.3510.0 and issue is fixed. please refer below attached screencast for reference Thank You...
,
Aug 2
,
Aug 2
This bug requires manual review: M69 has already been promoted to the beta branch, so this requires manual review Please contact the milestone owner if you have questions. Owners: amineer@(Android), kariahda@(iOS), cindyb@(ChromeOS), govind@(Desktop) For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Aug 2
Approving merge to M69 branch 3497 based on comment #15 and #17. Please merge ASAP. Thank you.
,
Aug 3
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6c75fcdc7eaf4ca28e11bbbf862714add11a4b45 commit 6c75fcdc7eaf4ca28e11bbbf862714add11a4b45 Author: Trent Apted <tapted@chromium.org> Date: Fri Aug 03 00:26:44 2018 [merge-m69] MacViewsBrowser: Release capture before starting the native download shelf drag. Normally drags initiated via views::View::ProcessMouseDragged() complete in views::View::DoDrag() once exceeding their drag distance threshold. However, DownloadItemView doesn't set a views::DragController or override View::GetDragOperations(). Instead, it runs its own drag in an override of View::OnMouseDragged(). This drag code path isn't aware of the Widget::SetCapture() call done in Widget::OnMouseEvent(), which needs to be released before an OS-level drag can take place. Usually this is done by views::DragDropClientMac, which gets skipped. To fix, ensure the custom OS-level drag codepath in download_item_drag_mac.mm releases capture instead. TBR=tapted@chromium.org (cherry picked from commit c2174d8b05d5e7002579e0dc8ac6f65d1279f222) Bug: 863377 Change-Id: Ib2f7c80a00dd3b38fe5a98475bddb4e595f3f83c Reviewed-on: https://chromium-review.googlesource.com/1156192 Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org> Commit-Queue: Trent Apted <tapted@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#579563} Reviewed-on: https://chromium-review.googlesource.com/1160830 Reviewed-by: Trent Apted <tapted@chromium.org> Cr-Commit-Position: refs/branch-heads/3497@{#365} Cr-Branched-From: 271eaf50594eb818c9295dc78d364aea18c82ea8-refs/heads/master@{#576753} [modify] https://crrev.com/6c75fcdc7eaf4ca28e11bbbf862714add11a4b45/chrome/browser/ui/cocoa/download/download_item_drag_mac.mm
,
Aug 3
,
Aug 9
Update : ------ Tested above issue in latest Beta build #69.0.3497.32 in Mac(10.12.6,10.13.1,10.13.6,10.14) OS and the issue is fixed. Now, 'Choose File' button works as expected in today's Beta build hence adding TE-Verified labels. Kindly review an attached screen-cast for reference. Thank you..! |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by rbasuvula@chromium.org
, Jul 13