| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 this.registerRequiredCSS('ui/searchableView.css'); | 42 this.registerRequiredCSS('ui/searchableView.css'); |
| 43 this.element[UI.SearchableView._symbol] = this; | 43 this.element[UI.SearchableView._symbol] = this; |
| 44 | 44 |
| 45 this._searchProvider = searchable; | 45 this._searchProvider = searchable; |
| 46 this._setting = settingName ? Common.settings.createSetting(settingName, {})
: null; | 46 this._setting = settingName ? Common.settings.createSetting(settingName, {})
: null; |
| 47 | 47 |
| 48 this.contentElement.createChild('content'); | 48 this.contentElement.createChild('content'); |
| 49 this._footerElementContainer = this.contentElement.createChild('div', 'searc
h-bar hidden'); | 49 this._footerElementContainer = this.contentElement.createChild('div', 'searc
h-bar hidden'); |
| 50 this._footerElementContainer.style.order = 100; | 50 this._footerElementContainer.style.order = 100; |
| 51 | 51 |
| 52 var toolbar = new UI.Toolbar('search-toolbar', this._footerElementContainer)
; | 52 var toolbar = new UI.Toolbar('', this._footerElementContainer); |
| 53 | 53 |
| 54 if (this._searchProvider.supportsCaseSensitiveSearch()) { | 54 if (this._searchProvider.supportsCaseSensitiveSearch()) { |
| 55 this._caseSensitiveButton = new UI.ToolbarToggle(Common.UIString('Case sen
sitive'), ''); | 55 this._caseSensitiveButton = new UI.ToolbarToggle(Common.UIString('Case sen
sitive'), ''); |
| 56 this._caseSensitiveButton.setText('Aa'); | 56 this._caseSensitiveButton.setText('Aa'); |
| 57 this._caseSensitiveButton.addEventListener(UI.ToolbarButton.Events.Click,
this._toggleCaseSensitiveSearch, this); | 57 this._caseSensitiveButton.addEventListener(UI.ToolbarButton.Events.Click,
this._toggleCaseSensitiveSearch, this); |
| 58 toolbar.appendToolbarItem(this._caseSensitiveButton); | 58 toolbar.appendToolbarItem(this._caseSensitiveButton); |
| 59 } | 59 } |
| 60 | 60 |
| 61 if (this._searchProvider.supportsRegexSearch()) { | 61 if (this._searchProvider.supportsRegexSearch()) { |
| 62 this._regexButton = new UI.ToolbarToggle(Common.UIString('Regex'), ''); | 62 this._regexButton = new UI.ToolbarToggle(Common.UIString('Regex'), ''); |
| (...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 597 // Silent catch. | 597 // Silent catch. |
| 598 } | 598 } |
| 599 | 599 |
| 600 // Otherwise just do a plain text search. | 600 // Otherwise just do a plain text search. |
| 601 if (!regex) | 601 if (!regex) |
| 602 regex = createPlainTextSearchRegex(query, modifiers); | 602 regex = createPlainTextSearchRegex(query, modifiers); |
| 603 | 603 |
| 604 return regex; | 604 return regex; |
| 605 } | 605 } |
| 606 }; | 606 }; |
| OLD | NEW |