| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> | 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> |
| 4 * Copyright (C) 2009 Joseph Pecoraro | 4 * Copyright (C) 2009 Joseph Pecoraro |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * | 9 * |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 1671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1682 _highlightSearchResults: function() | 1682 _highlightSearchResults: function() |
| 1683 { | 1683 { |
| 1684 if (!this._searchQuery || !this._searchHighlightsVisible) | 1684 if (!this._searchQuery || !this._searchHighlightsVisible) |
| 1685 return; | 1685 return; |
| 1686 if (this._highlightResult) { | 1686 if (this._highlightResult) { |
| 1687 this._updateSearchHighlight(true); | 1687 this._updateSearchHighlight(true); |
| 1688 return; | 1688 return; |
| 1689 } | 1689 } |
| 1690 | 1690 |
| 1691 var text = this.listItemElement.textContent; | 1691 var text = this.listItemElement.textContent; |
| 1692 var regexObject = createSearchRegex(this._searchQuery, "g"); | 1692 var regexObject = createSearchRegex(this._searchQuery, "gi"); |
| 1693 | 1693 |
| 1694 var offset = 0; | 1694 var offset = 0; |
| 1695 var match = regexObject.exec(text); | 1695 var match = regexObject.exec(text); |
| 1696 var matchRanges = []; | 1696 var matchRanges = []; |
| 1697 while (match) { | 1697 while (match) { |
| 1698 matchRanges.push({ offset: match.index, length: match[0].length }); | 1698 matchRanges.push({ offset: match.index, length: match[0].length }); |
| 1699 match = regexObject.exec(text); | 1699 match = regexObject.exec(text); |
| 1700 } | 1700 } |
| 1701 | 1701 |
| 1702 // Fall back for XPath, etc. matches. | 1702 // Fall back for XPath, etc. matches. |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1820 }, | 1820 }, |
| 1821 | 1821 |
| 1822 _reset: function() | 1822 _reset: function() |
| 1823 { | 1823 { |
| 1824 this._treeOutline.rootDOMNode = null; | 1824 this._treeOutline.rootDOMNode = null; |
| 1825 this._treeOutline.selectDOMNode(null, false); | 1825 this._treeOutline.selectDOMNode(null, false); |
| 1826 WebInspector.domAgent.hideDOMNodeHighlight(); | 1826 WebInspector.domAgent.hideDOMNodeHighlight(); |
| 1827 this._recentlyModifiedNodes = []; | 1827 this._recentlyModifiedNodes = []; |
| 1828 } | 1828 } |
| 1829 } | 1829 } |
| OLD | NEW |