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 11 matching lines...) Expand all Loading... |
22 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 22 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
23 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY | 23 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY |
24 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 24 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
25 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 25 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
26 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 26 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
27 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 27 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
30 */ | 30 */ |
31 | 31 |
| 32 WebInspector.highlightedSearchResultClassName = "highlighted-search-result"; |
| 33 |
32 /** | 34 /** |
33 * @param {!Element} element | 35 * @param {!Element} element |
34 * @param {?function(!MouseEvent): boolean} elementDragStart | 36 * @param {?function(!MouseEvent): boolean} elementDragStart |
35 * @param {function(!MouseEvent)} elementDrag | 37 * @param {function(!MouseEvent)} elementDrag |
36 * @param {?function(!MouseEvent)} elementDragEnd | 38 * @param {?function(!MouseEvent)} elementDragEnd |
37 * @param {string} cursor | 39 * @param {string} cursor |
38 * @param {?string=} hoverCursor | 40 * @param {?string=} hoverCursor |
39 */ | 41 */ |
40 WebInspector.installDragHandle = function(element, elementDragStart, elementDrag
, elementDragEnd, cursor, hoverCursor) | 42 WebInspector.installDragHandle = function(element, elementDragStart, elementDrag
, elementDragEnd, cursor, hoverCursor) |
41 { | 43 { |
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
793 } | 795 } |
794 | 796 |
795 /** | 797 /** |
796 * @param {!Element} element | 798 * @param {!Element} element |
797 * @param {!Array.<!WebInspector.SourceRange>} resultRanges | 799 * @param {!Array.<!WebInspector.SourceRange>} resultRanges |
798 * @param {!Array.<!Object>=} changes | 800 * @param {!Array.<!Object>=} changes |
799 * @return {!Array.<!Element>} | 801 * @return {!Array.<!Element>} |
800 */ | 802 */ |
801 WebInspector.highlightSearchResults = function(element, resultRanges, changes) | 803 WebInspector.highlightSearchResults = function(element, resultRanges, changes) |
802 { | 804 { |
803 return WebInspector.highlightRangesWithStyleClass(element, resultRanges, "hi
ghlighted-search-result", changes); | 805 return WebInspector.highlightRangesWithStyleClass(element, resultRanges, Web
Inspector.highlightedSearchResultClassName, changes); |
804 } | 806 } |
805 | 807 |
806 /** | 808 /** |
807 * @param {!Element} element | 809 * @param {!Element} element |
| 810 * @param {string} styleClass |
808 */ | 811 */ |
809 WebInspector.removeSearchResultsHighlight = function(element) | 812 WebInspector.removeSearchResultsHighlight = function(element, styleClass) |
810 { | 813 { |
811 var highlightBits = element.querySelectorAll(".highlighted-search-result"); | 814 var highlightBits = element.querySelectorAll("." + styleClass); |
812 for (var i = 0; i < highlightBits.length; ++i) { | 815 for (var i = 0; i < highlightBits.length; ++i) { |
813 var span = highlightBits[i]; | 816 var span = highlightBits[i]; |
814 span.parentElement.replaceChild(createTextNode(span.textContent), span); | 817 span.parentElement.replaceChild(createTextNode(span.textContent), span); |
815 } | 818 } |
816 } | 819 } |
817 | 820 |
818 /** | 821 /** |
819 * @param {!Element} element | 822 * @param {!Element} element |
820 * @param {string} className | 823 * @param {string} className |
821 */ | 824 */ |
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1384 { | 1387 { |
1385 var root = this.createShadowRoot(); | 1388 var root = this.createShadowRoot(); |
1386 root.appendChild(WebInspector.View.createStyleElement("ui/checkboxTe
xtLabel.css")); | 1389 root.appendChild(WebInspector.View.createStyleElement("ui/checkboxTe
xtLabel.css")); |
1387 this.checkboxElement = this.createChild("input", "dt-checkbox-button
"); | 1390 this.checkboxElement = this.createChild("input", "dt-checkbox-button
"); |
1388 this.checkboxElement.type = "checkbox"; | 1391 this.checkboxElement.type = "checkbox"; |
1389 root.createChild("content").select = ".dt-checkbox-button"; | 1392 root.createChild("content").select = ".dt-checkbox-button"; |
1390 root.createChild("content"); | 1393 root.createChild("content"); |
1391 } | 1394 } |
1392 }); | 1395 }); |
1393 })(); | 1396 })(); |
OLD | NEW |