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

Issue 14795011: Remove dead ContextMenu code from Blink core (Closed)

Created:
7 years, 7 months ago by adamk
Modified:
7 years, 7 months ago
CC:
blink-reviews, jeez, Nate Chapin, eae+blinkwatch, gavinp+loader_chromium.org, groby-ooo-7-16, darin (slow to review)
Visibility:
Public.

Description

Remove dead ContextMenu code from Blink core Most of ContextMenuController was devoted to building up context menus and handling actions for those menus it had built up, but in Blink/Chromium, those menus are almost entirely dropped on the floor by the embedder. Only those menu items tagged as "custom" are preserved. And these are added elsewhere, by ContextMenuProvider instances; the only currently-existing one belongs to the web inspector. As part of this cleanup, renamed ContextMenuClient::customizeMenu() to showContextMenu(), since it's a call to that method from the controller which actually causes a context menu to appear. Also tightened up that method, which has no reason to transfer ownership (or even allow mutation) of its ContextMenu to the embedder. R=darin Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=150375

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+20 lines, -1087 lines) Patch
M Source/WebKit/chromium/src/ContextMenuClientImpl.h View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/WebKit/chromium/src/ContextMenuClientImpl.cpp View 6 chunks +6 lines, -8 lines 0 comments Download
M Source/core/core.gypi View 1 chunk +0 lines, -2 lines 0 comments Download
M Source/core/loader/EmptyClients.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/loader/EmptyClients.cpp View 1 chunk +0 lines, -5 lines 0 comments Download
M Source/core/page/ContextMenuClient.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/page/ContextMenuController.h View 2 chunks +0 lines, -18 lines 0 comments Download
M Source/core/page/ContextMenuController.cpp View 4 chunks +4 lines, -741 lines 3 comments Download
M Source/core/platform/ContextMenu.h View 1 chunk +4 lines, -22 lines 0 comments Download
M Source/core/platform/ContextMenu.cpp View 2 chunks +1 line, -5 lines 0 comments Download
M Source/core/platform/ContextMenuItem.h View 2 chunks +1 line, -80 lines 0 comments Download
M Source/core/platform/LocalizedStrings.h View 1 chunk +0 lines, -48 lines 0 comments Download
D Source/core/platform/chromium/ContextMenuChromium.cpp View 1 chunk +0 lines, -59 lines 0 comments Download
D Source/core/platform/chromium/ContextMenuItemChromium.cpp View 1 chunk +0 lines, -46 lines 0 comments Download
M Source/core/platform/chromium/LocalizedStringsChromium.cpp View 1 chunk +0 lines, -49 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
adamk
7 years, 7 months ago (2013-05-14 00:07:03 UTC) #1
adamk
https://codereview.chromium.org/14795011/diff/1/Source/core/page/ContextMenuController.cpp File Source/core/page/ContextMenuController.cpp (left): https://codereview.chromium.org/14795011/diff/1/Source/core/page/ContextMenuController.cpp#oldcode575 Source/core/page/ContextMenuController.cpp:575: Vector<String> guesses = frame->editor()->guessesForMisspelledOrUngrammatical(misspelling, badGrammar); Just happened to be ...
7 years, 7 months ago (2013-05-14 00:30:52 UTC) #2
adamk
+groby for Mac spellchecking insight. See my comment about Editor::guessesForMisspelledOrUngrammatical(): it happens to call updateSpellingUIWithMisspelledWord(). ...
7 years, 7 months ago (2013-05-14 00:33:01 UTC) #3
groby-ooo-7-16
I'm reasonably confident this is dead code, see inline comment. https://codereview.chromium.org/14795011/diff/1/Source/core/page/ContextMenuController.cpp File Source/core/page/ContextMenuController.cpp (left): https://codereview.chromium.org/14795011/diff/1/Source/core/page/ContextMenuController.cpp#oldcode575 ...
7 years, 7 months ago (2013-05-14 00:57:54 UTC) #4
adamk
https://codereview.chromium.org/14795011/diff/1/Source/core/page/ContextMenuController.cpp File Source/core/page/ContextMenuController.cpp (left): https://codereview.chromium.org/14795011/diff/1/Source/core/page/ContextMenuController.cpp#oldcode575 Source/core/page/ContextMenuController.cpp:575: Vector<String> guesses = frame->editor()->guessesForMisspelledOrUngrammatical(misspelling, badGrammar); On 2013/05/14 00:57:54, groby ...
7 years, 7 months ago (2013-05-14 01:05:12 UTC) #5
groby-ooo-7-16
Ah. That does indeed have a side effect, sorry for missing it. If you have ...
7 years, 7 months ago (2013-05-14 01:44:31 UTC) #6
adamk
On 2013/05/14 01:44:31, groby wrote: > Ah. That does indeed have a side effect, sorry ...
7 years, 7 months ago (2013-05-14 21:18:08 UTC) #7
adamk
+eseidel to review
7 years, 7 months ago (2013-05-14 21:19:01 UTC) #8
darin (slow to review)
LGTM
7 years, 7 months ago (2013-05-14 21:25:34 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/adamk@chromium.org/14795011/1
7 years, 7 months ago (2013-05-14 21:27:31 UTC) #10
commit-bot: I haz the power
7 years, 7 months ago (2013-05-14 23:34:05 UTC) #11
Message was sent while issue was closed.
Change committed as 150375

Powered by Google App Engine
This is Rietveld 408576698