Commit f91b1ca6 authored by pfeldman@chromium.org's avatar pfeldman@chromium.org

DevTools: don't highlight custom elements in soft context menu.

BUG=522865

Review URL: https://codereview.chromium.org/1312883002

git-svn-id: svn://svn.chromium.org/blink/trunk@201250 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent f2738f35
...@@ -122,6 +122,7 @@ WebInspector.SoftContextMenu.prototype = { ...@@ -122,6 +122,7 @@ WebInspector.SoftContextMenu.prototype = {
if (item.element) { if (item.element) {
var wrapper = menuItemElement.createChild("div", "soft-context-menu-custom-item"); var wrapper = menuItemElement.createChild("div", "soft-context-menu-custom-item");
wrapper.appendChild(item.element); wrapper.appendChild(item.element);
menuItemElement._isCustom = true;
return menuItemElement; return menuItemElement;
} }
...@@ -273,7 +274,7 @@ WebInspector.SoftContextMenu.prototype = { ...@@ -273,7 +274,7 @@ WebInspector.SoftContextMenu.prototype = {
_highlightPrevious: function() _highlightPrevious: function()
{ {
var menuItemElement = this._highlightedMenuItemElement ? this._highlightedMenuItemElement.previousSibling : this._contextMenuElement.lastChild; var menuItemElement = this._highlightedMenuItemElement ? this._highlightedMenuItemElement.previousSibling : this._contextMenuElement.lastChild;
while (menuItemElement && menuItemElement._isSeparator) while (menuItemElement && (menuItemElement._isSeparator || menuItemElement._isCustom))
menuItemElement = menuItemElement.previousSibling; menuItemElement = menuItemElement.previousSibling;
if (menuItemElement) if (menuItemElement)
this._highlightMenuItem(menuItemElement); this._highlightMenuItem(menuItemElement);
...@@ -282,7 +283,7 @@ WebInspector.SoftContextMenu.prototype = { ...@@ -282,7 +283,7 @@ WebInspector.SoftContextMenu.prototype = {
_highlightNext: function() _highlightNext: function()
{ {
var menuItemElement = this._highlightedMenuItemElement ? this._highlightedMenuItemElement.nextSibling : this._contextMenuElement.firstChild; var menuItemElement = this._highlightedMenuItemElement ? this._highlightedMenuItemElement.nextSibling : this._contextMenuElement.firstChild;
while (menuItemElement && menuItemElement._isSeparator) while (menuItemElement && (menuItemElement._isSeparator || menuItemElement._isCustom))
menuItemElement = menuItemElement.nextSibling; menuItemElement = menuItemElement.nextSibling;
if (menuItemElement) if (menuItemElement)
this._highlightMenuItem(menuItemElement); this._highlightMenuItem(menuItemElement);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment