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

Side by Side Diff: Source/WebCore/inspector/front-end/ScriptsPanel.js

Issue 8373002: Merge 97777 - Web Inspector: ScriptsPanel's should use similar logic to decide whether it could s... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/912/
Patch Set: Created 9 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 | « no previous file | 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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * Copyright (C) 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2011 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 x.show(this.viewsContainerElement); 625 x.show(this.viewsContainerElement);
626 this._scriptViewStatusBarItemsContainer.removeChildren(); 626 this._scriptViewStatusBarItemsContainer.removeChildren();
627 var statusBarItems = x.statusBarItems || []; 627 var statusBarItems = x.statusBarItems || [];
628 for (var i = 0; i < statusBarItems.length; ++i) 628 for (var i = 0; i < statusBarItems.length; ++i)
629 this._scriptViewStatusBarItemsContainer.appendChild(statusBarIte ms[i]); 629 this._scriptViewStatusBarItemsContainer.appendChild(statusBarIte ms[i]);
630 } 630 }
631 }, 631 },
632 632
633 canShowAnchorLocation: function(anchor) 633 canShowAnchorLocation: function(anchor)
634 { 634 {
635 return this._debuggerEnabled && WebInspector.debuggerModel.scriptsForURL (anchor.href).length; 635 return this._debuggerEnabled && anchor.uiSourceCode;
636 }, 636 },
637 637
638 showAnchorLocation: function(anchor) 638 showAnchorLocation: function(anchor)
639 { 639 {
640 this._showSourceLine(anchor.uiSourceCode, anchor.lineNumber); 640 this._showSourceLine(anchor.uiSourceCode, anchor.lineNumber);
641 }, 641 },
642 642
643 _showSourceLine: function(uiSourceCode, lineNumber) 643 _showSourceLine: function(uiSourceCode, lineNumber)
644 { 644 {
645 var sourceFrame = this._showSourceFrameAndAddToHistory(uiSourceCode); 645 var sourceFrame = this._showSourceFrameAndAddToHistory(uiSourceCode);
646 sourceFrame.highlightLine(lineNumber); 646 if (lineNumber)
647 sourceFrame.highlightLine(lineNumber);
647 }, 648 },
648 649
649 _showSourceFrameAndAddToHistory: function(uiSourceCode) 650 _showSourceFrameAndAddToHistory: function(uiSourceCode)
650 { 651 {
651 if (!uiSourceCode._option) 652 if (!uiSourceCode._option)
652 return; 653 return;
653 654
654 var sourceFrame = this._showSourceFrame(uiSourceCode); 655 var sourceFrame = this._showSourceFrame(uiSourceCode);
655 656
656 var oldIndex = this._currentBackForwardIndex; 657 var oldIndex = this._currentBackForwardIndex;
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
1289 }, 1290 },
1290 1291
1291 suggestedFileName: function() 1292 suggestedFileName: function()
1292 { 1293 {
1293 var names = this._scriptsPanel._folderAndDisplayNameForScriptURL(this._u iSourceCode.url); 1294 var names = this._scriptsPanel._folderAndDisplayNameForScriptURL(this._u iSourceCode.url);
1294 return names.displayName || "untitled.js"; 1295 return names.displayName || "untitled.js";
1295 } 1296 }
1296 } 1297 }
1297 1298
1298 WebInspector.SourceFrameDelegateForScriptsPanel.prototype.__proto__ = WebInspect or.SourceFrameDelegate.prototype; 1299 WebInspector.SourceFrameDelegateForScriptsPanel.prototype.__proto__ = WebInspect or.SourceFrameDelegate.prototype;
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698