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 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
694 if (!effectiveNode) | 694 if (!effectiveNode) |
695 return; | 695 return; |
696 | 696 |
697 function resolvedNode(object) | 697 function resolvedNode(object) |
698 { | 698 { |
699 if (!object) | 699 if (!object) |
700 return; | 700 return; |
701 | 701 |
702 /** | 702 /** |
703 * @param {?string} pseudoType | 703 * @param {?string} pseudoType |
| 704 * @suppressReceiverCheck |
704 * @this {!Element} | 705 * @this {!Element} |
705 */ | 706 */ |
706 function toggleClassAndInjectStyleRule(pseudoType) | 707 function toggleClassAndInjectStyleRule(pseudoType) |
707 { | 708 { |
708 const classNamePrefix = "__web-inspector-hide"; | 709 const classNamePrefix = "__web-inspector-hide"; |
709 const classNameSuffix = "-shortcut__"; | 710 const classNameSuffix = "-shortcut__"; |
710 const styleTagId = "__web-inspector-hide-shortcut-style__"; | 711 const styleTagId = "__web-inspector-hide-shortcut-style__"; |
711 const styleRules = ".__web-inspector-hide-shortcut__, .__web-ins
pector-hide-shortcut__ * { visibility: hidden !important; } .__web-inspector-hid
ebefore-shortcut__::before { visibility: hidden !important; } .__web-inspector-h
ideafter-shortcut__::after { visibility: hidden !important; }"; | 712 const styleRules = ".__web-inspector-hide-shortcut__, .__web-ins
pector-hide-shortcut__ * { visibility: hidden !important; } .__web-inspector-hid
ebefore-shortcut__::before { visibility: hidden !important; } .__web-inspector-h
ideafter-shortcut__::after { visibility: hidden !important; }"; |
712 | 713 |
713 var className = classNamePrefix + (pseudoType || "") + className
Suffix; | 714 var className = classNamePrefix + (pseudoType || "") + className
Suffix; |
(...skipping 1675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2389 | 2390 |
2390 this._highlightResult = []; | 2391 this._highlightResult = []; |
2391 WebInspector.highlightSearchResults(this.listItemElement, matchRanges, t
his._highlightResult); | 2392 WebInspector.highlightSearchResults(this.listItemElement, matchRanges, t
his._highlightResult); |
2392 }, | 2393 }, |
2393 | 2394 |
2394 _scrollIntoView: function() | 2395 _scrollIntoView: function() |
2395 { | 2396 { |
2396 function scrollIntoViewCallback(object) | 2397 function scrollIntoViewCallback(object) |
2397 { | 2398 { |
2398 /** | 2399 /** |
| 2400 * @suppressReceiverCheck |
2399 * @this {!Element} | 2401 * @this {!Element} |
2400 */ | 2402 */ |
2401 function scrollIntoView() | 2403 function scrollIntoView() |
2402 { | 2404 { |
2403 this.scrollIntoViewIfNeeded(true); | 2405 this.scrollIntoViewIfNeeded(true); |
2404 } | 2406 } |
2405 | 2407 |
2406 if (object) | 2408 if (object) |
2407 object.callFunction(scrollIntoView); | 2409 object.callFunction(scrollIntoView); |
2408 } | 2410 } |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2657 var treeOutline = new WebInspector.ElementsTreeOutline(false, false); | 2659 var treeOutline = new WebInspector.ElementsTreeOutline(false, false); |
2658 treeOutline.rootDOMNode = /** @type {!WebInspector.DOMNode} */ (object); | 2660 treeOutline.rootDOMNode = /** @type {!WebInspector.DOMNode} */ (object); |
2659 treeOutline.element.classList.add("outline-disclosure"); | 2661 treeOutline.element.classList.add("outline-disclosure"); |
2660 if (!treeOutline.children[0].hasChildren) | 2662 if (!treeOutline.children[0].hasChildren) |
2661 treeOutline.element.classList.add("single-node"); | 2663 treeOutline.element.classList.add("single-node"); |
2662 treeOutline.setVisible(true); | 2664 treeOutline.setVisible(true); |
2663 treeOutline.element.treeElementForTest = treeOutline.children[0]; | 2665 treeOutline.element.treeElementForTest = treeOutline.children[0]; |
2664 return treeOutline.element; | 2666 return treeOutline.element; |
2665 } | 2667 } |
2666 } | 2668 } |
OLD | NEW |