| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 this._showInheritedComputedStylePropertiesSetting = WebInspector.settings.cr
eateSetting("showInheritedComputedStyleProperties", false); | 47 this._showInheritedComputedStylePropertiesSetting = WebInspector.settings.cr
eateSetting("showInheritedComputedStyleProperties", false); |
| 48 this._showInheritedComputedStylePropertiesSetting.addChangeListener(this._sh
owInheritedComputedStyleChanged.bind(this)); | 48 this._showInheritedComputedStylePropertiesSetting.addChangeListener(this._sh
owInheritedComputedStyleChanged.bind(this)); |
| 49 | 49 |
| 50 var hbox = this.element.createChild("div", "hbox styles-sidebar-pane-toolbar
"); | 50 var hbox = this.element.createChild("div", "hbox styles-sidebar-pane-toolbar
"); |
| 51 var filterContainerElement = hbox.createChild("div", "styles-sidebar-pane-fi
lter-box"); | 51 var filterContainerElement = hbox.createChild("div", "styles-sidebar-pane-fi
lter-box"); |
| 52 var filterInput = WebInspector.StylesSidebarPane.createPropertyFilterElement
(WebInspector.UIString("Filter"), hbox, filterCallback.bind(this)); | 52 var filterInput = WebInspector.StylesSidebarPane.createPropertyFilterElement
(WebInspector.UIString("Filter"), hbox, filterCallback.bind(this)); |
| 53 filterContainerElement.appendChild(filterInput); | 53 filterContainerElement.appendChild(filterInput); |
| 54 | 54 |
| 55 var toolbar = new WebInspector.Toolbar(hbox); | 55 var toolbar = new WebInspector.Toolbar(hbox); |
| 56 toolbar.element.classList.add("styles-pane-toolbar"); | 56 toolbar.element.classList.add("styles-pane-toolbar"); |
| 57 toolbar.appendToolbarItem(new WebInspector.ToolbarCheckbox(WebInspector.UISt
ring("Show inherited"), | 57 toolbar.appendToolbarItem(new WebInspector.ToolbarCheckbox(WebInspector.UISt
ring("Show inherited"), undefined, this._showInheritedComputedStylePropertiesSet
ting)); |
| 58 WebInspector.UISt
ring("Show inherited properties"), | |
| 59 this._showInherit
edComputedStylePropertiesSetting)); | |
| 60 | 58 |
| 61 this._propertiesContainer = this.element.createChild("div", "monospace"); | 59 this._propertiesContainer = this.element.createChild("div", "monospace"); |
| 62 this._propertiesContainer.classList.add("computed-properties"); | 60 this._propertiesContainer.classList.add("computed-properties"); |
| 63 this._onTracePropertyBound = this._onTraceProperty.bind(this); | 61 this._onTracePropertyBound = this._onTraceProperty.bind(this); |
| 64 | 62 |
| 65 this._stylesSidebarPane = stylesSidebarPane; | 63 this._stylesSidebarPane = stylesSidebarPane; |
| 66 | 64 |
| 67 /** | 65 /** |
| 68 * @param {?RegExp} regex | 66 * @param {?RegExp} regex |
| 69 * @this {WebInspector.ComputedStyleWidget} | 67 * @this {WebInspector.ComputedStyleWidget} |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 for (var i = 0; i < this._propertiesContainer.children.length; ++i) { | 204 for (var i = 0; i < this._propertiesContainer.children.length; ++i) { |
| 207 var item = this._propertiesContainer.children[i]; | 205 var item = this._propertiesContainer.children[i]; |
| 208 var property = item[WebInspector.ComputedStyleWidget._propertySymbol
]; | 206 var property = item[WebInspector.ComputedStyleWidget._propertySymbol
]; |
| 209 var matched = !regex || regex.test(property.name) || regex.test(prop
erty.value); | 207 var matched = !regex || regex.test(property.name) || regex.test(prop
erty.value); |
| 210 item.classList.toggle("hidden", !matched); | 208 item.classList.toggle("hidden", !matched); |
| 211 } | 209 } |
| 212 }, | 210 }, |
| 213 | 211 |
| 214 __proto__: WebInspector.ThrottledWidget.prototype | 212 __proto__: WebInspector.ThrottledWidget.prototype |
| 215 } | 213 } |
| OLD | NEW |