Send a notification for the stylesheet added and
its import-ed styleshets based on document.stylesheets diff
from previous status. It also updates stylesheets status.
420308
function () {
                var added = {},
                    current,
                    newStatus;

                current = this.stylesheets;
                newStatus = related().stylesheets;

                Object.keys(newStatus).forEach(function (v, i) {
                    if (!current[v]) {
                        added[v] = newStatus[v];
                    }
                });

                Object.keys(added).forEach(function (v, i) {
                    _transport.send(JSON.stringify({
                        method: "StylesheetAdded",
                        href: v,
                        roots: [added[v]]
                    }));
                });

                this.stylesheets = newStatus;
            }
1167243
function init(theConfig) {
        exports.config = theConfig;

        Inspector.on("error", _onError);
        Inspector.Inspector.on("detached", _onDetached);

        // Only listen for styleSheetAdded
        // We may get interim added/removed events when pushing incremental updates
        CSSAgent.on("styleSheetAdded.livedev", _styleSheetAdded);

        MainViewManager
            .on("currentFileChange", _onFileChanged);
        DocumentManager
            .on("documentSaved", _onDocumentSaved)
            .on("dirtyFlagChange", _onDirtyFlagChange);
        ProjectManager
            .on("beforeProjectClose beforeAppClose", close);

        // Initialize exports.status
        _setStatus(STATUS_INACTIVE);
    }
280647
def notify_height_changed(self):
        
        new_table_height = sum([row.height for row in self.rows])
        self._graphic_frame.height = new_table_height
319609
function (href) {
                var self = this;


                // Inspect CSSRules for @imports:
                // styleSheet obejct is required to scan CSSImportRules but
                // browsers differ on the implementation of MutationObserver interface.
                // Webkit triggers notifications before stylesheets are loaded,
                // Firefox does it after loading.
                // There are also differences on when 'load' event is triggered for
                // the 'link' nodes. Webkit triggers it before stylesheet is loaded.
                // Some references to check:
                //      http://www.phpied.com/when-is-a-stylesheet-really-loaded/
                //      http://stackoverflow.com/questions/17747616/webkit-dynamically-created-stylesheet-when-does-it-really-load
                //        http://stackoverflow.com/questions/11425209/are-dom-mutation-observers-slower-than-dom-mutation-events
                //
                // TODO: This is just a temporary 'cross-browser' solution, it needs optimization.
                var loadInterval = setInterval(function () {
                    var i;
                    for (i = 0; i < window.document.styleSheets.length; i++) {
                        if (window.document.styleSheets[i].href === href) {
                            //clear interval
                            clearInterval(loadInterval);
                            // notify stylesheets added
                            self.notifyStylesheetAdded(href);
                            break;
                        }
                    }
                }, 50);
            }
1374705
function insert(sheet, [selectors, styles]) {
  if (sheet.scopedStyleId) {
    selectors = scopifySelectors(selectors, sheet.scopedStyleId);
  }

  var idx = sheet.insertRule(`${selectors} { }`, sheet.rules.length);
  var rule = sheet.rules[idx];

  if (typeof styles === 'string') { rule.style = styles; }
  else {
    // @TODO Fix this to be upward-friendly, and valueize style object.
    assign(rule.style, styles);
    //mirrorProperties(rule.style, styles);
  }

  return rule;
}
518529
protected void notifyModuleUpdate(@Nullable ScriptModule newModule, @Nullable ScriptModule oldModule) {
        for (ScriptModuleListener listener : listeners) {
            listener.moduleUpdated(newModule, oldModule);
        }
    }
555748
function stylesheetOverride(stylesheet, props, themeData) {
  return {
    ...stylesheet,
    pointerBorder: { fill: themeData["tooltip.backgroundColor"] },
    pointerBody: { fill: themeData["tooltip.backgroundColor"] }
  };
}
1132014
function _notifyActiveEditorChanged(current) {
        // Skip if the Editor that gained focus was already the most recently focused editor.
        // This may happen e.g. if the window loses then regains focus.
        if (_lastFocusedEditor === current) {
            return;
        }
        var previous = _lastFocusedEditor;
        _lastFocusedEditor = current;

        exports.trigger("activeEditorChange", current, previous);
    }
826388
def append_default_stylesheets(self):
        
        for style in utils.get_stylesheet_list(self.settings):
            self.css(style)
898428
function onUpdate (update) {
      var value = update[0], ts = update[1], id = update[2]
      insertBatch (id, key, ts, JSON.stringify(value), scuttlebutt)
    }
1371847
public static void safeLoadStylesheets(String[] stylesheets, JavaScriptObject callback) {

        CmsStylesheetLoader loader = new CmsStylesheetLoader(Arrays.asList(stylesheets), new Runnable() {

            public native void call(JavaScriptObject jsCallback) /*-{
        jsCallback();
    }-*/;

            public void run() {

                if (callback != null) {
                    call(callback);
                }
            }

        });
        loader.loadWithTimeout(5000);
    }
846603
function _applyAnyStylesheet(node) {
  if (!doc.createStyleSheet) {
    return;
  }

  if (_getHTMLNodeName(node) === 'style') {
    // IE
    var ss = doc.createStyleSheet(); // Create a stylesheet to actually do something useful

    ss.cssText = node.cssText; // We continue to add the style tag, however
  }
}
604017
def add_styles(self, **styles):
        """"""
        for stylename in sorted(styles):
            self._doc.styles.addElement(styles[stylename])
582920
public function addStylesheet($stylesheet, $inline = true)
    {
        $type = $inline ? 'inline' : 'external';
        $this->stylesheets[$type][] = $stylesheet;
    }
764416
function pollWebKit() {
    var css = pending.css, i;

    if (css) {
      i = styleSheets.length;

      // Look for a stylesheet matching the pending URL.
      while (--i >= 0) {
        if (styleSheets[i].href === css.urls[0]) {
          finish('css');
          break;
        }
      }

      pollCount += 1;

      if (css) {
        if (pollCount < 200) {
          setTimeout(pollWebKit, 50);
        } else {
          // We've been polling for 10 seconds and nothing's happened, which may
          // indicate that the stylesheet has been removed from the document
          // before it had a chance to load. Stop polling and finish the pending
          // request to prevent blocking further requests.
          finish('css');
        }
      }
    }
  }
1061183
def _notify_change(self):
        
        def inner_action(*args):
            """ Inner action: open file """
            # cache cursor position before reloading so that the cursor
            # position is restored automatically after reload has finished.
            # See OpenCobolIDE/OpenCobolIDE#97
            Cache().set_cursor_position(
                self.editor.file.path,
                self.editor.textCursor().position())
            if os.path.exists(self.editor.file.path):
                self.editor.file.open(self.editor.file.path)
                self.file_reloaded.emit()
            else:
                # file moved just after a change, see OpenCobolIDE/OpenCobolIDE#337
                self._notify_deleted_file()

        args = (_("File changed"),
                _("The file <i>%s</i> has changed externally.\nDo you want to "
                  "reload it?") % os.path.basename(self.editor.file.path))
        kwargs = {"expected_action": inner_action}
        if self.editor.hasFocus() or self.auto_reload:
            self._notify(*args, **kwargs)
        else:
            # show the reload prompt as soon as the editor has focus
            self._notification_pending = True
            self._data = (args, kwargs)
493973
def notify_width_changed(self):
        
        new_table_width = sum([col.width for col in self.columns])
        self._graphic_frame.width = new_table_width