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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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('search-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('click', this._toggleCaseSensit
iveSearch, 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'), ''); |
63 this._regexButton.setText('.*'); | 63 this._regexButton.setText('.*'); |
64 this._regexButton.addEventListener(UI.ToolbarButton.Events.Click, this._to
ggleRegexSearch, this); | 64 this._regexButton.addEventListener('click', this._toggleRegexSearch, this)
; |
65 toolbar.appendToolbarItem(this._regexButton); | 65 toolbar.appendToolbarItem(this._regexButton); |
66 } | 66 } |
67 | 67 |
68 this._footerElement = this._footerElementContainer.createChild('table', 'too
lbar-search'); | 68 this._footerElement = this._footerElementContainer.createChild('table', 'too
lbar-search'); |
69 this._footerElement.cellSpacing = 0; | 69 this._footerElement.cellSpacing = 0; |
70 | 70 |
71 this._firstRowElement = this._footerElement.createChild('tr'); | 71 this._firstRowElement = this._footerElement.createChild('tr'); |
72 this._secondRowElement = this._footerElement.createChild('tr', 'hidden'); | 72 this._secondRowElement = this._footerElement.createChild('tr', 'hidden'); |
73 | 73 |
74 // Column 1 | 74 // Column 1 |
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
611 // Silent catch. | 611 // Silent catch. |
612 } | 612 } |
613 | 613 |
614 // Otherwise just do a plain text search. | 614 // Otherwise just do a plain text search. |
615 if (!regex) | 615 if (!regex) |
616 regex = createPlainTextSearchRegex(query, modifiers); | 616 regex = createPlainTextSearchRegex(query, modifiers); |
617 | 617 |
618 return regex; | 618 return regex; |
619 } | 619 } |
620 }; | 620 }; |
OLD | NEW |