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

Unified Diff: Source/devtools/front_end/ui/SoftContextMenu.js

Issue 1312883002: DevTools: don't highlight custom elements in soft context menu. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/ui/SoftContextMenu.js
diff --git a/Source/devtools/front_end/ui/SoftContextMenu.js b/Source/devtools/front_end/ui/SoftContextMenu.js
index ace88f84fda3a5c38e97a988eec57ed7f40e3816..f56780e223c0ca7b82da65e77a89b0c46ee4cb8a 100644
--- a/Source/devtools/front_end/ui/SoftContextMenu.js
+++ b/Source/devtools/front_end/ui/SoftContextMenu.js
@@ -122,6 +122,7 @@ WebInspector.SoftContextMenu.prototype = {
if (item.element) {
var wrapper = menuItemElement.createChild("div", "soft-context-menu-custom-item");
wrapper.appendChild(item.element);
+ menuItemElement._isCustom = true;
return menuItemElement;
}
@@ -273,7 +274,7 @@ WebInspector.SoftContextMenu.prototype = {
_highlightPrevious: function()
{
var menuItemElement = this._highlightedMenuItemElement ? this._highlightedMenuItemElement.previousSibling : this._contextMenuElement.lastChild;
- while (menuItemElement && menuItemElement._isSeparator)
+ while (menuItemElement && (menuItemElement._isSeparator || menuItemElement._isCustom))
menuItemElement = menuItemElement.previousSibling;
if (menuItemElement)
this._highlightMenuItem(menuItemElement);
@@ -282,7 +283,7 @@ WebInspector.SoftContextMenu.prototype = {
_highlightNext: function()
{
var menuItemElement = this._highlightedMenuItemElement ? this._highlightedMenuItemElement.nextSibling : this._contextMenuElement.firstChild;
- while (menuItemElement && menuItemElement._isSeparator)
+ while (menuItemElement && (menuItemElement._isSeparator || menuItemElement._isCustom))
menuItemElement = menuItemElement.nextSibling;
if (menuItemElement)
this._highlightMenuItem(menuItemElement);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698