this.settingsSelectElement.addEventListener("click", function(event) { event.stopPropagation() }, false);
this.settingsSelectElement.addEventListener("change", this._changeSetting.bind(this), false);
- var format = WebInspector.applicationSettings.colorFormat;
+ var format = WebInspector.settings.colorFormat;
if (format === "hex")
this.settingsSelectElement[0].selected = true;
else if (format === "rgb")
// Select the correct color format setting again, since it needs to be selected.
var selectedIndex = 0;
for (var i = 0; i < options.length; ++i) {
- if (options[i].value === WebInspector.applicationSettings.colorFormat) {
+ if (options[i].value === WebInspector.settings.colorFormat) {
selectedIndex = i;
break;
}
_changeColorFormat: function(event)
{
var selectedOption = this.settingsSelectElement[this.settingsSelectElement.selectedIndex];
- WebInspector.applicationSettings.colorFormat = selectedOption.value;
+ WebInspector.settings.colorFormat = selectedOption.value;
for (var pseudoId in this.sections) {
var sections = this.sections[pseudoId];
var showInheritedCheckbox = new WebInspector.Checkbox(WebInspector.UIString("Show inherited"), "sidebar-pane-subtitle");
this.titleElement.appendChild(showInheritedCheckbox.element);
- if (WebInspector.applicationSettings.showInheritedComputedStyleProperties) {
+ if (WebInspector.settings.showInheritedComputedStyleProperties) {
this.bodyElement.addStyleClass("show-inherited");
showInheritedCheckbox.checked = true;
}
function showInheritedToggleFunction(event)
{
- WebInspector.applicationSettings.showInheritedComputedStyleProperties = showInheritedCheckbox.checked;
- if (WebInspector.applicationSettings.showInheritedComputedStyleProperties)
+ WebInspector.settings.showInheritedComputedStyleProperties = showInheritedCheckbox.checked;
+ if (WebInspector.settings.showInheritedComputedStyleProperties)
this.bodyElement.addStyleClass("show-inherited");
else
this.bodyElement.removeStyleClass("show-inherited");
editingSelectorCommitted: function(element, newContent, oldContent, context)
{
var self = this;
- function successCallback(styleRule, doesSelectorAffectSelectedNode)
+ function successCallback(newRule, doesSelectorAffectSelectedNode)
{
+ var styleRule = { section: self, style: newRule.style, selectorText: newRule.selectorText, sourceURL: newRule.sourceURL, rule: newRule };
self.makeNormal(styleRule);
if (!doesSelectorAffectSelectedNode) {
var format;
if (Preferences.showColorNicknames && color.nickname)
format = "nickname";
- else if (WebInspector.applicationSettings.colorFormat === "rgb")
+ else if (WebInspector.settings.colorFormat === "rgb")
format = (color.simple ? "rgb" : "rgba");
- else if (WebInspector.applicationSettings.colorFormat === "hsl")
+ else if (WebInspector.settings.colorFormat === "hsl")
format = (color.simple ? "hsl" : "hsla");
else if (color.simple)
format = (color.hasShortHex() ? "shorthex" : "hex");