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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 /** | 85 /** |
86 * @param {!WebInspector.CSSProperty} property | 86 * @param {!WebInspector.CSSProperty} property |
87 * @return {!Element} | 87 * @return {!Element} |
88 */ | 88 */ |
89 WebInspector.StylesSidebarPane.createExclamationMark = function(property) | 89 WebInspector.StylesSidebarPane.createExclamationMark = function(property) |
90 { | 90 { |
91 var exclamationElement = createElement("label", "dt-icon-label"); | 91 var exclamationElement = createElement("label", "dt-icon-label"); |
92 exclamationElement.className = "exclamation-mark"; | 92 exclamationElement.className = "exclamation-mark"; |
93 if (!WebInspector.StylesSidebarPane.ignoreErrorsForProperty(property)) | 93 if (!WebInspector.StylesSidebarPane.ignoreErrorsForProperty(property)) |
94 exclamationElement.type = "warning-icon"; | 94 exclamationElement.type = "warning-icon"; |
95 WebInspector.Tooltip.install(exclamationElement, WebInspector.CSSMetadata.cs
sPropertiesMetainfo.keySet()[property.name.toLowerCase()] ? WebInspector.UIStrin
g("Invalid property value") : WebInspector.UIString("Unknown property name")); | 95 exclamationElement.title = WebInspector.CSSMetadata.cssPropertiesMetainfo.ke
ySet()[property.name.toLowerCase()] ? WebInspector.UIString("Invalid property va
lue") : WebInspector.UIString("Unknown property name"); |
96 return exclamationElement; | 96 return exclamationElement; |
97 } | 97 } |
98 | 98 |
99 /** | 99 /** |
100 * @param {!WebInspector.CSSProperty} property | 100 * @param {!WebInspector.CSSProperty} property |
101 * @return {boolean} | 101 * @return {boolean} |
102 */ | 102 */ |
103 WebInspector.StylesSidebarPane.ignoreErrorsForProperty = function(property) { | 103 WebInspector.StylesSidebarPane.ignoreErrorsForProperty = function(property) { |
104 /** | 104 /** |
105 * @param {string} string | 105 * @param {string} string |
(...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
989 selectorContainer.appendChild(openBrace); | 989 selectorContainer.appendChild(openBrace); |
990 selectorContainer.addEventListener("mousedown", this._handleEmptySpaceMouseD
own.bind(this), false); | 990 selectorContainer.addEventListener("mousedown", this._handleEmptySpaceMouseD
own.bind(this), false); |
991 selectorContainer.addEventListener("click", this._handleSelectorContainerCli
ck.bind(this), false); | 991 selectorContainer.addEventListener("click", this._handleSelectorContainerCli
ck.bind(this), false); |
992 | 992 |
993 var closeBrace = createElement("div"); | 993 var closeBrace = createElement("div"); |
994 closeBrace.textContent = "}"; | 994 closeBrace.textContent = "}"; |
995 this.element.appendChild(closeBrace); | 995 this.element.appendChild(closeBrace); |
996 | 996 |
997 if (this.editable && rule) { | 997 if (this.editable && rule) { |
998 var newRuleButton = closeBrace.createChild("div", "sidebar-pane-button-n
ew-rule"); | 998 var newRuleButton = closeBrace.createChild("div", "sidebar-pane-button-n
ew-rule"); |
999 WebInspector.Tooltip.install(newRuleButton, WebInspector.UIString("Inser
t Style Rule")); | 999 newRuleButton.title = WebInspector.UIString("Insert Style Rule"); |
1000 newRuleButton.addEventListener("click", this._onNewRuleClick.bind(this),
false); | 1000 newRuleButton.addEventListener("click", this._onNewRuleClick.bind(this),
false); |
1001 } | 1001 } |
1002 | 1002 |
1003 this._selectorElement.addEventListener("click", this._handleSelectorClick.bi
nd(this), false); | 1003 this._selectorElement.addEventListener("click", this._handleSelectorClick.bi
nd(this), false); |
1004 this.element.addEventListener("mousedown", this._handleEmptySpaceMouseDown.b
ind(this), false); | 1004 this.element.addEventListener("mousedown", this._handleEmptySpaceMouseDown.b
ind(this), false); |
1005 this.element.addEventListener("click", this._handleEmptySpaceClick.bind(this
), false); | 1005 this.element.addEventListener("click", this._handleEmptySpaceClick.bind(this
), false); |
1006 | 1006 |
1007 if (rule) { | 1007 if (rule) { |
1008 // Prevent editing the user agent and user rules. | 1008 // Prevent editing the user agent and user rules. |
1009 if (rule.isUserAgent || rule.isInjected) { | 1009 if (rule.isUserAgent || rule.isInjected) { |
(...skipping 2231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3241 | 3241 |
3242 /** | 3242 /** |
3243 * @override | 3243 * @override |
3244 * @return {?WebInspector.ToolbarItem} | 3244 * @return {?WebInspector.ToolbarItem} |
3245 */ | 3245 */ |
3246 item: function() | 3246 item: function() |
3247 { | 3247 { |
3248 return this._button; | 3248 return this._button; |
3249 } | 3249 } |
3250 } | 3250 } |
OLD | NEW |