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

Side by Side Diff: Source/devtools/front_end/elements/ElementsPanel.js

Issue 659403006: DevTools: do not consider ? a shortcut while editing. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebaselined 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/devtools/front_end/elements/ElementsTreeOutline.js » ('j') | 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) 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com>
4 * Copyright (C) 2009 Joseph Pecoraro 4 * Copyright (C) 2009 Joseph Pecoraro
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 if (!WebInspector.settings.domWordWrap.get()) 53 if (!WebInspector.settings.domWordWrap.get())
54 this.contentElement.classList.add("nowrap"); 54 this.contentElement.classList.add("nowrap");
55 WebInspector.settings.domWordWrap.addChangeListener(this._domWordWrapSetting Changed.bind(this)); 55 WebInspector.settings.domWordWrap.addChangeListener(this._domWordWrapSetting Changed.bind(this));
56 56
57 this._splitView.sidebarElement().addEventListener("contextmenu", this._sideb arContextMenuEventFired.bind(this), false); 57 this._splitView.sidebarElement().addEventListener("contextmenu", this._sideb arContextMenuEventFired.bind(this), false);
58 58
59 var crumbsContainer = stackElement.createChild("div"); 59 var crumbsContainer = stackElement.createChild("div");
60 crumbsContainer.id = "elements-crumbs"; 60 crumbsContainer.id = "elements-crumbs";
61 this.crumbsElement = crumbsContainer.createChild("div", "crumbs"); 61 this.crumbsElement = crumbsContainer.createChild("div", "crumbs");
62 this.crumbsElement.addEventListener("mousemove", this._mouseMovedInCrumbs.bi nd(this), false); 62 this.crumbsElement.addEventListener("mousemove", this._mouseMovedInCrumbs.bi nd(this), false);
63 this.crumbsElement.addEventListener("mouseout", this._mouseMovedOutOfCrumbs. bind(this), false); 63 this.crumbsElement.addEventListener("mouseleave", this._mouseMovedOutOfCrumb s.bind(this), false);
64 64
65 this.sidebarPanes = {}; 65 this.sidebarPanes = {};
66 this.sidebarPanes.platformFonts = new WebInspector.PlatformFontsSidebarPane( ); 66 this.sidebarPanes.platformFonts = new WebInspector.PlatformFontsSidebarPane( );
67 this.sidebarPanes.computedStyle = new WebInspector.ComputedStyleSidebarPane( ); 67 this.sidebarPanes.computedStyle = new WebInspector.ComputedStyleSidebarPane( );
68 this.sidebarPanes.styles = new WebInspector.StylesSidebarPane(this.sidebarPa nes.computedStyle, this._setPseudoClassForNode.bind(this)); 68 this.sidebarPanes.styles = new WebInspector.StylesSidebarPane(this.sidebarPa nes.computedStyle, this._setPseudoClassForNode.bind(this));
69 this.sidebarPanes.styles.addEventListener(WebInspector.StylesSidebarPane.Eve nts.SelectorEditingStarted, this._onEditingSelectorStarted.bind(this)); 69 this.sidebarPanes.styles.addEventListener(WebInspector.StylesSidebarPane.Eve nts.SelectorEditingStarted, this._onEditingSelectorStarted.bind(this));
70 this.sidebarPanes.styles.addEventListener(WebInspector.StylesSidebarPane.Eve nts.SelectorEditingEnded, this._onEditingSelectorEnded.bind(this)); 70 this.sidebarPanes.styles.addEventListener(WebInspector.StylesSidebarPane.Eve nts.SelectorEditingEnded, this._onEditingSelectorEnded.bind(this));
71 71
72 this._matchedStylesFilterBoxContainer = createElement("div"); 72 this._matchedStylesFilterBoxContainer = createElement("div");
73 this._matchedStylesFilterBoxContainer.className = "sidebar-pane-filter-box"; 73 this._matchedStylesFilterBoxContainer.className = "sidebar-pane-filter-box";
(...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 702
703 _metricsPaneEdited: function() 703 _metricsPaneEdited: function()
704 { 704 {
705 // Once metrics are edited, the Styles pane should be updated. 705 // Once metrics are edited, the Styles pane should be updated.
706 this.sidebarPanes.styles.needsUpdate = true; 706 this.sidebarPanes.styles.needsUpdate = true;
707 this.updateStyles(true); 707 this.updateStyles(true);
708 }, 708 },
709 709
710 _mouseMovedInCrumbs: function(event) 710 _mouseMovedInCrumbs: function(event)
711 { 711 {
712 var nodeUnderMouse = event.deepElementFromPoint(); 712 var nodeUnderMouse = event.target;
713 var crumbElement = nodeUnderMouse.enclosingNodeOrSelfWithClass("crumb"); 713 var crumbElement = nodeUnderMouse.enclosingNodeOrSelfWithClass("crumb");
714 var node = /** @type {?WebInspector.DOMNode} */ (crumbElement ? crumbEle ment.representedObject : null); 714 var node = /** @type {?WebInspector.DOMNode} */ (crumbElement ? crumbEle ment.representedObject : null);
715 if (node) 715 if (node)
716 node.highlight(); 716 node.highlight();
717 }, 717 },
718 718
719 _mouseMovedOutOfCrumbs: function(event) 719 _mouseMovedOutOfCrumbs: function(event)
720 { 720 {
721 var nodeUnderMouse = event.deepElementFromPoint();
722 if (nodeUnderMouse && nodeUnderMouse.isDescendant(this.crumbsElement))
723 return;
724
725 for (var i = 0; i < this._treeOutlines.length; ++i) 721 for (var i = 0; i < this._treeOutlines.length; ++i)
726 this._treeOutlines[i].domModel().hideDOMNodeHighlight(); 722 this._treeOutlines[i].domModel().hideDOMNodeHighlight();
727 }, 723 },
728 724
729 /** 725 /**
730 * @param {boolean=} forceUpdate 726 * @param {boolean=} forceUpdate
731 */ 727 */
732 updateBreadcrumb: function(forceUpdate) 728 updateBreadcrumb: function(forceUpdate)
733 { 729 {
734 if (!this.isShowing()) 730 if (!this.isShowing())
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after
1572 1568
1573 WebInspector.ElementsPanelFactory.prototype = { 1569 WebInspector.ElementsPanelFactory.prototype = {
1574 /** 1570 /**
1575 * @return {!WebInspector.Panel} 1571 * @return {!WebInspector.Panel}
1576 */ 1572 */
1577 createPanel: function() 1573 createPanel: function()
1578 { 1574 {
1579 return WebInspector.ElementsPanel.instance(); 1575 return WebInspector.ElementsPanel.instance();
1580 } 1576 }
1581 } 1577 }
OLDNEW
« no previous file with comments | « no previous file | Source/devtools/front_end/elements/ElementsTreeOutline.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698