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

Side by Side Diff: Source/devtools/front_end/bindings/Linkifier.js

Issue 1180733005: [DevTools] Added missing items to live anchor's context menu (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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 | « no previous file | Source/devtools/front_end/elements/ElementsPanel.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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 { 333 {
334 var text = uiLocation.linkText(); 334 var text = uiLocation.linkText();
335 if (this._maxLength) 335 if (this._maxLength)
336 text = text.trimMiddle(this._maxLength); 336 text = text.trimMiddle(this._maxLength);
337 anchor.textContent = text; 337 anchor.textContent = text;
338 338
339 var titleText = uiLocation.uiSourceCode.originURL(); 339 var titleText = uiLocation.uiSourceCode.originURL();
340 if (typeof uiLocation.lineNumber === "number") 340 if (typeof uiLocation.lineNumber === "number")
341 titleText += ":" + (uiLocation.lineNumber + 1); 341 titleText += ":" + (uiLocation.lineNumber + 1);
342 anchor.title = titleText; 342 anchor.title = titleText;
343
344 var networkURL = WebInspector.networkMapping.networkURL(uiLocation.uiSou rceCode);
pfeldman 2015/06/18 06:51:18 This is likely a modularity violation. You should
345 if (networkURL)
346 anchor.href = networkURL;
343 } 347 }
344 } 348 }
345 349
346 /** 350 /**
347 * @constructor 351 * @constructor
348 * @extends {WebInspector.Linkifier.DefaultFormatter} 352 * @extends {WebInspector.Linkifier.DefaultFormatter}
349 */ 353 */
350 WebInspector.Linkifier.DefaultCSSFormatter = function() 354 WebInspector.Linkifier.DefaultCSSFormatter = function()
351 { 355 {
352 WebInspector.Linkifier.DefaultFormatter.call(this, WebInspector.Linkifier.De faultCSSFormatter.MaxLengthForDisplayedURLs); 356 WebInspector.Linkifier.DefaultFormatter.call(this, WebInspector.Linkifier.De faultCSSFormatter.MaxLengthForDisplayedURLs);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 var debuggerModel = WebInspector.DebuggerModel.fromTarget(target); 409 var debuggerModel = WebInspector.DebuggerModel.fromTarget(target);
406 if (!debuggerModel) 410 if (!debuggerModel)
407 return ""; 411 return "";
408 var script = debuggerModel.scriptForId(scriptId); 412 var script = debuggerModel.scriptForId(scriptId);
409 if (!script) 413 if (!script)
410 return ""; 414 return "";
411 var location = /** @type {!WebInspector.DebuggerModel.Location} */ (debugger Model.createRawLocation(script, lineNumber, columnNumber || 0)); 415 var location = /** @type {!WebInspector.DebuggerModel.Location} */ (debugger Model.createRawLocation(script, lineNumber, columnNumber || 0));
412 var uiLocation = /** @type {!WebInspector.UILocation} */ (WebInspector.debug gerWorkspaceBinding.rawLocationToUILocation(location)); 416 var uiLocation = /** @type {!WebInspector.UILocation} */ (WebInspector.debug gerWorkspaceBinding.rawLocationToUILocation(location));
413 return uiLocation.linkText(); 417 return uiLocation.linkText();
414 } 418 }
OLDNEW
« no previous file with comments | « no previous file | Source/devtools/front_end/elements/ElementsPanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698