Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). | 3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). |
| 4 * Copyright (C) 2009 Joseph Pecoraro | 4 * Copyright (C) 2009 Joseph Pecoraro |
| 5 * Copyright (C) 2011 Google Inc. All rights reserved. | 5 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 6 * | 6 * |
| 7 * Redistribution and use in source and binary forms, with or without | 7 * Redistribution and use in source and binary forms, with or without |
| 8 * modification, are permitted provided that the following conditions | 8 * modification, are permitted provided that the following conditions |
| 9 * are met: | 9 * are met: |
| 10 * | 10 * |
| (...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 455 return; | 455 return; |
| 456 } | 456 } |
| 457 | 457 |
| 458 this._currentQuery = query; | 458 this._currentQuery = query; |
| 459 this._searchProvider.currentQuery = query; | 459 this._searchProvider.currentQuery = query; |
| 460 this._searchProvider.performSearch(query, shouldJump); | 460 this._searchProvider.performSearch(query, shouldJump); |
| 461 }, | 461 }, |
| 462 | 462 |
| 463 _updateSecondRowVisibility: function() | 463 _updateSecondRowVisibility: function() |
| 464 { | 464 { |
| 465 if (this._replaceCheckboxElement.checked) { | 465 var secondRowVisible = this._replaceCheckboxElement.checked; |
| 466 this._footerElement.classList.add("toolbar-search-replace"); | 466 this._footerElementContainer.classList.toggle("replaceable", secondRowVi sible); |
| 467 this._secondRowElement.classList.remove("hidden"); | 467 this._footerElement.classList.toggle("toolbar-search-replace", secondRow Visible); |
| 468 this._prevButtonElement.classList.remove("hidden"); | 468 this._secondRowElement.classList.toggle("hidden", !secondRowVisible); |
| 469 this._findButtonElement.classList.remove("hidden"); | 469 this._prevButtonElement.classList.toggle("hidden", !secondRowVisible); |
| 470 this._replaceCheckboxElement.tabIndex = -1; | 470 this._findButtonElement.classList.toggle("hidden", !secondRowVisible); |
| 471 this._replaceCheckboxElement.tabIndex = secondRowVisible ? -1 : 0; | |
| 472 | |
| 473 if (this._replaceCheckboxElement.checked) | |
|
eustas
2014/03/04 08:07:28
why not secondRowVisible?
vsevik
2014/03/04 08:16:45
Done.
| |
| 471 this._replaceInputElement.focus(); | 474 this._replaceInputElement.focus(); |
| 472 } else { | 475 else |
| 473 this._footerElement.classList.remove("toolbar-search-replace"); | |
| 474 this._secondRowElement.classList.add("hidden"); | |
| 475 this._prevButtonElement.classList.add("hidden"); | |
| 476 this._findButtonElement.classList.add("hidden"); | |
| 477 this._replaceCheckboxElement.tabIndex = 0; | 476 this._replaceCheckboxElement.tabIndex = 0; |
|
eustas
2014/03/04 08:07:28
tabIndex is already 0.
vsevik
2014/03/04 08:16:45
Great catch, I accidentally removed wrong line.
| |
| 478 this._searchInputElement.focus(); | |
| 479 } | |
| 480 this.doResize(); | 477 this.doResize(); |
| 481 }, | 478 }, |
| 482 | 479 |
| 483 _replace: function() | 480 _replace: function() |
| 484 { | 481 { |
| 485 /** @type {!WebInspector.Replaceable} */ (this._searchProvider).replaceS electionWith(this._replaceInputElement.value); | 482 /** @type {!WebInspector.Replaceable} */ (this._searchProvider).replaceS electionWith(this._replaceInputElement.value); |
| 486 delete this._currentQuery; | 483 delete this._currentQuery; |
| 487 this._performSearch(true, true); | 484 this._performSearch(true, true); |
| 488 }, | 485 }, |
| 489 | 486 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 538 * @param {string} text | 535 * @param {string} text |
| 539 */ | 536 */ |
| 540 replaceSelectionWith: function(text) { }, | 537 replaceSelectionWith: function(text) { }, |
| 541 | 538 |
| 542 /** | 539 /** |
| 543 * @param {string} query | 540 * @param {string} query |
| 544 * @param {string} replacement | 541 * @param {string} replacement |
| 545 */ | 542 */ |
| 546 replaceAllWith: function(query, replacement) { } | 543 replaceAllWith: function(query, replacement) { } |
| 547 } | 544 } |
| OLD | NEW |