Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Enumerations | Functions | Variables
nsViewSourceHTML.cpp File Reference
#include "nsIAtom.h"
#include "nsViewSourceHTML.h"
#include "nsCRT.h"
#include "nsParser.h"
#include "nsScanner.h"
#include "nsIParser.h"
#include "nsDTDUtils.h"
#include "nsIContentSink.h"
#include "nsIHTMLContentSink.h"
#include "nsHTMLTokenizer.h"
#include "nsIPrefService.h"
#include "nsIPrefBranch.h"
#include "nsUnicharUtils.h"
#include "nsPrintfCString.h"
#include "nsIServiceManager.h"
#include "COtherDTD.h"
#include "nsElementTable.h"
#include "prenv.h"
#include "prtypes.h"
#include "prio.h"
#include "plstr.h"
#include "prmem.h"

Go to the source code of this file.

Classes

class  CIndirectTextToken
class  CSharedVSContext

Defines

#define NS_VIEWSOURCE_TOKENS_PER_BLOCK   16
 MODULE NOTES: gess 4/8/98.
#define STOP_TIMER()
#define START_TIMER()

Enumerations

enum  {
  VIEW_SOURCE_START_TAG = 0, VIEW_SOURCE_END_TAG = 1, VIEW_SOURCE_COMMENT = 2, VIEW_SOURCE_CDATA = 3,
  VIEW_SOURCE_DOCTYPE = 4, VIEW_SOURCE_PI = 5, VIEW_SOURCE_ENTITY = 6, VIEW_SOURCE_TEXT = 7,
  VIEW_SOURCE_ATTRIBUTE_NAME = 8, VIEW_SOURCE_ATTRIBUTE_VALUE = 9, VIEW_SOURCE_SUMMARY = 10, VIEW_SOURCE_POPUP = 11,
  VIEW_SOURCE_MARKUPDECLARATION = 12
}

Functions

static NS_DEFINE_IID (kClassIID, NS_VIEWSOURCE_HTML_IID)
nsresult NS_NewViewSourceHTML (nsIDTD **aInstancePtrResult)
 This method is defined in nsIParser.

Variables

static const char kBodyId [] = "viewsource"
static const char kBodyClassWrap [] = "wrap"
static const char *const kElementClasses []
static const char *const kBeforeText []
static const char *const kAfterText []

Define Documentation

MODULE NOTES: gess 4/8/98.

Definition at line 54 of file nsViewSourceHTML.cpp.

Definition at line 67 of file nsViewSourceHTML.cpp.

Definition at line 66 of file nsViewSourceHTML.cpp.


Enumeration Type Documentation

anonymous enum
Enumerator:
VIEW_SOURCE_START_TAG 
VIEW_SOURCE_END_TAG 
VIEW_SOURCE_COMMENT 
VIEW_SOURCE_CDATA 
VIEW_SOURCE_DOCTYPE 
VIEW_SOURCE_PI 
VIEW_SOURCE_ENTITY 
VIEW_SOURCE_TEXT 
VIEW_SOURCE_ATTRIBUTE_NAME 
VIEW_SOURCE_ATTRIBUTE_VALUE 
VIEW_SOURCE_SUMMARY 
VIEW_SOURCE_POPUP 
VIEW_SOURCE_MARKUPDECLARATION 

Definition at line 222 of file nsViewSourceHTML.cpp.


Function Documentation

static NS_DEFINE_IID ( kClassIID  ,
NS_VIEWSOURCE_HTML_IID   
) [static]
nsresult NS_NewViewSourceHTML ( nsIDTD **  aInstancePtrResult)

This method is defined in nsIParser.

It is used to cause the COM-like construction of an nsParser.

gess 4/8/98

Parameters:
nsIParser**ptr to newly instantiated parser
Returns:
NS_xxx error result

Definition at line 160 of file nsViewSourceHTML.cpp.

{
  CViewSourceHTML* it = new CViewSourceHTML();

  if (it == 0) {
    return NS_ERROR_OUT_OF_MEMORY;
  }

  return it->QueryInterface(kClassIID, (void **) aInstancePtrResult);
}

Here is the caller graph for this function:


Variable Documentation

const char* const kAfterText[] [static]
Initial value:
 {
  ">",
  ">",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  ""
}

Definition at line 270 of file nsViewSourceHTML.cpp.

const char* const kBeforeText[] [static]
Initial value:
 {
  "<",
  "</",
  "",
  "",
  "",
  "",
  "&",
  "",
  "",
  "=",
  "",
  "",
  ""
}

Definition at line 254 of file nsViewSourceHTML.cpp.

const char kBodyClassWrap[] = "wrap" [static]

Definition at line 117 of file nsViewSourceHTML.cpp.

const char kBodyId[] = "viewsource" [static]

Definition at line 116 of file nsViewSourceHTML.cpp.

const char* const kElementClasses[] [static]
Initial value:
 {
  "start-tag",
  "end-tag",
  "comment",
  "cdata",
  "doctype",
  "pi",
  "entity",
  "text",
  "attribute-name",
  "attribute-value",
  "summary",
  "popup",
  "markupdeclaration"  
}

Definition at line 238 of file nsViewSourceHTML.cpp.