Back to index

lightning-sunbird  0.9+nobinonly
Functions
nsStyleSheetTxns.cpp File Reference
#include "nsEditor.h"
#include "nsIPresShell.h"
#include "nsICSSStyleSheet.h"
#include "nsIDocument.h"
#include "nsIDocumentObserver.h"
#include "nsISelectionController.h"
#include "nsStyleSheetTxns.h"

Go to the source code of this file.

Functions

static void AddStyleSheet (nsIEditor *aEditor, nsIStyleSheet *aSheet)
static void RemoveStyleSheet (nsIEditor *aEditor, nsIStyleSheet *aSheet)

Function Documentation

static void AddStyleSheet ( nsIEditor aEditor,
nsIStyleSheet aSheet 
) [static]

Definition at line 51 of file nsStyleSheetTxns.cpp.

{
  nsCOMPtr<nsIDOMDocument> domDoc;
  aEditor->GetDocument(getter_AddRefs(domDoc));
  nsCOMPtr<nsIDocument> doc = do_QueryInterface(domDoc);
  if (doc) {
    doc->BeginUpdate(UPDATE_STYLE);
    doc->AddStyleSheet(aSheet);
    doc->EndUpdate(UPDATE_STYLE);
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void RemoveStyleSheet ( nsIEditor aEditor,
nsIStyleSheet aSheet 
) [static]

Definition at line 64 of file nsStyleSheetTxns.cpp.

{
  nsCOMPtr<nsIDOMDocument> domDoc;
  aEditor->GetDocument(getter_AddRefs(domDoc));
  nsCOMPtr<nsIDocument> doc = do_QueryInterface(domDoc);
  if (doc) {
    doc->BeginUpdate(UPDATE_STYLE);
    doc->RemoveStyleSheet(aSheet);
    doc->EndUpdate(UPDATE_STYLE);
  }
}

Here is the call graph for this function:

Here is the caller graph for this function: