B2G/gecko/browser/components/sessionstore/src/SessionStore.jsm
/**
   * go through all frames and store the current scroll positions
   * and innerHTML content of WYSIWYG editors
   * @param aWindow
   *        Window reference
   * @param aBrowser
   *        single browser reference
   * @param aTabData
   *        tabData object to add the information to
   * @param aFullData
   *        always return privacy sensitive data (use with care)
   */
go through all frames and store the current scroll positions
and innerHTML content of WYSIWYG editors
@param aWindow
Window reference
@param aBrowser
single browser reference
@param aTabData
tabData object to add the information to
@param aFullData
always return privacy sensitive data (use with care)
go through all frames and store the current scroll positions and innerHTML content of WYSIWYG editors @param aWindow Window reference @param aBrowser single browser reference @param aTabData tabData object to add the information to @param aFullData always return privacy sensitive data ( use with care )
function ssi_updateTextAndScrollDataForTab(aWindow, aBrowser, aTabData, aFullData) {
    if (aBrowser.__SS_data && aBrowser.__SS_tabStillLoading)
      return;
    var tabIndex = (aTabData.index || aTabData.entries.length) - 1;
    if (!aTabData.entries[tabIndex])
      return;
    let selectedPageStyle = aBrowser.markupDocumentViewer.authorStyleDisabled ? "_nostyle" :
                            this._getSelectedPageStyle(aBrowser.contentWindow);
    if (selectedPageStyle)
      aTabData.pageStyle = selectedPageStyle;
    else if (aTabData.pageStyle)
      delete aTabData.pageStyle;
    this._updateTextAndScrollDataForFrame(aWindow, aBrowser.contentWindow,
                                          aTabData.entries[tabIndex],
                                          !aBrowser.__SS_formDataSaved, aFullData,
                                          !!aTabData.pinned);
    aBrowser.__SS_formDataSaved = true;
    if (aBrowser.currentURI.spec == "about:config")
      aTabData.entries[tabIndex].formdata = {
        id: {
          "textbox": aBrowser.contentDocument.getElementById("textbox").value
        },
        xpath: {}
      };
  }
function ssi_updateTextAndScrollDataForTab ( aWindow , aBrowser , aTabData , aFullData ) { if ( aBrowser . __SS_data && aBrowser . __SS_tabStillLoading ) return ; var tabIndex = ( aTabData . index || aTabData . entries . length ) - 1 ; if ( ! aTabData . entries [ tabIndex ] ) return ; let selectedPageStyle = aBrowser . markupDocumentViewer . authorStyleDisabled ? "_nostyle" : this . _getSelectedPageStyle ( aBrowser . contentWindow ) ; if ( selectedPageStyle ) aTabData . pageStyle = selectedPageStyle ; else if ( aTabData . pageStyle ) delete aTabData . pageStyle ; this . _updateTextAndScrollDataForFrame ( aWindow , aBrowser . contentWindow , aTabData . entries [ tabIndex ] , ! aBrowser . __SS_formDataSaved , aFullData , ! ! aTabData . pinned ) ; aBrowser . __SS_formDataSaved = true ; if ( aBrowser . currentURI . spec == "about:config" ) aTabData . entries [ tabIndex ] . formdata = { id : { "textbox" : aBrowser . contentDocument . getElementById ( "textbox" ) . value } , xpath : { } } ; }
go through all frames and store the current scroll positions
 and innerHTML content of WYSIWYG editors
 @param aWindow
        Window reference
 @param aBrowser
        single browser reference
 @param aTabData
        tabData object to add the information to
 @param aFullData
        always return privacy sensitive data (use with care)
go through all frames and store the current scroll positions and innerHTML content of WYSIWYG editors @param aWindow Window reference @param aBrowser single browser reference @param aTabData tabData object to add the information to @param aFullData always return privacy sensitive data ( use with care )
// we shouldn't update data for incompletely initialized tabs // entry data needn't exist for tabs just initialized with an incomplete session state