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 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
808 if (this._style.type === SDK.CSSStyleDeclaration.Type.Inline) | 808 if (this._style.type === SDK.CSSStyleDeclaration.Type.Inline) |
809 return this._matchedStyles.isInherited(this._style) ? Common.UIString('Sty
le Attribute') : 'element.style'; | 809 return this._matchedStyles.isInherited(this._style) ? Common.UIString('Sty
le Attribute') : 'element.style'; |
810 if (this._style.type === SDK.CSSStyleDeclaration.Type.Attributes) | 810 if (this._style.type === SDK.CSSStyleDeclaration.Type.Attributes) |
811 return node.nodeNameInCorrectCase() + '[' + Common.UIString('Attributes St
yle') + ']'; | 811 return node.nodeNameInCorrectCase() + '[' + Common.UIString('Attributes St
yle') + ']'; |
812 return this._style.parentRule.selectorText(); | 812 return this._style.parentRule.selectorText(); |
813 } | 813 } |
814 | 814 |
815 _onMouseOutSelector() { | 815 _onMouseOutSelector() { |
816 if (this._hoverTimer) | 816 if (this._hoverTimer) |
817 clearTimeout(this._hoverTimer); | 817 clearTimeout(this._hoverTimer); |
818 SDK.DOMModel.hideDOMNodeHighlight(); | 818 SDK.OverlayModel.hideDOMNodeHighlight(); |
819 } | 819 } |
820 | 820 |
821 _onMouseEnterSelector() { | 821 _onMouseEnterSelector() { |
822 if (this._hoverTimer) | 822 if (this._hoverTimer) |
823 clearTimeout(this._hoverTimer); | 823 clearTimeout(this._hoverTimer); |
824 this._hoverTimer = setTimeout(this._highlight.bind(this), 300); | 824 this._hoverTimer = setTimeout(this._highlight.bind(this), 300); |
825 } | 825 } |
826 | 826 |
827 _highlight() { | 827 _highlight() { |
828 SDK.DOMModel.hideDOMNodeHighlight(); | 828 SDK.OverlayModel.hideDOMNodeHighlight(); |
829 var node = this._parentPane.node(); | 829 var node = this._parentPane.node(); |
830 var domModel = node.domModel(); | |
831 var selectors = this._style.parentRule ? this._style.parentRule.selectorText
() : undefined; | 830 var selectors = this._style.parentRule ? this._style.parentRule.selectorText
() : undefined; |
832 domModel.highlightDOMNodeWithConfig(node.id, {mode: 'all', showInfo: undefin
ed, selectors: selectors}); | 831 node.domModel().overlayModel().highlightDOMNodeWithConfig( |
| 832 node.id, {mode: 'all', showInfo: undefined, selectors: selectors}); |
833 } | 833 } |
834 | 834 |
835 /** | 835 /** |
836 * @return {?Elements.StylePropertiesSection} | 836 * @return {?Elements.StylePropertiesSection} |
837 */ | 837 */ |
838 firstSibling() { | 838 firstSibling() { |
839 var parent = this.element.parentElement; | 839 var parent = this.element.parentElement; |
840 if (!parent) | 840 if (!parent) |
841 return null; | 841 return null; |
842 | 842 |
(...skipping 2249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3092 } | 3092 } |
3093 | 3093 |
3094 /** | 3094 /** |
3095 * @override | 3095 * @override |
3096 * @return {!UI.ToolbarItem} | 3096 * @return {!UI.ToolbarItem} |
3097 */ | 3097 */ |
3098 item() { | 3098 item() { |
3099 return this._button; | 3099 return this._button; |
3100 } | 3100 } |
3101 }; | 3101 }; |
OLD | NEW |