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

Issue 7227007: [Mac] Show correct cursor after context menu is closed. (Closed)

Created:
9 years, 5 months ago by Alexei Svitkine (slow)
Modified:
9 years, 5 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, Avi (use Gerrit), jam, brettw-cc_chromium.org
Visibility:
Public.

Description

[Mac] Show correct cursor after context menu is closed. The fix has two parts to it. First keep the RenderViewContextMenu in a scoped_ptr on the TabContentsViewMac instead of creating it on the stack in |ShowContextMenu()|. (This is how it's done with views and gtk already.) This ensures |MenuClosed()| gets called on the RenderViewContextMenu properly - previously it would get destroyed before that could happen. Second, send mouse leave and mouse enter events to the renderer when the context menu is opened and closed, so that the renderer will update the cursor. The CL also renames |is_showing_popup_menu_| to |is_showing_context_menu_| in the views code to be consistent with the name of the callback and the equivalent variable in the GTK and now Mac code. BUG=64436 TEST=see bug Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=92370

Patch Set 1 #

Total comments: 1

Patch Set 2 : '' #

Total comments: 1

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+55 lines, -11 lines) Patch
M chrome/browser/renderer_host/render_widget_host_view_mac.h View 1 2 3 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/render_widget_host_view_mac.mm View 1 2 3 3 chunks +35 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/render_widget_host_view_views.h View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/renderer_host/render_widget_host_view_views.cc View 1 2 3 5 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/tab_contents/tab_contents_view_mac.h View 1 2 3 3 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/tab_contents/tab_contents_view_mac.mm View 1 2 3 4 1 chunk +4 lines, -4 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
Alexei Svitkine (slow)
9 years, 5 months ago (2011-07-06 14:55:23 UTC) #1
brettw
http://codereview.chromium.org/7227007/diff/1/content/renderer/render_view.cc File content/renderer/render_view.cc (right): http://codereview.chromium.org/7227007/diff/1/content/renderer/render_view.cc#newcode4266 content/renderer/render_view.cc:4266: Send(new ViewHostMsg_SetCursor(routing_id_, current_cursor_)); How do you know the old ...
9 years, 5 months ago (2011-07-06 17:04:31 UTC) #2
Alexei Svitkine (slow)
> How do you know the old cursor is the right one to use for ...
9 years, 5 months ago (2011-07-06 17:56:47 UTC) #3
brettw
We should understand why your way works if it's indeed the right thing.
9 years, 5 months ago (2011-07-06 18:03:47 UTC) #4
Alexei Svitkine (slow)
On 2011/07/06 18:03:47, brettw wrote: > We should understand why your way works if it's ...
9 years, 5 months ago (2011-07-06 21:10:48 UTC) #5
brettw
This looks fine to me from a high level, but Avi should check the mac ...
9 years, 5 months ago (2011-07-07 17:04:37 UTC) #6
Alexei Svitkine (slow)
ping Avi On Thu, Jul 7, 2011 at 1:04 PM, <brettw@chromium.org> wrote: > This looks ...
9 years, 5 months ago (2011-07-12 13:34:37 UTC) #7
Alexei Svitkine (slow)
Hey Mark, Could you review the Mac-side of this, since Avi is on vacation?
9 years, 5 months ago (2011-07-12 13:37:34 UTC) #8
Mark Mentovai
LGTM. I’m concerned about the event stream thing, but otherwise this is fine. http://codereview.chromium.org/7227007/diff/6001/chrome/browser/renderer_host/render_widget_host_view_mac.mm File ...
9 years, 5 months ago (2011-07-12 14:06:57 UTC) #9
Alexei Svitkine (slow)
> “outside of event stream”—is this a good idea? What if the current event > ...
9 years, 5 months ago (2011-07-12 14:26:09 UTC) #10
commit-bot: I haz the power
Can't apply patch for file chrome/browser/tab_contents/tab_contents_view_mac.h. While running patch -p0 --forward --force; patching file chrome/browser/tab_contents/tab_contents_view_mac.h ...
9 years, 5 months ago (2011-07-13 00:39:04 UTC) #11
commit-bot: I haz the power
9 years, 5 months ago (2011-07-13 15:50:46 UTC) #12
Change committed as 92370

Powered by Google App Engine
This is Rietveld 408576698