aboutsummaryrefslogtreecommitdiff
path: root/js/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'js/controllers')
-rwxr-xr-xjs/controllers/styles-controller.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/js/controllers/styles-controller.js b/js/controllers/styles-controller.js
index 33084169..d36c8cb9 100755
--- a/js/controllers/styles-controller.js
+++ b/js/controllers/styles-controller.js
@@ -190,6 +190,7 @@ var stylesController = exports.StylesController = Montage.create(Component, {
190 ///// attach specificity to rule object 190 ///// attach specificity to rule object
191 ///// if rule is css keyframes, return rule and don't attach specificity 191 ///// if rule is css keyframes, return rule and don't attach specificity
192 if (rule instanceof WebKitCSSKeyframesRule) { 192 if (rule instanceof WebKitCSSKeyframesRule) {
193
193 return rule; 194 return rule;
194 } 195 }
195 rule[this.CONST.SPECIFICITY_KEY] = this.getSpecificity(rule.selectorText); 196 rule[this.CONST.SPECIFICITY_KEY] = this.getSpecificity(rule.selectorText);
@@ -1184,6 +1185,8 @@ var stylesController = exports.StylesController = Montage.create(Component, {
1184 1185
1185 this.styleSheetModified(sheet); 1186 this.styleSheetModified(sheet);
1186 1187
1188 NJevent('newStyleSheet', sheet);
1189
1187 return sheet; 1190 return sheet;
1188 } 1191 }
1189 }, 1192 },
@@ -1243,11 +1246,16 @@ var stylesController = exports.StylesController = Montage.create(Component, {
1243 1246
1244 clearDirtyStyleSheets : { 1247 clearDirtyStyleSheets : {
1245 value: function(doc) { 1248 value: function(doc) {
1246 if(!doc) { 1249 this.dirtyStyleSheets.length = 0;
1250
1251 if(doc) {
1247 this.dirtyStyleSheets = null; 1252 this.dirtyStyleSheets = null;
1248 this.dirtyStyleSheets = []; 1253 this.dirtyStyleSheets = this.dirtyStyleSheets.filter(function(sheet) {
1254 return sheet.document !== doc;
1255 });
1249 } 1256 }
1250 1257
1258
1251 } 1259 }
1252 }, 1260 },
1253 1261