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 all"), undefined, this._showInheritedComputedStylePropertiesSetting))
; |
58 WebInspector.UISt
ring("Show inherited properties"), | |
59 this._showInherit
edComputedStylePropertiesSetting)); | |
60 | 58 |
61 this._propertiesOutline = new TreeOutlineInShadow(); | 59 this._propertiesOutline = new TreeOutlineInShadow(); |
62 this._propertiesOutline.registerRequiredCSS("elements/computedStyleSidebarPa
ne.css"); | 60 this._propertiesOutline.registerRequiredCSS("elements/computedStyleSidebarPa
ne.css"); |
63 this._propertiesOutline.element.classList.add("monospace", "computed-propert
ies"); | 61 this._propertiesOutline.element.classList.add("monospace", "computed-propert
ies"); |
64 this.element.appendChild(this._propertiesOutline.element); | 62 this.element.appendChild(this._propertiesOutline.element); |
65 | 63 |
66 this._stylesSidebarPane = stylesSidebarPane; | 64 this._stylesSidebarPane = stylesSidebarPane; |
67 this._linkifier = new WebInspector.Linkifier(new WebInspector.Linkifier.Defa
ultCSSFormatter()); | 65 this._linkifier = new WebInspector.Linkifier(new WebInspector.Linkifier.Defa
ultCSSFormatter()); |
68 | 66 |
69 /** | 67 /** |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 var children = this._propertiesOutline.rootElement().children(); | 289 var children = this._propertiesOutline.rootElement().children(); |
292 for (var child of children) { | 290 for (var child of children) { |
293 var property = child[WebInspector.ComputedStyleWidget._propertySymbo
l]; | 291 var property = child[WebInspector.ComputedStyleWidget._propertySymbo
l]; |
294 var matched = !regex || regex.test(property.name) || regex.test(prop
erty.value); | 292 var matched = !regex || regex.test(property.name) || regex.test(prop
erty.value); |
295 child.hidden = !matched; | 293 child.hidden = !matched; |
296 } | 294 } |
297 }, | 295 }, |
298 | 296 |
299 __proto__: WebInspector.ThrottledWidget.prototype | 297 __proto__: WebInspector.ThrottledWidget.prototype |
300 } | 298 } |
OLD | NEW |