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

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

Issue 2782773002: [DevTools] Remove SDKModels' fromTarget methods (Closed)
Patch Set: addressed review comments 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 * 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 * @return {!Element} 49 * @return {!Element}
50 */ 50 */
51 static createBreakpointHitMessage(details) { 51 static createBreakpointHitMessage(details) {
52 var messageWrapper = createElement('span'); 52 var messageWrapper = createElement('span');
53 var mainElement = messageWrapper.createChild('div', 'status-main'); 53 var mainElement = messageWrapper.createChild('div', 'status-main');
54 mainElement.appendChild(UI.Icon.create('smallicon-info', 'status-icon')); 54 mainElement.appendChild(UI.Icon.create('smallicon-info', 'status-icon'));
55 var auxData = /** @type {!Object} */ (details.auxData); 55 var auxData = /** @type {!Object} */ (details.auxData);
56 mainElement.appendChild(createTextNode( 56 mainElement.appendChild(createTextNode(
57 String.sprintf('Paused on %s', Components.DOMBreakpointsSidebarPane.Brea kpointTypeNouns[auxData['type']]))); 57 String.sprintf('Paused on %s', Components.DOMBreakpointsSidebarPane.Brea kpointTypeNouns[auxData['type']])));
58 58
59 var domModel = SDK.DOMModel.fromTarget(details.debuggerModel.target()); 59 var domModel = details.debuggerModel.target().model(SDK.DOMModel);
60 if (domModel) { 60 if (domModel) {
61 var subElement = messageWrapper.createChild('div', 'status-sub monospace') ; 61 var subElement = messageWrapper.createChild('div', 'status-sub monospace') ;
62 var node = domModel.nodeForId(auxData['nodeId']); 62 var node = domModel.nodeForId(auxData['nodeId']);
63 var linkifiedNode = Components.DOMPresentationUtils.linkifyNodeReference(n ode); 63 var linkifiedNode = Components.DOMPresentationUtils.linkifyNodeReference(n ode);
64 subElement.appendChild(linkifiedNode); 64 subElement.appendChild(linkifiedNode);
65 65
66 var targetNode = auxData['targetNodeId'] ? domModel.nodeForId(auxData['tar getNodeId']) : null; 66 var targetNode = auxData['targetNodeId'] ? domModel.nodeForId(auxData['tar getNodeId']) : null;
67 var targetNodeLink = targetNode ? Components.DOMPresentationUtils.linkifyN odeReference(targetNode) : ''; 67 var targetNodeLink = targetNode ? Components.DOMPresentationUtils.linkifyN odeReference(targetNode) : '';
68 var message; 68 var message;
69 if (auxData.type === Components.DOMBreakpointsSidebarPane.BreakpointTypes. SubtreeModified) { 69 if (auxData.type === Components.DOMBreakpointsSidebarPane.BreakpointTypes. SubtreeModified) {
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 var pane = Components.domBreakpointsSidebarPane; 404 var pane = Components.domBreakpointsSidebarPane;
405 if (pane.element.parentNode !== this.element) 405 if (pane.element.parentNode !== this.element)
406 pane.show(this.element); 406 pane.show(this.element);
407 } 407 }
408 }; 408 };
409 409
410 /** 410 /**
411 * @type {!Components.DOMBreakpointsSidebarPane} 411 * @type {!Components.DOMBreakpointsSidebarPane}
412 */ 412 */
413 Components.domBreakpointsSidebarPane; 413 Components.domBreakpointsSidebarPane;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698