B2G/gecko/browser/devtools/styleeditor/StyleEditorChrome.jsm
/**
   * Populate the chrome UI according to the content document.
   *
   * @see StyleEditor._setupShadowStyleSheet
   */
Populate the chrome UI according to the content document.
Populate the chrome UI according to the content document .
function SEC__populateChrome()
  {
    this._resetChrome();
    let document = this.contentDocument;
    this._document.title = _("chromeWindowTitle",
      document.title || document.location.href);
    for (let i = 0; i < document.styleSheets.length; ++i) {
      let styleSheet = document.styleSheets[i];
      let editor = new StyleEditor(document, styleSheet);
      editor.addActionListener(this);
      this._editors.push(editor);
    }
    this._triggerChromeListeners("ContentAttach");
    this._editors.forEach(function (aEditor) {
      this._window.setTimeout(aEditor.load.bind(aEditor), 0);
    }, this);
  }
function SEC__populateChrome ( ) { this . _resetChrome ( ) ; let document = this . contentDocument ; this . _document . title = _ ( "chromeWindowTitle" , document . title || document . location . href ) ; for ( let i = 0 ; i < document . styleSheets . length ; ++ i ) { let styleSheet = document . styleSheets [ i ] ; let editor = new StyleEditor ( document , styleSheet ) ; editor . addActionListener ( this ) ; this . _editors . push ( editor ) ; } this . _triggerChromeListeners ( "ContentAttach" ) ; this . _editors . forEach ( function ( aEditor ) { this . _window . setTimeout ( aEditor . load . bind ( aEditor ) , 0 ) ; } , this ) ; }
Populate the chrome UI according to the content document.
Populate the chrome UI according to the content document .
// Queue editors loading so that ContentAttach is consistently triggered // right after all editor instances are available (this.editors) but are // NOT loaded/ready yet. This also helps responsivity during loading when // there are many heavy stylesheets.