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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/components/DOMPresentationUtils.js

Issue 2835843002: Revert of [DevTools] Consolidate overlay-related functionality in Overlay domain (Closed)
Patch Set: Created 3 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
4 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> 4 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com>
5 * Copyright (C) 2009 Joseph Pecoraro 5 * Copyright (C) 2009 Joseph Pecoraro
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 10 *
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 var shadowRoot = UI.createShadowRootWithCoreStyles(root, 'components/domUtils. css'); 110 var shadowRoot = UI.createShadowRootWithCoreStyles(root, 'components/domUtils. css');
111 var link = shadowRoot.createChild('div', 'node-link'); 111 var link = shadowRoot.createChild('div', 'node-link');
112 112
113 if (idref) 113 if (idref)
114 link.createChild('span', 'node-label-id').createTextChild('#' + idref); 114 link.createChild('span', 'node-label-id').createTextChild('#' + idref);
115 else 115 else
116 Components.DOMPresentationUtils.decorateNodeLabel(node, link); 116 Components.DOMPresentationUtils.decorateNodeLabel(node, link);
117 117
118 link.addEventListener('click', Common.Revealer.reveal.bind(Common.Revealer, no de, undefined), false); 118 link.addEventListener('click', Common.Revealer.reveal.bind(Common.Revealer, no de, undefined), false);
119 link.addEventListener('mouseover', node.highlight.bind(node, undefined, undefi ned), false); 119 link.addEventListener('mouseover', node.highlight.bind(node, undefined, undefi ned), false);
120 link.addEventListener('mouseleave', () => SDK.OverlayModel.hideDOMNodeHighligh t(), false); 120 link.addEventListener('mouseleave', SDK.DOMModel.hideDOMNodeHighlight.bind(SDK .DOMModel), false);
121 121
122 return root; 122 return root;
123 }; 123 };
124 124
125 /** 125 /**
126 * @param {!SDK.DeferredDOMNode} deferredNode 126 * @param {!SDK.DeferredDOMNode} deferredNode
127 * @return {!Node} 127 * @return {!Node}
128 */ 128 */
129 Components.DOMPresentationUtils.linkifyDeferredNodeReference = function(deferred Node) { 129 Components.DOMPresentationUtils.linkifyDeferredNodeReference = function(deferred Node) {
130 var root = createElement('div'); 130 var root = createElement('div');
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 636
637 /** 637 /**
638 * @override 638 * @override
639 * @param {!SDK.DOMNode} node 639 * @param {!SDK.DOMNode} node
640 * @return {?{title: string, color: string}} 640 * @return {?{title: string, color: string}}
641 */ 641 */
642 decorate(node) { 642 decorate(node) {
643 return {title: this._title, color: this._color}; 643 return {title: this._title, color: this._color};
644 } 644 }
645 }; 645 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698