| 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 750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 792 } | 794 } |
| 793 | 795 |
| 794 /** | 796 /** |
| 795 * @param {!Element} element | 797 * @param {!Element} element |
| 796 * @param {!Array.<!WebInspector.SourceRange>} resultRanges | 798 * @param {!Array.<!WebInspector.SourceRange>} resultRanges |
| 797 * @param {!Array.<!Object>=} changes | 799 * @param {!Array.<!Object>=} changes |
| 798 * @return {!Array.<!Element>} | 800 * @return {!Array.<!Element>} |
| 799 */ | 801 */ |
| 800 WebInspector.highlightSearchResults = function(element, resultRanges, changes) | 802 WebInspector.highlightSearchResults = function(element, resultRanges, changes) |
| 801 { | 803 { |
| 802 return WebInspector.highlightRangesWithStyleClass(element, resultRanges, "hi
ghlighted-search-result", changes); | 804 return WebInspector.highlightRangesWithStyleClass(element, resultRanges, Web
Inspector.highlightedSearchResultClassName, changes); |
| 803 } | 805 } |
| 804 | 806 |
| 805 /** | 807 /** |
| 806 * @param {!Element} element | 808 * @param {!Element} element |
| 809 * @param {string} styleClass |
| 807 */ | 810 */ |
| 808 WebInspector.removeSearchResultsHighlight = function(element) | 811 WebInspector.removeSearchResultsHighlight = function(element, styleClass) |
| 809 { | 812 { |
| 810 var highlightBits = element.querySelectorAll(".highlighted-search-result"); | 813 var highlightBits = element.querySelectorAll("." + styleClass); |
| 811 for (var i = 0; i < highlightBits.length; ++i) { | 814 for (var i = 0; i < highlightBits.length; ++i) { |
| 812 var span = highlightBits[i]; | 815 var span = highlightBits[i]; |
| 813 span.parentElement.replaceChild(createTextNode(span.textContent), span); | 816 span.parentElement.replaceChild(createTextNode(span.textContent), span); |
| 814 } | 817 } |
| 815 } | 818 } |
| 816 | 819 |
| 817 /** | 820 /** |
| 818 * @param {!Element} element | 821 * @param {!Element} element |
| 819 * @param {string} className | 822 * @param {string} className |
| 820 */ | 823 */ |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1263 proto.createdCallback = function() { | 1266 proto.createdCallback = function() { |
| 1264 var root = this.createShadowRoot(); | 1267 var root = this.createShadowRoot(); |
| 1265 root.appendChild(createElement("content")); | 1268 root.appendChild(createElement("content")); |
| 1266 root.appendChild(WebInspector.View.createStyleElement("ui/textButton.css
")); | 1269 root.appendChild(WebInspector.View.createStyleElement("ui/textButton.css
")); |
| 1267 }; | 1270 }; |
| 1268 document.registerElement("text-button", { | 1271 document.registerElement("text-button", { |
| 1269 prototype: proto, | 1272 prototype: proto, |
| 1270 extends: "button" | 1273 extends: "button" |
| 1271 }); | 1274 }); |
| 1272 })(); | 1275 })(); |
| OLD | NEW |