OLD | NEW |
---|---|
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 * 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 * | 10 * |
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
507 * @param {number} columnNumber | 507 * @param {number} columnNumber |
508 * @return {Element} | 508 * @return {Element} |
509 */ | 509 */ |
510 _createAnchor: function(uiSourceCode, lineNumber, columnNumber) | 510 _createAnchor: function(uiSourceCode, lineNumber, columnNumber) |
511 { | 511 { |
512 var anchor = document.createElement("a"); | 512 var anchor = document.createElement("a"); |
513 anchor.preferredPanel = "scripts"; | 513 anchor.preferredPanel = "scripts"; |
514 anchor.href = sanitizeHref(uiSourceCode.originURL()); | 514 anchor.href = sanitizeHref(uiSourceCode.originURL()); |
515 anchor.uiSourceCode = uiSourceCode; | 515 anchor.uiSourceCode = uiSourceCode; |
516 anchor.lineNumber = lineNumber; | 516 anchor.lineNumber = lineNumber; |
517 anchor.silent = true; | |
pfeldman
2013/04/27 08:05:45
Clicking a link does not result in focus gain? Tha
Dmitry Zvorygin
2013/04/29 16:02:35
Only if you click on link in advanced search panel
| |
517 return anchor; | 518 return anchor; |
518 }, | 519 }, |
519 | 520 |
520 /** | 521 /** |
521 * @param {WebInspector.FileBasedSearchResultsPane.SearchResult} searchResul t | 522 * @param {WebInspector.FileBasedSearchResultsPane.SearchResult} searchResul t |
522 */ | 523 */ |
523 addSearchResult: function(searchResult) | 524 addSearchResult: function(searchResult) |
524 { | 525 { |
525 this._searchResults.push(searchResult); | 526 this._searchResults.push(searchResult); |
526 var uiSourceCode = searchResult.uiSourceCode; | 527 var uiSourceCode = searchResult.uiSourceCode; |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
602 /** | 603 /** |
603 * @param {WebInspector.FileBasedSearchResultsPane.SearchResult} searchResul t | 604 * @param {WebInspector.FileBasedSearchResultsPane.SearchResult} searchResul t |
604 * @param {number} startMatchIndex | 605 * @param {number} startMatchIndex |
605 * @param {TreeElement} showMoreMatchesElement | 606 * @param {TreeElement} showMoreMatchesElement |
606 */ | 607 */ |
607 _showMoreMatchesElementSelected: function(searchResult, startMatchIndex, sho wMoreMatchesElement) | 608 _showMoreMatchesElementSelected: function(searchResult, startMatchIndex, sho wMoreMatchesElement) |
608 { | 609 { |
609 var fileTreeElement = showMoreMatchesElement.parent; | 610 var fileTreeElement = showMoreMatchesElement.parent; |
610 fileTreeElement.removeChild(showMoreMatchesElement); | 611 fileTreeElement.removeChild(showMoreMatchesElement); |
611 this._appendSearchMatches(fileTreeElement, searchResult, startMatchIndex , searchResult.searchMatches.length); | 612 this._appendSearchMatches(fileTreeElement, searchResult, startMatchIndex , searchResult.searchMatches.length); |
613 return true; | |
lushnikov
2013/04/28 13:36:59
Could you please annotate return value?
Dmitry Zvorygin
2013/04/29 16:02:35
Done.
| |
612 }, | 614 }, |
613 | 615 |
614 /** | 616 /** |
615 * @param {string} fileName | 617 * @param {string} fileName |
616 * @param {number} searchMatchesCount | 618 * @param {number} searchMatchesCount |
617 * @param {number} searchResultIndex | 619 * @param {number} searchResultIndex |
618 */ | 620 */ |
619 _addFileTreeElement: function(fileName, searchMatchesCount, searchResultInde x) | 621 _addFileTreeElement: function(fileName, searchMatchesCount, searchResultInde x) |
620 { | 622 { |
621 var fileTreeElement = new TreeElement("", null, true); | 623 var fileTreeElement = new TreeElement("", null, true); |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
690 */ | 692 */ |
691 WebInspector.FileBasedSearchResultsPane.SearchResult = function(uiSourceCode, se archMatches) { | 693 WebInspector.FileBasedSearchResultsPane.SearchResult = function(uiSourceCode, se archMatches) { |
692 this.uiSourceCode = uiSourceCode; | 694 this.uiSourceCode = uiSourceCode; |
693 this.searchMatches = searchMatches; | 695 this.searchMatches = searchMatches; |
694 } | 696 } |
695 | 697 |
696 /** | 698 /** |
697 * @type {WebInspector.AdvancedSearchController} | 699 * @type {WebInspector.AdvancedSearchController} |
698 */ | 700 */ |
699 WebInspector.advancedSearchController = null; | 701 WebInspector.advancedSearchController = null; |
OLD | NEW |