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

Side by Side Diff: Source/devtools/front_end/AdvancedSearchController.js

Issue 14329024: [DevTools] Close drawer on blur after short timeout. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed comments. Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/devtools/front_end/DefaultTextEditor.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) 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
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.omitFocus = true;
vsevik 2013/05/08 12:12:57 As discussed I don't think we should show drawer s
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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 var showMoreMatchesElement = new TreeElement(showMoreMatchesText, null, false); 597 var showMoreMatchesElement = new TreeElement(showMoreMatchesText, null, false);
597 fileTreeElement.appendChild(showMoreMatchesElement); 598 fileTreeElement.appendChild(showMoreMatchesElement);
598 showMoreMatchesElement.listItemElement.addStyleClass("show-more-matches" ); 599 showMoreMatchesElement.listItemElement.addStyleClass("show-more-matches" );
599 showMoreMatchesElement.onselect = this._showMoreMatchesElementSelected.b ind(this, searchResult, startMatchIndex, showMoreMatchesElement); 600 showMoreMatchesElement.onselect = this._showMoreMatchesElementSelected.b ind(this, searchResult, startMatchIndex, showMoreMatchesElement);
600 }, 601 },
601 602
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
607 * @return {boolean}
606 */ 608 */
607 _showMoreMatchesElementSelected: function(searchResult, startMatchIndex, sho wMoreMatchesElement) 609 _showMoreMatchesElementSelected: function(searchResult, startMatchIndex, sho wMoreMatchesElement)
608 { 610 {
609 var fileTreeElement = showMoreMatchesElement.parent; 611 var fileTreeElement = showMoreMatchesElement.parent;
610 fileTreeElement.removeChild(showMoreMatchesElement); 612 fileTreeElement.removeChild(showMoreMatchesElement);
611 this._appendSearchMatches(fileTreeElement, searchResult, startMatchIndex , searchResult.searchMatches.length); 613 this._appendSearchMatches(fileTreeElement, searchResult, startMatchIndex , searchResult.searchMatches.length);
614 return true;
612 }, 615 },
613 616
614 /** 617 /**
615 * @param {string} fileName 618 * @param {string} fileName
616 * @param {number} searchMatchesCount 619 * @param {number} searchMatchesCount
617 * @param {number} searchResultIndex 620 * @param {number} searchResultIndex
618 */ 621 */
619 _addFileTreeElement: function(fileName, searchMatchesCount, searchResultInde x) 622 _addFileTreeElement: function(fileName, searchMatchesCount, searchResultInde x)
620 { 623 {
621 var fileTreeElement = new TreeElement("", null, true); 624 var fileTreeElement = new TreeElement("", null, true);
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 */ 693 */
691 WebInspector.FileBasedSearchResultsPane.SearchResult = function(uiSourceCode, se archMatches) { 694 WebInspector.FileBasedSearchResultsPane.SearchResult = function(uiSourceCode, se archMatches) {
692 this.uiSourceCode = uiSourceCode; 695 this.uiSourceCode = uiSourceCode;
693 this.searchMatches = searchMatches; 696 this.searchMatches = searchMatches;
694 } 697 }
695 698
696 /** 699 /**
697 * @type {WebInspector.AdvancedSearchController} 700 * @type {WebInspector.AdvancedSearchController}
698 */ 701 */
699 WebInspector.advancedSearchController = null; 702 WebInspector.advancedSearchController = null;
OLDNEW
« no previous file with comments | « no previous file | Source/devtools/front_end/DefaultTextEditor.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698