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

Issue 2568893002: Prevent drag-and-drop events from firing over cross-site, same-page frames. (Closed)

Created:
4 years ago by paulmeyer
Modified:
4 years ago
CC:
chromium-reviews, jam, darin-cc_chromium.org, site-isolation-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Prevent drag-and-drop events from firing over cross-site, same-page frames. This is done by storing the source RenderViewHost and RenderProcessHost for each dragstart. Then, for other drag events (like dragover), if the target frame for that event is in the same RenderViewHost, but different RenderProcessHost, than the source, then the event is not fired. Note that this patch will not affect behavior on Mac, and a subsequent CL will enforce the same thing for Mac. BUG=666858 Committed: https://crrev.com/7dfa247951db2ccb10b8b5276eb58a33cda4728f Cr-Commit-Position: refs/heads/master@{#438609}

Patch Set 1 #

Total comments: 6

Patch Set 2 : Addressed comments. #

Total comments: 23

Patch Set 3 : Addressed additional comments from everyone. #

Total comments: 2

Patch Set 4 : Fixed typo in comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+70 lines, -14 lines) Patch
M chrome/browser/ui/views/drag_and_drop_interactive_uitest.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_view_aura.h View 1 2 3 3 chunks +24 lines, -4 lines 0 comments Download
M content/browser/web_contents/web_contents_view_aura.cc View 1 2 12 chunks +42 lines, -7 lines 0 comments Download
M testing/buildbot/filters/site-per-process.interactive_ui_tests.filter View 1 2 1 chunk +0 lines, -3 lines 0 comments Download

Messages

Total messages: 38 (20 generated)
paulmeyer
4 years ago (2016-12-12 18:49:03 UTC) #8
Charlie Reis
Thanks! I can take a look after my meeting. Maybe lfg@ can take a first ...
4 years ago (2016-12-12 19:30:35 UTC) #12
Łukasz Anforowicz
Could you please also remove the test filter from testing/buildbot/filters/site-per-process.interactive_ui_tests.filter (i.e. revert to the revision ...
4 years ago (2016-12-12 19:47:17 UTC) #13
lfg
https://codereview.chromium.org/2568893002/diff/20001/content/browser/web_contents/web_contents_view_aura.cc File content/browser/web_contents/web_contents_view_aura.cc (right): https://codereview.chromium.org/2568893002/diff/20001/content/browser/web_contents/web_contents_view_aura.cc#newcode912 content/browser/web_contents/web_contents_view_aura.cc:912: drag_source_rph_ = source_rwh->GetProcess(); Would it be possible that a ...
4 years ago (2016-12-12 20:34:21 UTC) #14
Charlie Reis
https://codereview.chromium.org/2568893002/diff/20001/content/browser/web_contents/web_contents_view_aura.cc File content/browser/web_contents/web_contents_view_aura.cc (right): https://codereview.chromium.org/2568893002/diff/20001/content/browser/web_contents/web_contents_view_aura.cc#newcode912 content/browser/web_contents/web_contents_view_aura.cc:912: drag_source_rph_ = source_rwh->GetProcess(); On 2016/12/12 20:34:21, lfg wrote: > ...
4 years ago (2016-12-12 20:57:03 UTC) #15
paulmeyer
https://codereview.chromium.org/2568893002/diff/20001/content/browser/web_contents/web_contents_view_aura.cc File content/browser/web_contents/web_contents_view_aura.cc (right): https://codereview.chromium.org/2568893002/diff/20001/content/browser/web_contents/web_contents_view_aura.cc#newcode912 content/browser/web_contents/web_contents_view_aura.cc:912: drag_source_rph_ = source_rwh->GetProcess(); On 2016/12/12 20:34:21, lfg wrote: > ...
4 years ago (2016-12-13 20:57:31 UTC) #18
Charlie Reis
Thanks. A few quick thoughts on the .h file before I have to run. https://codereview.chromium.org/2568893002/diff/40001/content/browser/web_contents/web_contents_view_aura.h ...
4 years ago (2016-12-13 23:01:16 UTC) #19
Łukasz Anforowicz
https://codereview.chromium.org/2568893002/diff/40001/content/browser/web_contents/web_contents_view_aura.h File content/browser/web_contents/web_contents_view_aura.h (right): https://codereview.chromium.org/2568893002/diff/40001/content/browser/web_contents/web_contents_view_aura.h#newcode206 content/browser/web_contents/web_contents_view_aura.h:206: // We also keep track of the ID of ...
4 years ago (2016-12-13 23:07:24 UTC) #21
lfg
Mostly looks good, I think we should have a test for this, can you add ...
4 years ago (2016-12-14 16:10:10 UTC) #22
Łukasz Anforowicz
On 2016/12/14 16:10:10, lfg wrote: > Mostly looks good, I think we should have a ...
4 years ago (2016-12-14 17:01:18 UTC) #23
Charlie Reis
A few more suggestions to finish it up. I do think we should enable Lukasz's ...
4 years ago (2016-12-14 18:06:51 UTC) #24
paulmeyer
PTAL https://codereview.chromium.org/2568893002/diff/40001/content/browser/web_contents/web_contents_view_aura.h File content/browser/web_contents/web_contents_view_aura.h (right): https://codereview.chromium.org/2568893002/diff/40001/content/browser/web_contents/web_contents_view_aura.h#newcode93 content/browser/web_contents/web_contents_view_aura.h:93: bool ValidDragTarget(RenderWidgetHostImpl* target_rwh) const; On 2016/12/14 18:06:50, Charlie ...
4 years ago (2016-12-14 18:27:49 UTC) #25
Charlie Reis
Thanks! That's much clearer. LGTM with the changes below. https://codereview.chromium.org/2568893002/diff/40001/content/browser/web_contents/web_contents_view_aura.cc File content/browser/web_contents/web_contents_view_aura.cc (right): https://codereview.chromium.org/2568893002/diff/40001/content/browser/web_contents/web_contents_view_aura.cc#newcode644 content/browser/web_contents/web_contents_view_aura.cc:644: ...
4 years ago (2016-12-14 18:36:36 UTC) #28
paulmeyer
https://codereview.chromium.org/2568893002/diff/40001/content/browser/web_contents/web_contents_view_aura.cc File content/browser/web_contents/web_contents_view_aura.cc (right): https://codereview.chromium.org/2568893002/diff/40001/content/browser/web_contents/web_contents_view_aura.cc#newcode644 content/browser/web_contents/web_contents_view_aura.cc:644: return target_rwh->GetProcess()->GetID() == drag_source_rph_ || On 2016/12/14 18:36:36, Charlie ...
4 years ago (2016-12-14 18:53:18 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2568893002/80001
4 years ago (2016-12-14 18:55:16 UTC) #32
lfg
lgtm
4 years ago (2016-12-14 18:55:34 UTC) #33
commit-bot: I haz the power
Committed patchset #4 (id:80001)
4 years ago (2016-12-14 20:34:33 UTC) #36
commit-bot: I haz the power
4 years ago (2016-12-14 20:37:33 UTC) #38
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/7dfa247951db2ccb10b8b5276eb58a33cda4728f
Cr-Commit-Position: refs/heads/master@{#438609}

Powered by Google App Engine
This is Rietveld 408576698