OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 3 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
4 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). | 4 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). |
5 * Copyright (C) 2009 Joseph Pecoraro | 5 * Copyright (C) 2009 Joseph Pecoraro |
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 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
707 WebInspector.highlightSearchResult = function(element, offset, length, domChange
s) | 707 WebInspector.highlightSearchResult = function(element, offset, length, domChange
s) |
708 { | 708 { |
709 var result = WebInspector.highlightSearchResults(element, [new WebInspector.
SourceRange(offset, length)], domChanges); | 709 var result = WebInspector.highlightSearchResults(element, [new WebInspector.
SourceRange(offset, length)], domChanges); |
710 return result.length ? result[0] : null; | 710 return result.length ? result[0] : null; |
711 } | 711 } |
712 | 712 |
713 /** | 713 /** |
714 * @param {!Element} element | 714 * @param {!Element} element |
715 * @param {!Array.<!WebInspector.SourceRange>} resultRanges | 715 * @param {!Array.<!WebInspector.SourceRange>} resultRanges |
716 * @param {!Array.<!Object>=} changes | 716 * @param {!Array.<!Object>=} changes |
| 717 * @param {?Boolean=} isCurrent |
717 * @return {!Array.<!Element>} | 718 * @return {!Array.<!Element>} |
718 */ | 719 */ |
719 WebInspector.highlightSearchResults = function(element, resultRanges, changes) | 720 WebInspector.highlightSearchResults = function(element, resultRanges, changes, i
sCurrent) |
720 { | 721 { |
721 return WebInspector.highlightRangesWithStyleClass(element, resultRanges, "hi
ghlighted-search-result", changes); | 722 var style = isCurrent ? "current-search-result" : "highlighted-search-result
"; |
| 723 return WebInspector.highlightRangesWithStyleClass(element, resultRanges, sty
le, changes); |
722 } | 724 } |
723 | 725 |
724 /** | 726 /** |
725 * @param {!Element} element | 727 * @param {!Element} element |
726 * @param {string} className | 728 * @param {string} className |
727 */ | 729 */ |
728 WebInspector.runCSSAnimationOnce = function(element, className) | 730 WebInspector.runCSSAnimationOnce = function(element, className) |
729 { | 731 { |
730 function animationEndCallback() | 732 function animationEndCallback() |
731 { | 733 { |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1078 window.addEventListener("focus", WebInspector._windowFocused, false); | 1080 window.addEventListener("focus", WebInspector._windowFocused, false); |
1079 window.addEventListener("blur", WebInspector._windowBlurred, false); | 1081 window.addEventListener("blur", WebInspector._windowBlurred, false); |
1080 document.addEventListener("focus", WebInspector._focusChanged, true); | 1082 document.addEventListener("focus", WebInspector._focusChanged, true); |
1081 document.addEventListener("blur", WebInspector._documentBlurred, true); | 1083 document.addEventListener("blur", WebInspector._documentBlurred, true); |
1082 window.removeEventListener("DOMContentLoaded", windowLoaded, false); | 1084 window.removeEventListener("DOMContentLoaded", windowLoaded, false); |
1083 } | 1085 } |
1084 | 1086 |
1085 window.addEventListener("DOMContentLoaded", windowLoaded, false); | 1087 window.addEventListener("DOMContentLoaded", windowLoaded, false); |
1086 | 1088 |
1087 })(); | 1089 })(); |
OLD | NEW |