| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2009 Joseph Pecoraro | 3 * Copyright (C) 2009 Joseph Pecoraro |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 829 if (this._style.type === SDK.CSSStyleDeclaration.Type.Inline) | 829 if (this._style.type === SDK.CSSStyleDeclaration.Type.Inline) |
| 830 return this._matchedStyles.isInherited(this._style) ? Common.UIString('Sty
le Attribute') : 'element.style'; | 830 return this._matchedStyles.isInherited(this._style) ? Common.UIString('Sty
le Attribute') : 'element.style'; |
| 831 if (this._style.type === SDK.CSSStyleDeclaration.Type.Attributes) | 831 if (this._style.type === SDK.CSSStyleDeclaration.Type.Attributes) |
| 832 return node.nodeNameInCorrectCase() + '[' + Common.UIString('Attributes St
yle') + ']'; | 832 return node.nodeNameInCorrectCase() + '[' + Common.UIString('Attributes St
yle') + ']'; |
| 833 return this._style.parentRule.selectorText(); | 833 return this._style.parentRule.selectorText(); |
| 834 } | 834 } |
| 835 | 835 |
| 836 _onMouseOutSelector() { | 836 _onMouseOutSelector() { |
| 837 if (this._hoverTimer) | 837 if (this._hoverTimer) |
| 838 clearTimeout(this._hoverTimer); | 838 clearTimeout(this._hoverTimer); |
| 839 SDK.DOMModel.hideDOMNodeHighlight(); | 839 SDK.OverlayModel.hideDOMNodeHighlight(); |
| 840 } | 840 } |
| 841 | 841 |
| 842 _onMouseEnterSelector() { | 842 _onMouseEnterSelector() { |
| 843 if (this._hoverTimer) | 843 if (this._hoverTimer) |
| 844 clearTimeout(this._hoverTimer); | 844 clearTimeout(this._hoverTimer); |
| 845 this._hoverTimer = setTimeout(this._highlight.bind(this), 300); | 845 this._hoverTimer = setTimeout(this._highlight.bind(this), 300); |
| 846 } | 846 } |
| 847 | 847 |
| 848 _highlight() { | 848 _highlight() { |
| 849 SDK.DOMModel.hideDOMNodeHighlight(); | 849 SDK.OverlayModel.hideDOMNodeHighlight(); |
| 850 var node = this._parentPane.node(); | 850 var node = this._parentPane.node(); |
| 851 var domModel = node.domModel(); | |
| 852 var selectors = this._style.parentRule ? this._style.parentRule.selectorText
() : undefined; | 851 var selectors = this._style.parentRule ? this._style.parentRule.selectorText
() : undefined; |
| 853 domModel.highlightDOMNodeWithConfig(node.id, {mode: 'all', showInfo: undefin
ed, selectors: selectors}); | 852 node.domModel().overlayModel().highlightDOMNodeWithConfig( |
| 853 node.id, {mode: 'all', showInfo: undefined, selectors: selectors}); |
| 854 } | 854 } |
| 855 | 855 |
| 856 /** | 856 /** |
| 857 * @return {?Elements.StylePropertiesSection} | 857 * @return {?Elements.StylePropertiesSection} |
| 858 */ | 858 */ |
| 859 firstSibling() { | 859 firstSibling() { |
| 860 var parent = this.element.parentElement; | 860 var parent = this.element.parentElement; |
| 861 if (!parent) | 861 if (!parent) |
| 862 return null; | 862 return null; |
| 863 | 863 |
| (...skipping 2278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3142 } | 3142 } |
| 3143 | 3143 |
| 3144 /** | 3144 /** |
| 3145 * @override | 3145 * @override |
| 3146 * @return {!UI.ToolbarItem} | 3146 * @return {!UI.ToolbarItem} |
| 3147 */ | 3147 */ |
| 3148 item() { | 3148 item() { |
| 3149 return this._button; | 3149 return this._button; |
| 3150 } | 3150 } |
| 3151 }; | 3151 }; |
| OLD | NEW |