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

Side by Side Diff: Source/devtools/front_end/ui/SoftContextMenu.js

Issue 659043002: DevTools: fix styles for glasspane (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: address comments one more time Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « Source/devtools/front_end/ui/Dialog.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All Rights Reserved. 2 * Copyright (C) 2011 Google Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 * @param {number} y 42 * @param {number} y
43 */ 43 */
44 show: function(x, y) 44 show: function(x, y)
45 { 45 {
46 this._x = x; 46 this._x = x;
47 this._y = y; 47 this._y = y;
48 this._time = new Date().getTime(); 48 this._time = new Date().getTime();
49 49
50 // Create context menu. 50 // Create context menu.
51 this._contextMenuElement = document.createElementWithClass("div", "soft- context-menu"); 51 this._contextMenuElement = document.createElementWithClass("div", "soft- context-menu");
52 this._contextMenuElement.classList.add("component-root");
52 this._contextMenuElement.tabIndex = 0; 53 this._contextMenuElement.tabIndex = 0;
53 this._contextMenuElement.style.top = y + "px"; 54 this._contextMenuElement.style.top = y + "px";
54 this._contextMenuElement.style.left = x + "px"; 55 this._contextMenuElement.style.left = x + "px";
55 56
56 this._contextMenuElement.addEventListener("mouseup", consumeEvent, false ); 57 this._contextMenuElement.addEventListener("mouseup", consumeEvent, false );
57 this._contextMenuElement.addEventListener("keydown", this._menuKeyDown.b ind(this), false); 58 this._contextMenuElement.addEventListener("keydown", this._menuKeyDown.b ind(this), false);
58 59
59 for (var i = 0; i < this._items.length; ++i) 60 for (var i = 0; i < this._items.length; ++i)
60 this._contextMenuElement.appendChild(this._createMenuItem(this._item s[i])); 61 this._contextMenuElement.appendChild(this._createMenuItem(this._item s[i]));
61 62
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 337
337 _discardSubMenus: function() 338 _discardSubMenus: function()
338 { 339 {
339 if (this._subMenu) 340 if (this._subMenu)
340 this._subMenu._discardSubMenus(); 341 this._subMenu._discardSubMenus();
341 this._contextMenuElement.remove(); 342 this._contextMenuElement.remove();
342 if (this._parentMenu) 343 if (this._parentMenu)
343 delete this._parentMenu._subMenu; 344 delete this._parentMenu._subMenu;
344 } 345 }
345 } 346 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/ui/Dialog.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698