public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* optimization/3315: g++ 3.0 ICE compiling mozilla
@ 2001-06-21  1:46 Laurent.Bonnaud
  0 siblings, 0 replies; only message in thread
From: Laurent.Bonnaud @ 2001-06-21  1:46 UTC (permalink / raw)
  To: gcc-gnats

>Number:         3315
>Category:       optimization
>Synopsis:       g++ segfaults
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 21 01:46:02 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        3.0 (Debian) (Debian testing/unstable)
>Organization:
>Environment:
System: Linux irancy 2.4.4-686 #1 Sun Apr 29 12:22:40 EST 2001 i686 unknown
Architecture: i686

	
host: i386-pc-linux-gnu
build: i386-pc-linux-gnu
target: i386-pc-linux-gnu
configured with: ../src/configure -v --enable-languages=c,c++,java,f77,proto,objc --prefix=/usr --infodir=/share/info --mandir=/share/man --enable-shared --with-gnu-as --with-gnu-ld --with-system-zlib --enable-long-long --enable-nls --without-x --without-included-gettext --disable-checking --enable-threads=posix --enable-java-gc=boehm --with-cpp-install-dir=bin --enable-objc-gc i386-linux
>Description:

$ g++ -c -O3 nsFormControlHelper.ii
nsFormControlHelper.cpp: In static member function `static void 
   nsFormControlHelper::PaintFixedSizeCheckMark(nsIRenderingContext&, float)':
nsFormControlHelper.cpp:731: Internal error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL: http://www.gnu.org/software/gcc/bugs.html > for instructions.


>How-To-Repeat:
	Use preprocessed file below
	
>Fix:
	Compiling with -O2 works

# 1 "nsFormControlHelper.cpp"
# 1 "../../../../config-defs.h" 1
# 2 "nsFormControlHelper.cpp" 2
# 22 "nsFormControlHelper.cpp"
# 1 "../../../../dist/include/nsCOMPtr.h" 1
# 44 "../../../../dist/include/nsCOMPtr.h"
# 1 "../../../../dist/include/nsDebug.h" 1
# 26 "../../../../dist/include/nsDebug.h"
# 1 "../../../../dist/include/nsCom.h" 1
# 27 "../../../../dist/include/nsDebug.h" 2
# 1 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prtypes.h" 1
# 39 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prtypes.h"
# 1 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prcpucfg.h" 1
# 40 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prtypes.h" 2


# 1 "/usr/lib/gcc-lib/i386-linux/3.0/include/stddef.h" 1 3
# 147 "/usr/lib/gcc-lib/i386-linux/3.0/include/stddef.h" 3
typedef int ptrdiff_t;
# 199 "/usr/lib/gcc-lib/i386-linux/3.0/include/stddef.h" 3
typedef unsigned int size_t;
# 43 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prtypes.h" 2
# 234 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prtypes.h"
extern "C" {
# 244 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prtypes.h"
typedef unsigned char PRUint8;
# 258 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prtypes.h"
typedef signed char PRInt8;
# 271 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prtypes.h"
typedef unsigned short PRUint16;
typedef short PRInt16;
# 284 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prtypes.h"
typedef unsigned int PRUint32;
typedef int PRInt32;
# 318 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prtypes.h"
typedef long long PRInt64;
typedef unsigned long long PRUint64;
# 342 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prtypes.h"
typedef int PRIntn;
typedef unsigned int PRUintn;
# 353 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prtypes.h"
typedef double PRFloat64;






typedef size_t PRSize;







typedef PRInt32 PROffset32;
typedef PRInt64 PROffset64;







typedef ptrdiff_t PRPtrdiff;







typedef unsigned long PRUptrdiff;
# 395 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prtypes.h"
typedef PRIntn PRBool;
# 405 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prtypes.h"
typedef PRUint8 PRPackedBool;





typedef enum { PR_FAILURE = -1, PR_SUCCESS = 0 } PRStatus;
# 424 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prtypes.h"
typedef long PRWord;
typedef unsigned long PRUword;
# 466 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prtypes.h"
# 1 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/obsolete/protypes.h" 1
# 29 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/obsolete/protypes.h"
typedef PRUintn uintn;

typedef PRIntn intn;
# 53 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/obsolete/protypes.h"
# 1 "/usr/include/sys/types.h" 1 3
# 26 "/usr/include/sys/types.h" 3
# 1 "/usr/include/features.h" 1 3
# 283 "/usr/include/features.h" 3
# 1 "/usr/include/sys/cdefs.h" 1 3
# 284 "/usr/include/features.h" 2 3
# 312 "/usr/include/features.h" 3
# 1 "/usr/include/gnu/stubs.h" 1 3
# 313 "/usr/include/features.h" 2 3
# 27 "/usr/include/sys/types.h" 2 3

extern "C" {

# 1 "/usr/include/bits/types.h" 1 3
# 26 "/usr/include/bits/types.h" 3
# 1 "/usr/include/features.h" 1 3
# 27 "/usr/include/bits/types.h" 2 3


# 1 "/usr/lib/gcc-lib/i386-linux/3.0/include/stddef.h" 1 3
# 30 "/usr/include/bits/types.h" 2 3


typedef unsigned char __u_char;
typedef unsigned short __u_short;
typedef unsigned int __u_int;
typedef unsigned long __u_long;

__extension__ typedef unsigned long long int __u_quad_t;
__extension__ typedef long long int __quad_t;
# 49 "/usr/include/bits/types.h" 3
typedef signed char __int8_t;
typedef unsigned char __uint8_t;
typedef signed short int __int16_t;
typedef unsigned short int __uint16_t;
typedef signed int __int32_t;
typedef unsigned int __uint32_t;

__extension__ typedef signed long long int __int64_t;
__extension__ typedef unsigned long long int __uint64_t;

typedef __quad_t *__qaddr_t;

typedef __u_quad_t __dev_t;
typedef __u_int __uid_t;
typedef __u_int __gid_t;
typedef __u_long __ino_t;
typedef __u_int __mode_t;
typedef __u_int __nlink_t;
typedef long int __off_t;
typedef __quad_t __loff_t;
typedef int __pid_t;
typedef int __ssize_t;
typedef __u_long __rlim_t;
typedef __u_quad_t __rlim64_t;
typedef __u_int __id_t;

typedef struct
  {
    int __val[2];
  } __fsid_t;


typedef int __daddr_t;
typedef char *__caddr_t;
typedef long int __time_t;
typedef unsigned int __useconds_t;
typedef long int __suseconds_t;
typedef long int __swblk_t;

typedef long int __clock_t;


typedef int __clockid_t;


typedef int __timer_t;






typedef int __key_t;


typedef unsigned short int __ipc_pid_t;



typedef long int __blksize_t;




typedef long int __blkcnt_t;
typedef __quad_t __blkcnt64_t;


typedef __u_long __fsblkcnt_t;
typedef __u_quad_t __fsblkcnt64_t;


typedef __u_long __fsfilcnt_t;
typedef __u_quad_t __fsfilcnt64_t;


typedef __u_quad_t __ino64_t;


typedef __loff_t __off64_t;


typedef long int __t_scalar_t;
typedef unsigned long int __t_uscalar_t;


typedef int __intptr_t;


typedef unsigned int __socklen_t;




# 1 "/usr/include/bits/pthreadtypes.h" 1 3
# 23 "/usr/include/bits/pthreadtypes.h" 3
# 1 "/usr/include/bits/sched.h" 1 3
# 68 "/usr/include/bits/sched.h" 3
struct __sched_param
  {
    int __sched_priority;
  };
# 24 "/usr/include/bits/pthreadtypes.h" 2 3


struct _pthread_fastlock
{
  long int __status;
  int __spinlock;

};



typedef struct _pthread_descr_struct *_pthread_descr;





typedef struct __pthread_attr_s
{
  int __detachstate;
  int __schedpolicy;
  struct __sched_param __schedparam;
  int __inheritsched;
  int __scope;
  size_t __guardsize;
  int __stackaddr_set;
  void *__stackaddr;
  size_t __stacksize;
} pthread_attr_t;



typedef struct
{
  struct _pthread_fastlock __c_lock;
  _pthread_descr __c_waiting;
} pthread_cond_t;



typedef struct
{
  int __dummy;
} pthread_condattr_t;


typedef unsigned int pthread_key_t;





typedef struct
{
  int __m_reserved;
  int __m_count;
  _pthread_descr __m_owner;
  int __m_kind;
  struct _pthread_fastlock __m_lock;
} pthread_mutex_t;



typedef struct
{
  int __mutexkind;
} pthread_mutexattr_t;



typedef int pthread_once_t;




typedef struct _pthread_rwlock_t
{
  struct _pthread_fastlock __rw_lock;
  int __rw_readers;
  _pthread_descr __rw_writer;
  _pthread_descr __rw_read_waiting;
  _pthread_descr __rw_write_waiting;
  int __rw_kind;
  int __rw_pshared;
} pthread_rwlock_t;



typedef struct
{
  int __lockkind;
  int __pshared;
} pthread_rwlockattr_t;




typedef volatile int pthread_spinlock_t;


typedef struct {
  struct _pthread_fastlock __ba_lock;
  int __ba_required;
  int __ba_present;
  _pthread_descr __ba_waiting;
} pthread_barrier_t;


typedef struct {
  int __pshared;
} pthread_barrierattr_t;





typedef unsigned long int pthread_t;
# 144 "/usr/include/bits/types.h" 2 3
# 31 "/usr/include/sys/types.h" 2 3



typedef __u_char u_char;
typedef __u_short u_short;
typedef __u_int u_int;
typedef __u_long u_long;
typedef __quad_t quad_t;
typedef __u_quad_t u_quad_t;
typedef __fsid_t fsid_t;




typedef __loff_t loff_t;



typedef __ino_t ino_t;






typedef __ino64_t ino64_t;




typedef __dev_t dev_t;




typedef __gid_t gid_t;




typedef __mode_t mode_t;




typedef __nlink_t nlink_t;




typedef __uid_t uid_t;





typedef __off_t off_t;






typedef __off64_t off64_t;




typedef __pid_t pid_t;




typedef __id_t id_t;




typedef __ssize_t ssize_t;





typedef __daddr_t daddr_t;
typedef __caddr_t caddr_t;





typedef __key_t key_t;
# 132 "/usr/include/sys/types.h" 3
# 1 "/usr/include/time.h" 1 3
# 56 "/usr/include/time.h" 3
# 1 "/usr/include/bits/types.h" 1 3
# 57 "/usr/include/time.h" 2 3


typedef __clock_t clock_t;







# 1 "/usr/include/bits/types.h" 1 3
# 68 "/usr/include/time.h" 2 3


typedef __time_t time_t;
# 79 "/usr/include/time.h" 3
# 1 "/usr/include/bits/types.h" 1 3
# 80 "/usr/include/time.h" 2 3


typedef __clockid_t clockid_t;
# 91 "/usr/include/time.h" 3
# 1 "/usr/include/bits/types.h" 1 3
# 92 "/usr/include/time.h" 2 3


typedef __timer_t timer_t;
# 133 "/usr/include/sys/types.h" 2 3



typedef __useconds_t useconds_t;



typedef __suseconds_t suseconds_t;





# 1 "/usr/lib/gcc-lib/i386-linux/3.0/include/stddef.h" 1 3
# 147 "/usr/include/sys/types.h" 2 3



typedef unsigned long int ulong;
typedef unsigned short int ushort;
typedef unsigned int uint;
# 190 "/usr/include/sys/types.h" 3
typedef int int8_t __attribute__ ((__mode__ (__QI__)));
typedef int int16_t __attribute__ ((__mode__ (__HI__)));
typedef int int32_t __attribute__ ((__mode__ (__SI__)));
typedef int int64_t __attribute__ ((__mode__ (__DI__)));


typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__)));
typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__)));
typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__)));
typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__)));

typedef int register_t __attribute__ ((__mode__ (__word__)));
# 212 "/usr/include/sys/types.h" 3
# 1 "/usr/include/endian.h" 1 3
# 22 "/usr/include/endian.h" 3
# 1 "/usr/include/features.h" 1 3
# 23 "/usr/include/endian.h" 2 3
# 37 "/usr/include/endian.h" 3
# 1 "/usr/include/bits/endian.h" 1 3
# 38 "/usr/include/endian.h" 2 3
# 213 "/usr/include/sys/types.h" 2 3


# 1 "/usr/include/sys/select.h" 1 3
# 25 "/usr/include/sys/select.h" 3
# 1 "/usr/include/features.h" 1 3
# 26 "/usr/include/sys/select.h" 2 3


# 1 "/usr/include/bits/types.h" 1 3
# 29 "/usr/include/sys/select.h" 2 3


# 1 "/usr/include/bits/select.h" 1 3
# 32 "/usr/include/sys/select.h" 2 3


# 1 "/usr/include/bits/sigset.h" 1 3
# 23 "/usr/include/bits/sigset.h" 3
typedef int __sig_atomic_t;




typedef struct
  {
    unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
  } __sigset_t;
# 35 "/usr/include/sys/select.h" 2 3



typedef __sigset_t sigset_t;




# 1 "/usr/include/time.h" 1 3
# 106 "/usr/include/time.h" 3
struct timespec
  {
    long int tv_sec;
    long int tv_nsec;
  };
# 44 "/usr/include/sys/select.h" 2 3

# 1 "/usr/include/bits/time.h" 1 3
# 63 "/usr/include/bits/time.h" 3
# 1 "/usr/include/bits/types.h" 1 3
# 64 "/usr/include/bits/time.h" 2 3



struct timeval
  {
    __time_t tv_sec;
    __suseconds_t tv_usec;
  };
# 46 "/usr/include/sys/select.h" 2 3



typedef long int __fd_mask;







typedef struct
  {



    __fd_mask fds_bits[1024 / (8 * sizeof (__fd_mask))];





  } fd_set;






typedef __fd_mask fd_mask;
# 89 "/usr/include/sys/select.h" 3
extern "C" {






extern int select (int __nfds, fd_set *__restrict __readfds,
                   fd_set *__restrict __writefds,
                   fd_set *__restrict __exceptfds,
                   struct timeval *__restrict __timeout) throw ();





extern int pselect (int __nfds, fd_set *__restrict __readfds,
                    fd_set *__restrict __writefds,
                    fd_set *__restrict __exceptfds,
                    const struct timespec *__restrict __timeout,
                    const __sigset_t *__restrict __sigmask) throw ();


}
# 216 "/usr/include/sys/types.h" 2 3


# 1 "/usr/include/sys/sysmacros.h" 1 3
# 219 "/usr/include/sys/types.h" 2 3




typedef __blksize_t blksize_t;






typedef __blkcnt_t blkcnt_t;



typedef __fsblkcnt_t fsblkcnt_t;



typedef __fsfilcnt_t fsfilcnt_t;
# 257 "/usr/include/sys/types.h" 3
typedef __blkcnt64_t blkcnt64_t;
typedef __fsblkcnt64_t fsblkcnt64_t;
typedef __fsfilcnt64_t fsfilcnt64_t;


}
# 54 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/obsolete/protypes.h" 2





typedef PRUint64 uint64;

typedef PRUint32 uint32;



typedef PRUint16 uint16;
typedef PRUint8 uint8;
# 77 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/obsolete/protypes.h"
typedef PRInt64 int64;







typedef PRInt32 int32;




typedef PRInt16 int16;
typedef PRInt8 int8;





typedef PRFloat64 float64;
typedef PRUptrdiff uptrdiff_t;
typedef PRUword uprword_t;
typedef PRWord prword_t;
# 467 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prtypes.h" 2





}
# 28 "../../../../dist/include/nsDebug.h" 2
# 42 "../../../../dist/include/nsDebug.h"
class nsDebug {
public:






  static void AbortIfFalse(const char* aStr, const char* aExpr,
                                  const char* aFile, PRIntn aLine);
# 60 "../../../../dist/include/nsDebug.h"
  static PRBool WarnIfFalse(const char* aStr, const char* aExpr,
                                   const char* aFile, PRIntn aLine);
# 78 "../../../../dist/include/nsDebug.h"
  static void SetWarningMessageBoxEnable(PRBool aOnOff);




  static PRBool GetWarningMessageBoxEnable(void);
# 96 "../../../../dist/include/nsDebug.h"
  static void Abort(const char* aFile, PRIntn aLine);




  static void Break(const char* aFile, PRIntn aLine);




  static void PreCondition(const char* aStr, const char* aExpr,
                                  const char* aFile, PRIntn aLine);




  static void PostCondition(const char* aStr, const char* aExpr,
                                   const char* aFile, PRIntn aLine);




  static void Assertion(const char* aStr, const char* aExpr,
                               const char* aFile, PRIntn aLine);




  static void NotYetImplemented(const char* aMessage,
                                       const char* aFile, PRIntn aLine);




  static void NotReached(const char* aMessage,
                                const char* aFile, PRIntn aLine);




  static void Error(const char* aMessage,
                           const char* aFile, PRIntn aLine);




  static void Warning(const char* aMessage,
                             const char* aFile, PRIntn aLine);
};
# 45 "../../../../dist/include/nsCOMPtr.h" 2




# 1 "../../../../dist/include/nsISupports.h" 1
# 10 "../../../../dist/include/nsISupports.h"
# 1 "../../../../dist/include/nsrootidl.h" 1
# 11 "../../../../dist/include/nsrootidl.h"
# 1 "../../../../dist/include/nscore.h" 1
# 37 "../../../../dist/include/nscore.h"
# 1 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prtypes.h" 1
# 38 "../../../../dist/include/nscore.h" 2


# 1 "../../../../dist/include/nsDebug.h" 1
# 41 "../../../../dist/include/nscore.h" 2
# 213 "../../../../dist/include/nscore.h"
    typedef PRUint16 PRUnichar;
# 12 "../../../../dist/include/nsrootidl.h" 2
# 1 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prtime.h" 1
# 32 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prtime.h"
# 1 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prlong.h" 1
# 30 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prlong.h"
# 1 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prtypes.h" 1
# 31 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prlong.h" 2

extern "C" {
# 50 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prlong.h"
extern PRInt64 LL_MaxInt(void);
extern PRInt64 LL_MinInt(void);
extern PRInt64 LL_Zero(void);
# 407 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prlong.h"
}
# 33 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prtime.h" 2

extern "C" {
# 61 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prtime.h"
typedef PRInt64 PRTime;






typedef struct PRTimeParameters {
    PRInt32 tp_gmt_offset;
    PRInt32 tp_dst_offset;
} PRTimeParameters;
# 96 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prtime.h"
typedef struct PRExplodedTime {
    PRInt32 tm_usec;
    PRInt32 tm_sec;

    PRInt32 tm_min;
    PRInt32 tm_hour;
    PRInt32 tm_mday;

    PRInt32 tm_month;
    PRInt16 tm_year;


    PRInt8 tm_wday;

    PRInt16 tm_yday;


    PRTimeParameters tm_params;
} PRExplodedTime;
# 139 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prtime.h"
typedef PRTimeParameters ( *PRTimeParamFn)(const PRExplodedTime *gmt);
# 161 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prtime.h"
extern PRTime

PR_Now(void);
# 175 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prtime.h"
extern void PR_ExplodeTime(
    PRTime usecs, PRTimeParamFn params, PRExplodedTime *exploded);





extern PRTime

PR_ImplodeTime(const PRExplodedTime *exploded);
# 198 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prtime.h"
extern void PR_NormalizeTime(
    PRExplodedTime *exploded, PRTimeParamFn params);






extern PRTimeParameters PR_LocalTimeParameters(const PRExplodedTime *gmt);


extern PRTimeParameters PR_GMTParameters(const PRExplodedTime *gmt);





extern PRTimeParameters PR_USPacificTimeParameters(const PRExplodedTime *gmt);
# 248 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prtime.h"
extern PRStatus PR_ParseTimeString (
        const char *string,
        PRBool default_to_gmt,
        PRTime *result);
# 265 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prtime.h"
extern PRUint32 PR_FormatTime(char *buf, int buflen, const char *fmt,
                                           const PRExplodedTime *tm);




extern PRUint32
PR_FormatTimeUSEnglish( char* buf, PRUint32 bufSize,
                        const char* format, const PRExplodedTime* tm );



}
# 13 "../../../../dist/include/nsrootidl.h" 2
# 11 "../../../../dist/include/nsISupports.h" 2
# 117 "../../../../dist/include/nsISupports.h"
# 1 "../../../../dist/include/nsISupportsUtils.h" 1
# 32 "../../../../dist/include/nsISupportsUtils.h"
# 1 "../../../../dist/include/nscore.h" 1
# 33 "../../../../dist/include/nsISupportsUtils.h" 2


# 1 "../../../../dist/include/nsDebug.h" 1
# 36 "../../../../dist/include/nsISupportsUtils.h" 2
# 1 "../../../../dist/include/nsID.h" 1
# 26 "../../../../dist/include/nsID.h"
# 1 "/usr/include/string.h" 1 3
# 26 "/usr/include/string.h" 3
# 1 "/usr/include/features.h" 1 3
# 27 "/usr/include/string.h" 2 3

extern "C" {




# 1 "/usr/lib/gcc-lib/i386-linux/3.0/include/stddef.h" 1 3
# 34 "/usr/include/string.h" 2 3



extern void *memcpy (void *__restrict __dest,
                     __const void *__restrict __src, size_t __n) throw ();


extern void *memmove (void *__dest, __const void *__src, size_t __n)
     throw ();





extern void *memccpy (void *__restrict __dest, __const void *__restrict __src,
                      int __c, size_t __n)
     throw ();




extern void *memset (void *__s, int __c, size_t __n) throw ();


extern int memcmp (__const void *__s1, __const void *__s2, size_t __n)
     throw () __attribute__ ((__pure__));


extern void *memchr (__const void *__s, int __c, size_t __n)
      throw () __attribute__ ((__pure__));




extern void *rawmemchr (__const void *__s, int __c) throw () __attribute__ ((__pure__));


extern void *memrchr (__const void *__s, int __c, size_t __n)
      throw () __attribute__ ((__pure__));




extern char *strcpy (char *__restrict __dest, __const char *__restrict __src)
     throw ();

extern char *strncpy (char *__restrict __dest,
                      __const char *__restrict __src, size_t __n) throw ();


extern char *strcat (char *__restrict __dest, __const char *__restrict __src)
     throw ();

extern char *strncat (char *__restrict __dest, __const char *__restrict __src,
                      size_t __n) throw ();


extern int strcmp (__const char *__s1, __const char *__s2)
     throw () __attribute__ ((__pure__));

extern int strncmp (__const char *__s1, __const char *__s2, size_t __n)
     throw () __attribute__ ((__pure__));


extern int strcoll (__const char *__s1, __const char *__s2)
     throw () __attribute__ ((__pure__));

extern size_t strxfrm (char *__restrict __dest,
                       __const char *__restrict __src, size_t __n) throw ();





# 1 "/usr/include/xlocale.h" 1 3
# 28 "/usr/include/xlocale.h" 3
typedef struct __locale_struct
{

  struct locale_data *__locales[13];


  const unsigned short int *__ctype_b;
  const int *__ctype_tolower;
  const int *__ctype_toupper;
} *__locale_t;
# 109 "/usr/include/string.h" 2 3


extern int __strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l)
     throw () __attribute__ ((__pure__));

extern size_t __strxfrm_l (char *__dest, __const char *__src, size_t __n,
                           __locale_t __l) throw ();




extern char *strdup (__const char *__s) throw () __attribute__ ((__malloc__));






extern char *strndup (__const char *__string, size_t __n)
     throw () __attribute__ ((__malloc__));
# 155 "/usr/include/string.h" 3
extern char *strchr (__const char *__s, int __c) throw () __attribute__ ((__pure__));

extern char *strrchr (__const char *__s, int __c) throw () __attribute__ ((__pure__));




extern char *strchrnul (__const char *__s, int __c) throw () __attribute__ ((__pure__));




extern size_t strcspn (__const char *__s, __const char *__reject)
     throw () __attribute__ ((__pure__));


extern size_t strspn (__const char *__s, __const char *__accept)
     throw () __attribute__ ((__pure__));

extern char *strpbrk (__const char *__s, __const char *__accept)
     throw () __attribute__ ((__pure__));

extern char *strstr (__const char *__haystack, __const char *__needle)
     throw () __attribute__ ((__pure__));



extern char *strcasestr (__const char *__haystack, __const char *__needle)
     throw () __attribute__ ((__pure__));



extern char *strtok (char *__restrict __s, __const char *__restrict __delim)
     throw ();



extern char *__strtok_r (char *__restrict __s,
                         __const char *__restrict __delim,
                         char **__restrict __save_ptr) throw ();

extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim,
                       char **__restrict __save_ptr) throw ();






extern void *memmem (__const void *__haystack, size_t __haystacklen,
                     __const void *__needle, size_t __needlelen)
     throw () __attribute__ ((__pure__));



extern void *__mempcpy (void *__restrict __dest,
                        __const void *__restrict __src, size_t __n) throw ();
extern void *mempcpy (void *__restrict __dest,
                      __const void *__restrict __src, size_t __n) throw ();




extern size_t strlen (__const char *__s) throw () __attribute__ ((__pure__));




extern size_t strnlen (__const char *__string, size_t __maxlen)
     throw () __attribute__ ((__pure__));




extern char *strerror (int __errnum) throw ();



extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) throw ();




extern void __bzero (void *__s, size_t __n) throw ();



extern void bcopy (__const void *__src, void *__dest, size_t __n) throw ();


extern void bzero (void *__s, size_t __n) throw ();


extern int bcmp (__const void *__s1, __const void *__s2, size_t __n)
     throw () __attribute__ ((__pure__));


extern char *index (__const char *__s, int __c) throw () __attribute__ ((__pure__));


extern char *rindex (__const char *__s, int __c) throw () __attribute__ ((__pure__));



extern int ffs (int __i) throw () __attribute__ ((__const__));




extern int ffsl (long int __l) throw () __attribute__ ((__const__));

__extension__ extern int ffsll (long long int __ll)
     throw () __attribute__ ((__const__));




extern int strcasecmp (__const char *__s1, __const char *__s2)
     throw () __attribute__ ((__pure__));


extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n)
     throw () __attribute__ ((__pure__));





extern int __strcasecmp_l (__const char *__s1, __const char *__s2,
                           __locale_t __loc) throw () __attribute__ ((__pure__));

extern int __strncasecmp_l (__const char *__s1, __const char *__s2,
                            size_t __n, __locale_t __loc)
     throw () __attribute__ ((__pure__));





extern char *strsep (char **__restrict __stringp,
                     __const char *__restrict __delim) throw ();




extern int strverscmp (__const char *__s1, __const char *__s2)
     throw () __attribute__ ((__pure__));


extern char *strsignal (int __sig) throw ();


extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src)
     throw ();
extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src)
     throw ();



extern char *__stpncpy (char *__restrict __dest,
                        __const char *__restrict __src, size_t __n) throw ();
extern char *stpncpy (char *__restrict __dest,
                      __const char *__restrict __src, size_t __n) throw ();


extern char *strfry (char *__string) throw ();


extern void *memfrob (void *__s, size_t __n) throw ();






extern char *basename (__const char *__filename) throw ();
# 364 "/usr/include/string.h" 3
}
# 27 "../../../../dist/include/nsID.h" 2
# 40 "../../../../dist/include/nsID.h"
struct nsID {





  PRUint32 m0;
  PRUint16 m1;
  PRUint16 m2;
  PRUint8 m3[8];
# 62 "../../../../dist/include/nsID.h"
  inline PRBool Equals(const nsID& other) const {
    return (PRBool)
      ((((PRUint32*) &m0)[0] == ((PRUint32*) &other.m0)[0]) &&
       (((PRUint32*) &m0)[1] == ((PRUint32*) &other.m0)[1]) &&
       (((PRUint32*) &m0)[2] == ((PRUint32*) &other.m0)[2]) &&
       (((PRUint32*) &m0)[3] == ((PRUint32*) &other.m0)[3]));
  }





         PRBool Parse(const char *aIDStr);





         char* ToString() const;

};
# 102 "../../../../dist/include/nsID.h"
typedef nsID nsCID;
# 37 "../../../../dist/include/nsISupportsUtils.h" 2
# 1 "../../../../dist/include/nsIID.h" 1
# 35 "../../../../dist/include/nsIID.h"
typedef nsID nsIID;
# 38 "../../../../dist/include/nsISupportsUtils.h" 2
# 1 "../../../../dist/include/nsError.h" 1
# 26 "../../../../dist/include/nsError.h"
# 1 "../../../../dist/include/nsCom.h" 1
# 27 "../../../../dist/include/nsError.h" 2
# 1 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prtypes.h" 1
# 28 "../../../../dist/include/nsError.h" 2





typedef PRUint32 nsresult;
# 262 "../../../../dist/include/nsError.h"
extern nsresult
NS_ErrorAccordingToNSPR();
# 39 "../../../../dist/include/nsISupportsUtils.h" 2
# 1 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/pratom.h" 1
# 27 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/pratom.h"
# 1 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prtypes.h" 1
# 28 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/pratom.h" 2
# 1 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prlock.h" 1
# 32 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prlock.h"
# 1 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prtypes.h" 1
# 33 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prlock.h" 2

extern "C" {
# 47 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prlock.h"
typedef struct PRLock PRLock;
# 64 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prlock.h"
extern PRLock* PR_NewLock(void);
# 75 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prlock.h"
extern void PR_DestroyLock(PRLock *lock);
# 86 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prlock.h"
extern void PR_Lock(PRLock *lock);
# 98 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prlock.h"
extern PRStatus PR_Unlock(PRLock *lock);

}
# 29 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/pratom.h" 2

extern "C" {
# 41 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/pratom.h"
extern PRInt32 PR_AtomicIncrement(PRInt32 *val);
# 52 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/pratom.h"
extern PRInt32 PR_AtomicDecrement(PRInt32 *val);
# 64 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/pratom.h"
extern PRInt32 PR_AtomicSet(PRInt32 *val, PRInt32 newval);
# 76 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/pratom.h"
extern PRInt32 PR_AtomicAdd(PRInt32 *ptr, PRInt32 val);




typedef struct PRStackElemStr PRStackElem;

struct PRStackElemStr {
    PRStackElem *prstk_elem_next;

};

typedef struct PRStackStr PRStack;
# 99 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/pratom.h"
extern PRStack * PR_CreateStack(const char *stack_name);
# 111 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/pratom.h"
extern void PR_StackPush(PRStack *stack, PRStackElem *stack_elem);
# 124 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/pratom.h"
extern PRStackElem * PR_StackPop(PRStack *stack);
# 138 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/pratom.h"
extern PRStatus PR_DestroyStack(PRStack *stack);

}
# 40 "../../../../dist/include/nsISupportsUtils.h" 2


# 1 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prcmon.h" 1
# 32 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prcmon.h"
# 1 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prmon.h" 1
# 22 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prmon.h"
# 1 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prtypes.h" 1
# 23 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prmon.h" 2
# 1 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prinrval.h" 1
# 34 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prinrval.h"
# 1 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prtypes.h" 1
# 35 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prinrval.h" 2

extern "C" {





typedef PRUint32 PRIntervalTime;
# 89 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prinrval.h"
extern PRIntervalTime PR_IntervalNow(void);
# 107 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prinrval.h"
extern PRUint32 PR_TicksPerSecond(void);
# 126 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prinrval.h"
extern PRIntervalTime PR_SecondsToInterval(PRUint32 seconds);
extern PRIntervalTime PR_MillisecondsToInterval(PRUint32 milli);
extern PRIntervalTime PR_MicrosecondsToInterval(PRUint32 micro);
# 147 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prinrval.h"
extern PRUint32 PR_IntervalToSeconds(PRIntervalTime ticks);
extern PRUint32 PR_IntervalToMilliseconds(PRIntervalTime ticks);
extern PRUint32 PR_IntervalToMicroseconds(PRIntervalTime ticks);

}
# 24 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prmon.h" 2

extern "C" {

typedef struct PRMonitor PRMonitor;
# 36 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prmon.h"
extern PRMonitor* PR_NewMonitor(void);







extern void PR_DestroyMonitor(PRMonitor *mon);






extern void PR_EnterMonitor(PRMonitor *mon);






extern PRStatus PR_ExitMonitor(PRMonitor *mon);
# 76 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prmon.h"
extern PRStatus PR_Wait(PRMonitor *mon, PRIntervalTime ticks);






extern PRStatus PR_Notify(PRMonitor *mon);






extern PRStatus PR_NotifyAll(PRMonitor *mon);

}
# 33 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prcmon.h" 2
# 1 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prinrval.h" 1
# 34 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prcmon.h" 2

extern "C" {
# 45 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prcmon.h"
extern PRMonitor* PR_CEnterMonitor(void *address);





extern PRStatus PR_CExitMonitor(void *address);





extern PRStatus PR_CWait(void *address, PRIntervalTime timeout);





extern PRStatus PR_CNotify(void *address);





extern PRStatus PR_CNotifyAll(void *address);





extern void PR_CSetOnMonitorRecycle(void ( *callback)(void *address));

}
# 43 "../../../../dist/include/nsISupportsUtils.h" 2
# 71 "../../../../dist/include/nsISupportsUtils.h"
typedef PRUint32 nsrefcnt;
# 90 "../../../../dist/include/nsISupportsUtils.h"
# 1 "../../../../dist/include/nsTraceRefcnt.h" 1
# 26 "../../../../dist/include/nsTraceRefcnt.h"
# 1 "../../../../dist/include/nsCom.h" 1
# 27 "../../../../dist/include/nsTraceRefcnt.h" 2

# 1 "/usr/lib/gcc-lib/i386-linux/3.0/include/stdio.h" 1 3
# 36 "/usr/lib/gcc-lib/i386-linux/3.0/include/stdio.h" 3
# 1 "/usr/include/features.h" 1 3
# 37 "/usr/lib/gcc-lib/i386-linux/3.0/include/stdio.h" 2 3

extern "C" {



# 1 "/usr/lib/gcc-lib/i386-linux/3.0/include/stddef.h" 1 3
# 43 "/usr/lib/gcc-lib/i386-linux/3.0/include/stdio.h" 2 3

# 1 "/usr/include/bits/types.h" 1 3
# 45 "/usr/lib/gcc-lib/i386-linux/3.0/include/stdio.h" 2 3
# 53 "/usr/lib/gcc-lib/i386-linux/3.0/include/stdio.h" 3
typedef struct _IO_FILE FILE;
# 63 "/usr/lib/gcc-lib/i386-linux/3.0/include/stdio.h" 3
typedef struct _IO_FILE __FILE;
# 73 "/usr/lib/gcc-lib/i386-linux/3.0/include/stdio.h" 3
# 1 "/usr/include/libio.h" 1 3
# 30 "/usr/include/libio.h" 3
# 1 "/usr/include/_G_config.h" 1 3
# 9 "/usr/include/_G_config.h" 3
# 1 "/usr/include/bits/types.h" 1 3
# 10 "/usr/include/_G_config.h" 2 3




# 1 "/usr/lib/gcc-lib/i386-linux/3.0/include/stddef.h" 1 3
# 312 "/usr/lib/gcc-lib/i386-linux/3.0/include/stddef.h" 3
typedef unsigned int wint_t;
# 15 "/usr/include/_G_config.h" 2 3
# 24 "/usr/include/_G_config.h" 3
# 1 "/usr/include/wchar.h" 1 3
# 48 "/usr/include/wchar.h" 3
# 1 "/usr/lib/gcc-lib/i386-linux/3.0/include/stddef.h" 1 3
# 49 "/usr/include/wchar.h" 2 3

# 1 "/usr/include/bits/wchar.h" 1 3
# 51 "/usr/include/wchar.h" 2 3
# 67 "/usr/include/wchar.h" 3
typedef struct
{
  int __count;
  union
  {
    wint_t __wch;
    char __wchb[4];
  } __value;
} __mbstate_t;
# 25 "/usr/include/_G_config.h" 2 3

typedef struct
{
  __off_t __pos;
  __mbstate_t __state;
} _G_fpos_t;
typedef struct
{
  __off64_t __pos;
  __mbstate_t __state;
} _G_fpos64_t;
# 44 "/usr/include/_G_config.h" 3
# 1 "/usr/include/gconv.h" 1 3
# 26 "/usr/include/gconv.h" 3
# 1 "/usr/include/features.h" 1 3
# 27 "/usr/include/gconv.h" 2 3

# 1 "/usr/include/wchar.h" 1 3
# 48 "/usr/include/wchar.h" 3
# 1 "/usr/lib/gcc-lib/i386-linux/3.0/include/stddef.h" 1 3
# 49 "/usr/include/wchar.h" 2 3

# 1 "/usr/include/bits/wchar.h" 1 3
# 51 "/usr/include/wchar.h" 2 3
# 29 "/usr/include/gconv.h" 2 3

# 1 "/usr/lib/gcc-lib/i386-linux/3.0/include/stddef.h" 1 3
# 31 "/usr/include/gconv.h" 2 3





enum
{
  __GCONV_OK = 0,
  __GCONV_NOCONV,
  __GCONV_NODB,
  __GCONV_NOMEM,

  __GCONV_EMPTY_INPUT,
  __GCONV_FULL_OUTPUT,
  __GCONV_ILLEGAL_INPUT,
  __GCONV_INCOMPLETE_INPUT,

  __GCONV_ILLEGAL_DESCRIPTOR,
  __GCONV_INTERNAL_ERROR
};



enum
{
  __GCONV_IS_LAST = 0x0001,
  __GCONV_IGNORE_ERRORS = 0x0002
};



struct __gconv_step;
struct __gconv_step_data;
struct __gconv_loaded_object;
struct __gconv_trans_data;



typedef int (*__gconv_fct) (struct __gconv_step *, struct __gconv_step_data *,
                            __const unsigned char **, __const unsigned char *,
                            unsigned char **, size_t *, int, int);


typedef int (*__gconv_init_fct) (struct __gconv_step *);
typedef void (*__gconv_end_fct) (struct __gconv_step *);



typedef int (*__gconv_trans_fct) (struct __gconv_step *,
                                  struct __gconv_step_data *, void *,
                                  __const unsigned char *,
                                  __const unsigned char **,
                                  __const unsigned char *, unsigned char **,
                                  size_t *);


typedef int (*__gconv_trans_context_fct) (void *, __const unsigned char *,
                                          __const unsigned char *,
                                          unsigned char *, unsigned char *);


typedef int (*__gconv_trans_query_fct) (__const char *, __const char ***,
                                        size_t *);


typedef int (*__gconv_trans_init_fct) (void **, const char *);
typedef void (*__gconv_trans_end_fct) (void *);

struct __gconv_trans_data
{

  __gconv_trans_fct __trans_fct;
  __gconv_trans_context_fct __trans_context_fct;
  __gconv_trans_end_fct __trans_end_fct;
  void *__data;
  struct __gconv_trans_data *__next;
};



struct __gconv_step
{
  struct __gconv_loaded_object *__shlib_handle;
  __const char *__modname;

  int __counter;

  char *__from_name;
  char *__to_name;

  __gconv_fct __fct;
  __gconv_init_fct __init_fct;
  __gconv_end_fct __end_fct;



  int __min_needed_from;
  int __max_needed_from;
  int __min_needed_to;
  int __max_needed_to;


  int __stateful;

  void *__data;
};



struct __gconv_step_data
{
  unsigned char *__outbuf;
  unsigned char *__outbufend;



  int __flags;



  int __invocation_counter;



  int __internal_use;

  __mbstate_t *__statep;
  __mbstate_t __state;



  struct __gconv_trans_data *__trans;
};



typedef struct __gconv_info
{
  size_t __nsteps;
  struct __gconv_step *__steps;
  __extension__ struct __gconv_step_data __data [];
} *__gconv_t;
# 45 "/usr/include/_G_config.h" 2 3
typedef union
{
  struct __gconv_info __cd;
  struct
  {
    struct __gconv_info __cd;
    struct __gconv_step_data __data;
  } __combined;
} _G_iconv_t;

typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));
# 31 "/usr/include/libio.h" 2 3
# 51 "/usr/include/libio.h" 3
# 1 "/usr/lib/gcc-lib/i386-linux/3.0/include/stdarg.h" 1 3
# 43 "/usr/lib/gcc-lib/i386-linux/3.0/include/stdarg.h" 3
typedef __builtin_va_list __gnuc_va_list;
# 52 "/usr/include/libio.h" 2 3
# 158 "/usr/include/libio.h" 3
struct _IO_jump_t; struct _IO_FILE;
# 168 "/usr/include/libio.h" 3
typedef void _IO_lock_t;





struct _IO_marker {
  struct _IO_marker *_next;
  struct _IO_FILE *_sbuf;



  int _pos;
# 191 "/usr/include/libio.h" 3
};


enum __codecvt_result
{
  __codecvt_ok,
  __codecvt_partial,
  __codecvt_error,
  __codecvt_noconv
};
# 259 "/usr/include/libio.h" 3
struct _IO_FILE {
  int _flags;




  char* _IO_read_ptr;
  char* _IO_read_end;
  char* _IO_read_base;
  char* _IO_write_base;
  char* _IO_write_ptr;
  char* _IO_write_end;
  char* _IO_buf_base;
  char* _IO_buf_end;

  char *_IO_save_base;
  char *_IO_backup_base;
  char *_IO_save_end;

  struct _IO_marker *_markers;

  struct _IO_FILE *_chain;

  int _fileno;
  int _blksize;
  __off_t _old_offset;



  unsigned short _cur_column;
  signed char _vtable_offset;
  char _shortbuf[1];



  _IO_lock_t *_lock;
# 303 "/usr/include/libio.h" 3
  __off64_t _offset;





  void *__pad1;
  void *__pad2;

  int _mode;

  char _unused2[15 * sizeof (int) - 2 * sizeof (void *)];

};





struct _IO_FILE_plus;

extern struct _IO_FILE_plus _IO_2_1_stdin_;
extern struct _IO_FILE_plus _IO_2_1_stdout_;
extern struct _IO_FILE_plus _IO_2_1_stderr_;
# 342 "/usr/include/libio.h" 3
typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes);







typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf,
                                 size_t __n);







typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w);


typedef int __io_close_fn (void *__cookie);




typedef __io_read_fn cookie_read_function_t;
typedef __io_write_fn cookie_write_function_t;
typedef __io_seek_fn cookie_seek_function_t;
typedef __io_close_fn cookie_close_function_t;


typedef struct
{
  __io_read_fn *read;
  __io_write_fn *write;
  __io_seek_fn *seek;
  __io_close_fn *close;
} _IO_cookie_io_functions_t;
typedef _IO_cookie_io_functions_t cookie_io_functions_t;

struct _IO_cookie_file;


extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write,
                             void *__cookie, _IO_cookie_io_functions_t __fns);




extern "C" {


extern int __underflow (_IO_FILE *) throw ();
extern int __uflow (_IO_FILE *) throw ();
extern int __overflow (_IO_FILE *, int) throw ();
extern wint_t __wunderflow (_IO_FILE *) throw ();
extern wint_t __wuflow (_IO_FILE *) throw ();
extern wint_t __woverflow (_IO_FILE *, wint_t) throw ();
# 424 "/usr/include/libio.h" 3
extern int _IO_getc (_IO_FILE *__fp) throw ();
extern int _IO_putc (int __c, _IO_FILE *__fp) throw ();
extern int _IO_feof (_IO_FILE *__fp) throw ();
extern int _IO_ferror (_IO_FILE *__fp) throw ();

extern int _IO_peekc_locked (_IO_FILE *__fp) throw ();





extern void _IO_flockfile (_IO_FILE *) throw ();
extern void _IO_funlockfile (_IO_FILE *) throw ();
extern int _IO_ftrylockfile (_IO_FILE *) throw ();
# 454 "/usr/include/libio.h" 3
extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict,
                        __gnuc_va_list, int *__restrict) throw ();
extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict,
                         __gnuc_va_list) throw ();
extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t) throw ();
extern size_t _IO_sgetn (_IO_FILE *, void *, size_t) throw ();

extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int) throw ();
extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int) throw ();

extern void _IO_free_backup_area (_IO_FILE *) throw ();
# 510 "/usr/include/libio.h" 3
}
# 74 "/usr/lib/gcc-lib/i386-linux/3.0/include/stdio.h" 2 3




typedef __gnuc_va_list __not_va_list__;
# 88 "/usr/lib/gcc-lib/i386-linux/3.0/include/stdio.h" 3
typedef _G_fpos_t fpos_t;




typedef _G_fpos64_t fpos64_t;
# 137 "/usr/lib/gcc-lib/i386-linux/3.0/include/stdio.h" 3
# 1 "/usr/include/bits/stdio_lim.h" 1 3
# 138 "/usr/lib/gcc-lib/i386-linux/3.0/include/stdio.h" 2 3



extern FILE *stdin;
extern FILE *stdout;
extern FILE *stderr;






extern int remove (__const char *__filename) throw ();

extern int rename (__const char *__old, __const char *__new) throw ();




extern FILE *tmpfile (void) throw ();
# 166 "/usr/lib/gcc-lib/i386-linux/3.0/include/stdio.h" 3
extern FILE *tmpfile64 (void) throw ();


extern char *tmpnam (char *__s) throw ();




extern char *tmpnam_r (char *__s) throw ();
# 186 "/usr/lib/gcc-lib/i386-linux/3.0/include/stdio.h" 3
extern char *tempnam (__const char *__dir, __const char *__pfx)
     throw () __attribute__ ((__malloc__));




extern int fclose (FILE *__stream) throw ();

extern int fflush (FILE *__stream) throw ();



extern int fflush_unlocked (FILE *__stream) throw ();




extern int fcloseall (void) throw ();





extern FILE *fopen (__const char *__restrict __filename,
                    __const char *__restrict __modes) throw ();

extern FILE *freopen (__const char *__restrict __filename,
                      __const char *__restrict __modes,
                      FILE *__restrict __stream) throw ();
# 230 "/usr/lib/gcc-lib/i386-linux/3.0/include/stdio.h" 3
extern FILE *fopen64 (__const char *__restrict __filename,
                      __const char *__restrict __modes) throw ();
extern FILE *freopen64 (__const char *__restrict __filename,
                        __const char *__restrict __modes,
                        FILE *__restrict __stream) throw ();




extern FILE *fdopen (int __fd, __const char *__modes) throw ();





extern FILE *fopencookie (void *__restrict __magic_cookie,
                          __const char *__restrict __modes,
                          _IO_cookie_io_functions_t __io_funcs) throw ();


extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes) throw ();




extern FILE *open_memstream (char **__restrict __bufloc,
                             size_t *__restrict __sizeloc) throw ();





extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) throw ();



extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
                    int __modes, size_t __n) throw ();




extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
                       size_t __size) throw ();


extern void setlinebuf (FILE *__stream) throw ();




extern int fprintf (FILE *__restrict __stream,
                    __const char *__restrict __format, ...) throw ();

extern int printf (__const char *__restrict __format, ...) throw ();

extern int sprintf (char *__restrict __s,
                    __const char *__restrict __format, ...) throw ();


extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format,
                     __gnuc_va_list __arg) throw ();

extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg)
     throw ();

extern int vsprintf (char *__restrict __s, __const char *__restrict __format,
                     __gnuc_va_list __arg) throw ();



extern int snprintf (char *__restrict __s, size_t __maxlen,
                     __const char *__restrict __format, ...)
     throw () __attribute__ ((__format__ (__printf__, 3, 4)));

extern int vsnprintf (char *__restrict __s, size_t __maxlen,
                      __const char *__restrict __format, __gnuc_va_list __arg)
     throw () __attribute__ ((__format__ (__printf__, 3, 0)));





extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f,
                      __gnuc_va_list __arg)
     throw () __attribute__ ((__format__ (__printf__, 2, 0)));
extern int __asprintf (char **__restrict __ptr,
                       __const char *__restrict __fmt, ...)
     throw () __attribute__ ((__format__ (__printf__, 2, 3)));
extern int asprintf (char **__restrict __ptr,
                     __const char *__restrict __fmt, ...)
     throw () __attribute__ ((__format__ (__printf__, 2, 3)));


extern int vdprintf (int __fd, __const char *__restrict __fmt,
                     __gnuc_va_list __arg)
     throw () __attribute__ ((__format__ (__printf__, 2, 0)));
extern int dprintf (int __fd, __const char *__restrict __fmt, ...)
     throw () __attribute__ ((__format__ (__printf__, 2, 3)));




extern int fscanf (FILE *__restrict __stream,
                   __const char *__restrict __format, ...) throw ();

extern int scanf (__const char *__restrict __format, ...) throw ();

extern int sscanf (__const char *__restrict __s,
                   __const char *__restrict __format, ...) throw ();



extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format,
                    __gnuc_va_list __arg)
     throw () __attribute__ ((__format__ (__scanf__, 2, 0)));


extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg)
     throw () __attribute__ ((__format__ (__scanf__, 1, 0)));


extern int vsscanf (__const char *__restrict __s,
                    __const char *__restrict __format, __gnuc_va_list __arg)
     throw () __attribute__ ((__format__ (__scanf__, 2, 0)));




extern int fgetc (FILE *__stream) throw ();
extern int getc (FILE *__stream) throw ();


extern int getchar (void) throw ();







extern int getc_unlocked (FILE *__stream) throw ();
extern int getchar_unlocked (void) throw ();




extern int fgetc_unlocked (FILE *__stream) throw ();




extern int fputc (int __c, FILE *__stream) throw ();
extern int putc (int __c, FILE *__stream) throw ();


extern int putchar (int __c) throw ();







extern int fputc_unlocked (int __c, FILE *__stream) throw ();




extern int putc_unlocked (int __c, FILE *__stream) throw ();
extern int putchar_unlocked (int __c) throw ();





extern int getw (FILE *__stream) throw ();


extern int putw (int __w, FILE *__stream) throw ();




extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
     throw ();



extern char *fgets_unlocked (char *__restrict __s, int __n,
                             FILE *__restrict __stream) throw ();




extern char *gets (char *__s) throw ();
# 434 "/usr/lib/gcc-lib/i386-linux/3.0/include/stdio.h" 3
extern __ssize_t __getdelim (char **__restrict __lineptr,
                               size_t *__restrict __n, int __delimiter,
                               FILE *__restrict __stream) throw ();
extern __ssize_t getdelim (char **__restrict __lineptr,
                             size_t *__restrict __n, int __delimiter,
                             FILE *__restrict __stream) throw ();


extern __ssize_t getline (char **__restrict __lineptr,
                            size_t *__restrict __n,
                            FILE *__restrict __stream) throw ();




extern int fputs (__const char *__restrict __s, FILE *__restrict __stream)
     throw ();



extern int fputs_unlocked (__const char *__restrict __s,
                           FILE *__restrict __stream) throw ();



extern int puts (__const char *__s) throw ();



extern int ungetc (int __c, FILE *__stream) throw ();



extern size_t fread (void *__restrict __ptr, size_t __size,
                     size_t __n, FILE *__restrict __stream) throw ();

extern size_t fwrite (__const void *__restrict __ptr, size_t __size,
                      size_t __n, FILE *__restrict __s) throw ();



extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
                              size_t __n, FILE *__restrict __stream) throw ();
extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size,
                               size_t __n, FILE *__restrict __stream) throw ();




extern int fseek (FILE *__stream, long int __off, int __whence) throw ();

extern long int ftell (FILE *__stream) throw ();

extern void rewind (FILE *__stream) throw ();
# 497 "/usr/lib/gcc-lib/i386-linux/3.0/include/stdio.h" 3
extern int fseeko (FILE *__stream, __off_t __off, int __whence) throw ();

extern __off_t ftello (FILE *__stream) throw ();



extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos)
     throw ();

extern int fsetpos (FILE *__stream, __const fpos_t *__pos) throw ();
# 531 "/usr/lib/gcc-lib/i386-linux/3.0/include/stdio.h" 3
extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence) throw ();
extern __off64_t ftello64 (FILE *__stream) throw ();
extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos)
     throw ();
extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos) throw ();



extern void clearerr (FILE *__stream) throw ();

extern int feof (FILE *__stream) throw ();

extern int ferror (FILE *__stream) throw ();



extern void clearerr_unlocked (FILE *__stream) throw ();
extern int feof_unlocked (FILE *__stream) throw ();
extern int ferror_unlocked (FILE *__stream) throw ();




extern void perror (__const char *__s) throw ();




extern int sys_nerr;
extern __const char *__const sys_errlist[];


extern int _sys_nerr;
extern __const char *__const _sys_errlist[];





extern int fileno (FILE *__stream) throw ();




extern int fileno_unlocked (FILE *__stream) throw ();






extern FILE *popen (__const char *__command, __const char *__modes) throw ();


extern int pclose (FILE *__stream) throw ();





extern char *ctermid (char *__s) throw ();





extern char *cuserid (char *__s) throw ();




struct obstack;


extern int obstack_printf (struct obstack *__restrict __obstack,
                           __const char *__restrict __format, ...) throw ();
extern int obstack_vprintf (struct obstack *__restrict __obstack,
                            __const char *__restrict __format,
                            __gnuc_va_list __args) throw ();







extern void flockfile (FILE *__stream) throw ();



extern int ftrylockfile (FILE *__stream) throw ();


extern void funlockfile (FILE *__stream) throw ();
# 638 "/usr/lib/gcc-lib/i386-linux/3.0/include/stdio.h" 3
# 1 "/usr/include/bits/stdio.h" 1 3
# 39 "/usr/include/bits/stdio.h" 3
inline int
vprintf (__const char *__restrict __fmt, __gnuc_va_list __arg) throw ()
{
  return vfprintf (stdout, __fmt, __arg);
}


inline int
getchar (void) throw ()
{
  return _IO_getc (stdin);
}




inline int
getc_unlocked (FILE *__fp) throw ()
{
  return ((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++);
}


inline int
getchar_unlocked (void) throw ()
{
  return ((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++);
}




inline int
putchar (int __c) throw ()
{
  return _IO_putc (__c, stdout);
}




inline int
fputc_unlocked (int __c, FILE *__stream) throw ()
{
  return (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
}





inline int
putc_unlocked (int __c, FILE *__stream) throw ()
{
  return (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
}


inline int
putchar_unlocked (int __c) throw ()
{
  return (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c)));
}





inline __ssize_t
getline (char **__lineptr, size_t *__n, FILE *__stream) throw ()
{
  return __getdelim (__lineptr, __n, '\n', __stream);
}





inline int
feof_unlocked (FILE *__stream) throw ()
{
  return (((__stream)->_flags & 0x10) != 0);
}


inline int
ferror_unlocked (FILE *__stream) throw ()
{
  return (((__stream)->_flags & 0x20) != 0);
}
# 639 "/usr/lib/gcc-lib/i386-linux/3.0/include/stdio.h" 2 3


}
# 29 "../../../../dist/include/nsTraceRefcnt.h" 2

class nsISupports;
# 133 "../../../../dist/include/nsTraceRefcnt.h"
struct nsTraceRefcntStats {
  nsrefcnt mAddRefs;
  nsrefcnt mReleases;
  nsrefcnt mCreates;
  nsrefcnt mDestroys;
  double mRefsOutstandingTotal;
  double mRefsOutstandingSquared;
  double mObjsOutstandingTotal;
  double mObjsOutstandingSquared;
};
# 152 "../../../../dist/include/nsTraceRefcnt.h"
typedef PRBool ( *nsTraceRefcntStatFunc)
  (const char* aTypeName,
   PRUint32 aInstanceSize,
   nsTraceRefcntStats* aCurrentStats,
   nsTraceRefcntStats* aPrevStats,
   void *aClosure);





class nsTraceRefcnt {
public:
  static void Startup();

  static void Shutdown();

  static void LogAddRef(void* aPtr,
                               nsrefcnt aNewRefCnt,
                               const char* aTypeName,
                               PRUint32 aInstanceSize);

  static void LogRelease(void* aPtr,
                                nsrefcnt aNewRefCnt,
                                const char* aTypeName);

  static void LogNewXPCOM(void* aPtr,
                                 const char* aTypeName,
                                 PRUint32 aInstanceSize,
                                 const char* aFile,
                                 int aLine);

  static void LogDeleteXPCOM(void* aPtr,
                                    const char* aFile,
                                    int aLine);

  static nsrefcnt LogAddRefCall(void* aPtr,
                                       nsrefcnt aNewRefcnt,
                                       const char* aFile,
                                       int aLine);

  static nsrefcnt LogReleaseCall(void* aPtr,
                                        nsrefcnt aNewRefcnt,
                                        const char* aFile,
                                        int aLine);

  static void LogCtor(void* aPtr, const char* aTypeName,
                             PRUint32 aInstanceSize);

  static void LogDtor(void* aPtr, const char* aTypeName,
                             PRUint32 aInstanceSize);

  static void LogAddCOMPtr(void *aCOMPtr, nsISupports *aObject);

  static void LogReleaseCOMPtr(void *aCOMPtr, nsISupports *aObject);

  enum StatisticsType {
    ALL_STATS,
    NEW_STATS
  };

  static nsresult DumpStatistics(StatisticsType type = ALL_STATS,
                                        FILE* out = 0);

  static void ResetStatistics(void);

  static void GatherStatistics(nsTraceRefcntStatFunc aFunc,
                                      void* aClosure);

  static void LoadLibrarySymbols(const char* aLibraryName,
                                        void* aLibrayHandle);

  static void DemangleSymbol(const char * aSymbol,
                                    char * aBuffer,
                                    int aBufLen);

  static void WalkTheStack(FILE* aStream);

  static void SetPrefServiceAvailability(PRBool avail);






  static void SetActivityIsLegal(PRBool aLegal);
};




extern "C" void
NS_MeanAndStdDev(double n, double sumOfValues, double sumOfSquaredValues,
                 double *meanResult, double *stdDevResult);
# 91 "../../../../dist/include/nsISupportsUtils.h" 2







class nsISupports {
public:
# 115 "../../../../dist/include/nsISupportsUtils.h"
  virtual nsresult QueryInterface(const nsIID& aIID,
                            void** aInstancePtr) = 0;







  virtual nsrefcnt AddRef(void) = 0;
# 133 "../../../../dist/include/nsISupportsUtils.h"
  virtual nsrefcnt Release(void) = 0;


};
# 1117 "../../../../dist/include/nsISupportsUtils.h"
extern "C++" {



template <class T>
inline
nsrefcnt
ns_if_addref( T expr )



  {
    return expr ? expr->AddRef() : 0;
  }

 }
# 1232 "../../../../dist/include/nsISupportsUtils.h"
extern "C++" {



class nsISupports;

template <class T>
struct nsCOMTypeInfo
  {
    static const nsIID& GetIID() { return T::GetIID(); }
  };

template <>
struct nsCOMTypeInfo<nsISupports>
  {
    static const nsIID& GetIID() {
        static const nsIID iid = { 0x00000000, 0x0000, 0x0000, {0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46} }; return iid;
    }
  };




template <class DestinationType>
inline
nsresult
CallQueryInterface( nsISupports* aSource, DestinationType** aDestination )
  {
    {};
    {};

    return aSource->QueryInterface(nsCOMTypeInfo<DestinationType>::GetIID(), (void**)aDestination);
  }

}






# 1 "../../../../dist/include/nsIClassInfo.h" 1
# 14 "../../../../dist/include/nsIClassInfo.h"
# 1 "../../../../dist/include/nsIProgrammingLanguage.h" 1
# 28 "../../../../dist/include/nsIProgrammingLanguage.h"
class nsIProgrammingLanguage : public nsISupports {
 public:

  static const nsIID& GetIID() {static const nsIID iid = {0xea604e90, 0x40ba, 0x11d5, { 0x90, 0xbb, 0x00, 0x10, 0xa4, 0xe7, 0x3d, 0x9a }}; return iid;}




  enum { UNKNOWN = 0U };

  enum { CPLUSPLUS = 1U };

  enum { JAVASCRIPT = 2U };

  enum { PYTHON = 3U };

  enum { PERL = 4U };

  enum { JAVA = 5U };

  enum { ZX81_BASIC = 6U };

  enum { JAVASCRIPT2 = 7U };

};
# 15 "../../../../dist/include/nsIClassInfo.h" 2
# 29 "../../../../dist/include/nsIClassInfo.h"
class nsIClassInfo : public nsISupports {
 public:

  static const nsIID& GetIID() {static const nsIID iid = {0x986c11d0, 0xf340, 0x11d4, { 0x90, 0x75, 0x00, 0x10, 0xa4, 0xe7, 0x3d, 0x9a }}; return iid;}
# 43 "../../../../dist/include/nsIClassInfo.h"
  virtual nsresult GetInterfaces(PRUint32 *count, nsIID * **array) = 0;
# 58 "../../../../dist/include/nsIClassInfo.h"
  virtual nsresult GetHelperForLanguage(PRUint32 language, nsISupports **_retval) = 0;






  virtual nsresult GetContractID(char * *aContractID) = 0;





  virtual nsresult GetClassDescription(char * *aClassDescription) = 0;






  virtual nsresult GetClassID(nsCID * *aClassID) = 0;





  virtual nsresult GetImplementationLanguage(PRUint32 *aImplementationLanguage) = 0;




  enum { SINGLETON = 1U };

  enum { THREADSAFE = 2U };

  enum { MAIN_THREAD_ONLY = 4U };

  enum { DOM_OBJECT = 8U };

  enum { PLUGIN_OBJECT = 16U };

  enum { RESERVED = 2147483648U };


  virtual nsresult GetFlags(PRUint32 *aFlags) = 0;

};
# 1274 "../../../../dist/include/nsISupportsUtils.h" 2
# 118 "../../../../dist/include/nsISupports.h" 2
# 50 "../../../../dist/include/nsCOMPtr.h" 2




# 1 "../../../../dist/include/nscore.h" 1
# 55 "../../../../dist/include/nsCOMPtr.h" 2
# 107 "../../../../dist/include/nsCOMPtr.h"
  typedef PRBool NSCAP_BOOL;
# 159 "../../../../dist/include/nsCOMPtr.h"
template <class T>
class nsDerivedSafe : public T
# 170 "../../../../dist/include/nsCOMPtr.h"
  {
    private:

      using T::AddRef;
      using T::Release;






      void operator delete( void*, size_t );



      nsDerivedSafe<T>& operator=( const T& );
# 194 "../../../../dist/include/nsCOMPtr.h"
  };
# 215 "../../../../dist/include/nsCOMPtr.h"
template <class T>
struct already_AddRefed
# 232 "../../../../dist/include/nsCOMPtr.h"
  {
    already_AddRefed( T* aRawPtr )
        : mRawPtr(aRawPtr)
      {

      }

    T* get() const { return mRawPtr; }

    T* mRawPtr;
  };

template <class T>
inline
const already_AddRefed<T>
getter_AddRefs( T* aRawPtr )




  {
    return already_AddRefed<T>(aRawPtr);
  }

template <class T>
inline
const already_AddRefed<T>
getter_AddRefs( const already_AddRefed<T>& aAlreadyAddRefedPtr )
  {
    return aAlreadyAddRefedPtr;
  }

template <class T>
inline
const already_AddRefed<T>
dont_AddRef( T* aRawPtr )
  {
    return already_AddRefed<T>(aRawPtr);
  }

template <class T>
inline
const already_AddRefed<T>
dont_AddRef( const already_AddRefed<T> aAlreadyAddRefedPtr )
  {
    return aAlreadyAddRefedPtr;
  }
# 291 "../../../../dist/include/nsCOMPtr.h"
template <class T>
inline
T*
dont_QueryInterface( T* expr )
  {
    return expr;
  }



class nsCOMPtr_helper
# 317 "../../../../dist/include/nsCOMPtr.h"
  {
    public:
      virtual nsresult operator()( const nsIID&, void** ) const = 0;
  };

class nsQueryInterface : public nsCOMPtr_helper
  {
    public:
      nsQueryInterface( nsISupports* aRawPtr, nsresult* error )
          : mRawPtr(aRawPtr),
            mErrorPtr(error)
        {

        }

      virtual nsresult operator()( const nsIID& aIID, void** ) const;

    private:
      nsISupports* mRawPtr;
      nsresult* mErrorPtr;
  };

inline
const nsQueryInterface
do_QueryInterface( nsISupports* aRawPtr, nsresult* error = 0 )
  {
    return nsQueryInterface(aRawPtr, error);
  }

template <class T>
inline
void
do_QueryInterface( already_AddRefed<T>& )
  {



  }

template <class T>
inline
void
do_QueryInterface( already_AddRefed<T>&, nsresult* )
  {



  }
# 382 "../../../../dist/include/nsCOMPtr.h"
class nsCOMPtr_base
# 395 "../../../../dist/include/nsCOMPtr.h"
  {
    public:

      nsCOMPtr_base( nsISupports* rawPtr = 0 )
          : mRawPtr(rawPtr)
        {

        }


                ~nsCOMPtr_base();






                void assign_with_AddRef( nsISupports* );
                void assign_from_helper( const nsCOMPtr_helper&, const nsIID& );
                void** begin_assignment();

    protected:
      nsISupports* mRawPtr;

      void
      assign_assuming_AddRef( nsISupports* newPtr )
        {
# 430 "../../../../dist/include/nsCOMPtr.h"
          nsISupports* oldPtr = mRawPtr;
          mRawPtr = newPtr;
          ;;
          if ( oldPtr )
            (oldPtr)->Release();
        }
  };



template <class T>
class nsCOMPtr

    : private nsCOMPtr_base

  {
    enum { _force_even_compliant_compilers_to_fail_ = sizeof(T) };
# 482 "../../../../dist/include/nsCOMPtr.h"
    public:
      typedef T element_type;
# 512 "../../../../dist/include/nsCOMPtr.h"
      nsCOMPtr()
            : nsCOMPtr_base(0)

        {
          ;;
        }

      nsCOMPtr( const nsCOMPtr<T>& aSmartPtr )
            : nsCOMPtr_base(aSmartPtr.mRawPtr)

        {
          if ( mRawPtr )
            (mRawPtr)->AddRef();
          ;;
        }

      nsCOMPtr( T* aRawPtr )
            : nsCOMPtr_base(aRawPtr)

        {
          if ( mRawPtr )
            (mRawPtr)->AddRef();
          ;;
          ;;
        }

      nsCOMPtr( const already_AddRefed<T>& aSmartPtr )
            : nsCOMPtr_base(aSmartPtr.mRawPtr)

        {
          ;;
          ;;
        }

      nsCOMPtr( const nsCOMPtr_helper& helper )
            : nsCOMPtr_base(0)


        {
          ;;
          assign_from_helper(helper, nsCOMTypeInfo<T>::GetIID());
          ;;
        }
# 571 "../../../../dist/include/nsCOMPtr.h"
      nsCOMPtr<T>&
      operator=( const nsCOMPtr<T>& rhs )

        {
          assign_with_AddRef(rhs.mRawPtr);
          return *this;
        }

      nsCOMPtr<T>&
      operator=( T* rhs )

        {
          assign_with_AddRef(rhs);
          ;;
          return *this;
        }

      nsCOMPtr<T>&
      operator=( const already_AddRefed<T>& rhs )

        {
          assign_assuming_AddRef(rhs.mRawPtr);
          ;;
          return *this;
        }

      nsCOMPtr<T>&
      operator=( const nsCOMPtr_helper& rhs )


        {
          assign_from_helper(rhs, nsCOMTypeInfo<T>::GetIID());
          ;;
          return *this;
        }
# 622 "../../../../dist/include/nsCOMPtr.h"
      nsDerivedSafe<T>*
      get() const






        {
          return reinterpret_cast< nsDerivedSafe<T>* >(mRawPtr);
        }

      operator nsDerivedSafe<T>*() const







        {
          return get();
        }

      nsDerivedSafe<T>*
      operator->() const
        {
          {};
          return get();
        }
# 666 "../../../../dist/include/nsCOMPtr.h"
      nsCOMPtr<T>*
      get_address()


        {
          return this;
        }

      const nsCOMPtr<T>*
      get_address() const


        {
          return this;
        }






    private:
      const nsCOMPtr<T>*
      operator&() const






        {
          return this;
        }

      nsCOMPtr<T>*
      operator&()



        {
          return this;
        }

    public:
      nsDerivedSafe<T>&
      operator*() const
        {
          {};
          return *get();
        }






      T**
      StartAssignment()
        {

          return reinterpret_cast< T** >(begin_assignment());




        }
  };
# 745 "../../../../dist/include/nsCOMPtr.h"
template <>
class nsCOMPtr<nsISupports>
    : private nsCOMPtr_base
  {
    public:
      typedef nsISupports element_type;
# 763 "../../../../dist/include/nsCOMPtr.h"
      nsCOMPtr()
            : nsCOMPtr_base(0)

        {
          ;;
        }

      nsCOMPtr( const nsCOMPtr<nsISupports>& aSmartPtr )
            : nsCOMPtr_base(aSmartPtr.mRawPtr)

        {
          if ( mRawPtr )
            (mRawPtr)->AddRef();
          ;;
        }

      nsCOMPtr( nsISupports* aRawPtr )
            : nsCOMPtr_base(aRawPtr)

        {
          if ( mRawPtr )
            (mRawPtr)->AddRef();
          ;;
        }

      nsCOMPtr( const already_AddRefed<nsISupports>& aSmartPtr )
            : nsCOMPtr_base(aSmartPtr.mRawPtr)

        {
          ;;
        }

      nsCOMPtr( const nsCOMPtr_helper& helper )
            : nsCOMPtr_base(0)


        {
          ;;
          assign_from_helper(helper, nsCOMTypeInfo<nsISupports>::GetIID());
        }




      nsCOMPtr<nsISupports>&
      operator=( const nsCOMPtr<nsISupports>& rhs )

        {
          assign_with_AddRef(rhs.mRawPtr);
          return *this;
        }

      nsCOMPtr<nsISupports>&
      operator=( nsISupports* rhs )

        {
          assign_with_AddRef(rhs);
          return *this;
        }

      nsCOMPtr<nsISupports>&
      operator=( const already_AddRefed<nsISupports>& rhs )

        {
          assign_assuming_AddRef(rhs.mRawPtr);
          return *this;
        }

      nsCOMPtr<nsISupports>&
      operator=( const nsCOMPtr_helper& rhs )


        {
          assign_from_helper(rhs, nsCOMTypeInfo<nsISupports>::GetIID());
          return *this;
        }




      nsDerivedSafe<nsISupports>*
      get() const






        {
          return reinterpret_cast< nsDerivedSafe<nsISupports>* >(mRawPtr);
        }

      operator nsDerivedSafe<nsISupports>*() const







        {
          return get();
        }

      nsDerivedSafe<nsISupports>*
      operator->() const
        {
          {};
          return get();
        }
# 887 "../../../../dist/include/nsCOMPtr.h"
      nsCOMPtr<nsISupports>*
      get_address()


        {
          return this;
        }

      const nsCOMPtr<nsISupports>*
      get_address() const


        {
          return this;
        }






    private:
      const nsCOMPtr<nsISupports>*
      operator&() const






        {
          return this;
        }

      nsCOMPtr<nsISupports>*
      operator&()



        {
          return this;
        }

    public:

      nsDerivedSafe<nsISupports>&
      operator*() const
        {
          {};
          return *get();
        }






      nsISupports**
      StartAssignment()
        {

          return reinterpret_cast< nsISupports** >(begin_assignment());




        }
  };
# 999 "../../../../dist/include/nsCOMPtr.h"
template <class T>
inline
nsCOMPtr<T>*
address_of( nsCOMPtr<T>& aPtr )
  {
    return aPtr.get_address();
  }

template <class T>
inline
const nsCOMPtr<T>*
address_of( const nsCOMPtr<T>& aPtr )
  {
    return aPtr.get_address();
  }



template <class T>
class nsGetterAddRefs
# 1036 "../../../../dist/include/nsCOMPtr.h"
  {
    public:
      explicit
      nsGetterAddRefs( nsCOMPtr<T>& aSmartPtr )
          : mTargetSmartPtr(aSmartPtr)
        {

        }
# 1058 "../../../../dist/include/nsCOMPtr.h"
      operator void**()
        {
          return reinterpret_cast< void** >(mTargetSmartPtr.StartAssignment());
        }

      operator nsISupports**()
        {
          return reinterpret_cast< nsISupports** >(mTargetSmartPtr.StartAssignment());
        }

      operator T**()
        {
          return mTargetSmartPtr.StartAssignment();
        }

      T*&
      operator*()
        {
          return *(mTargetSmartPtr.StartAssignment());
        }

    private:
      nsCOMPtr<T>& mTargetSmartPtr;
  };


template <>
class nsGetterAddRefs<nsISupports>
  {
    public:
      explicit
      nsGetterAddRefs( nsCOMPtr<nsISupports>& aSmartPtr )
          : mTargetSmartPtr(aSmartPtr)
        {

        }
# 1102 "../../../../dist/include/nsCOMPtr.h"
      operator void**()
        {
          return reinterpret_cast< void** >(mTargetSmartPtr.StartAssignment());
        }

      operator nsISupports**()
        {
          return mTargetSmartPtr.StartAssignment();
        }

      nsISupports*&
      operator*()
        {
          return *(mTargetSmartPtr.StartAssignment());
        }

    private:
      nsCOMPtr<nsISupports>& mTargetSmartPtr;
  };


template <class T>
inline
nsGetterAddRefs<T>
getter_AddRefs( nsCOMPtr<T>& aSmartPtr )




  {
    return nsGetterAddRefs<T>(aSmartPtr);
  }





template <class T, class U>
inline
NSCAP_BOOL
operator==( const nsCOMPtr<T>& lhs, const nsCOMPtr<U>& rhs )
  {
    return static_cast< const void* >(lhs.get()) == static_cast< const void* >(rhs.get());
  }


template <class T, class U>
inline
NSCAP_BOOL
operator!=( const nsCOMPtr<T>& lhs, const nsCOMPtr<U>& rhs )
  {
    return static_cast< const void* >(lhs.get()) != static_cast< const void* >(rhs.get());
  }




template <class T, class U>
inline
NSCAP_BOOL
operator==( const nsCOMPtr<T>& lhs, const U* rhs )
  {
    return static_cast< const void* >(lhs.get()) == static_cast< const void* >(rhs);
  }

template <class T, class U>
inline
NSCAP_BOOL
operator==( const U* lhs, const nsCOMPtr<T>& rhs )
  {
    return static_cast< const void* >(lhs) == static_cast< const void* >(rhs.get());
  }

template <class T, class U>
inline
NSCAP_BOOL
operator!=( const nsCOMPtr<T>& lhs, const U* rhs )
  {
    return static_cast< const void* >(lhs.get()) != static_cast< const void* >(rhs);
  }

template <class T, class U>
inline
NSCAP_BOOL
operator!=( const U* lhs, const nsCOMPtr<T>& rhs )
  {
    return static_cast< const void* >(lhs) != static_cast< const void* >(rhs.get());
  }
# 1206 "../../../../dist/include/nsCOMPtr.h"
template <class T, class U>
inline
NSCAP_BOOL
operator==( const nsCOMPtr<T>& lhs, U* rhs )
  {
    return static_cast< const void* >(lhs.get()) == static_cast< void* >(rhs);
  }

template <class T, class U>
inline
NSCAP_BOOL
operator==( U* lhs, const nsCOMPtr<T>& rhs )
  {
    return static_cast< void* >(lhs) == static_cast< const void* >(rhs.get());
  }

template <class T, class U>
inline
NSCAP_BOOL
operator!=( const nsCOMPtr<T>& lhs, U* rhs )
  {
    return static_cast< const void* >(lhs.get()) != static_cast< void* >(rhs);
  }

template <class T, class U>
inline
NSCAP_BOOL
operator!=( U* lhs, const nsCOMPtr<T>& rhs )
  {
    return static_cast< void* >(lhs) != static_cast< const void* >(rhs.get());
  }






class NSCAP_Zero;

template <class T>
inline
NSCAP_BOOL
operator==( const nsCOMPtr<T>& lhs, NSCAP_Zero* rhs )

  {
    return static_cast< const void* >(lhs.get()) == reinterpret_cast< const void* >(rhs);
  }

template <class T>
inline
NSCAP_BOOL
operator==( NSCAP_Zero* lhs, const nsCOMPtr<T>& rhs )

  {
    return reinterpret_cast< const void* >(lhs) == static_cast< const void* >(rhs.get());
  }

template <class T>
inline
NSCAP_BOOL
operator!=( const nsCOMPtr<T>& lhs, NSCAP_Zero* rhs )

  {
    return static_cast< const void* >(lhs.get()) != reinterpret_cast< const void* >(rhs);
  }

template <class T>
inline
NSCAP_BOOL
operator!=( NSCAP_Zero* lhs, const nsCOMPtr<T>& rhs )

  {
    return reinterpret_cast< const void* >(lhs) != static_cast< const void* >(rhs.get());
  }
# 1309 "../../../../dist/include/nsCOMPtr.h"
inline
NSCAP_BOOL
SameCOMIdentity( nsISupports* lhs, nsISupports* rhs )
  {
    return nsCOMPtr<nsISupports>( do_QueryInterface(lhs) ) == nsCOMPtr<nsISupports>( do_QueryInterface(rhs) );
  }



template <class SourceType, class DestinationType>
inline
nsresult
CallQueryInterface( nsCOMPtr<SourceType>& aSourcePtr, DestinationType** aDestPtr )
  {
    return CallQueryInterface(aSourcePtr.get(), aDestPtr);
  }
# 23 "nsFormControlHelper.cpp" 2
# 1 "nsFormControlHelper.h" 1
# 26 "nsFormControlHelper.h"
# 1 "../../../../dist/include/nsIFormControlFrame.h" 1
# 26 "../../../../dist/include/nsIFormControlFrame.h"
# 1 "../../../../dist/include/nsISupports.h" 1
# 27 "../../../../dist/include/nsIFormControlFrame.h" 2
# 1 "../../../../dist/include/nsFont.h" 1
# 26 "../../../../dist/include/nsFont.h"
# 1 "../../../../dist/include/nscore.h" 1
# 27 "../../../../dist/include/nsFont.h" 2
# 1 "../../../../dist/include/nsCoord.h" 1
# 26 "../../../../dist/include/nsCoord.h"
# 1 "../../../../dist/include/nscore.h" 1
# 27 "../../../../dist/include/nsCoord.h" 2
# 40 "../../../../dist/include/nsCoord.h"
typedef PRInt32 nscoord;
# 28 "../../../../dist/include/nsFont.h" 2
# 1 "../../../../dist/include/nsString.h" 1
# 46 "../../../../dist/include/nsString.h"
# 1 "../../../../dist/include/nsString2.h" 1
# 47 "../../../../dist/include/nsString2.h"
# 1 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prtypes.h" 1
# 48 "../../../../dist/include/nsString2.h" 2
# 1 "../../../../dist/include/nscore.h" 1
# 49 "../../../../dist/include/nsString2.h" 2
# 1 "/usr/lib/gcc-lib/i386-linux/3.0/include/stdio.h" 1 3
# 50 "../../../../dist/include/nsString2.h" 2
# 1 "../../../../dist/include/nsString.h" 1
# 51 "../../../../dist/include/nsString2.h" 2
# 1 "../../../../dist/include/nsIAtom.h" 1
# 17 "../../../../dist/include/nsIAtom.h"
class nsISizeOfHandler;

# 1 "../../../../dist/include/nsAWritableString.h" 1
# 30 "../../../../dist/include/nsAWritableString.h"
# 1 "../../../../dist/include/nsAReadableString.h" 1
# 30 "../../../../dist/include/nsAReadableString.h"
# 1 "../../../../dist/include/nsAString.h" 1
# 28 "../../../../dist/include/nsAString.h"
# 1 "../../../../dist/include/nsStringFwd.h" 1
# 34 "../../../../dist/include/nsStringFwd.h"
class nsAString;
class nsACString;






class nsAPromiseString;
class nsAPromiseCString;






class nsAFlatString;
class nsAFlatCString;






class nsDependentString;
class nsDependentCString;
# 29 "../../../../dist/include/nsAString.h" 2



# 1 "../../../../dist/include/nsPrivateSharableString.h" 1
# 29 "../../../../dist/include/nsPrivateSharableString.h"
# 1 "../../../../dist/include/nsBufferHandle.h" 1
# 30 "../../../../dist/include/nsBufferHandle.h"
# 1 "/usr/lib/gcc-lib/i386-linux/3.0/include/stddef.h" 1 3
# 31 "../../../../dist/include/nsBufferHandle.h" 2


# 1 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prtypes.h" 1
# 34 "../../../../dist/include/nsBufferHandle.h" 2


# 1 "../../../../dist/include/nsDebug.h" 1
# 37 "../../../../dist/include/nsBufferHandle.h" 2


# 1 "../../../../dist/include/nscore.h" 1
# 40 "../../../../dist/include/nsBufferHandle.h" 2
# 80 "../../../../dist/include/nsBufferHandle.h"
template <class CharT>
class nsBufferHandle
  {
    public:
      nsBufferHandle() { }
      nsBufferHandle( CharT* aDataStart, CharT* aDataEnd ) : mDataStart(aDataStart), mDataEnd(aDataEnd) { }

      void DataStart( CharT* aNewDataStart ) { mDataStart = aNewDataStart; }
      CharT* DataStart() { return mDataStart; }
      const CharT* DataStart() const { return mDataStart; }

      void DataEnd( CharT* aNewDataEnd ) { mDataEnd = aNewDataEnd; }
      CharT* DataEnd() { return mDataEnd; }
      const CharT* DataEnd() const { return mDataEnd; }

      ptrdiff_t DataLength() const { return mDataEnd - mDataStart; }

    protected:
      CharT* mDataStart;
      CharT* mDataEnd;
  };

template <class CharT>
class nsConstBufferHandle
  {
    public:
      nsConstBufferHandle() { }
      nsConstBufferHandle( const CharT* aDataStart, const CharT* aDataEnd ) : mDataStart(aDataStart), mDataEnd(aDataEnd) { }

      void DataStart( const CharT* aNewDataStart ) { mDataStart = aNewDataStart; }
      const CharT* DataStart() const { return mDataStart; }

      void DataEnd( const CharT* aNewDataEnd ) { mDataEnd = aNewDataEnd; }
      const CharT* DataEnd() const { return mDataEnd; }

      ptrdiff_t DataLength() const { return mDataEnd - mDataStart; }

    protected:
      const CharT* mDataStart;
      const CharT* mDataEnd;
  };







template <class CharT>
class nsStringAllocator
  {
    public:

      virtual void Deallocate( CharT* ) const = 0;
  };




       nsStringAllocator<char>& StringAllocator_char();
       nsStringAllocator<PRUnichar>& StringAllocator_wchar_t();





template <class T>
struct nsStringAllocatorTraits
  {
  };

template <>
struct nsStringAllocatorTraits<char>
  {
    static nsStringAllocator<char>& global_string_allocator() { return StringAllocator_char(); }
  };

template <>
struct nsStringAllocatorTraits<PRUnichar>
  {
    static nsStringAllocator<PRUnichar>& global_string_allocator() { return StringAllocator_wchar_t(); }
  };
# 170 "../../../../dist/include/nsBufferHandle.h"
template <class CharT>
class nsSharedBufferHandle
    : public nsBufferHandle<CharT>
  {
    protected:
      enum
        {
          kIsShared = 0x08000000,
          kIsSingleAllocationWithBuffer = 0x04000000,
          kIsStorageDefinedSeparately = 0x02000000,
          kIsUserAllocator = 0x01000000,


          kIsNULL = 0x80000000,
          kImplementationFlagsMask = 0xF0000000,

          kFlagsMask = 0xFF000000,
          kRefCountMask = 0x00FFFFFF
        };

    public:
      nsSharedBufferHandle( CharT* aDataStart, CharT* aDataEnd )
          : nsBufferHandle<CharT>(aDataStart, aDataEnd)
        {
          mFlags = kIsShared;
        }

      nsSharedBufferHandle( CharT* aDataStart, CharT* aDataEnd, CharT*, CharT*, PRBool isSingleAllocation )
          : nsBufferHandle<CharT>(aDataStart, aDataEnd)
        {
          mFlags = kIsShared;
          if ( isSingleAllocation )
            mFlags |= kIsSingleAllocationWithBuffer;
        }

      ~nsSharedBufferHandle();

      void
      AcquireReference() const
        {
          nsSharedBufferHandle<CharT>* mutable_this = const_cast< nsSharedBufferHandle<CharT>* >(this);
          mutable_this->set_refcount( get_refcount()+1 );
        }

      void
      ReleaseReference() const
        {
          nsSharedBufferHandle<CharT>* mutable_this = const_cast< nsSharedBufferHandle<CharT>* >(this);
          if ( !mutable_this->set_refcount( get_refcount()-1 ) )
            delete mutable_this;

        }

      PRBool
      IsReferenced() const
        {
          return get_refcount() != 0;
        }

      PRUint32
      GetImplementationFlags() const
        {
          return mFlags & kImplementationFlagsMask;
        }

      void
      SetImplementationFlags( PRUint32 aNewFlags )
        {
          mFlags = (mFlags & ~kImplementationFlagsMask) | (aNewFlags & kImplementationFlagsMask);
        }

    protected:
      PRUint32 mFlags;

      PRUint32
      get_refcount() const
        {
          return mFlags & kRefCountMask;
        }

      PRUint32
      set_refcount( PRUint32 aNewRefCount )
        {
          {};

          mFlags = (mFlags & kFlagsMask) | aNewRefCount;
          return aNewRefCount;
        }

      nsStringAllocator<CharT>& get_allocator() const;
  };


template <class CharT>
class nsFlexBufferHandle
    : public nsSharedBufferHandle<CharT>
  {
    public:
      nsFlexBufferHandle( CharT* aDataStart, CharT* aDataEnd, CharT* aStorageStart, CharT* aStorageEnd )
          : nsSharedBufferHandle<CharT>(aDataStart, aDataEnd),
            mStorageStart(aStorageStart),
            mStorageEnd(aStorageEnd)
        {
          this->mFlags |= this->kIsStorageDefinedSeparately;
        }

      void StorageStart( CharT* aNewStorageStart ) { mStorageStart = aNewStorageStart; }
      CharT* StorageStart() { return mStorageStart; }
      const CharT* StorageStart() const { return mStorageStart; }

      void StorageEnd( CharT* aNewStorageEnd ) { mStorageEnd = aNewStorageEnd; }
      CharT* StorageEnd() { return mStorageEnd; }
      const CharT* StorageEnd() const { return mStorageEnd; }

      ptrdiff_t StorageLength() const { return mStorageEnd - mStorageStart; }

    protected:
      CharT* mStorageStart;
      CharT* mStorageEnd;
  };

template <class CharT>
class nsSharedBufferHandleWithAllocator
    : public nsSharedBufferHandle<CharT>
  {
    public:
      nsSharedBufferHandleWithAllocator( CharT* aDataStart, CharT* aDataEnd, nsStringAllocator<CharT>& aAllocator )
          : nsSharedBufferHandle<CharT>(aDataStart, aDataEnd),
            mAllocator(aAllocator)
        {
          this->mFlags |= this->kIsUserAllocator;
        }

      nsStringAllocator<CharT>& get_allocator() const { return mAllocator; }

    protected:
      nsStringAllocator<CharT>& mAllocator;
  };

template <class CharT>
class nsFlexBufferHandleWithAllocator
    : public nsFlexBufferHandle<CharT>
  {
    public:
      nsFlexBufferHandleWithAllocator( CharT* aDataStart, CharT* aDataEnd,
                                       CharT* aStorageStart, CharT* aStorageEnd,
                                       nsStringAllocator<CharT>& aAllocator )
          : nsFlexBufferHandle<CharT>(aDataStart, aDataEnd, aStorageStart, aStorageEnd),
            mAllocator(aAllocator)
        {
          this->mFlags |= this->kIsUserAllocator;
        }

      nsStringAllocator<CharT>& get_allocator() const { return mAllocator; }

    protected:
      nsStringAllocator<CharT>& mAllocator;
  };


template <class CharT>
nsStringAllocator<CharT>&
nsSharedBufferHandle<CharT>::get_allocator() const

  {
    if ( mFlags & kIsUserAllocator )
      {
        if ( mFlags & kIsStorageDefinedSeparately )
          return reinterpret_cast< const nsFlexBufferHandleWithAllocator<CharT>* >(this)->get_allocator();
        else
          return reinterpret_cast< const nsSharedBufferHandleWithAllocator<CharT>* >(this)->get_allocator();
      }

    return nsStringAllocatorTraits<CharT>::global_string_allocator();
  }


template <class CharT>
nsSharedBufferHandle<CharT>::~nsSharedBufferHandle()

  {
    {};

    if ( !(mFlags & kIsSingleAllocationWithBuffer) )
      {
        CharT* string_storage = this->mDataStart;
        if ( mFlags & kIsStorageDefinedSeparately )
          string_storage = reinterpret_cast< nsFlexBufferHandle<CharT>* >(this)->StorageStart();

        get_allocator().Deallocate(string_storage);
      }
  }
# 30 "../../../../dist/include/nsPrivateSharableString.h" 2
# 40 "../../../../dist/include/nsPrivateSharableString.h"
class nsPrivateSharableString
  {
    public:
      typedef PRUnichar char_type;

    public:
      virtual ~nsPrivateSharableString() {}

      virtual PRUint32 GetImplementationFlags() const;
      virtual const nsBufferHandle<char_type>* GetFlatBufferHandle() const;
      virtual const nsBufferHandle<char_type>* GetBufferHandle() const;
      virtual const nsSharedBufferHandle<char_type>* GetSharedBufferHandle() const;







  };

class nsPrivateSharableCString
  {
    public:
      typedef char char_type;

    public:
      virtual ~nsPrivateSharableCString() {}

      virtual PRUint32 GetImplementationFlags() const;
      virtual const nsBufferHandle<char_type>* GetFlatBufferHandle() const;
      virtual const nsBufferHandle<char_type>* GetBufferHandle() const;
      virtual const nsSharedBufferHandle<char_type>* GetSharedBufferHandle() const;







  };
# 33 "../../../../dist/include/nsAString.h" 2



# 1 "../../../../dist/include/nsCharTraits.h" 1
# 27 "../../../../dist/include/nsCharTraits.h"
# 1 "/usr/include/ctype.h" 1 3
# 26 "/usr/include/ctype.h" 3
# 1 "/usr/include/features.h" 1 3
# 27 "/usr/include/ctype.h" 2 3
# 1 "/usr/include/bits/types.h" 1 3
# 28 "/usr/include/ctype.h" 2 3

extern "C" {
# 40 "/usr/include/ctype.h" 3
# 1 "/usr/include/endian.h" 1 3
# 41 "/usr/include/ctype.h" 2 3






enum
{
  _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)),
  _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)),
  _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)),
  _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)),
  _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)),
  _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)),
  _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)),
  _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)),
  _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)),
  _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)),
  _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)),
  _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8))
};
# 75 "/usr/include/ctype.h" 3
extern __const unsigned short int *__ctype_b;
extern __const __int32_t *__ctype_tolower;
extern __const __int32_t *__ctype_toupper;
# 91 "/usr/include/ctype.h" 3
extern int isalnum (int) throw ();
extern int isalpha (int) throw ();
extern int iscntrl (int) throw ();
extern int isdigit (int) throw ();
extern int islower (int) throw ();
extern int isgraph (int) throw ();
extern int isprint (int) throw ();
extern int ispunct (int) throw ();
extern int isspace (int) throw ();
extern int isupper (int) throw ();
extern int isxdigit (int) throw ();


extern int isblank (int) throw ();




extern int tolower (int __c) throw ();


extern int toupper (int __c) throw ();






extern int isascii (int __c) throw ();



extern int toascii (int __c) throw ();



extern int _toupper (int) throw ();
extern int _tolower (int) throw ();
# 167 "/usr/include/ctype.h" 3
extern __inline int
tolower (int __c) throw ()
{
  return __c >= -128 && __c < 256 ? __ctype_tolower[__c] : __c;
}

extern __inline int
toupper (int __c) throw ()
{
  return __c >= -128 && __c < 256 ? __ctype_toupper[__c] : __c;
}
# 210 "/usr/include/ctype.h" 3
# 1 "/usr/include/xlocale.h" 1 3
# 211 "/usr/include/ctype.h" 2 3
# 223 "/usr/include/ctype.h" 3
extern int __isalnum_l (int, __locale_t) throw ();
extern int __isalpha_l (int, __locale_t) throw ();
extern int __iscntrl_l (int, __locale_t) throw ();
extern int __isdigit_l (int, __locale_t) throw ();
extern int __islower_l (int, __locale_t) throw ();
extern int __isgraph_l (int, __locale_t) throw ();
extern int __isprint_l (int, __locale_t) throw ();
extern int __ispunct_l (int, __locale_t) throw ();
extern int __isspace_l (int, __locale_t) throw ();
extern int __isupper_l (int, __locale_t) throw ();
extern int __isxdigit_l (int, __locale_t) throw ();

extern int __isblank_l (int, __locale_t) throw ();



extern int __tolower_l (int __c, __locale_t __l) throw ();


extern int __toupper_l (int __c, __locale_t __l) throw ();
# 276 "/usr/include/ctype.h" 3
}
# 28 "../../../../dist/include/nsCharTraits.h" 2


# 1 "/usr/include/string.h" 1 3
# 31 "../../../../dist/include/nsCharTraits.h" 2
# 39 "../../../../dist/include/nsCharTraits.h"
# 1 "../../../../dist/include/nsStringIteratorUtils.h" 1
# 27 "../../../../dist/include/nsStringIteratorUtils.h"
template <class Iterator>
inline
PRBool
SameFragment( const Iterator& lhs, const Iterator& rhs )
  {
    return lhs.fragment().mStart == rhs.fragment().mStart;
  }

template <class CharT> class nsReadingIterator;




       size_t Distance( const nsReadingIterator<PRUnichar>&, const nsReadingIterator<PRUnichar>& );
       size_t Distance( const nsReadingIterator<char>&, const nsReadingIterator<char>& );
# 40 "../../../../dist/include/nsCharTraits.h" 2





  typedef PRBool nsCharTraits_bool;


template <class CharT>
struct nsCharTraits
  {
    typedef CharT char_type;
    typedef char incompatible_char_type;

    static
    void
    assign( char_type& lhs, const char_type& rhs )
      {
        lhs = rhs;
      }




    typedef int int_type;

    static
    char_type
    to_char_type( const int_type& c )
      {
        return char_type(c);
      }

    static
    int_type
    to_int_type( const char_type& c )
      {
        return int_type(c);
      }

    static
    nsCharTraits_bool
    eq_int_type( const int_type& lhs, const int_type& rhs )
      {
        return lhs == rhs;
      }




    static
    nsCharTraits_bool
    eq( const char_type& lhs, const char_type& rhs )
      {
        return lhs == rhs;
      }

    static
    nsCharTraits_bool
    lt( const char_type& lhs, const char_type& rhs )
      {
        return lhs < rhs;
      }




    static
    char_type*
    copy( char_type* s1, const char_type* s2, size_t n )
      {
        char_type* result = s1;
        while ( n-- )
          assign(*s1++, *s2++);
        return result;
      }

    static
    char_type*
    move( char_type* s1, const char_type* s2, size_t n )
      {
        char_type* result = s1;

        if ( n )
          {
            if ( s2 > s1 )
              copy(s1, s2, n);
            else
              {
                s1 += n;
                s2 += n;
                while ( n-- )
                  assign(*--s1, *--s2);
              }
          }

        return result;
      }

    static
    char_type*
    assign( char_type* s, size_t n, const char_type& c )
      {
        char_type* result = s;
        while ( n-- )
          assign(*s++, c);
        return result;
      }

    static
    int
    compare( const char_type* s1, const char_type* s2, size_t n )
      {
        for ( ; n--; ++s1, ++s2 )
          {
            if ( lt(*s1, *s2) )
              return -1;
            if ( lt(*s2, *s1) )
              return 1;
          }

        return 0;
      }

    static
    size_t
    length( const char_type* s )
      {
        size_t result = 0;
        while ( !eq(*s++, CharT(0)) )
          ++result;
        return result;
      }

    static
    const char_type*
    find( const char_type* s, size_t n, const char_type& c )
      {
        while ( n-- )
          {
            if ( eq(*s, c) )
              return s;
            ++s;
          }

        return 0;
      }
# 211 "../../../../dist/include/nsCharTraits.h"
  };

template <>
struct nsCharTraits<char>
  {
    typedef char char_type;
    typedef PRUnichar incompatible_char_type;

    static
    void
    assign( char& lhs, char rhs )
      {
        lhs = rhs;
      }




    typedef int int_type;

    static
    char
    to_char_type( int c )
      {
        return char(c);
      }

    static
    int
    to_int_type( char c )
      {
        return int( static_cast< unsigned char >(c) );
      }

    static
    nsCharTraits_bool
    eq_int_type( int lhs, int rhs )
      {
        return lhs == rhs;
      }




    static
    nsCharTraits_bool
    eq( char lhs, char rhs )
      {
        return lhs == rhs;
      }

    static
    nsCharTraits_bool
    lt( char lhs, char rhs )
      {
        return lhs < rhs;
      }




    static
    char*
    move( char* s1, const char* s2, size_t n )
      {
        return static_cast< char* >(memmove(s1, s2, n));
      }

    static
    char*
    copy( char* s1, const char* s2, size_t n )
      {
        return static_cast< char* >(memcpy(s1, s2, n));
      }

    static
    char*
    assign( char* s, size_t n, char c )
      {
        return static_cast< char* >(memset(s, to_int_type(c), n));
      }

    static
    int
    compare( const char* s1, const char* s2, size_t n )
      {
        return memcmp(s1, s2, n);
      }

    static
    size_t
    length( const char* s )
      {
        return strlen(s);
      }

    static
    const char*
    find( const char* s, size_t n, char c )
      {
        return reinterpret_cast< const char* >(memchr(s, to_int_type(c), n));
      }
# 337 "../../../../dist/include/nsCharTraits.h"
  };
# 466 "../../../../dist/include/nsCharTraits.h"
template <class InputIterator>
struct nsCharSourceTraits
  {
    typedef typename InputIterator::difference_type difference_type;
# 480 "../../../../dist/include/nsCharTraits.h"
    static
    PRUint32
    readable_distance( const InputIterator& iter )
      {
        return iter.size_forward();
      }

    static
    PRUint32
    readable_distance( const InputIterator& first, const InputIterator& last )
      {
        return PRUint32(SameFragment(first, last) ? last.get()-first.get() : first.size_forward());
      }

    static
    const typename InputIterator::value_type*
    read( const InputIterator& iter )
      {
        return iter.get();
      }

    static
    void
    advance( InputIterator& s, difference_type n )
      {
        s.advance(n);
      }
  };



template <class CharT>
struct nsCharSourceTraits<CharT*>
  {
    typedef ptrdiff_t difference_type;
# 525 "../../../../dist/include/nsCharTraits.h"
    static
    PRUint32
    readable_distance( CharT* s )
      {
        return PRUint32(nsCharTraits<CharT>::length(s));

      }

    static
    PRUint32
    readable_distance( CharT* first, CharT* last )
      {
        return PRUint32(last-first);
      }

    static
    const CharT*
    read( CharT* s )
      {
        return s;
      }

    static
    void
    advance( CharT*& s, difference_type n )
      {
        s += n;
      }
  };
# 649 "../../../../dist/include/nsCharTraits.h"
template <class OutputIterator>
struct nsCharSinkTraits
  {
    static
    PRUint32
    write( OutputIterator& iter, const typename OutputIterator::value_type* s, PRUint32 n )
      {
        return iter.write(s, n);
      }
  };



template <class CharT>
struct nsCharSinkTraits<CharT*>
  {
    static
    PRUint32
    write( CharT*& iter, const CharT* s, PRUint32 n )
      {
        nsCharTraits<CharT>::move(iter, s, n);
        iter += n;
        return n;
      }
  };
# 37 "../../../../dist/include/nsAString.h" 2



# 1 "../../../../dist/include/nsStringIterator.h" 1
# 28 "../../../../dist/include/nsStringIterator.h"
# 1 "../../../../dist/include/nsStringFragment.h" 1
# 38 "../../../../dist/include/nsStringFragment.h"
enum nsFragmentRequest { kPrevFragment, kFirstFragment, kLastFragment, kNextFragment, kFragmentAt };
# 53 "../../../../dist/include/nsStringFragment.h"
template <class CharT>
struct nsReadableFragment
  {
    const CharT* mStart;
    const CharT* mEnd;
    const void* mFragmentIdentifier;

    nsReadableFragment()
        : mStart(0), mEnd(0), mFragmentIdentifier(0)
      {

      }
  };
# 80 "../../../../dist/include/nsStringFragment.h"
template <class CharT>
struct nsWritableFragment
  {
    CharT* mStart;
    CharT* mEnd;
    void* mFragmentIdentifier;

    nsWritableFragment()
        : mStart(0), mEnd(0), mFragmentIdentifier(0)
      {

      }
  };
# 29 "../../../../dist/include/nsStringIterator.h" 2







# 1 "../../../../dist/include/nsStringTraits.h" 1
# 44 "../../../../dist/include/nsStringTraits.h"
template <class CharT>
struct nsStringTraits
  {
    typedef nsAString abstract_string_type;
    typedef nsAPromiseString abstract_promise_type;
    typedef nsAFlatString abstract_flat_type;
    typedef const nsDependentString literal_string_type;
  };
# 66 "../../../../dist/include/nsStringTraits.h"
template <>
struct nsStringTraits<char>
  {
    typedef nsACString abstract_string_type;
    typedef nsAPromiseCString abstract_promise_type;
    typedef nsAFlatCString abstract_flat_type;
    typedef const nsDependentCString literal_string_type;
  };
# 37 "../../../../dist/include/nsStringIterator.h" 2



# 1 "../../../../dist/include/nsAlgorithm.h" 1
# 38 "../../../../dist/include/nsAlgorithm.h"
template <class T>
inline
const T&
NS_MIN( const T& a, const T& b )
  {
    return b < a ? b : a;
  }

template <class T>
inline
const T&
NS_MAX( const T& a, const T& b )
  {
    return a > b ? a : b;
  }

template <class InputIterator, class T>
inline
PRUint32
NS_COUNT( InputIterator& first, const InputIterator& last, const T& value )
  {
    PRUint32 result = 0;
    for ( ; first != last; ++first )
      if ( *first == value )
        ++result;
    return result;
  }

template <class InputIterator, class OutputIterator>
inline
OutputIterator&
copy_string( InputIterator& first, const InputIterator& last, OutputIterator& result )
  {
    typedef nsCharSourceTraits<InputIterator> source_traits;
    typedef nsCharSinkTraits<OutputIterator> sink_traits;

    while ( first != last )
      {
        PRInt32 count_copied = PRInt32(sink_traits::write(result, source_traits::read(first), source_traits::readable_distance(first, last)));
        {};
        source_traits::advance(first, count_copied);
      }

    return result;
  }

template <class InputIterator, class OutputIterator>
OutputIterator&
copy_string_backward( const InputIterator& first, InputIterator& last, OutputIterator& result )
  {
    while ( first != last )
      {
        last.normalize_backward();
        result.normalize_backward();
        PRUint32 lengthToCopy = PRUint32( NS_MIN(last.size_backward(), result.size_backward()) );
        if ( first.fragment().mStart == last.fragment().mStart )
          lengthToCopy = NS_MIN(lengthToCopy, PRUint32(last.get() - first.get()));

        {};





        nsCharTraits<typename OutputIterator::value_type>::move(result.get()-lengthToCopy, last.get()-lengthToCopy, lengthToCopy);


        last.advance( -PRInt32(lengthToCopy) );
        result.advance( -PRInt32(lengthToCopy) );
      }

    return result;
  }
# 41 "../../../../dist/include/nsStringIterator.h" 2
# 55 "../../../../dist/include/nsStringIterator.h"
template <class CharT>
class nsReadingIterator

  {
    public:
      typedef ptrdiff_t difference_type;
      typedef CharT value_type;
      typedef const CharT* pointer;
      typedef const CharT& reference;


    private:
      friend class nsAString;
      friend class nsACString;
      typedef typename nsStringTraits<CharT>::abstract_string_type string_type;

      nsReadableFragment<CharT> mFragment;
      const CharT* mPosition;
      const string_type* mOwningString;

    public:
      nsReadingIterator() { }



      inline void normalize_forward();
      inline void normalize_backward();

      pointer
      get() const
        {
          return mPosition;
        }

      CharT
      operator*() const
        {
          return *get();
        }
# 105 "../../../../dist/include/nsStringIterator.h"
      nsReadingIterator<CharT>&
      operator++()
        {
          ++mPosition;
          normalize_forward();
          return *this;
        }

      nsReadingIterator<CharT>
      operator++( int )
        {
          nsReadingIterator<CharT> result(*this);
          ++mPosition;
          normalize_forward();
          return result;
        }

      nsReadingIterator<CharT>&
      operator--()
        {
          normalize_backward();
          --mPosition;
          return *this;
        }

      nsReadingIterator<CharT>
      operator--( int )
        {
          nsReadingIterator<CharT> result(*this);
          normalize_backward();
          --mPosition;
          return result;
        }

      const nsReadableFragment<CharT>&
      fragment() const
        {
          return mFragment;
        }

      const string_type&
      string() const
        {
          {};
          return *mOwningString;
        }

      difference_type
      size_forward() const
        {
          return mFragment.mEnd - mPosition;
        }

      difference_type
      size_backward() const
        {
          return mPosition - mFragment.mStart;
        }

      nsReadingIterator<CharT>&
      advance( difference_type n )
        {
          while ( n > 0 )
            {
              difference_type one_hop = NS_MIN(n, size_forward());

              {};


              mPosition += one_hop;
              normalize_forward();
              n -= one_hop;
            }

          while ( n < 0 )
            {
              normalize_backward();
              difference_type one_hop = NS_MAX(n, -size_backward());

              {};


              mPosition += one_hop;
              n -= one_hop;
            }

          return *this;
        }
  };

template <class CharT>
class nsWritingIterator

  {
    public:
      typedef ptrdiff_t difference_type;
      typedef CharT value_type;
      typedef CharT* pointer;
      typedef CharT& reference;


    private:
      friend class nsAString;
      friend class nsACString;
      typedef typename nsStringTraits<CharT>::abstract_string_type string_type;

      nsWritableFragment<CharT> mFragment;
      CharT* mPosition;
      string_type* mOwningString;

    public:
      nsWritingIterator() { }



      inline void normalize_forward();
      inline void normalize_backward();

      pointer
      get() const
        {
          return mPosition;
        }

      reference
      operator*() const
        {
          return *get();
        }
# 245 "../../../../dist/include/nsStringIterator.h"
      nsWritingIterator<CharT>&
      operator++()
        {
          ++mPosition;
          normalize_forward();
          return *this;
        }

      nsWritingIterator<CharT>
      operator++( int )
        {
          nsWritingIterator<CharT> result(*this);
          ++mPosition;
          normalize_forward();
          return result;
        }

      nsWritingIterator<CharT>&
      operator--()
        {
          normalize_backward();
          --mPosition;
          return *this;
        }

      nsWritingIterator<CharT>
      operator--( int )
        {
          nsWritingIterator<CharT> result(*this);
          normalize_backward();
          --mPosition;
          return result;
        }

      const nsWritableFragment<CharT>&
      fragment() const
        {
          return mFragment;
        }

      nsWritableFragment<CharT>&
      fragment()
        {
          return mFragment;
        }

      const string_type&
      string() const
        {
          {};
          return *mOwningString;
        }

      string_type&
      string()
        {
          {};
          return *mOwningString;
        }

      difference_type
      size_forward() const
        {
          return mFragment.mEnd - mPosition;
        }

      difference_type
      size_backward() const
        {
          return mPosition - mFragment.mStart;
        }

      nsWritingIterator<CharT>&
      advance( difference_type n )
        {
          while ( n > 0 )
            {
              difference_type one_hop = NS_MIN(n, size_forward());

              {};


              mPosition += one_hop;
              normalize_forward();
              n -= one_hop;
            }

          while ( n < 0 )
            {
              normalize_backward();
              difference_type one_hop = NS_MAX(n, -size_backward());

              {};


              mPosition += one_hop;
              n -= one_hop;
            }

          return *this;
        }

      PRUint32
      write( const value_type* s, PRUint32 n )
        {
          {};

          n = NS_MIN(n, PRUint32(size_forward()));
          nsCharTraits<value_type>::move(mPosition, s, n);
          advance( difference_type(n) );
          return n;
        }
  };

template <class CharT>
inline
void
nsReadingIterator<CharT>::normalize_forward()
  {
    while ( mPosition == mFragment.mEnd
         && mOwningString->GetReadableFragment(mFragment, kNextFragment) )
        mPosition = mFragment.mStart;
  }

template <class CharT>
inline
void
nsReadingIterator<CharT>::normalize_backward()
  {
    while ( mPosition == mFragment.mStart
         && mOwningString->GetReadableFragment(mFragment, kPrevFragment) )
        mPosition = mFragment.mEnd;
  }

template <class CharT>
inline
PRBool
operator==( const nsReadingIterator<CharT>& lhs, const nsReadingIterator<CharT>& rhs )
  {
    return lhs.get() == rhs.get();
  }

template <class CharT>
inline
PRBool
operator!=( const nsReadingIterator<CharT>& lhs, const nsReadingIterator<CharT>& rhs )
  {
    return lhs.get() != rhs.get();
  }






template <class CharT>
inline
void
nsWritingIterator<CharT>::normalize_forward()
  {
    while ( mPosition == mFragment.mEnd
         && mOwningString->GetWritableFragment(mFragment, kNextFragment) )
      mPosition = mFragment.mStart;
  }

template <class CharT>
inline
void
nsWritingIterator<CharT>::normalize_backward()
  {
    while ( mPosition == mFragment.mStart
         && mOwningString->GetWritableFragment(mFragment, kPrevFragment) )
      mPosition = mFragment.mEnd;
  }

template <class CharT>
inline
PRBool
operator==( const nsWritingIterator<CharT>& lhs, const nsWritingIterator<CharT>& rhs )
  {
    return lhs.get() == rhs.get();
  }

template <class CharT>
inline
PRBool
operator!=( const nsWritingIterator<CharT>& lhs, const nsWritingIterator<CharT>& rhs )
  {
    return lhs.get() != rhs.get();
  }
# 41 "../../../../dist/include/nsAString.h" 2







class nsAString
    : public nsPrivateSharableString
  {
    public:
      typedef nsAString self_type;
      typedef nsAPromiseString promise_type;
      typedef PRUnichar char_type;
      typedef char incompatible_char_type;


      typedef nsReadingIterator<char_type> const_iterator;
      typedef nsWritingIterator<char_type> iterator;

      typedef PRUint32 size_type;
      typedef PRUint32 index_type;






      virtual ~nsAString() { }

      inline const_iterator& BeginReading( const_iterator& ) const;
      inline const_iterator& EndReading( const_iterator& ) const;

      inline iterator& BeginWriting( iterator& );
      inline iterator& EndWriting( iterator& );

      virtual size_type Length() const = 0;
      PRBool IsEmpty() const { return Length() == 0; }

      inline PRBool Equals( const self_type& ) const;
      PRBool Equals( const char_type* ) const;







      char_type First() const;
      char_type Last() const;

      size_type CountChar( char_type ) const;
# 112 "../../../../dist/include/nsAString.h"
      size_type Left( self_type&, size_type ) const;
      size_type Mid( self_type&, PRUint32, PRUint32 ) const;
      size_type Right( self_type&, size_type ) const;


      PRInt32 FindChar( char_type, index_type aOffset = 0 ) const;
# 128 "../../../../dist/include/nsAString.h"
      virtual void SetCapacity( size_type ) { }
# 143 "../../../../dist/include/nsAString.h"
      virtual void SetLength( size_type ) { }


      void
      Truncate( size_type aNewLength=0 )
        {
          {};

          if ( aNewLength < this->Length() )
            SetLength(aNewLength);
        }
# 178 "../../../../dist/include/nsAString.h"
      void Assign( const self_type& aReadable ) { AssignFromReadable(aReadable); }
      inline void Assign( const promise_type& aReadable );
      void Assign( const char_type* aPtr ) { aPtr ? do_AssignFromElementPtr(aPtr) : SetLength(0); }
      void Assign( const char_type* aPtr, size_type aLength ) { do_AssignFromElementPtrLength(aPtr, aLength); }
      void Assign( char_type aChar ) { do_AssignFromElement(aChar); }


      self_type& operator=( const self_type& aReadable ) { Assign(aReadable); return *this; }

      self_type& operator=( const promise_type& aReadable ) { Assign(aReadable); return *this; }
      self_type& operator=( const char_type* aPtr ) { Assign(aPtr); return *this; }
      self_type& operator=( char_type aChar ) { Assign(aChar); return *this; }







      void Append( const self_type& aReadable ) { AppendFromReadable(aReadable); }
      inline void Append( const promise_type& aReadable );
      void Append( const char_type* aPtr ) { if (aPtr) do_AppendFromElementPtr(aPtr); }
      void Append( const char_type* aPtr, size_type aLength ) { do_AppendFromElementPtrLength(aPtr, aLength); }
      void Append( char_type aChar ) { do_AppendFromElement(aChar); }

      self_type& operator+=( const self_type& aReadable ) { Append(aReadable); return *this; }
      self_type& operator+=( const promise_type& aReadable ) { Append(aReadable); return *this; }
      self_type& operator+=( const char_type* aPtr ) { Append(aPtr); return *this; }
      self_type& operator+=( char_type aChar ) { Append(aChar); return *this; }
# 219 "../../../../dist/include/nsAString.h"
      void Insert( const self_type& aReadable, index_type atPosition ) { InsertFromReadable(aReadable, atPosition); }
      inline void Insert( const promise_type& aReadable, index_type atPosition );
      void Insert( const char_type* aPtr, index_type atPosition ) { if (aPtr) do_InsertFromElementPtr(aPtr, atPosition); }
      void Insert( const char_type* aPtr, index_type atPosition, size_type aLength ) { do_InsertFromElementPtrLength(aPtr, atPosition, aLength); }
      void Insert( char_type aChar, index_type atPosition ) { do_InsertFromElement(aChar, atPosition); }



      virtual void Cut( index_type cutStart, size_type cutLength );



      void Replace( index_type cutStart, size_type cutLength, const self_type& aReadable ) { ReplaceFromReadable(cutStart, cutLength, aReadable); }


    private:

      index_type CountChar( incompatible_char_type ) const;
      void operator= ( incompatible_char_type );
      void Assign ( incompatible_char_type );
      void operator+= ( incompatible_char_type );
      void Append ( incompatible_char_type );
      void Insert ( incompatible_char_type, index_type );


    protected:
              void AssignFromReadable( const self_type& );
              void AssignFromPromise( const self_type& );
      virtual void do_AssignFromReadable( const self_type& );
      virtual void do_AssignFromElementPtr( const char_type* );
      virtual void do_AssignFromElementPtrLength( const char_type*, size_type );
      virtual void do_AssignFromElement( char_type );

              void AppendFromReadable( const self_type& );
              void AppendFromPromise( const self_type& );
      virtual void do_AppendFromReadable( const self_type& );
      virtual void do_AppendFromElementPtr( const char_type* );
      virtual void do_AppendFromElementPtrLength( const char_type*, size_type );
      virtual void do_AppendFromElement( char_type );

              void InsertFromReadable( const self_type&, index_type );
              void InsertFromPromise( const self_type&, index_type );
      virtual void do_InsertFromReadable( const self_type&, index_type );
      virtual void do_InsertFromElementPtr( const char_type*, index_type );
      virtual void do_InsertFromElementPtrLength( const char_type*, index_type, size_type );
      virtual void do_InsertFromElement( char_type, index_type );

              void ReplaceFromReadable( index_type, size_type, const self_type& );
              void ReplaceFromPromise( index_type, size_type, const self_type& );
      virtual void do_ReplaceFromReadable( index_type, size_type, const self_type& );



    public:
      virtual const char_type* GetReadableFragment( nsReadableFragment<char_type>&, nsFragmentRequest, PRUint32 = 0 ) const = 0;
      virtual char_type* GetWritableFragment( nsWritableFragment<char_type>&, nsFragmentRequest, PRUint32 = 0 ) = 0;
      virtual PRBool IsDependentOn( const self_type& aString ) const { return &aString == this; }
  };

class nsACString
    : public nsPrivateSharableCString
  {
    public:
      typedef nsACString self_type;
      typedef nsAPromiseCString promise_type;
      typedef char char_type;
      typedef PRUnichar incompatible_char_type;


      typedef nsReadingIterator<char_type> const_iterator;
      typedef nsWritingIterator<char_type> iterator;

      typedef PRUint32 size_type;
      typedef PRUint32 index_type;






      virtual ~nsACString() { }

      inline const_iterator& BeginReading( const_iterator& ) const;
      inline const_iterator& EndReading( const_iterator& ) const;

      inline iterator& BeginWriting( iterator& );
      inline iterator& EndWriting( iterator& );

      virtual size_type Length() const = 0;
      PRBool IsEmpty() const { return Length() == 0; }

      inline PRBool Equals( const self_type& ) const;
      PRBool Equals( const char_type* ) const;







      char_type First() const;
      char_type Last() const;

      size_type CountChar( char_type ) const;
# 342 "../../../../dist/include/nsAString.h"
      size_type Left( self_type&, size_type ) const;
      size_type Mid( self_type&, PRUint32, PRUint32 ) const;
      size_type Right( self_type&, size_type ) const;


      PRInt32 FindChar( char_type, PRUint32 aOffset = 0 ) const;
# 358 "../../../../dist/include/nsAString.h"
      virtual void SetCapacity( size_type ) { }
# 373 "../../../../dist/include/nsAString.h"
      virtual void SetLength( size_type ) { }


      void
      Truncate( size_type aNewLength=0 )
        {
          {};

          if ( aNewLength < this->Length() )
            SetLength(aNewLength);
        }
# 408 "../../../../dist/include/nsAString.h"
      void Assign( const self_type& aReadable ) { AssignFromReadable(aReadable); }
      inline void Assign( const promise_type& aReadable );
      void Assign( const char_type* aPtr ) { aPtr ? do_AssignFromElementPtr(aPtr) : SetLength(0); }
      void Assign( const char_type* aPtr, size_type aLength ) { do_AssignFromElementPtrLength(aPtr, aLength); }
      void Assign( char_type aChar ) { do_AssignFromElement(aChar); }


      self_type& operator=( const self_type& aReadable ) { Assign(aReadable); return *this; }

      self_type& operator=( const promise_type& aReadable ) { Assign(aReadable); return *this; }
      self_type& operator=( const char_type* aPtr ) { Assign(aPtr); return *this; }
      self_type& operator=( char_type aChar ) { Assign(aChar); return *this; }







      void Append( const self_type& aReadable ) { AppendFromReadable(aReadable); }
      inline void Append( const promise_type& aReadable );
      void Append( const char_type* aPtr ) { if (aPtr) do_AppendFromElementPtr(aPtr); }
      void Append( const char_type* aPtr, size_type aLength ) { do_AppendFromElementPtrLength(aPtr, aLength); }
      void Append( char_type aChar ) { do_AppendFromElement(aChar); }

      self_type& operator+=( const self_type& aReadable ) { Append(aReadable); return *this; }
      self_type& operator+=( const promise_type& aReadable ) { Append(aReadable); return *this; }
      self_type& operator+=( const char_type* aPtr ) { Append(aPtr); return *this; }
      self_type& operator+=( char_type aChar ) { Append(aChar); return *this; }
# 449 "../../../../dist/include/nsAString.h"
      void Insert( const self_type& aReadable, index_type atPosition ) { InsertFromReadable(aReadable, atPosition); }
      inline void Insert( const promise_type& aReadable, index_type atPosition );
      void Insert( const char_type* aPtr, index_type atPosition ) { if (aPtr) do_InsertFromElementPtr(aPtr, atPosition); }
      void Insert( const char_type* aPtr, index_type atPosition, size_type aLength ) { do_InsertFromElementPtrLength(aPtr, atPosition, aLength); }
      void Insert( char_type aChar, index_type atPosition ) { do_InsertFromElement(aChar, atPosition); }



      virtual void Cut( index_type cutStart, size_type cutLength );



      void Replace( index_type cutStart, size_type cutLength, const self_type& aReadable ) { ReplaceFromReadable(cutStart, cutLength, aReadable); }


    private:

      index_type CountChar( incompatible_char_type ) const;
      void operator= ( incompatible_char_type );
      void Assign ( incompatible_char_type );
      void operator+= ( incompatible_char_type );
      void Append ( incompatible_char_type );
      void Insert ( incompatible_char_type, index_type );


    protected:
              void AssignFromReadable( const self_type& );
              void AssignFromPromise( const self_type& );
      virtual void do_AssignFromReadable( const self_type& );
      virtual void do_AssignFromElementPtr( const char_type* );
      virtual void do_AssignFromElementPtrLength( const char_type*, size_type );
      virtual void do_AssignFromElement( char_type );

              void AppendFromReadable( const self_type& );
              void AppendFromPromise( const self_type& );
      virtual void do_AppendFromReadable( const self_type& );
      virtual void do_AppendFromElementPtr( const char_type* );
      virtual void do_AppendFromElementPtrLength( const char_type*, size_type );
      virtual void do_AppendFromElement( char_type );

              void InsertFromReadable( const self_type&, index_type );
              void InsertFromPromise( const self_type&, index_type );
      virtual void do_InsertFromReadable( const self_type&, index_type );
      virtual void do_InsertFromElementPtr( const char_type*, index_type );
      virtual void do_InsertFromElementPtrLength( const char_type*, index_type, size_type );
      virtual void do_InsertFromElement( char_type, index_type );

              void ReplaceFromReadable( index_type, size_type, const self_type& );
              void ReplaceFromPromise( index_type, size_type, const self_type& );
      virtual void do_ReplaceFromReadable( index_type, size_type, const self_type& );



    public:
      virtual const char_type* GetReadableFragment( nsReadableFragment<char_type>&, nsFragmentRequest, PRUint32 = 0 ) const = 0;
      virtual char_type* GetWritableFragment( nsWritableFragment<char_type>&, nsFragmentRequest, PRUint32 = 0 ) = 0;
      virtual PRBool IsDependentOn( const self_type& aString ) const { return &aString == this; }
  };

# 1 "../../../../dist/include/nsAPromiseString.h" 1
# 35 "../../../../dist/include/nsAPromiseString.h"
class nsAPromiseString : public nsAString { };
class nsAPromiseCString : public nsACString { };
# 509 "../../../../dist/include/nsAString.h" 2

inline
void
nsAString::Assign( const nsAPromiseString& aReadable )
  {
    AssignFromPromise(aReadable);
  }

inline
void
nsAString::Append( const nsAPromiseString& aReadable )
  {
    AppendFromPromise(aReadable);
  }

inline
void
nsAString::Insert( const nsAPromiseString& aReadable, index_type atPosition )
  {
    InsertFromPromise(aReadable, atPosition);
  }

inline
void
nsACString::Assign( const nsAPromiseCString& aReadable )
  {
    AssignFromPromise(aReadable);
  }

inline
void
nsACString::Append( const nsAPromiseCString& aReadable )
  {
    AppendFromPromise(aReadable);
  }

inline
void
nsACString::Insert( const nsAPromiseCString& aReadable, index_type atPosition )
  {
    InsertFromPromise(aReadable, atPosition);
  }





inline
nsAString::const_iterator&
nsAString::BeginReading( const_iterator& aResult ) const
  {
    aResult.mOwningString = this;
    GetReadableFragment(aResult.mFragment, kFirstFragment);
    aResult.mPosition = aResult.mFragment.mStart;
    aResult.normalize_forward();
    return aResult;
  }

inline
nsAString::const_iterator&
nsAString::EndReading( const_iterator& aResult ) const
  {
    aResult.mOwningString = this;
    GetReadableFragment(aResult.mFragment, kLastFragment);
    aResult.mPosition = aResult.mFragment.mEnd;

    return aResult;
  }

inline
nsAString::iterator&
nsAString::BeginWriting( iterator& aResult )
  {
    aResult.mOwningString = this;
    GetWritableFragment(aResult.mFragment, kFirstFragment);
    aResult.mPosition = aResult.mFragment.mStart;
    aResult.normalize_forward();
    return aResult;
  }


inline
nsAString::iterator&
nsAString::EndWriting( iterator& aResult )
  {
    aResult.mOwningString = this;
    GetWritableFragment(aResult.mFragment, kLastFragment);
    aResult.mPosition = aResult.mFragment.mEnd;

    return aResult;
  }

class nsStringComparator
  {
    public:
      virtual int operator()( const PRUnichar*, const PRUnichar*, PRUint32 aLength ) const = 0;
  };

class nsDefaultStringComparator
    : public nsStringComparator
  {
    public:
      virtual int operator()( const PRUnichar*, const PRUnichar*, PRUint32 aLength ) const;
  };

class nsCaseInsensitiveStringComparator
    : public nsStringComparator
  {
    public:
      virtual int operator()( const PRUnichar*, const PRUnichar*, PRUint32 aLength ) const;
  };

       int Compare( const nsAString& lhs, const nsAString& rhs, const nsStringComparator& = nsDefaultStringComparator() );

inline
PRBool
nsAString::Equals( const self_type& rhs ) const
  {
    return Length()==rhs.Length() && Compare(*this, rhs)==0;
  }

inline
PRBool
operator!=( const nsAString& lhs, const nsAString& rhs )
  {
    return !lhs.Equals(rhs);
  }

inline
PRBool
operator< ( const nsAString& lhs, const nsAString& rhs )
  {
    return Compare(lhs, rhs)< 0;
  }

inline
PRBool
operator<=( const nsAString& lhs, const nsAString& rhs )
  {
    return Compare(lhs, rhs)<=0;
  }

inline
PRBool
operator==( const nsAString& lhs, const nsAString& rhs )
  {
    return lhs.Equals(rhs);
  }

inline
PRBool
operator>=( const nsAString& lhs, const nsAString& rhs )
  {
    return Compare(lhs, rhs)>=0;
  }

inline
PRBool
operator> ( const nsAString& lhs, const nsAString& rhs )
  {
    return Compare(lhs, rhs)> 0;
  }

inline
nsAString::size_type
nsAString::Left( nsAString& aResult, size_type aLengthToCopy ) const
  {
    return Mid(aResult, 0, aLengthToCopy);
  }






inline
nsACString::const_iterator&
nsACString::BeginReading( const_iterator& aResult ) const
  {
    aResult.mOwningString = this;
    GetReadableFragment(aResult.mFragment, kFirstFragment);
    aResult.mPosition = aResult.mFragment.mStart;
    aResult.normalize_forward();
    return aResult;
  }

inline
nsACString::const_iterator&
nsACString::EndReading( const_iterator& aResult ) const
  {
    aResult.mOwningString = this;
    GetReadableFragment(aResult.mFragment, kLastFragment);
    aResult.mPosition = aResult.mFragment.mEnd;

    return aResult;
  }

inline
nsACString::iterator&
nsACString::BeginWriting( iterator& aResult )
  {
    aResult.mOwningString = this;
    GetWritableFragment(aResult.mFragment, kFirstFragment);
    aResult.mPosition = aResult.mFragment.mStart;
    aResult.normalize_forward();
    return aResult;
  }


inline
nsACString::iterator&
nsACString::EndWriting( iterator& aResult )
  {
    aResult.mOwningString = this;
    GetWritableFragment(aResult.mFragment, kLastFragment);
    aResult.mPosition = aResult.mFragment.mEnd;

    return aResult;
  }


class nsCStringComparator
  {
    public:
      virtual int operator()( const char*, const char*, PRUint32 aLength ) const = 0;
  };

class nsDefaultCStringComparator
    : public nsCStringComparator
  {
    public:
      virtual int operator()( const char*, const char*, PRUint32 aLength ) const;
  };

class nsCaseInsensitiveCStringComparator
    : public nsCStringComparator
  {
    public:
      virtual int operator()( const char*, const char*, PRUint32 aLength ) const;
  };

       int Compare( const nsACString& lhs, const nsACString& rhs, const nsCStringComparator& = nsDefaultCStringComparator() );

inline
PRBool
nsACString::Equals( const self_type& rhs ) const
  {
    return Length()==rhs.Length() && Compare(*this, rhs)==0;
  }

inline
PRBool
operator!=( const nsACString& lhs, const nsACString& rhs )
  {
    return !lhs.Equals(rhs);
  }

inline
PRBool
operator< ( const nsACString& lhs, const nsACString& rhs )
  {
    return Compare(lhs, rhs)< 0;
  }

inline
PRBool
operator<=( const nsACString& lhs, const nsACString& rhs )
  {
    return Compare(lhs, rhs)<=0;
  }

inline
PRBool
operator==( const nsACString& lhs, const nsACString& rhs )
  {
    return lhs.Equals(rhs);
  }

inline
PRBool
operator>=( const nsACString& lhs, const nsACString& rhs )
  {
    return Compare(lhs, rhs)>=0;
  }

inline
PRBool
operator> ( const nsACString& lhs, const nsACString& rhs )
  {
    return Compare(lhs, rhs)> 0;
  }

inline
nsACString::size_type
nsACString::Left( nsACString& aResult, size_type aLengthToCopy ) const
  {
    return Mid(aResult, 0, aLengthToCopy);
  }



# 1 "../../../../dist/include/nsDependentConcatenation.h" 1
# 50 "../../../../dist/include/nsDependentConcatenation.h"
class nsDependentConcatenation
    : public nsAPromiseString
  {
    public:
      typedef nsDependentConcatenation self_type;
      typedef PRUnichar char_type;
      typedef nsAString string_type;
      typedef string_type::const_iterator const_iterator;

    protected:
      virtual const char_type* GetReadableFragment( nsReadableFragment<char_type>&, nsFragmentRequest, PRUint32 ) const;
      virtual char_type* GetWritableFragment( nsWritableFragment<char_type>&, nsFragmentRequest, PRUint32 ) { return 0; }

      enum { kLeftString, kRightString };

      int
      GetCurrentStringFromFragment( const nsReadableFragment<char_type>& aFragment ) const
        {
          return (reinterpret_cast< PRUint32 >(aFragment.mFragmentIdentifier) & mFragmentIdentifierMask) ? kRightString : kLeftString;
        }

      int
      SetLeftStringInFragment( nsReadableFragment<char_type>& aFragment ) const
        {
          aFragment.mFragmentIdentifier = reinterpret_cast< void* >(reinterpret_cast< PRUint32 >(aFragment.mFragmentIdentifier) & ~mFragmentIdentifierMask);
          return kLeftString;
        }

      int
      SetRightStringInFragment( nsReadableFragment<char_type>& aFragment ) const
        {
          aFragment.mFragmentIdentifier = reinterpret_cast< void* >(reinterpret_cast< PRUint32 >(aFragment.mFragmentIdentifier) | mFragmentIdentifierMask);
          return kRightString;
        }

    public:
      nsDependentConcatenation( const string_type& aLeftString, const string_type& aRightString, PRUint32 aMask = 1 )
          : mFragmentIdentifierMask(aMask)
        {
          mStrings[kLeftString] = &aLeftString;
          mStrings[kRightString] = &aRightString;
        }

      nsDependentConcatenation( const self_type& aLeftString, const string_type& aRightString )
          : mFragmentIdentifierMask(aLeftString.mFragmentIdentifierMask<<1)
        {
          mStrings[kLeftString] = &aLeftString;
          mStrings[kRightString] = &aRightString;
        }




    private:

      void operator=( const self_type& );

    public:

      virtual PRUint32 Length() const;
      virtual PRBool IsDependentOn( const string_type& ) const;




      PRUint32 GetFragmentIdentifierMask() const { return mFragmentIdentifierMask; }

    private:
      void operator+( const self_type& );



    private:
      const string_type* mStrings[2];
      PRUint32 mFragmentIdentifierMask;
  };

class nsDependentCConcatenation
    : public nsAPromiseCString
  {
    public:
      typedef nsDependentCConcatenation self_type;
      typedef char char_type;
      typedef nsACString string_type;
      typedef string_type::const_iterator const_iterator;

    protected:
      virtual const char_type* GetReadableFragment( nsReadableFragment<char_type>&, nsFragmentRequest, PRUint32 ) const;
      virtual char_type* GetWritableFragment( nsWritableFragment<char_type>&, nsFragmentRequest, PRUint32 ) { return 0; }

      enum { kLeftString, kRightString };

      int
      GetCurrentStringFromFragment( const nsReadableFragment<char_type>& aFragment ) const
        {
          return (reinterpret_cast< PRUint32 >(aFragment.mFragmentIdentifier) & mFragmentIdentifierMask) ? kRightString : kLeftString;
        }

      int
      SetLeftStringInFragment( nsReadableFragment<char_type>& aFragment ) const
        {
          aFragment.mFragmentIdentifier = reinterpret_cast< void* >(reinterpret_cast< PRUint32 >(aFragment.mFragmentIdentifier) & ~mFragmentIdentifierMask);
          return kLeftString;
        }

      int
      SetRightStringInFragment( nsReadableFragment<char_type>& aFragment ) const
        {
          aFragment.mFragmentIdentifier = reinterpret_cast< void* >(reinterpret_cast< PRUint32 >(aFragment.mFragmentIdentifier) | mFragmentIdentifierMask);
          return kRightString;
        }

    public:
      nsDependentCConcatenation( const string_type& aLeftString, const string_type& aRightString, PRUint32 aMask = 1 )
          : mFragmentIdentifierMask(aMask)
        {
          mStrings[kLeftString] = &aLeftString;
          mStrings[kRightString] = &aRightString;
        }

      nsDependentCConcatenation( const self_type& aLeftString, const string_type& aRightString )
          : mFragmentIdentifierMask(aLeftString.mFragmentIdentifierMask<<1)
        {
          mStrings[kLeftString] = &aLeftString;
          mStrings[kRightString] = &aRightString;
        }




    private:

      void operator=( const self_type& );

    public:

      virtual PRUint32 Length() const;
      virtual PRBool IsDependentOn( const string_type& ) const;




      PRUint32 GetFragmentIdentifierMask() const { return mFragmentIdentifierMask; }

    private:
      void operator+( const self_type& );



    private:
      const string_type* mStrings[2];
      PRUint32 mFragmentIdentifierMask;
  };
# 224 "../../../../dist/include/nsDependentConcatenation.h"
inline
const nsDependentConcatenation
operator+( const nsDependentConcatenation& lhs, const nsAString& rhs )
  {
    return nsDependentConcatenation(lhs, rhs, lhs.GetFragmentIdentifierMask()<<1);
  }

inline
const nsDependentCConcatenation
operator+( const nsDependentCConcatenation& lhs, const nsACString& rhs )
  {
    return nsDependentCConcatenation(lhs, rhs, lhs.GetFragmentIdentifierMask()<<1);
  }

inline
const nsDependentConcatenation
operator+( const nsAString& lhs, const nsAString& rhs )
  {
    return nsDependentConcatenation(lhs, rhs);
  }

inline
const nsDependentCConcatenation
operator+( const nsACString& lhs, const nsACString& rhs )
  {
    return nsDependentCConcatenation(lhs, rhs);
  }
# 811 "../../../../dist/include/nsAString.h" 2
# 31 "../../../../dist/include/nsAReadableString.h" 2


typedef const nsAString nsAReadableString;
typedef const nsACString nsAReadableCString;


# 1 "../../../../dist/include/nsLiteralString.h" 1
# 32 "../../../../dist/include/nsLiteralString.h"
# 1 "../../../../dist/include/nsDependentString.h" 1
# 28 "../../../../dist/include/nsDependentString.h"
# 1 "../../../../dist/include/nsAFlatString.h" 1
# 33 "../../../../dist/include/nsAFlatString.h"
class nsAFlatString
    : public nsAString
  {
    public:

      virtual const PRUnichar* get() const;
      PRUnichar operator[]( PRUint32 i ) const { return get()[ i ]; }
      PRUnichar CharAt( PRUint32 ) const;

      virtual PRUint32 Length() const;


    public:
      virtual const PRUnichar* GetReadableFragment( nsReadableFragment<PRUnichar>&, nsFragmentRequest, PRUint32 ) const;
      virtual PRUnichar* GetWritableFragment( nsWritableFragment<PRUnichar>&, nsFragmentRequest, PRUint32 );
  };

class nsAFlatCString
    : public nsACString
  {
    public:

      virtual const char* get() const;
      char operator[]( PRUint32 i ) const { return get()[ i ]; }
      char CharAt( PRUint32 ) const;

      virtual PRUint32 Length() const;


    public:
      virtual const char* GetReadableFragment( nsReadableFragment<char>&, nsFragmentRequest, PRUint32 ) const;
      virtual char* GetWritableFragment( nsWritableFragment<char>&, nsFragmentRequest, PRUint32 );
  };

inline
PRUnichar
nsAFlatString::CharAt( PRUint32 i ) const
  {
    {};
    return operator[](i);
  }

inline
char
nsAFlatCString::CharAt( PRUint32 i ) const
  {
    {};
    return operator[](i);
  }
# 29 "../../../../dist/include/nsDependentString.h" 2
# 45 "../../../../dist/include/nsDependentString.h"
class nsDependentString
      : public nsAFlatString
  {
    public:
      void
      Rebind( const PRUnichar* aPtr )
        {
          mHandle.DataStart(aPtr);
          mHandle.DataEnd(aPtr ? (aPtr+nsCharTraits<PRUnichar>::length(aPtr)) : 0);
        }

      void
      Rebind( const PRUnichar* aStartPtr, const PRUnichar* aEndPtr )
        {
          mHandle.DataStart(aStartPtr);
          mHandle.DataEnd(aEndPtr);
        }

      void
      Rebind( const PRUnichar* aPtr, PRUint32 aLength )
        {
          if ( aLength == PRUint32(-1) )
            {

              Rebind(aPtr);
            }
          else
            Rebind(aPtr, aPtr+aLength);
        }

      nsDependentString( const PRUnichar* aStartPtr, const PRUnichar* aEndPtr ) { Rebind(aStartPtr, aEndPtr); }
      nsDependentString( const PRUnichar* aPtr, PRUint32 aLength ) { Rebind(aPtr, aLength); }
      explicit nsDependentString( const PRUnichar* aPtr ) { Rebind(aPtr); }




    private:

      void operator=( const nsDependentString& );

    public:
      virtual const nsBufferHandle<PRUnichar>* GetFlatBufferHandle() const { return reinterpret_cast< const nsBufferHandle<PRUnichar>* >(&mHandle); }
      virtual const nsBufferHandle<PRUnichar>* GetBufferHandle() const { return reinterpret_cast< const nsBufferHandle<PRUnichar>* >(&mHandle); }

    private:
      nsConstBufferHandle<PRUnichar> mHandle;
  };



class nsDependentCString
      : public nsAFlatCString
  {
    public:
      void
      Rebind( const char* aPtr )
        {
          mHandle.DataStart(aPtr);
          mHandle.DataEnd(aPtr ? (aPtr+nsCharTraits<char>::length(aPtr)) : 0);
        }

      void
      Rebind( const char* aStartPtr, const char* aEndPtr )
        {
          mHandle.DataStart(aStartPtr);
          mHandle.DataEnd(aEndPtr);
        }

      void
      Rebind( const char* aPtr, PRUint32 aLength )
        {
          if ( aLength == PRUint32(-1) )
            {

              Rebind(aPtr);
            }
          else
            Rebind(aPtr, aPtr+aLength);
        }

      nsDependentCString( const char* aStartPtr, const char* aEndPtr ) { Rebind(aStartPtr, aEndPtr); }
      nsDependentCString( const char* aPtr, PRUint32 aLength ) { Rebind(aPtr, aLength); }
      explicit nsDependentCString( const char* aPtr ) { Rebind(aPtr); }




    private:

      void operator=( const nsDependentCString& );

    public:
      virtual const nsBufferHandle<char>* GetFlatBufferHandle() const { return reinterpret_cast< const nsBufferHandle<char>* >(&mHandle); }
      virtual const nsBufferHandle<char>* GetBufferHandle() const { return reinterpret_cast< const nsBufferHandle<char>* >(&mHandle); }

    private:
      nsConstBufferHandle<char> mHandle;
  };
# 33 "../../../../dist/include/nsLiteralString.h" 2
# 38 "../../../../dist/include/nsAReadableString.h" 2



# 1 "../../../../dist/include/nsDependentSubstring.h" 1
# 41 "../../../../dist/include/nsDependentSubstring.h"
class nsDependentSubstring
      : public nsAPromiseString
# 51 "../../../../dist/include/nsDependentSubstring.h"
  {
    typedef nsAString string_type;
    typedef string_type::const_iterator const_iterator;

    protected:
      virtual const PRUnichar* GetReadableFragment( nsReadableFragment<PRUnichar>&, nsFragmentRequest, PRUint32 ) const;
      virtual PRUnichar* GetWritableFragment( nsWritableFragment<PRUnichar>&, nsFragmentRequest, PRUint32 ) { return 0; }

    public:
      nsDependentSubstring( const string_type& aString, PRUint32 aStartPos, PRUint32 aLength )
          : mString(aString),
            mStartPos( NS_MIN(aStartPos, aString.Length()) ),
            mLength( NS_MIN(aLength, aString.Length()-mStartPos) )
        {

        }

      nsDependentSubstring( const const_iterator& aStart, const const_iterator& aEnd )
          : mString(aStart.string())
        {
          const_iterator zeroPoint;
          mString.BeginReading(zeroPoint);
          mStartPos = Distance(zeroPoint, aStart);
          mLength = Distance(aStart, aEnd);
        }




    private:

      void operator=( const nsDependentSubstring& );

    public:
      virtual PRUint32 Length() const;
      virtual PRBool IsDependentOn( const string_type& aString ) const { return mString.IsDependentOn(aString); }

    private:
      const string_type& mString;
      PRUint32 mStartPos;
      PRUint32 mLength;
  };

class nsDependentCSubstring
      : public nsAPromiseCString
# 104 "../../../../dist/include/nsDependentSubstring.h"
  {
    typedef nsACString string_type;
    typedef string_type::const_iterator const_iterator;

    protected:
      virtual const char* GetReadableFragment( nsReadableFragment<char>&, nsFragmentRequest, PRUint32 ) const;
      virtual char* GetWritableFragment( nsWritableFragment<char>&, nsFragmentRequest, PRUint32 ) { return 0; }

    public:
      nsDependentCSubstring( const string_type& aString, PRUint32 aStartPos, PRUint32 aLength )
          : mString(aString),
            mStartPos( NS_MIN(aStartPos, aString.Length()) ),
            mLength( NS_MIN(aLength, aString.Length()-mStartPos) )
        {

        }

      nsDependentCSubstring( const const_iterator& aStart, const const_iterator& aEnd )
          : mString(aStart.string())
        {
          const_iterator zeroPoint;
          mString.BeginReading(zeroPoint);
          mStartPos = Distance(zeroPoint, aStart);
          mLength = Distance(aStart, aEnd);
        }




    private:

      void operator=( const nsDependentCSubstring& );

    public:
      virtual PRUint32 Length() const;
      virtual PRBool IsDependentOn( const string_type& aString ) const { return mString.IsDependentOn(aString); }

    private:
      const string_type& mString;
      PRUint32 mStartPos;
      PRUint32 mLength;
  };







inline
const nsDependentCSubstring
Substring( const nsACString& aString, PRUint32 aStartPos, PRUint32 aSubstringLength )
  {
    return nsDependentCSubstring(aString, aStartPos, aSubstringLength);
  }

inline
const nsDependentSubstring
Substring( const nsAString& aString, PRUint32 aStartPos, PRUint32 aSubstringLength )
  {
    return nsDependentSubstring(aString, aStartPos, aSubstringLength);
  }

inline
const nsDependentCSubstring
Substring( const nsReadingIterator<char>& aStart, const nsReadingIterator<char>& aEnd )
  {
    return nsDependentCSubstring(aStart, aEnd);
  }

inline
const nsDependentSubstring
Substring( const nsReadingIterator<PRUnichar>& aStart, const nsReadingIterator<PRUnichar>& aEnd )
  {
    return nsDependentSubstring(aStart, aEnd);
  }
# 42 "../../../../dist/include/nsAReadableString.h" 2



# 1 "../../../../dist/include/nsPromiseFlatString.h" 1
# 28 "../../../../dist/include/nsPromiseFlatString.h"
# 1 "../../../../dist/include/nsSharableString.h" 1
# 35 "../../../../dist/include/nsSharableString.h"
# 1 "../../../../dist/include/nsBufferHandleUtils.h" 1
# 36 "../../../../dist/include/nsBufferHandleUtils.h"
# 1 "/usr/include/g++-v3/backward/new.h" 1 3
# 33 "/usr/include/g++-v3/backward/new.h" 3
# 1 "/usr/include/g++-v3/backward/backward_warning.h" 1 3
# 34 "/usr/include/g++-v3/backward/new.h" 2 3
# 1 "/usr/include/g++-v3/new" 1 3
# 34 "/usr/include/g++-v3/new" 3
# 1 "/usr/include/g++-v3/cstddef" 1 3
# 31 "/usr/include/g++-v3/cstddef" 3
# 1 "/usr/include/g++-v3/bits/std_cstddef.h" 1 3
# 38 "/usr/include/g++-v3/bits/std_cstddef.h" 3
# 1 "/usr/lib/gcc-lib/i386-linux/3.0/include/stddef.h" 1 3
# 39 "/usr/include/g++-v3/bits/std_cstddef.h" 2 3

namespace std
{
  using ::ptrdiff_t;
  using ::size_t;
}
# 32 "/usr/include/g++-v3/cstddef" 2 3
# 35 "/usr/include/g++-v3/new" 2 3
# 1 "/usr/include/g++-v3/exception" 1 3
# 34 "/usr/include/g++-v3/exception" 3
extern "C++" {

namespace std
{
  class exception
  {
  public:
    exception() throw() { }
    virtual ~exception() throw();
    virtual const char* what() const throw();
  };

  class bad_exception : public exception
  {
  public:
    bad_exception() throw() { }
    virtual ~bad_exception() throw();
  };

  typedef void (*terminate_handler) ();
  typedef void (*unexpected_handler) ();

  terminate_handler set_terminate(terminate_handler) throw();
  void terminate() __attribute__ ((__noreturn__));

  unexpected_handler set_unexpected(unexpected_handler) throw();
  void unexpected() __attribute__ ((__noreturn__));

  bool uncaught_exception() throw();
}

}
# 36 "/usr/include/g++-v3/new" 2 3

extern "C++" {

namespace std
{
  class bad_alloc : public exception
  {
  public:
    bad_alloc() throw() { }
    virtual ~bad_alloc() throw();
  };

  struct nothrow_t { };
  extern const nothrow_t nothrow;
  typedef void (*new_handler)();
  new_handler set_new_handler(new_handler);
}


void *operator new(std::size_t) throw (std::bad_alloc);
void *operator new[](std::size_t) throw (std::bad_alloc);
void operator delete(void *) throw();
void operator delete[](void *) throw();
void *operator new(std::size_t, const std::nothrow_t&) throw();
void *operator new[](std::size_t, const std::nothrow_t&) throw();
void operator delete(void *, const std::nothrow_t&) throw();
void operator delete[](void *, const std::nothrow_t&) throw();


inline void *operator new(std::size_t, void *place) throw() { return place; }
inline void *operator new[](std::size_t, void *place) throw() { return place; }
}
# 35 "/usr/include/g++-v3/backward/new.h" 2 3

using std::bad_alloc;
using std::nothrow_t;
using std::nothrow;
using std::new_handler;
using std::set_new_handler;
# 37 "../../../../dist/include/nsBufferHandleUtils.h" 2



template <class CharT>
class nsAutoBufferHandle
  {
    public:
      nsAutoBufferHandle() : mHandle(0) { }

      nsAutoBufferHandle( const nsAutoBufferHandle<CharT>& aOther )
          : mHandle(aOther.get())
        {
          if ( mHandle )
            mHandle->AcquireReference();
        }

      explicit
      nsAutoBufferHandle( const nsSharedBufferHandle<CharT>* aHandle )
          : mHandle( const_cast< nsSharedBufferHandle<CharT>* >(aHandle) )
        {
          if ( mHandle )
            mHandle->AcquireReference();
        }

     ~nsAutoBufferHandle()
        {
          if ( mHandle )
            mHandle->ReleaseReference();
        }

      nsAutoBufferHandle<CharT>&
      operator=( const nsSharedBufferHandle<CharT>* rhs )
        {
          nsSharedBufferHandle<CharT>* old_handle = mHandle;
          if ( (mHandle = const_cast< nsSharedBufferHandle<CharT>* >(rhs)) )
            mHandle->AcquireReference();
          if ( old_handle )
            old_handle->ReleaseReference();
          return *this;
        }

      nsAutoBufferHandle<CharT>&
      operator=( const nsAutoBufferHandle<CharT>& rhs )
        {
          return operator=(rhs.get());
        }

      nsSharedBufferHandle<CharT>*
      get() const
        {
          return mHandle;
        }

      operator nsSharedBufferHandle<CharT>*() const
        {
          return get();
        }

      nsSharedBufferHandle<CharT>*
      operator->() const
        {
          return get();
        }

    private:
      nsSharedBufferHandle<CharT>* mHandle;
  };


template <class HandleT, class CharT>
inline
size_t
NS_AlignedHandleSize( const HandleT*, const CharT* )
  {

    return ((sizeof(HandleT) + sizeof(CharT) - 1) / sizeof(CharT)) * sizeof(CharT);
  }

template <class HandleT, class CharT>
inline
const CharT*
NS_DataAfterHandle( const HandleT* aHandlePtr, const CharT* aDummyCharTPtr )
  {
    typedef const CharT* CharT_ptr;
    return CharT_ptr(static_cast< const unsigned char* >(aHandlePtr) + NS_AlignedHandleSize(aHandlePtr, aDummyCharTPtr));
  }

template <class HandleT, class CharT>
inline
CharT*
NS_DataAfterHandle( HandleT* aHandlePtr, const CharT* aDummyCharTPtr )
  {
    typedef CharT* CharT_ptr;
    return CharT_ptr(static_cast< unsigned char* >(aHandlePtr) + NS_AlignedHandleSize(aHandlePtr, aDummyCharTPtr));
  }

template <class HandleT, class StringT>
HandleT*
NS_AllocateContiguousHandleWithData( const HandleT* aDummyHandlePtr, PRUint32 aAdditionalCapacity, const StringT* aDataSource )
  {
    typedef typename StringT::char_type char_type;
    typedef char_type* char_ptr;


    size_t handle_size = NS_AlignedHandleSize(aDummyHandlePtr, char_ptr(0));


    size_t data_length = aDataSource? aDataSource->Length() : 0;
    size_t buffer_length = data_length + aAdditionalCapacity;


    size_t buffer_size = buffer_length * sizeof(char_type);


    HandleT* result = 0;
    void* handle_ptr = ::operator new(handle_size + buffer_size);

    if ( handle_ptr )
      {
        char_ptr data_start_ptr = char_ptr(static_cast< unsigned char* >(handle_ptr) + handle_size);
        char_ptr data_end_ptr = data_start_ptr + data_length;
        char_ptr buffer_end_ptr = data_start_ptr + buffer_length;

        char_ptr toBegin = data_start_ptr;

        if ( data_length )
          {
            typename StringT::const_iterator fromBegin, fromEnd;
            copy_string(aDataSource->BeginReading(fromBegin), aDataSource->EndReading(fromEnd), toBegin);
          }


        if ( aAdditionalCapacity > 0 )
          *toBegin = char_type(0);

        result = new (handle_ptr) HandleT(data_start_ptr, data_end_ptr, data_start_ptr, buffer_end_ptr, 1);
      }

    return result;
  }

template <class HandleT, class StringT>
inline
HandleT*
NS_AllocateContiguousHandleWithData( const HandleT* aDummyHandlePtr, const StringT& aDataSource, PRUint32 aAdditionalCapacity )
  {
    return NS_AllocateContiguousHandleWithData(aDummyHandlePtr, aAdditionalCapacity, &aDataSource);
  }
# 36 "../../../../dist/include/nsSharableString.h" 2
# 44 "../../../../dist/include/nsSharableString.h"
class nsSharableString
    : public nsAFlatString
  {
    public:
      typedef nsSharableString self_type;
      typedef PRUnichar char_type;
      typedef nsAString string_type;

    public:
      nsSharableString() { }
      nsSharableString( const self_type& aOther ) : mBuffer(aOther.mBuffer) { }
      explicit nsSharableString( const string_type& aReadable ) { assign(aReadable); }
      explicit nsSharableString( const nsSharedBufferHandle<char_type>* aHandle ) : mBuffer(aHandle) { }

      self_type&
      operator=( const string_type& aReadable )
        {
          assign(aReadable);
          return *this;
        }

    protected:
      void assign( const string_type& );
      virtual const nsSharedBufferHandle<char_type>* GetSharedBufferHandle() const;

    private:
      nsAutoBufferHandle<char_type> mBuffer;
  };


class nsSharableCString
    : public nsAFlatCString
  {
    public:
      typedef nsSharableCString self_type;
      typedef char char_type;
      typedef nsACString string_type;

    public:
      nsSharableCString() { }
      nsSharableCString( const self_type& aOther ) : mBuffer(aOther.mBuffer) { }
      explicit nsSharableCString( const string_type& aReadable ) { assign(aReadable); }
      explicit nsSharableCString( const nsSharedBufferHandle<char_type>* aHandle ) : mBuffer(aHandle) { }

      self_type&
      operator=( const string_type& aReadable )
        {
          assign(aReadable);
          return *this;
        }

    protected:
      void assign( const string_type& );
      virtual const nsSharedBufferHandle<char_type>* GetSharedBufferHandle() const;

    private:
      nsAutoBufferHandle<char_type> mBuffer;
  };
# 29 "../../../../dist/include/nsPromiseFlatString.h" 2
# 83 "../../../../dist/include/nsPromiseFlatString.h"
class nsPromiseFlatString
    : public nsAFlatString
  {
    friend const nsPromiseFlatString PromiseFlatString( const nsAString& );

    public:
      nsPromiseFlatString( const nsPromiseFlatString& );

    protected:
      nsPromiseFlatString() : mPromisedString(&mFlattenedString) { }
      explicit nsPromiseFlatString( const nsAString& aString );


      virtual const nsBufferHandle<PRUnichar>* GetFlatBufferHandle() const;
      virtual const nsBufferHandle<PRUnichar>* GetBufferHandle() const;
      virtual const nsSharedBufferHandle<PRUnichar>* GetSharedBufferHandle() const;
      virtual PRBool IsDependentOn( const nsAString& ) const;



    public:
      virtual const PRUnichar* get() const;
      virtual PRUint32 Length() const;
    protected:
      virtual const PRUnichar* GetReadableFragment( nsReadableFragment<PRUnichar>&, nsFragmentRequest, PRUint32 ) const;


    private:

      void operator=( const nsPromiseFlatString& );

    private:
      nsSharableString mFlattenedString;
      const nsAFlatString* mPromisedString;
  };

class nsPromiseFlatCString
    : public nsAFlatCString
  {
    friend const nsPromiseFlatCString PromiseFlatCString( const nsACString& );

    public:
      nsPromiseFlatCString( const nsPromiseFlatCString& );

    protected:
      nsPromiseFlatCString() : mPromisedString(&mFlattenedString) { }
      explicit nsPromiseFlatCString( const nsACString& aString );


      virtual const nsBufferHandle<char>* GetFlatBufferHandle() const;
      virtual const nsBufferHandle<char>* GetBufferHandle() const;
      virtual const nsSharedBufferHandle<char>* GetSharedBufferHandle() const;
      virtual PRBool IsDependentOn( const nsACString& ) const;



    public:
      virtual const char* get() const;
      virtual PRUint32 Length() const;
    protected:
      virtual const char* GetReadableFragment( nsReadableFragment<char>&, nsFragmentRequest, PRUint32 ) const;


    private:

      void operator=( const nsPromiseFlatCString& );

    private:
      nsSharableCString mFlattenedString;
      const nsAFlatCString* mPromisedString;
  };


inline
const nsPromiseFlatString
PromiseFlatString( const nsAString& aString )
  {
    return nsPromiseFlatString(aString);
  }

inline
const nsPromiseFlatCString
PromiseFlatCString( const nsACString& aString )
  {
    return nsPromiseFlatCString(aString);
  }
# 46 "../../../../dist/include/nsAReadableString.h" 2
# 31 "../../../../dist/include/nsAWritableString.h" 2


typedef nsAString nsAWritableString;
typedef nsACString nsAWritableCString;
# 20 "../../../../dist/include/nsIAtom.h" 2
# 28 "../../../../dist/include/nsIAtom.h"
class nsIAtom : public nsISupports {
 public:

  static const nsIID& GetIID() {static const nsIID iid = {0x3d1b15b0, 0x93b4, 0x11d1, { 0x89, 0x5b, 0x00, 0x60, 0x08, 0x91, 0x1b, 0x81 }}; return iid;}





  virtual nsresult ToString(nsAWritableString & aString) = 0;





  virtual nsresult GetUnicode(const PRUnichar **aResult) = 0;





  virtual nsresult SizeOf(nsISizeOfHandler *aHandler, PRUint32 *_retval) = 0;

};
# 125 "../../../../dist/include/nsIAtom.h"
extern nsIAtom* NS_NewAtom(const char* isolatin1);




extern nsIAtom* NS_NewAtom(const PRUnichar* unicode);



extern nsIAtom* NS_NewAtom(const nsAReadableString& aString);




extern nsrefcnt NS_GetNumberOfAtoms(void);
extern void NS_PurgeAtomTable(void);
# 52 "../../../../dist/include/nsString2.h" 2
# 1 "../../../../dist/include/nsStr.h" 1
# 191 "../../../../dist/include/nsStr.h"
# 1 "../../../../dist/include/nscore.h" 1
# 192 "../../../../dist/include/nsStr.h" 2
# 1 "../../../../dist/include/nsMemory.h" 1
# 26 "../../../../dist/include/nsMemory.h"
# 1 "../../../../dist/include/nsIMemory.h" 1
# 36 "../../../../dist/include/nsIMemory.h"
class nsIMemory : public nsISupports {
 public:

  static const nsIID& GetIID() {static const nsIID iid = {0x59e7e77a, 0x38e4, 0x11d4, { 0x8c, 0xf5, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3 }}; return iid;}
# 50 "../../../../dist/include/nsIMemory.h"
  virtual void * Alloc(size_t size) = 0;
# 67 "../../../../dist/include/nsIMemory.h"
  virtual void * Realloc(void * ptr, size_t newSize) = 0;
# 76 "../../../../dist/include/nsIMemory.h"
  virtual void Free(void * ptr) = 0;
# 88 "../../../../dist/include/nsIMemory.h"
  virtual nsresult HeapMinimize(PRBool immediate) = 0;







  virtual nsresult IsLowMemory(PRBool *_retval) = 0;

};
# 27 "../../../../dist/include/nsMemory.h" 2







class nsMemory
{
public:
    static void* Alloc(size_t size);
    static void* Realloc(void* ptr, size_t size);
    static void Free(void* ptr);
    static nsresult HeapMinimize(PRBool aImmediate);
    static void* Clone(const void* ptr, size_t size);
    static nsIMemory* GetGlobalMemoryService();
};
# 193 "../../../../dist/include/nsStr.h" 2
# 1 "/usr/include/string.h" 1 3
# 194 "../../../../dist/include/nsStr.h" 2
# 1 "/usr/lib/gcc-lib/i386-linux/3.0/include/stdio.h" 1 3
# 195 "../../../../dist/include/nsStr.h" 2
# 1 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/plhash.h" 1
# 24 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/plhash.h"
# 1 "/usr/lib/gcc-lib/i386-linux/3.0/include/stdio.h" 1 3
# 25 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/plhash.h" 2
# 1 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prtypes.h" 1
# 26 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/plhash.h" 2

extern "C" {

typedef struct PLHashEntry PLHashEntry;
typedef struct PLHashTable PLHashTable;
typedef PRUint32 PLHashNumber;

typedef PLHashNumber ( *PLHashFunction)(const void *key);
typedef PRIntn ( *PLHashComparator)(const void *v1, const void *v2);




typedef PRIntn ( *PLHashEnumerator)(PLHashEntry *he, PRIntn i, void *arg);
# 51 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/plhash.h"
typedef struct PLHashAllocOps {
    void * ( *allocTable)(void *pool, PRSize size);
    void ( *freeTable)(void *pool, void *item);
    PLHashEntry * ( *allocEntry)(void *pool, const void *key);
    void ( *freeEntry)(void *pool, PLHashEntry *he, PRUintn flag);
} PLHashAllocOps;




struct PLHashEntry {
    PLHashEntry *next;
    PLHashNumber keyHash;
    const void *key;
    void *value;
};

struct PLHashTable {
    PLHashEntry **buckets;
    PRUint32 nentries;
    PRUint32 shift;
    PLHashFunction keyHash;
    PLHashComparator keyCompare;
    PLHashComparator valueCompare;
    const PLHashAllocOps *allocOps;
    void *allocPriv;






};





extern PLHashTable *
PL_NewHashTable(PRUint32 numBuckets, PLHashFunction keyHash,
                PLHashComparator keyCompare, PLHashComparator valueCompare,
                const PLHashAllocOps *allocOps, void *allocPriv);

extern void
PL_HashTableDestroy(PLHashTable *ht);


extern PLHashEntry *
PL_HashTableAdd(PLHashTable *ht, const void *key, void *value);

extern PRBool
PL_HashTableRemove(PLHashTable *ht, const void *key);

extern void *
PL_HashTableLookup(PLHashTable *ht, const void *key);

extern void *
PL_HashTableLookupConst(PLHashTable *ht, const void *key);

extern PRIntn
PL_HashTableEnumerateEntries(PLHashTable *ht, PLHashEnumerator f, void *arg);


extern PLHashNumber
PL_HashString(const void *key);


extern PRIntn
PL_CompareStrings(const void *v1, const void *v2);


extern PRIntn
PL_CompareValues(const void *v1, const void *v2);


extern PLHashEntry **
PL_HashTableRawLookup(PLHashTable *ht, PLHashNumber keyHash, const void *key);

extern PLHashEntry **
PL_HashTableRawLookupConst(PLHashTable *ht, PLHashNumber keyHash,
                           const void *key);

extern PLHashEntry *
PL_HashTableRawAdd(PLHashTable *ht, PLHashEntry **hep, PLHashNumber keyHash,
                   const void *key, void *value);

extern void
PL_HashTableRawRemove(PLHashTable *ht, PLHashEntry **hep, PLHashEntry *he);


extern PRIntn
PL_HashTableDump(PLHashTable *ht, PLHashEnumerator dump, FILE *fp);

}
# 196 "../../../../dist/include/nsStr.h" 2



enum eCharSize {eOneByte=0,eTwoByte=1};







const PRInt32 kDefaultStringSize = 64;
const PRInt32 kNotFound = -1;




class CBufDescriptor {
public:
  CBufDescriptor(char* aString, PRBool aStackBased,PRUint32 aCapacity,PRInt32 aLength=-1);
  CBufDescriptor(const char* aString, PRBool aStackBased,PRUint32 aCapacity,PRInt32 aLength=-1);
  CBufDescriptor(PRUnichar* aString, PRBool aStackBased,PRUint32 aCapacity,PRInt32 aLength=-1);
  CBufDescriptor(const PRUnichar* aString,PRBool aStackBased,PRUint32 aCapacity,PRInt32 aLength=-1);

  char* mBuffer;
  eCharSize mCharSize;
  PRUint32 mCapacity;
  PRInt32 mLength;
  PRBool mStackBased;
  PRBool mIsConst;
};




struct nsStr {

  nsStr() {
                         ;
  }

  ~nsStr() {
                         ;
  }
# 248 "../../../../dist/include/nsStr.h"
  static void Initialize(nsStr& aDest,eCharSize aCharSize);
# 257 "../../../../dist/include/nsStr.h"
  static void Initialize(nsStr& aDest,char* aCString,PRUint32 aCapacity,PRUint32 aLength,eCharSize aCharSize,PRBool aOwnsBuffer);
# 268 "../../../../dist/include/nsStr.h"
  static void Destroy(nsStr& aDest);
# 278 "../../../../dist/include/nsStr.h"
  static PRBool EnsureCapacity(nsStr& aString,PRUint32 aNewLength);
  static PRBool GrowCapacity(nsStr& aString,PRUint32 aNewLength);
# 291 "../../../../dist/include/nsStr.h"
  static void StrAppend(nsStr& aDest,const nsStr& aSource,PRUint32 anOffset,PRInt32 aCount);
# 303 "../../../../dist/include/nsStr.h"
  static void StrAssign(nsStr& aDest,const nsStr& aSource,PRUint32 anOffset,PRInt32 aCount);
# 316 "../../../../dist/include/nsStr.h"
  static void StrInsert( nsStr& aDest,PRUint32 aDestOffset,const nsStr& aSource,PRUint32 aSrcOffset,PRInt32 aCount);
# 328 "../../../../dist/include/nsStr.h"
  static void Delete(nsStr& aDest,PRUint32 aDestOffset,PRUint32 aCount);
# 341 "../../../../dist/include/nsStr.h"
  static void StrTruncate(nsStr& aDest,PRUint32 aDestOffset);
# 350 "../../../../dist/include/nsStr.h"
  static void ChangeCase(nsStr& aDest,PRBool aToUpper);
# 362 "../../../../dist/include/nsStr.h"
  static void Trim(nsStr& aDest,const char* aSet,PRBool aEliminateLeading,PRBool aEliminateTrailing);
# 374 "../../../../dist/include/nsStr.h"
  static void CompressSet(nsStr& aDest,const char* aSet,PRBool aEliminateLeading,PRBool aEliminateTrailing);
# 386 "../../../../dist/include/nsStr.h"
  static void StripChars(nsStr& aDest,const char* aSet);
# 398 "../../../../dist/include/nsStr.h"
  static PRInt32 StrCompare(const nsStr& aDest,const nsStr& aSource,PRInt32 aCount,PRBool aIgnoreCase);
# 410 "../../../../dist/include/nsStr.h"
  static PRInt32 FindSubstr(const nsStr& aDest,const nsStr& aSource, PRBool aIgnoreCase,PRInt32 anOffset,PRInt32 aCount);
  static PRInt32 FindChar(const nsStr& aDest,PRUnichar aChar, PRBool aIgnoreCase,PRInt32 anOffset,PRInt32 aCount);
  static PRInt32 FindCharInSet(const nsStr& aDest,const nsStr& aSet,PRBool aIgnoreCase,PRInt32 anOffset);

  static PRInt32 RFindSubstr(const nsStr& aDest,const nsStr& aSource, PRBool aIgnoreCase,PRInt32 anOffset,PRInt32 aCount);
  static PRInt32 RFindChar(const nsStr& aDest,PRUnichar aChar, PRBool aIgnoreCase,PRInt32 anOffset,PRInt32 aCount);
  static PRInt32 RFindCharInSet(const nsStr& aDest,const nsStr& aSet,PRBool aIgnoreCase,PRInt32 anOffset);

  static void Overwrite(nsStr& aDest,const nsStr& aSource,PRInt32 anOffset);

  static PRBool DidAcquireMemory(void);




  static PRUint32 HashCode(const nsStr& aDest);
# 436 "../../../../dist/include/nsStr.h"
  PRUint32 mLength;
  PRUint32 mCapacity;
  eCharSize mCharSize;
  PRBool mOwnsBuffer;

  union {
    char* mStr;
    PRUnichar* mUStr;
  };

private:
  static PRBool Alloc(nsStr& aString,PRUint32 aCount);
  static PRBool Realloc(nsStr& aString,PRUint32 aCount);
  static PRBool Free(nsStr& aString);

};
# 460 "../../../../dist/include/nsStr.h"
inline PRInt32 MinInt(PRInt32 anInt1,PRInt32 anInt2){
  return (anInt1<anInt2) ? anInt1 : anInt2;
}

inline PRInt32 MaxInt(PRInt32 anInt1,PRInt32 anInt2){
  return (anInt1<anInt2) ? anInt2 : anInt1;
}

inline void AddNullTerminator(nsStr& aDest) {
  if(eTwoByte==aDest.mCharSize)
    aDest.mUStr[aDest.mLength]=0;
  else aDest.mStr[aDest.mLength]=0;
}







inline void Recycle( char* aBuffer) { nsMemory::Free(aBuffer); }
inline void Recycle( PRUnichar* aBuffer) { nsMemory::Free(aBuffer); }
# 491 "../../../../dist/include/nsStr.h"
inline PRUnichar GetCharAt(const nsStr& aDest,PRUint32 anIndex) {
  if(anIndex<aDest.mLength) {
    return (eTwoByte==aDest.mCharSize) ? aDest.mUStr[anIndex] : (PRUnichar)aDest.mStr[anIndex];
  }
  return 0;
}
# 53 "../../../../dist/include/nsString2.h" 2
# 1 "../../../../dist/include/nsCRT.h" 1
# 25 "../../../../dist/include/nsCRT.h"
# 1 "/usr/include/stdlib.h" 1 3
# 25 "/usr/include/stdlib.h" 3
# 1 "/usr/include/features.h" 1 3
# 26 "/usr/include/stdlib.h" 2 3







# 1 "/usr/lib/gcc-lib/i386-linux/3.0/include/stddef.h" 1 3
# 34 "/usr/include/stdlib.h" 2 3

extern "C" {






# 1 "/usr/include/bits/waitflags.h" 1 3
# 43 "/usr/include/stdlib.h" 2 3
# 1 "/usr/include/bits/waitstatus.h" 1 3
# 63 "/usr/include/bits/waitstatus.h" 3
# 1 "/usr/include/endian.h" 1 3
# 64 "/usr/include/bits/waitstatus.h" 2 3

union wait
  {
    int w_status;
    struct
      {

        unsigned int __w_termsig:7;
        unsigned int __w_coredump:1;
        unsigned int __w_retcode:8;
        unsigned int:16;







      } __wait_terminated;
    struct
      {

        unsigned int __w_stopval:8;
        unsigned int __w_stopsig:8;
        unsigned int:16;






      } __wait_stopped;
  };
# 44 "/usr/include/stdlib.h" 2 3
# 94 "/usr/include/stdlib.h" 3
typedef struct
  {
    int quot;
    int rem;
  } div_t;



typedef struct
  {
    long int quot;
    long int rem;
  } ldiv_t;





__extension__ typedef struct
  {
    long long int quot;
    long long int rem;
  } lldiv_t;
# 133 "/usr/include/stdlib.h" 3
extern size_t __ctype_get_mb_cur_max (void) throw ();



extern double atof (__const char *__nptr) throw () __attribute__ ((__pure__));

extern int atoi (__const char *__nptr) throw () __attribute__ ((__pure__));

extern long int atol (__const char *__nptr) throw () __attribute__ ((__pure__));



__extension__ extern long long int atoll (__const char *__nptr)
     throw () __attribute__ ((__pure__));



extern double strtod (__const char *__restrict __nptr,
                      char **__restrict __endptr) throw ();



extern float strtof (__const char *__restrict __nptr,
                     char **__restrict __endptr) throw ();

extern long double strtold (__const char *__restrict __nptr,
                            char **__restrict __endptr) throw ();



extern long int strtol (__const char *__restrict __nptr,
                        char **__restrict __endptr, int __base) throw ();

extern unsigned long int strtoul (__const char *__restrict __nptr,
                                  char **__restrict __endptr, int __base)
     throw ();



__extension__
extern long long int strtoq (__const char *__restrict __nptr,
                             char **__restrict __endptr, int __base) throw ();

__extension__
extern unsigned long long int strtouq (__const char *__restrict __nptr,
                                       char **__restrict __endptr, int __base)
     throw ();






__extension__
extern long long int strtoll (__const char *__restrict __nptr,
                              char **__restrict __endptr, int __base) throw ();

__extension__
extern unsigned long long int strtoull (__const char *__restrict __nptr,
                                        char **__restrict __endptr, int __base)
     throw ();
# 211 "/usr/include/stdlib.h" 3
# 1 "/usr/include/xlocale.h" 1 3
# 212 "/usr/include/stdlib.h" 2 3



extern long int __strtol_l (__const char *__restrict __nptr,
                            char **__restrict __endptr, int __base,
                            __locale_t __loc) throw ();

extern unsigned long int __strtoul_l (__const char *__restrict __nptr,
                                      char **__restrict __endptr,
                                      int __base, __locale_t __loc) throw ();

__extension__
extern long long int __strtoll_l (__const char *__restrict __nptr,
                                  char **__restrict __endptr, int __base,
                                  __locale_t __loc) throw ();

__extension__
extern unsigned long long int __strtoull_l (__const char *__restrict __nptr,
                                            char **__restrict __endptr,
                                            int __base, __locale_t __loc)
     throw ();

extern double __strtod_l (__const char *__restrict __nptr,
                          char **__restrict __endptr, __locale_t __loc)
     throw ();

extern float __strtof_l (__const char *__restrict __nptr,
                         char **__restrict __endptr, __locale_t __loc) throw ();

extern long double __strtold_l (__const char *__restrict __nptr,
                                char **__restrict __endptr,
                                __locale_t __loc) throw ();






extern double __strtod_internal (__const char *__restrict __nptr,
                                 char **__restrict __endptr, int __group)
     throw ();
extern float __strtof_internal (__const char *__restrict __nptr,
                                char **__restrict __endptr, int __group)
     throw ();
extern long double __strtold_internal (__const char *__restrict __nptr,
                                       char **__restrict __endptr,
                                       int __group) throw ();

extern long int __strtol_internal (__const char *__restrict __nptr,
                                   char **__restrict __endptr,
                                   int __base, int __group) throw ();



extern unsigned long int __strtoul_internal (__const char *__restrict __nptr,
                                             char **__restrict __endptr,
                                             int __base, int __group) throw ();




__extension__
extern long long int __strtoll_internal (__const char *__restrict __nptr,
                                         char **__restrict __endptr,
                                         int __base, int __group) throw ();



__extension__
extern unsigned long long int __strtoull_internal (__const char *
                                                   __restrict __nptr,
                                                   char **__restrict __endptr,
                                                   int __base, int __group)
     throw ();







extern __inline double
strtod (__const char *__restrict __nptr, char **__restrict __endptr) throw ()
{
  return __strtod_internal (__nptr, __endptr, 0);
}
extern __inline long int
strtol (__const char *__restrict __nptr, char **__restrict __endptr,
        int __base) throw ()
{
  return __strtol_internal (__nptr, __endptr, __base, 0);
}
extern __inline unsigned long int
strtoul (__const char *__restrict __nptr, char **__restrict __endptr,
         int __base) throw ()
{
  return __strtoul_internal (__nptr, __endptr, __base, 0);
}


extern __inline float
strtof (__const char *__restrict __nptr, char **__restrict __endptr) throw ()
{
  return __strtof_internal (__nptr, __endptr, 0);
}
extern __inline long double
strtold (__const char *__restrict __nptr, char **__restrict __endptr) throw ()
{
  return __strtold_internal (__nptr, __endptr, 0);
}



__extension__ extern __inline long long int
strtoq (__const char *__restrict __nptr, char **__restrict __endptr,
        int __base) throw ()
{
  return __strtoll_internal (__nptr, __endptr, __base, 0);
}
__extension__ extern __inline unsigned long long int
strtouq (__const char *__restrict __nptr, char **__restrict __endptr,
         int __base) throw ()
{
  return __strtoull_internal (__nptr, __endptr, __base, 0);
}



__extension__ extern __inline long long int
strtoll (__const char *__restrict __nptr, char **__restrict __endptr,
         int __base) throw ()
{
  return __strtoll_internal (__nptr, __endptr, __base, 0);
}
__extension__ extern __inline unsigned long long int
strtoull (__const char * __restrict __nptr, char **__restrict __endptr,
          int __base) throw ()
{
  return __strtoull_internal (__nptr, __endptr, __base, 0);
}


extern __inline double
atof (__const char *__nptr) throw ()
{
  return strtod (__nptr, (char **) __null);
}
extern __inline int
atoi (__const char *__nptr) throw ()
{
  return (int) strtol (__nptr, (char **) __null, 10);
}
extern __inline long int
atol (__const char *__nptr) throw ()
{
  return strtol (__nptr, (char **) __null, 10);
}


__extension__ extern __inline long long int
atoll (__const char *__nptr) throw ()
{
  return strtoll (__nptr, (char **) __null, 10);
}
# 384 "/usr/include/stdlib.h" 3
extern char *l64a (long int __n) throw ();


extern long int a64l (__const char *__s) throw () __attribute__ ((__pure__));


# 1 "/usr/include/sys/types.h" 1 3
# 391 "/usr/include/stdlib.h" 2 3






extern long int random (void) throw ();


extern void srandom (unsigned int __seed) throw ();





extern char *initstate (unsigned int __seed, char *__statebuf,
                        size_t __statelen) throw ();



extern char *setstate (char *__statebuf) throw ();







struct random_data
  {
    int32_t *fptr;
    int32_t *rptr;
    int32_t *state;
    int rand_type;
    int rand_deg;
    int rand_sep;
    int32_t *end_ptr;
  };

extern int random_r (struct random_data *__restrict __buf,
                     int32_t *__restrict __result) throw ();

extern int srandom_r (unsigned int __seed, struct random_data *__buf) throw ();

extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,
                        size_t __statelen,
                        struct random_data *__restrict __buf) throw ();

extern int setstate_r (char *__restrict __statebuf,
                       struct random_data *__restrict __buf) throw ();





extern int rand (void) throw ();

extern void srand (unsigned int __seed) throw ();



extern int rand_r (unsigned int *__seed) throw ();







extern double drand48 (void) throw ();
extern double erand48 (unsigned short int __xsubi[3]) throw ();


extern long int lrand48 (void) throw ();
extern long int nrand48 (unsigned short int __xsubi[3]) throw ();


extern long int mrand48 (void) throw ();
extern long int jrand48 (unsigned short int __xsubi[3]) throw ();


extern void srand48 (long int __seedval) throw ();
extern unsigned short int *seed48 (unsigned short int __seed16v[3]) throw ();
extern void lcong48 (unsigned short int __param[7]) throw ();





struct drand48_data
  {
    unsigned short int __x[3];
    unsigned short int __old_x[3];
    unsigned short int __c;
    unsigned short int __init;
    unsigned long long int __a;
  };


extern int drand48_r (struct drand48_data *__restrict __buffer,
                      double *__restrict __result) throw ();
extern int erand48_r (unsigned short int __xsubi[3],
                      struct drand48_data *__restrict __buffer,
                      double *__restrict __result) throw ();


extern int lrand48_r (struct drand48_data *__restrict __buffer,
                      long int *__restrict __result) throw ();
extern int nrand48_r (unsigned short int __xsubi[3],
                      struct drand48_data *__restrict __buffer,
                      long int *__restrict __result) throw ();


extern int mrand48_r (struct drand48_data *__restrict __buffer,
                      long int *__restrict __result) throw ();
extern int jrand48_r (unsigned short int __xsubi[3],
                      struct drand48_data *__restrict __buffer,
                      long int *__restrict __result) throw ();


extern int srand48_r (long int __seedval, struct drand48_data *__buffer)
     throw ();

extern int seed48_r (unsigned short int __seed16v[3],
                     struct drand48_data *__buffer) throw ();

extern int lcong48_r (unsigned short int __param[7],
                      struct drand48_data *__buffer) throw ();
# 527 "/usr/include/stdlib.h" 3
extern void *malloc (size_t __size) throw () __attribute__ ((__malloc__));

extern void *calloc (size_t __nmemb, size_t __size)
     throw () __attribute__ ((__malloc__));





extern void *realloc (void *__ptr, size_t __size) throw () __attribute__ ((__malloc__));

extern void free (void *__ptr) throw ();



extern void cfree (void *__ptr) throw ();



# 1 "/usr/include/alloca.h" 1 3
# 22 "/usr/include/alloca.h" 3
# 1 "/usr/include/features.h" 1 3
# 23 "/usr/include/alloca.h" 2 3


# 1 "/usr/lib/gcc-lib/i386-linux/3.0/include/stddef.h" 1 3
# 26 "/usr/include/alloca.h" 2 3

extern "C" {





extern void *alloca (size_t __size) throw ();





}
# 547 "/usr/include/stdlib.h" 2 3




extern void *valloc (size_t __size) throw () __attribute__ ((__malloc__));




extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
     throw () __attribute__ ((__malloc__));



extern void abort (void) throw () __attribute__ ((__noreturn__));



extern int atexit (void (*__func) (void)) throw ();




extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg)
     throw ();





extern void exit (int __status) throw () __attribute__ ((__noreturn__));




extern void _Exit (int __status) throw () __attribute__ ((__noreturn__));




extern char *getenv (__const char *__name) throw ();



extern char *__secure_getenv (__const char *__name) throw ();





extern int putenv (char *__string) throw ();





extern int setenv (__const char *__name, __const char *__value, int __replace)
     throw ();


extern int unsetenv (__const char *__name) throw ();






extern int clearenv (void) throw ();
# 623 "/usr/include/stdlib.h" 3
extern char *mktemp (char *__template) throw ();







extern int mkstemp (char *__template) throw ();
# 640 "/usr/include/stdlib.h" 3
extern int mkstemp64 (char *__template) throw ();
# 650 "/usr/include/stdlib.h" 3
extern char *mkdtemp (char *__template) throw ();




extern int system (__const char *__command) throw ();






extern char *canonicalize_file_name (__const char *__name) throw ();
# 672 "/usr/include/stdlib.h" 3
extern char *realpath (__const char *__restrict __name,
                       char *__restrict __resolved) throw ();






typedef int (*__compar_fn_t) (__const void *, __const void *);


typedef __compar_fn_t comparison_fn_t;





extern void *bsearch (__const void *__key, __const void *__base,
                      size_t __nmemb, size_t __size, __compar_fn_t __compar);



extern void qsort (void *__base, size_t __nmemb, size_t __size,
                   __compar_fn_t __compar);



extern int abs (int __x) throw () __attribute__ ((__const__));
extern long int labs (long int __x) throw () __attribute__ ((__const__));

__extension__ extern long long int llabs (long long int __x)
     throw () __attribute__ ((__const__));






extern div_t div (int __numer, int __denom)
     throw () __attribute__ ((__const__));
extern ldiv_t ldiv (long int __numer, long int __denom)
     throw () __attribute__ ((__const__));

__extension__ extern lldiv_t lldiv (long long int __numer,
                                    long long int __denom)
     throw () __attribute__ ((__const__));
# 728 "/usr/include/stdlib.h" 3
extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt,
                   int *__restrict __sign) throw ();




extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt,
                   int *__restrict __sign) throw ();




extern char *gcvt (double __value, int __ndigit, char *__buf) throw ();




extern char *qecvt (long double __value, int __ndigit,
                    int *__restrict __decpt, int *__restrict __sign) throw ();
extern char *qfcvt (long double __value, int __ndigit,
                    int *__restrict __decpt, int *__restrict __sign) throw ();
extern char *qgcvt (long double __value, int __ndigit, char *__buf) throw ();




extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
                   int *__restrict __sign, char *__restrict __buf,
                   size_t __len) throw ();
extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
                   int *__restrict __sign, char *__restrict __buf,
                   size_t __len) throw ();

extern int qecvt_r (long double __value, int __ndigit,
                    int *__restrict __decpt, int *__restrict __sign,
                    char *__restrict __buf, size_t __len) throw ();
extern int qfcvt_r (long double __value, int __ndigit,
                    int *__restrict __decpt, int *__restrict __sign,
                    char *__restrict __buf, size_t __len) throw ();






extern int mblen (__const char *__s, size_t __n) throw ();


extern int mbtowc (wchar_t *__restrict __pwc,
                   __const char *__restrict __s, size_t __n) throw ();


extern int wctomb (char *__s, wchar_t __wchar) throw ();



extern size_t mbstowcs (wchar_t *__restrict __pwcs,
                        __const char *__restrict __s, size_t __n) throw ();

extern size_t wcstombs (char *__restrict __s,
                        __const wchar_t *__restrict __pwcs, size_t __n)
     throw ();







extern int rpmatch (__const char *__response) throw ();
# 808 "/usr/include/stdlib.h" 3
extern int getsubopt (char **__restrict __optionp,
                      char *__const *__restrict __tokens,
                      char **__restrict __valuep) throw ();





extern void setkey (__const char *__key) throw ();







extern int posix_openpt (int __oflag) throw ();







extern int grantpt (int __fd) throw ();



extern int unlockpt (int __fd) throw ();




extern char *ptsname (int __fd) throw ();






extern int ptsname_r (int __fd, char *__buf, size_t __buflen) throw ();


extern int getpt (void) throw ();






extern int getloadavg (double __loadavg[], int __nelem) throw ();





}
# 26 "../../../../dist/include/nsCRT.h" 2
# 1 "/usr/include/string.h" 1 3
# 27 "../../../../dist/include/nsCRT.h" 2
# 1 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/plstr.h" 1
# 42 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/plstr.h"
# 1 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prtypes.h" 1
# 43 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/plstr.h" 2

extern "C" {






extern PRUint32
PL_strlen(const char *str);
# 62 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/plstr.h"
extern PRUint32
PL_strnlen(const char *str, PRUint32 max);
# 73 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/plstr.h"
extern char *
PL_strcpy(char *dest, const char *src);
# 86 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/plstr.h"
extern char *
PL_strncpy(char *dest, const char *src, PRUint32 max);
# 109 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/plstr.h"
extern char *
PL_strncpyz(char *dest, const char *src, PRUint32 max);
# 123 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/plstr.h"
extern char *
PL_strdup(const char *s);







extern void
PL_strfree(char *s);
# 147 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/plstr.h"
extern char *
PL_strndup(const char *s, PRUint32 max);
# 159 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/plstr.h"
extern char *
PL_strcat(char *dst, const char *src);
# 174 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/plstr.h"
extern char *
PL_strncat(char *dst, const char *src, PRUint32 max);
# 188 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/plstr.h"
extern char *
PL_strcatn(char *dst, PRUint32 max, const char *src);
# 200 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/plstr.h"
extern PRIntn
PL_strcmp(const char *a, const char *b);
# 214 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/plstr.h"
extern PRIntn
PL_strncmp(const char *a, const char *b, PRUint32 max);
# 226 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/plstr.h"
extern PRIntn
PL_strcasecmp(const char *a, const char *b);
# 238 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/plstr.h"
extern PRIntn
PL_strncasecmp(const char *a, const char *b, PRUint32 max);
# 249 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/plstr.h"
extern char *
PL_strchr(const char *s, char c);
# 260 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/plstr.h"
extern char *
PL_strrchr(const char *s, char c);
# 272 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/plstr.h"
extern char *
PL_strnchr(const char *s, char c, PRUint32 n);
# 284 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/plstr.h"
extern char *
PL_strnrchr(const char *s, char c, PRUint32 n);
# 300 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/plstr.h"
extern char *
PL_strpbrk(const char *s, const char *list);
# 311 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/plstr.h"
extern char *
PL_strprbrk(const char *s, const char *list);
# 322 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/plstr.h"
extern char *
PL_strnpbrk(const char *s, const char *list, PRUint32 n);
# 333 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/plstr.h"
extern char *
PL_strnprbrk(const char *s, const char *list, PRUint32 n);
# 343 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/plstr.h"
extern char *
PL_strstr(const char *big, const char *little);
# 353 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/plstr.h"
extern char *
PL_strrstr(const char *big, const char *little);
# 364 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/plstr.h"
extern char *
PL_strnstr(const char *big, const char *little, PRUint32 n);
# 375 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/plstr.h"
extern char *
PL_strnrstr(const char *big, const char *little, PRUint32 max);
# 385 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/plstr.h"
extern char *
PL_strcasestr(const char *big, const char *little);
# 395 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/plstr.h"
extern char *
PL_strcaserstr(const char *big, const char *little);
# 406 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/plstr.h"
extern char *
PL_strncasestr(const char *big, const char *little, PRUint32 max);
# 417 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/plstr.h"
extern char *
PL_strncaserstr(const char *big, const char *little, PRUint32 max);







}
# 28 "../../../../dist/include/nsCRT.h" 2
# 1 "../../../../dist/include/nscore.h" 1
# 29 "../../../../dist/include/nsCRT.h" 2
# 1 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prtypes.h" 1
# 30 "../../../../dist/include/nsCRT.h" 2
# 1 "../../../../dist/include/nsCppSharedAllocator.h" 1



# 1 "../../../../dist/include/nsMemory.h" 1
# 5 "../../../../dist/include/nsCppSharedAllocator.h" 2
# 1 "../../../../dist/include/nscore.h" 1
# 6 "../../../../dist/include/nsCppSharedAllocator.h" 2
# 1 "/usr/include/g++-v3/backward/new.h" 1 3
# 7 "../../../../dist/include/nsCppSharedAllocator.h" 2
# 23 "../../../../dist/include/nsCppSharedAllocator.h"
# 1 "/usr/lib/gcc-lib/i386-linux/3.0/include/limits.h" 1 3
# 11 "/usr/lib/gcc-lib/i386-linux/3.0/include/limits.h" 3
# 1 "/usr/lib/gcc-lib/i386-linux/3.0/include/syslimits.h" 1 3






# 1 "/usr/lib/gcc-lib/i386-linux/3.0/include/limits.h" 1 3
# 130 "/usr/lib/gcc-lib/i386-linux/3.0/include/limits.h" 3
# 1 "/usr/include/limits.h" 1 3
# 26 "/usr/include/limits.h" 3
# 1 "/usr/include/features.h" 1 3
# 27 "/usr/include/limits.h" 2 3
# 144 "/usr/include/limits.h" 3
# 1 "/usr/include/bits/posix1_lim.h" 1 3
# 126 "/usr/include/bits/posix1_lim.h" 3
# 1 "/usr/include/bits/local_lim.h" 1 3
# 36 "/usr/include/bits/local_lim.h" 3
# 1 "/usr/include/linux/limits.h" 1 3
# 37 "/usr/include/bits/local_lim.h" 2 3
# 127 "/usr/include/bits/posix1_lim.h" 2 3
# 145 "/usr/include/limits.h" 2 3



# 1 "/usr/include/bits/posix2_lim.h" 1 3
# 149 "/usr/include/limits.h" 2 3



# 1 "/usr/include/bits/xopen_lim.h" 1 3
# 34 "/usr/include/bits/xopen_lim.h" 3
# 1 "/usr/include/bits/stdio_lim.h" 1 3
# 35 "/usr/include/bits/xopen_lim.h" 2 3
# 136 "/usr/include/bits/xopen_lim.h" 3
# 1 "/usr/include/bits/wordsize.h" 1 3
# 137 "/usr/include/bits/xopen_lim.h" 2 3
# 153 "/usr/include/limits.h" 2 3
# 131 "/usr/lib/gcc-lib/i386-linux/3.0/include/limits.h" 2 3
# 8 "/usr/lib/gcc-lib/i386-linux/3.0/include/syslimits.h" 2 3
# 12 "/usr/lib/gcc-lib/i386-linux/3.0/include/limits.h" 2 3
# 24 "../../../../dist/include/nsCppSharedAllocator.h" 2



template <class T>
class nsCppSharedAllocator




  {
    public:
      typedef T value_type;
      typedef size_t size_type;
      typedef ptrdiff_t difference_type;

      typedef T* pointer;
      typedef const T* const_pointer;

      typedef T& reference;
      typedef const T& const_reference;



      nsCppSharedAllocator() { }






     ~nsCppSharedAllocator() { }


      pointer
      address( reference r ) const
        {
          return &r;
        }

      const_pointer
      address( const_reference r ) const
        {
          return &r;
        }

      pointer
      allocate( size_type n, const void* =0 )
        {
          return reinterpret_cast< pointer >(nsMemory::Alloc(static_cast< PRUint32 >(n*sizeof(T))));
        }

      void
      deallocate( pointer p, size_type )
        {
          nsMemory::Free(p);
        }

      void
      construct( pointer p, const T& val )
        {
          new (p) T(val);
        }

      void
      destroy( pointer p )
        {
          p->~T();
        }

      size_type
      max_size() const
        {



          return (2147483647L * 2UL + 1) / sizeof(T);

        }
# 110 "../../../../dist/include/nsCppSharedAllocator.h"
  };


template <class T>
PRBool
operator==( const nsCppSharedAllocator<T>&, const nsCppSharedAllocator<T>& )
  {
    return 1;
  }

template <class T>
PRBool
operator!=( const nsCppSharedAllocator<T>&, const nsCppSharedAllocator<T>& )
  {
    return 0;
  }
# 31 "../../../../dist/include/nsCRT.h" 2
# 47 "../../../../dist/include/nsCRT.h"
extern const PRUnichar kIsoLatin1ToUCS2[256];
# 86 "../../../../dist/include/nsCRT.h"
class nsCRT {
public:
  enum {
    TAB='\t' ,
    LF='\n' ,
    VTAB='\v' ,
    FF='\f' ,
    CR='\r'
  };






  static void memcpy(void* aDest, const void* aSrc, PRUint32 aCount) {
    {};
    ::memcpy(aDest, aSrc, (size_t)aCount);
  }

  static PRInt32 memcmp(void* aDest, const void* aSrc, PRUint32 aCount) {
    {};
    return ::memcmp(aDest, aSrc, (size_t)aCount);
  }

  static void memmove(void* aDest, const void* aSrc, PRUint32 aCount) {
    {};
    ::memmove(aDest, aSrc, (size_t)aCount);
  }

  static void memset(void* aDest, PRUint8 aByte, PRUint32 aCount) {
    {};
    ::memset(aDest, aByte, aCount);
  }

  static void zero(void* aDest, PRUint32 aCount) {
    {};
    ::memset(aDest, 0, (size_t)aCount);
  }





  static PRUint32 strlen(const char* s) {
    return PRUint32(::strlen(s));
  }


  static PRInt32 strcmp(const char* s1, const char* s2) {
    return PRInt32(PL_strcmp(s1, s2));
  }

  static PRInt32 strncmp(const char* s1, const char* s2,
                         PRUint32 aMaxLen) {
    return PRInt32(PL_strncmp(s1, s2, aMaxLen));
  }


  static PRInt32 strcasecmp(const char* s1, const char* s2) {
    return PRInt32(PL_strcasecmp(s1, s2));
  }


  static PRInt32 strncasecmp(const char* s1, const char* s2, PRUint32 aMaxLen) {
    PRInt32 result=PRInt32(PL_strncasecmp(s1, s2, aMaxLen));


    if(result<0)
      result=-1;
    return result;
  }

  static PRInt32 strncmp(const char* s1, const char* s2, PRInt32 aMaxLen) {

    PRInt32 diff = ((const unsigned char*)s1)[0] - ((const unsigned char*)s2)[0];
    if (diff != 0) return diff;
    return PRInt32(PL_strncmp(s1,s2,unsigned(aMaxLen)));
  }

  static char* strdup(const char* str) {
    return PL_strdup(str);
  }

  static char* strndup(const char* str, PRUint32 len) {
    return PL_strndup(str, len);
  }

  static void free(char* str) {
    PL_strfree(str);
  }
# 197 "../../../../dist/include/nsCRT.h"
  static char* strtok(char* str, const char* delims, char* *newStr);


  static PRUint32 strlen(const PRUnichar* s);


  static PRInt32 strcmp(const PRUnichar* s1, const PRUnichar* s2);

  static PRInt32 strncmp(const PRUnichar* s1, const PRUnichar* s2,
                         PRUint32 aMaxLen);


  static PRInt32 strcasecmp(const PRUnichar* s1, const PRUnichar* s2);

  static PRInt32 strncasecmp(const PRUnichar* s1, const PRUnichar* s2,
                             PRUint32 aMaxLen);


  static PRInt32 strcmp(const PRUnichar* s1, const char* s2);

  static PRInt32 strncmp(const PRUnichar* s1, const char* s2,
                         PRUint32 aMaxLen);


  static PRInt32 strcasecmp(const PRUnichar* s1, const char* s2);

  static PRInt32 strncasecmp(const PRUnichar* s1, const char* s2,
                             PRUint32 aMaxLen);



  static PRUnichar* strdup(const PRUnichar* str);

  static PRUnichar* strndup(const PRUnichar* str, PRUint32 len);

  static void free(PRUnichar* str) {
        nsCppSharedAllocator<PRUnichar> shared_allocator;
        shared_allocator.deallocate(str, 0 );
  }


  static PRUint32 HashCode(const char* str, PRUint32* resultingStrLen = 0);


  static PRUint32 HashCode(const PRUnichar* str, PRUint32* resultingStrLen = 0);


  static PRUint32 BufferHashCode(const char* str, PRUint32 strLen);


  static PRInt32 atoi( const PRUnichar *string );

  static PRUnichar ToUpper(PRUnichar aChar);

  static PRUnichar ToLower(PRUnichar aChar);

  static PRBool IsUpper(PRUnichar aChar);

  static PRBool IsLower(PRUnichar aChar);

  static char ToUpper(char aChar);

  static char ToLower(char aChar);

  static PRBool IsUpper(char aChar);

  static PRBool IsLower(char aChar);

  static PRBool IsAscii(PRUnichar aChar);
  static PRBool IsAscii(PRUnichar* aString);
  static PRBool IsAsciiAlpha(PRUnichar aChar);
  static PRBool IsAsciiDigit(PRUnichar aChar);
  static PRBool IsAsciiSpace(PRUnichar aChar);
};
# 54 "../../../../dist/include/nsString2.h" 2
# 63 "../../../../dist/include/nsString2.h"
class nsISizeOfHandler;





class nsSubsumeStr;

class nsString :
  public nsAFlatString,
  public nsStr {

protected:
  virtual const nsBufferHandle<PRUnichar>* GetFlatBufferHandle() const;
  virtual const PRUnichar* GetReadableFragment( nsReadableFragment<PRUnichar>&, nsFragmentRequest, PRUint32 ) const;
  virtual PRUnichar* GetWritableFragment( nsWritableFragment<PRUnichar>&, nsFragmentRequest, PRUint32 );

public:
  virtual const PRUnichar* get() const { return GetUnicode(); }

public:



  nsString();





  nsString(const nsString& aString);

  explicit nsString(const nsAString&);

  explicit nsString(const PRUnichar*);
  nsString(const PRUnichar*, PRInt32);
# 108 "../../../../dist/include/nsString2.h"
  explicit nsString(nsSubsumeStr& aSubsumeStr);






  virtual ~nsString();





  virtual PRUint32 Length() const { return mLength; }





  virtual void SizeOf(nsISizeOfHandler* aHandler, PRUint32* aResult) const;







  void SetLength(PRUint32 aLength);






  void SetCapacity(PRUint32 aLength);
# 151 "../../../../dist/include/nsString2.h"
  PRBool IsUnicode(void) const {
    PRBool result=PRBool(mCharSize==eTwoByte);
    return result;
  }
# 163 "../../../../dist/include/nsString2.h"
  const char* GetBuffer(void) const;
  const PRUnichar* GetUnicode(void) const;




  PRBool SetCharAt(PRUnichar aChar,PRUint32 anIndex);
# 182 "../../../../dist/include/nsString2.h"
  void ToLowerCase();
# 191 "../../../../dist/include/nsString2.h"
  void ToLowerCase(nsString& aString) const;





  void ToUpperCase();







  void ToUpperCase(nsString& aString) const;
# 215 "../../../../dist/include/nsString2.h"
  void StripChars( const char* aSet );
  void StripChar( PRUnichar aChar, PRInt32 anOffset=0 );
  void StripChar( char aChar, PRInt32 anOffset=0 ) { StripChar((PRUnichar) (unsigned char)aChar,anOffset); }
  void StripChar( PRInt32 anInt, PRInt32 anOffset=0 ) { StripChar((PRUnichar)anInt,anOffset); }






  void StripWhitespace();






  void ReplaceChar( PRUnichar anOldChar, PRUnichar aNewChar );
  void ReplaceChar( const char* aSet, PRUnichar aNewChar );

  void ReplaceSubstring( const nsString& aTarget, const nsString& aNewValue );
  void ReplaceSubstring( const PRUnichar* aTarget, const PRUnichar* aNewValue );
# 249 "../../../../dist/include/nsString2.h"
  void Trim(const char* aSet,PRBool aEliminateLeading=1,PRBool aEliminateTrailing=1,PRBool aIgnoreQuotes=0);
# 260 "../../../../dist/include/nsString2.h"
  void CompressSet(const char* aSet, PRUnichar aChar,PRBool aEliminateLeading=1,PRBool aEliminateTrailing=1);
# 271 "../../../../dist/include/nsString2.h"
  void CompressWhitespace( PRBool aEliminateLeading=1,PRBool aEliminateTrailing=1);
# 281 "../../../../dist/include/nsString2.h"
  nsString* ToNewString() const;







  char* ToNewCString() const;







  char* ToNewUTF8String() const;







  PRUnichar* ToNewUnicode() const;
# 314 "../../../../dist/include/nsString2.h"
  char* ToCString(char* aBuf,PRUint32 aBufLength,PRUint32 anOffset=0) const;






  float ToFloat(PRInt32* aErrorCode) const;







  PRInt32 ToInteger(PRInt32* aErrorCode,PRUint32 aRadix=(10)) const;
# 345 "../../../../dist/include/nsString2.h"
  nsString& operator=( const nsString& aString ) { Assign(aString); return *this; }
  nsString& operator=( const nsAString& aReadable ) { Assign(aReadable); return *this; }

  nsString& operator=( const PRUnichar* aPtr ) { Assign(aPtr); return *this; }
  nsString& operator=( PRUnichar aChar ) { Assign(aChar); return *this; }

  void AssignWithConversion(char);
  void AssignWithConversion(const char*);
  void AssignWithConversion(const char*, PRInt32);
# 364 "../../../../dist/include/nsString2.h"
  void AppendInt(PRInt32, PRInt32=10);
  void AppendFloat(double);
  void AppendWithConversion(const char*, PRInt32=-1);
  void AppendWithConversion(char);

  virtual void do_AppendFromElement( PRUnichar );



  void InsertWithConversion(const char*, PRUint32, PRInt32=-1);
# 389 "../../../../dist/include/nsString2.h"
  PRInt32 Find(const nsString& aString,PRBool aIgnoreCase=0,PRInt32 anOffset=0,PRInt32 aCount=-1) const;
  PRInt32 Find(const nsStr& aString,PRBool aIgnoreCase=0,PRInt32 anOffset=0,PRInt32 aCount=-1) const;
  PRInt32 Find(const char* aString,PRBool aIgnoreCase=0,PRInt32 anOffset=0,PRInt32 aCount=-1) const;
  PRInt32 Find(const PRUnichar* aString,PRBool aIgnoreCase=0,PRInt32 anOffset=0,PRInt32 aCount=-1) const;
# 405 "../../../../dist/include/nsString2.h"
  PRInt32 FindChar(PRUnichar aChar,PRBool aIgnoreCase=0,PRInt32 anOffset=0,PRInt32 aCount=-1) const;
# 414 "../../../../dist/include/nsString2.h"
  PRInt32 FindCharInSet(const char* aString,PRInt32 anOffset=0) const;
  PRInt32 FindCharInSet(const PRUnichar* aString,PRInt32 anOffset=0) const;
  PRInt32 FindCharInSet(const nsStr& aString,PRInt32 anOffset=0) const;
# 427 "../../../../dist/include/nsString2.h"
  PRInt32 RFind(const char* aCString,PRBool aIgnoreCase=0,PRInt32 anOffset=-1,PRInt32 aCount=-1) const;
  PRInt32 RFind(const nsString& aString,PRBool aIgnoreCase=0,PRInt32 anOffset=-1,PRInt32 aCount=-1) const;
  PRInt32 RFind(const nsStr& aString,PRBool aIgnoreCase=0,PRInt32 anOffset=-1,PRInt32 aCount=-1) const;
  PRInt32 RFind(const PRUnichar* aString,PRBool aIgnoreCase=0,PRInt32 anOffset=-1,PRInt32 aCount=-1) const;
# 443 "../../../../dist/include/nsString2.h"
  PRInt32 RFindChar(PRUnichar aChar,PRBool aIgnoreCase=0,PRInt32 anOffset=-1,PRInt32 aCount=-1) const;
# 452 "../../../../dist/include/nsString2.h"
  PRInt32 RFindCharInSet(const char* aString,PRInt32 anOffset=-1) const;
  PRInt32 RFindCharInSet(const PRUnichar* aString,PRInt32 anOffset=-1) const;
  PRInt32 RFindCharInSet(const nsStr& aString,PRInt32 anOffset=-1) const;
# 470 "../../../../dist/include/nsString2.h"
  PRInt32 CompareWithConversion(const char* aString,PRBool aIgnoreCase=0,PRInt32 aCount=-1) const;
  PRInt32 CompareWithConversion(const nsString& aString,PRBool aIgnoreCase=0,PRInt32 aCount=-1) const;
  PRInt32 CompareWithConversion(const PRUnichar* aString,PRBool aIgnoreCase=0,PRInt32 aCount=-1) const;

  PRBool EqualsWithConversion(const nsString &aString,PRBool aIgnoreCase=0,PRInt32 aCount=-1) const;
  PRBool EqualsWithConversion(const char* aString,PRBool aIgnoreCase=0,PRInt32 aCount=-1) const;
  PRBool EqualsWithConversion(const PRUnichar* aString,PRBool aIgnoreCase=0,PRInt32 aCount=-1) const;
  PRBool EqualsAtom( nsIAtom* anAtom,PRBool aIgnoreCase) const;

  PRBool EqualsIgnoreCase(const nsString& aString) const;
  PRBool EqualsIgnoreCase(const char* aString,PRInt32 aCount=-1) const;
  PRBool EqualsIgnoreCase( nsIAtom *aAtom) const;
# 490 "../../../../dist/include/nsString2.h"
  PRBool IsASCII(const PRUnichar* aBuffer=0);

  void DebugDump(void) const;







  static PRBool IsSpace(PRUnichar ch);







  static PRBool IsAlpha(PRUnichar ch);







  static PRBool IsDigit(PRUnichar ch);

private:


  void operator=( char );
  void AssignWithConversion( PRUnichar );
  void AssignWithConversion( const PRUnichar*, PRInt32=-1 );
  void AppendWithConversion( PRUnichar );
  void AppendWithConversion( const PRUnichar*, PRInt32=-1 );
  void InsertWithConversion( const PRUnichar*, PRUint32, PRInt32=-1 );
};




extern int fputs(const nsString& aString, FILE* out);
# 542 "../../../../dist/include/nsString2.h"
class nsAutoString : public nsString {
public:

    virtual ~nsAutoString();
    nsAutoString();
    nsAutoString(const nsAutoString& aString);
    explicit nsAutoString(const nsAString& aString);
    explicit nsAutoString(const nsString& aString);
    explicit nsAutoString(const PRUnichar* aString);
    nsAutoString(const PRUnichar* aString,PRInt32 aLength);
    explicit nsAutoString(PRUnichar aChar);
    explicit nsAutoString(const CBufDescriptor& aBuffer);




    explicit nsAutoString(nsSubsumeStr& aSubsumeStr);



    nsAutoString& operator=( const nsAutoString& aString ) { Assign(aString); return *this; }
  private:
    void operator=( char );
  public:
    nsAutoString& operator=( const nsAString& aReadable ) { Assign(aReadable); return *this; }

    nsAutoString& operator=( const PRUnichar* aPtr ) { Assign(aPtr); return *this; }
    nsAutoString& operator=( PRUnichar aChar ) { Assign(aChar); return *this; }





    virtual void SizeOf(nsISizeOfHandler* aHandler, PRUint32* aResult) const;

    char mBuffer[kDefaultStringSize<<eTwoByte];
};



class NS_ConvertASCIItoUCS2
      : public nsAutoString



  {
    public:
      explicit NS_ConvertASCIItoUCS2( const char* );
      NS_ConvertASCIItoUCS2( const char*, PRUint32 );
      explicit NS_ConvertASCIItoUCS2( char );
# 600 "../../../../dist/include/nsString2.h"
    private:

      NS_ConvertASCIItoUCS2( PRUnichar );
  };

class NS_ConvertUTF8toUCS2
      : public nsAutoString
  {
    public:
      explicit
      NS_ConvertUTF8toUCS2( const char* aCString )
        {
          Init( aCString, ~PRUint32(0) );
        }

      NS_ConvertUTF8toUCS2( const char* aCString, PRUint32 aLength )
        {
          Init( aCString, aLength );
        }

      explicit
      NS_ConvertUTF8toUCS2( char aChar )
        {
          Init( &aChar, 1 );
        }

    protected:
      void Init( const char* aCString, PRUint32 aLength );

    private:
      NS_ConvertUTF8toUCS2( PRUnichar );
  };
# 646 "../../../../dist/include/nsString2.h"
class nsSubsumeStr : public nsString {
public:
  nsSubsumeStr();
  explicit nsSubsumeStr(nsStr& aString);
  nsSubsumeStr(PRUnichar* aString,PRBool assumeOwnership,PRInt32 aLength=-1);
  nsSubsumeStr(char* aString,PRBool assumeOwnership,PRInt32 aLength=-1);
  int Subsume(PRUnichar* aString,PRBool assumeOwnership,PRInt32 aLength=-1);

  nsSubsumeStr& operator=( const nsSubsumeStr& aReadable ) { Assign(aReadable); return *this; }
  nsSubsumeStr& operator=( const nsAString& aReadable ) { Assign(aReadable); return *this; }

  nsSubsumeStr& operator=( const PRUnichar* aPtr ) { Assign(aPtr); return *this; }
  nsSubsumeStr& operator=( PRUnichar aChar ) { Assign(aChar); return *this; }
private:
  void operator=( char );
};
# 47 "../../../../dist/include/nsString.h" 2
# 1 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prtypes.h" 1
# 48 "../../../../dist/include/nsString.h" 2
# 1 "../../../../dist/include/nscore.h" 1
# 49 "../../../../dist/include/nsString.h" 2
# 1 "/usr/lib/gcc-lib/i386-linux/3.0/include/stdio.h" 1 3
# 50 "../../../../dist/include/nsString.h" 2
# 1 "../../../../dist/include/nsStr.h" 1
# 51 "../../../../dist/include/nsString.h" 2
# 1 "../../../../dist/include/nsIAtom.h" 1
# 52 "../../../../dist/include/nsString.h" 2

# 1 "../../../../dist/include/nsAString.h" 1
# 54 "../../../../dist/include/nsString.h" 2
# 62 "../../../../dist/include/nsString.h"
# 1 "../../../../dist/include/nsAWritableString.h" 1
# 63 "../../../../dist/include/nsString.h" 2



class nsSubsumeCStr;

class nsCString :
  public nsAFlatCString,
  public nsStr {

protected:
  virtual const nsBufferHandle<char>* GetFlatBufferHandle() const;
  virtual const char* GetReadableFragment( nsReadableFragment<char>&, nsFragmentRequest, PRUint32 ) const;
  virtual char* GetWritableFragment( nsWritableFragment<char>&, nsFragmentRequest, PRUint32 );

public:
  virtual const char* get() const { return mStr; }

public:



  nsCString();





  nsCString(const nsCString& aString);

  explicit nsCString( const nsACString& );

  explicit nsCString(const char*);
  nsCString(const char*, PRInt32);





  explicit nsCString(nsSubsumeCStr& aSubsumeStr);





  virtual ~nsCString();





  virtual PRUint32 Length() const { return mLength; }





  virtual void SizeOf(nsISizeOfHandler* aHandler, PRUint32* aResult) const;
# 128 "../../../../dist/include/nsString.h"
  void SetLength(PRUint32 aLength);






  void SetCapacity(PRUint32 aLength);





  PRBool SetCharAt(PRUnichar aChar,PRUint32 anIndex);
# 151 "../../../../dist/include/nsString.h"
  void ToLowerCase();
# 160 "../../../../dist/include/nsString.h"
  void ToLowerCase(nsCString& aString) const;





  void ToUpperCase();







  void ToUpperCase(nsCString& aString) const;
# 184 "../../../../dist/include/nsString.h"
  void StripChars(const char* aSet);
  void StripChar(PRUnichar aChar,PRInt32 anOffset=0);
  void StripChar(char aChar,PRInt32 anOffset=0) { StripChar((PRUnichar) (unsigned char)aChar,anOffset); }






  void StripWhitespace();






  void ReplaceChar(PRUnichar aOldChar,PRUnichar aNewChar);
  void ReplaceChar(const char* aSet,PRUnichar aNewChar);

  void ReplaceSubstring(const nsCString& aTarget,const nsCString& aNewValue);
  void ReplaceSubstring(const char* aTarget,const char* aNewValue);
# 217 "../../../../dist/include/nsString.h"
  void Trim(const char* aSet,PRBool aEliminateLeading=1,PRBool aEliminateTrailing=1,PRBool aIgnoreQuotes=0);
# 228 "../../../../dist/include/nsString.h"
  void CompressSet(const char* aSet, PRUnichar aChar,PRBool aEliminateLeading=1,PRBool aEliminateTrailing=1);
# 239 "../../../../dist/include/nsString.h"
  void CompressWhitespace( PRBool aEliminateLeading=1,PRBool aEliminateTrailing=1);





  operator const char*() const {return (const char*)mStr;}







  nsCString* ToNewString() const;







  char* ToNewCString() const;







  PRUnichar* ToNewUnicode() const;
# 278 "../../../../dist/include/nsString.h"
  char* ToCString(char* aBuf,PRUint32 aBufLength,PRUint32 anOffset=0) const;






  float ToFloat(PRInt32* aErrorCode) const;
# 294 "../../../../dist/include/nsString.h"
  PRInt32 ToInteger(PRInt32* aErrorCode,PRUint32 aRadix=(10)) const;
# 310 "../../../../dist/include/nsString.h"
  nsCString& operator=( const nsCString& aString ) { Assign(aString); return *this; }
  nsCString& operator=( const nsACString& aReadable ) { Assign(aReadable); return *this; }

  nsCString& operator=( const char* aPtr ) { Assign(aPtr); return *this; }
  nsCString& operator=( char aChar ) { Assign(aChar); return *this; }

  void AssignWithConversion(const PRUnichar*,PRInt32=-1);
  void AssignWithConversion( const nsString& aString );
  void AssignWithConversion( const nsAString& aString );
  void AssignWithConversion(PRUnichar);
# 331 "../../../../dist/include/nsString.h"
  void AppendWithConversion(const nsString&, PRInt32=-1);
  void AppendWithConversion(PRUnichar aChar);
  void AppendWithConversion( const nsAString& aString );
  void AppendWithConversion(const PRUnichar*, PRInt32=-1);

  void AppendInt(PRInt32 aInteger,PRInt32 aRadix=10);
  void AppendFloat( double aFloat );


  void InsertWithConversion(PRUnichar aChar,PRUint32 anOffset);
# 363 "../../../../dist/include/nsString.h"
  PRInt32 Find(const nsStr& aString,PRBool aIgnoreCase=0,PRInt32 anOffset=0,PRInt32 aCount=-1) const;
  PRInt32 Find(const char* aString,PRBool aIgnoreCase=0,PRInt32 anOffset=0,PRInt32 aCount=-1) const;
  PRInt32 Find(const PRUnichar* aString,PRBool aIgnoreCase=0,PRInt32 anOffset=0,PRInt32 aCount=-1) const;
# 376 "../../../../dist/include/nsString.h"
  PRInt32 FindChar(PRUnichar aChar,PRBool aIgnoreCase=0,PRInt32 anOffset=0,PRInt32 aCount=-1) const;
# 385 "../../../../dist/include/nsString.h"
  PRInt32 FindCharInSet(const char* aString,PRInt32 anOffset=0) const;
  PRInt32 FindCharInSet(const PRUnichar* aString,PRInt32 anOffset=0) const;
  PRInt32 FindCharInSet(const nsStr& aString,PRInt32 anOffset=0) const;
# 397 "../../../../dist/include/nsString.h"
  PRInt32 RFind(const char* aCString,PRBool aIgnoreCase=0,PRInt32 anOffset=-1,PRInt32 aCount=-1) const;
  PRInt32 RFind(const nsStr& aString,PRBool aIgnoreCase=0,PRInt32 anOffset=-1,PRInt32 aCount=-1) const;
  PRInt32 RFind(const PRUnichar* aString,PRBool aIgnoreCase=0,PRInt32 anOffset=-1,PRInt32 aCount=-1) const;
# 410 "../../../../dist/include/nsString.h"
  PRInt32 RFindChar(PRUnichar aChar,PRBool aIgnoreCase=0,PRInt32 anOffset=-1,PRInt32 aCount=-1) const;
# 419 "../../../../dist/include/nsString.h"
  PRInt32 RFindCharInSet(const char* aString,PRInt32 anOffset=-1) const;
  PRInt32 RFindCharInSet(const PRUnichar* aString,PRInt32 anOffset=-1) const;
  PRInt32 RFindCharInSet(const nsStr& aString,PRInt32 anOffset=-1) const;
# 437 "../../../../dist/include/nsString.h"
  PRInt32 CompareWithConversion(const PRUnichar* aString,PRBool aIgnoreCase=0,PRInt32 aCount=-1) const;
  PRInt32 CompareWithConversion(const char* aString,PRBool aIgnoreCase=0,PRInt32 aCount=-1) const;

  PRBool EqualsWithConversion(const nsString &aString,PRBool aIgnoreCase=0,PRInt32 aCount=-1) const;
  PRBool EqualsWithConversion(const char* aString,PRBool aIgnoreCase=0,PRInt32 aCount=-1) const;
  PRBool EqualsWithConversion(const PRUnichar* aString,PRBool aIgnoreCase=0,PRInt32 aCount=-1) const;

  PRBool EqualsIgnoreCase(const char* aString,PRInt32 aCount=-1) const;
  PRBool EqualsIgnoreCase(const PRUnichar* aString,PRInt32 aCount=-1) const;


  void DebugDump(void) const;

private:


  void operator=( PRUnichar );
  void AssignWithConversion( char );
  void AssignWithConversion( const char*, PRInt32=-1 );
  void AppendWithConversion( char );
  void InsertWithConversion( char, PRUint32 );
};




extern int fputs(const nsCString& aString, FILE* out);
# 474 "../../../../dist/include/nsString.h"
class nsCAutoString : public nsCString {
public:

    virtual ~nsCAutoString();

    nsCAutoString();
    explicit nsCAutoString(const nsCString& );
    explicit nsCAutoString(const nsACString& aString);
    explicit nsCAutoString(const char* aString);
    nsCAutoString(const char* aString,PRInt32 aLength);
    explicit nsCAutoString(const CBufDescriptor& aBuffer);




    explicit nsCAutoString(nsSubsumeCStr& aSubsumeStr);



    nsCAutoString& operator=( const nsCAutoString& aString ) { Assign(aString); return *this; }
  private:
    void operator=( PRUnichar );
  public:
    nsCAutoString& operator=( const nsACString& aReadable ) { Assign(aReadable); return *this; }

    nsCAutoString& operator=( const char* aPtr ) { Assign(aPtr); return *this; }
    nsCAutoString& operator=( char aChar ) { Assign(aChar); return *this; }





    virtual void SizeOf(nsISizeOfHandler* aHandler, PRUint32* aResult) const;

    char mBuffer[kDefaultStringSize];
};






class NS_ConvertUCS2toUTF8
      : public nsCAutoString



  {
    public:
      explicit
      NS_ConvertUCS2toUTF8( const PRUnichar* aString )
        {
          Append( aString, ~PRUint32(0) );
        }

      NS_ConvertUCS2toUTF8( const PRUnichar* aString, PRUint32 aLength )
        {
          Append( aString, aLength );
        }

      explicit
      NS_ConvertUCS2toUTF8( PRUnichar aChar )
        {
          Append( &aChar, 1 );
        }

      explicit NS_ConvertUCS2toUTF8( const nsAString& aString );

    protected:
      void Append( const PRUnichar* aString, PRUint32 aLength );

    private:

      NS_ConvertUCS2toUTF8( char );
      operator const char*() const;
  };
# 565 "../../../../dist/include/nsString.h"
class nsSubsumeCStr : public nsCString {
public:
  explicit nsSubsumeCStr(nsStr& aString);
  nsSubsumeCStr(PRUnichar* aString,PRBool assumeOwnership,PRInt32 aLength=-1);
  nsSubsumeCStr(char* aString,PRBool assumeOwnership,PRInt32 aLength=-1);

  nsSubsumeCStr& operator=( const nsSubsumeCStr& aString ) { Assign(aString); return *this; }
  nsSubsumeCStr& operator=( const nsACString& aReadable ) { Assign(aReadable); return *this; }

  nsSubsumeCStr& operator=( const char* aPtr ) { Assign(aPtr); return *this; }
  nsSubsumeCStr& operator=( char aChar ) { Assign(aChar); return *this; }
private:
  void operator=( PRUnichar );
};
# 29 "../../../../dist/include/nsFont.h" 2





typedef PRBool (*nsFontFamilyEnumFunc)(const nsString& aFamily, PRBool aGeneric, void *aData);


struct nsFont {

  nsString name;


  PRUint8 style;


  PRUint8 variant;


  PRUint16 weight;



  PRUint8 decorations;


  nscoord size;


  nsFont(const char* aName, PRUint8 aStyle, PRUint8 aVariant,
         PRUint16 aWeight, PRUint8 aDecoration, nscoord aSize);


  nsFont(const nsString& aName, PRUint8 aStyle, PRUint8 aVariant,
         PRUint16 aWeight, PRUint8 aDecoration, nscoord aSize);


  nsFont(const nsFont& aFont);

  ~nsFont();

  PRBool operator==(const nsFont& aOther) const {
    return Equals(aOther);
  }

  PRBool Equals(const nsFont& aOther) const ;

  nsFont& operator=(const nsFont& aOther);





  PRBool EnumerateFamilies(nsFontFamilyEnumFunc aFunc, void* aData) const;
  void GetFirstFamily(nsString& aFamily) const;
};
# 28 "../../../../dist/include/nsIFormControlFrame.h" 2
class nsFormFrame;
class nsIPresContext;
class nsString;
class nsIContent;
# 44 "../../../../dist/include/nsIFormControlFrame.h"
class nsIFormControlFrame : public nsISupports {

public:
  static const nsIID& GetIID() {static const nsIID iid = { 0x38eb3980, 0x4d99, 0x11d2, { 0x80, 0x3f, 0x0, 0x60, 0x8, 0x15, 0xa7, 0x91 } }; return iid;}

  virtual nsresult GetType(PRInt32* aType) const = 0;

  virtual nsresult GetName(nsString* aName) = 0;

  virtual void SetFocus(PRBool aOn = 1, PRBool aRepaint = 0) = 0;

  virtual void ScrollIntoView(nsIPresContext* aPresContext) = 0;

  virtual void MouseClicked(nsIPresContext* aPresContext) = 0;

  virtual void Reset(nsIPresContext* aPresContext) = 0;

  virtual PRBool IsSuccessful(nsIFormControlFrame* aSubmitter) = 0;

  virtual PRInt32 GetMaxNumValues() = 0;

  virtual PRBool GetNamesValues(PRInt32 aMaxNumValues, PRInt32& aNumValues,
                                 nsString* aValues, nsString* aNames) = 0;

  virtual void SetFormFrame(nsFormFrame* aFrame) = 0;
# 79 "../../../../dist/include/nsIFormControlFrame.h"
  virtual nsresult SetSuggestedSize(nscoord aWidth, nscoord aHeight) = 0;
# 94 "../../../../dist/include/nsIFormControlFrame.h"
  virtual nsresult RequiresWidget(PRBool &aRequiresWidget) = 0;



  virtual nsresult GetFont(nsIPresContext* aPresContext,
                     const nsFont*& aFont) = 0;






  virtual nsresult GetFormContent(nsIContent*& aContent) const = 0;
# 116 "../../../../dist/include/nsIFormControlFrame.h"
  virtual nsresult SetProperty(nsIPresContext* aPresContext, nsIAtom* aName, const nsAReadableString& aValue) = 0;
# 126 "../../../../dist/include/nsIFormControlFrame.h"
  virtual nsresult GetProperty(nsIAtom* aName, nsAWritableString& aValue) = 0;



};
# 27 "nsFormControlHelper.h" 2
# 1 "../../../../dist/include/nsIFormManager.h" 1
# 25 "../../../../dist/include/nsIFormManager.h"
# 1 "../../../../dist/include/nsISupports.h" 1
# 26 "../../../../dist/include/nsIFormManager.h" 2
class nsIPresContext;
class nsIFrame;
# 38 "../../../../dist/include/nsIFormManager.h"
class nsIFormManager : public nsISupports {
public:
  static const nsIID& GetIID() {static const nsIID iid = { 0x592daa01, 0xcb23, 0x11d1, { 0x80, 0x2d, 0x0, 0x60, 0x8, 0x15, 0xa7, 0x91 } }; return iid;}




  virtual nsresult OnReset(nsIPresContext* aPresContext) = 0;
# 54 "../../../../dist/include/nsIFormManager.h"
  virtual nsresult OnSubmit(nsIPresContext* aPresContext, nsIFrame* aFrame) = 0;

};
# 28 "nsFormControlHelper.h" 2
# 1 "../../../../dist/include/nsISupports.h" 1
# 29 "nsFormControlHelper.h" 2
# 1 "../../../../dist/include/nsIWidget.h" 1
# 26 "../../../../dist/include/nsIWidget.h"
# 1 "../../../../dist/include/nsISupports.h" 1
# 27 "../../../../dist/include/nsIWidget.h" 2
# 1 "../../../../dist/include/nsColor.h" 1
# 26 "../../../../dist/include/nsColor.h"
# 1 "../../../../dist/include/nscore.h" 1
# 27 "../../../../dist/include/nsColor.h" 2

class nsString;



typedef PRUint32 nscolor;
# 71 "../../../../dist/include/nsColor.h"
extern "C" PRBool NS_HexToRGB(const nsString& aBuf, nscolor* aResult);




extern "C" PRBool NS_LooseHexToRGB(const nsString& aBuf, nscolor* aResult);



extern "C" PRBool NS_ColorNameToRGB(const nsString& aBuf, nscolor* aResult);



extern "C" void NS_Get3DColors(nscolor aResult[2], nscolor aColor);


extern "C" void NS_GetSpecial3DColors(nscolor aResult[2],
                                                                                           nscolor aBackgroundColor,
                                                                                           nscolor aBorderColor);



extern "C" nscolor NS_BrightenColor(nscolor inColor);



extern "C" nscolor NS_DarkenColor(nscolor inColor);


extern "C" int NS_GetBrightness(PRUint8 aRed, PRUint8 aGreen, PRUint8 aBlue);
# 28 "../../../../dist/include/nsIWidget.h" 2
# 1 "../../../../dist/include/nsIMouseListener.h" 1
# 27 "../../../../dist/include/nsIMouseListener.h"
# 1 "../../../../dist/include/nsGUIEvent.h" 1
# 26 "../../../../dist/include/nsGUIEvent.h"
# 1 "../../../../dist/include/nsPoint.h" 1
# 26 "../../../../dist/include/nsPoint.h"
# 1 "../../../../dist/include/nsCoord.h" 1
# 27 "../../../../dist/include/nsPoint.h" 2

struct nsPoint {
  nscoord x, y;


  nsPoint() {}
  nsPoint(const nsPoint& aPoint) {x = aPoint.x; y = aPoint.y;}
  nsPoint(nscoord aX, nscoord aY) {x = aX; y = aY;}

  void MoveTo(nscoord aX, nscoord aY) {x = aX; y = aY;}
  void MoveBy(nscoord aDx, nscoord aDy) {x += aDx; y += aDy;}



  PRBool operator==(const nsPoint& aPoint) const {
    return (PRBool) ((x == aPoint.x) && (y == aPoint.y));
  }
  PRBool operator!=(const nsPoint& aPoint) const {
    return (PRBool) ((x != aPoint.x) || (y != aPoint.y));
  }
  nsPoint operator+(const nsPoint& aPoint) const {
    return nsPoint(x + aPoint.x, y + aPoint.y);
  }
  nsPoint operator-(const nsPoint& aPoint) const {
    return nsPoint(x - aPoint.x, y - aPoint.y);
  }
  nsPoint& operator+=(const nsPoint& aPoint) {
    x += aPoint.x;
    y += aPoint.y;
    return *this;
  }
  nsPoint& operator-=(const nsPoint& aPoint) {
    x -= aPoint.x;
    y -= aPoint.y;
    return *this;
  }
};





struct nsFloatPoint {
  float x, y;


  nsFloatPoint() {}
  nsFloatPoint(const nsFloatPoint& aPoint) {x = aPoint.x; y = aPoint.y;}
  nsFloatPoint(float aX, float aY) {x = aX; y = aY;}

  void MoveTo(float aX, float aY) {x = aX; y = aY;}
  void MoveTo(nscoord aX, nscoord aY) {x = (float)aX; y = (float)aY;}
  void MoveBy(float aDx, float aDy) {x += aDx; y += aDy;}



  PRBool operator==(const nsFloatPoint& aPoint) const {
    return (PRBool) ((x == aPoint.x) && (y == aPoint.y));
  }
  PRBool operator!=(const nsFloatPoint& aPoint) const {
    return (PRBool) ((x != aPoint.x) || (y != aPoint.y));
  }
  nsFloatPoint operator+(const nsFloatPoint& aPoint) const {
    return nsFloatPoint(x + aPoint.x, y + aPoint.y);
  }
  nsFloatPoint operator-(const nsFloatPoint& aPoint) const {
    return nsFloatPoint(x - aPoint.x, y - aPoint.y);
  }
  nsFloatPoint& operator+=(const nsFloatPoint& aPoint) {
    x += aPoint.x;
    y += aPoint.y;
    return *this;
  }
  nsFloatPoint& operator-=(const nsFloatPoint& aPoint) {
    x -= aPoint.x;
    y -= aPoint.y;
    return *this;
  }
};






struct nsPathPoint: public nsFloatPoint{

  PRBool mIsOnCurve;


  nsPathPoint() {}
  nsPathPoint(const nsPathPoint& aPoint) {x = aPoint.x; y = aPoint.y;mIsOnCurve=aPoint.mIsOnCurve;}
  nsPathPoint(float aX, float aY) {x = aX; y = aY;mIsOnCurve=1;}
  nsPathPoint(float aX, float aY,PRBool aIsOnCurve) {x = aX; y = aY;mIsOnCurve=aIsOnCurve;}

};
# 27 "../../../../dist/include/nsGUIEvent.h" 2
# 1 "../../../../dist/include/nsRect.h" 1
# 27 "../../../../dist/include/nsRect.h"
# 1 "/usr/lib/gcc-lib/i386-linux/3.0/include/stdio.h" 1 3
# 28 "../../../../dist/include/nsRect.h" 2
# 1 "../../../../dist/include/nsCoord.h" 1
# 29 "../../../../dist/include/nsRect.h" 2
# 1 "../../../../dist/include/nsPoint.h" 1
# 30 "../../../../dist/include/nsRect.h" 2
# 1 "../../../../dist/include/nsSize.h" 1
# 26 "../../../../dist/include/nsSize.h"
# 1 "../../../../dist/include/nsCoord.h" 1
# 27 "../../../../dist/include/nsSize.h" 2




struct nsSize {
  nscoord width, height;


  nsSize() {}
  nsSize(const nsSize& aSize) {width = aSize.width; height = aSize.height;}
  nsSize(nscoord aWidth, nscoord aHeight) {width = aWidth; height = aHeight;}

  void SizeTo(nscoord aWidth, nscoord aHeight) {width = aWidth; height = aHeight;}
  void SizeBy(nscoord aDeltaWidth, nscoord aDeltaHeight) {width += aDeltaWidth;
                                                          height += aDeltaHeight;}



  PRBool operator==(const nsSize& aSize) const {
    return (PRBool) ((width == aSize.width) && (height == aSize.height));
  }
  PRBool operator!=(const nsSize& aSize) const {
    return (PRBool) ((width != aSize.width) || (height != aSize.height));
  }
  nsSize operator+(const nsSize& aSize) const {
    return nsSize(width + aSize.width, height + aSize.height);
  }
  nsSize operator-(const nsSize& aSize) const {
    return nsSize(width - aSize.width, height - aSize.height);
  }
  nsSize& operator+=(const nsSize& aSize) {width += aSize.width;
                                           height += aSize.height;
                                           return *this;}
  nsSize& operator-=(const nsSize& aSize) {width -= aSize.width;
                                           height -= aSize.height;
                                           return *this;}
};
# 31 "../../../../dist/include/nsRect.h" 2
# 1 "../../../../dist/include/nsMargin.h" 1
# 26 "../../../../dist/include/nsMargin.h"
# 1 "../../../../dist/include/nsCoord.h" 1
# 27 "../../../../dist/include/nsMargin.h" 2

struct nsMargin {
  nscoord left, top, right, bottom;


  nsMargin() {}
  nsMargin(const nsMargin& aMargin) {*this = aMargin;}
  nsMargin(nscoord aLeft, nscoord aTop,
           nscoord aRight, nscoord aBottom) {left = aLeft; top = aTop;
                                             right = aRight; bottom = aBottom;}

  void SizeTo(nscoord aLeft, nscoord aTop,
              nscoord aRight, nscoord aBottom) {left = aLeft; top = aTop;
                                                right = aRight; bottom = aBottom;}
  void SizeBy(nscoord aLeft, nscoord aTop,
              nscoord aRight, nscoord aBottom) {left += aLeft; top += aTop;
                                                right += aRight; bottom += aBottom;}



  PRBool operator==(const nsMargin& aMargin) const {
    return (PRBool) ((left == aMargin.left) && (top == aMargin.top) &&
                     (right == aMargin.right) && (bottom == aMargin.bottom));
  }
  PRBool operator!=(const nsMargin& aMargin) const {
    return (PRBool) ((left != aMargin.left) || (top != aMargin.top) ||
                     (right != aMargin.right) || (bottom != aMargin.bottom));
  }
  nsMargin operator+(const nsMargin& aMargin) const {
    return nsMargin(left + aMargin.left, top + aMargin.top,
                    right + aMargin.right, bottom + aMargin.bottom);
  }
  nsMargin operator-(const nsMargin& aMargin) const {
    return nsMargin(left - aMargin.left, top - aMargin.top,
                    right - aMargin.right, bottom - aMargin.bottom);
  }
  nsMargin& operator+=(const nsMargin& aMargin) {left += aMargin.left;
                                                 top += aMargin.top;
                                                 right += aMargin.right;
                                                 bottom += aMargin.bottom;
                                                 return *this;}
  nsMargin& operator-=(const nsMargin& aMargin) {left -= aMargin.left;
                                                 top -= aMargin.top;
                                                 right -= aMargin.right;
                                                 bottom -= aMargin.bottom;
                                                 return *this;}
};
# 32 "../../../../dist/include/nsRect.h" 2
# 1 "../../../../dist/include/nsUnitConversion.h" 1
# 25 "../../../../dist/include/nsUnitConversion.h"
# 1 "../../../../dist/include/nscore.h" 1
# 26 "../../../../dist/include/nsUnitConversion.h" 2
# 1 "/usr/include/math.h" 1 3
# 27 "/usr/include/math.h" 3
# 1 "/usr/include/features.h" 1 3
# 28 "/usr/include/math.h" 2 3

extern "C" {



# 1 "/usr/include/bits/huge_val.h" 1 3
# 25 "/usr/include/bits/huge_val.h" 3
# 1 "/usr/include/features.h" 1 3
# 26 "/usr/include/bits/huge_val.h" 2 3
# 34 "/usr/include/math.h" 2 3



# 1 "/usr/include/bits/nan.h" 1 3
# 38 "/usr/include/math.h" 2 3


# 1 "/usr/include/bits/mathdef.h" 1 3
# 29 "/usr/include/bits/mathdef.h" 3
typedef long double float_t;

typedef long double double_t;
# 41 "/usr/include/math.h" 2 3
# 63 "/usr/include/math.h" 3
# 1 "/usr/include/bits/mathcalls.h" 1 3
# 54 "/usr/include/bits/mathcalls.h" 3
extern double acos (double __x) throw (); extern double __acos (double __x) throw ();

extern double asin (double __x) throw (); extern double __asin (double __x) throw ();

extern double atan (double __x) throw (); extern double __atan (double __x) throw ();

extern double atan2 (double __y, double __x) throw (); extern double __atan2 (double __y, double __x) throw ();


extern double cos (double __x) throw (); extern double __cos (double __x) throw ();

extern double sin (double __x) throw (); extern double __sin (double __x) throw ();

extern double tan (double __x) throw (); extern double __tan (double __x) throw ();



extern void sincos (double __x, double *__sinx, double *__cosx) throw (); extern void __sincos (double __x, double *__sinx, double *__cosx) throw ();






extern double cosh (double __x) throw (); extern double __cosh (double __x) throw ();

extern double sinh (double __x) throw (); extern double __sinh (double __x) throw ();

extern double tanh (double __x) throw (); extern double __tanh (double __x) throw ();



extern double acosh (double __x) throw (); extern double __acosh (double __x) throw ();

extern double asinh (double __x) throw (); extern double __asinh (double __x) throw ();

extern double atanh (double __x) throw (); extern double __atanh (double __x) throw ();





extern double exp (double __x) throw (); extern double __exp (double __x) throw ();



extern double exp10 (double __x) throw (); extern double __exp10 (double __x) throw ();

extern double pow10 (double __x) throw (); extern double __pow10 (double __x) throw ();



extern double frexp (double __x, int *__exponent) throw (); extern double __frexp (double __x, int *__exponent) throw ();


extern double ldexp (double __x, int __exponent) throw (); extern double __ldexp (double __x, int __exponent) throw ();


extern double log (double __x) throw (); extern double __log (double __x) throw ();


extern double log10 (double __x) throw (); extern double __log10 (double __x) throw ();


extern double modf (double __x, double *__iptr) throw (); extern double __modf (double __x, double *__iptr) throw ();



extern double expm1 (double __x) throw (); extern double __expm1 (double __x) throw ();


extern double log1p (double __x) throw (); extern double __log1p (double __x) throw ();


extern double logb (double __x) throw (); extern double __logb (double __x) throw ();




extern double exp2 (double __x) throw (); extern double __exp2 (double __x) throw ();


extern double log2 (double __x) throw (); extern double __log2 (double __x) throw ();






extern double pow (double __x, double __y) throw (); extern double __pow (double __x, double __y) throw ();


extern double sqrt (double __x) throw (); extern double __sqrt (double __x) throw ();



extern double hypot (double __x, double __y) throw (); extern double __hypot (double __x, double __y) throw ();




extern double cbrt (double __x) throw (); extern double __cbrt (double __x) throw ();






extern double ceil (double __x) throw (); extern double __ceil (double __x) throw ();


extern double fabs (double __x) throw () __attribute__ ((__const__)); extern double __fabs (double __x) throw () __attribute__ ((__const__));


extern double floor (double __x) throw (); extern double __floor (double __x) throw ();


extern double fmod (double __x, double __y) throw (); extern double __fmod (double __x, double __y) throw ();




extern int __isinf (double __value) throw () __attribute__ ((__const__));


extern int __finite (double __value) throw () __attribute__ ((__const__));




extern int isinf (double __value) throw () __attribute__ ((__const__));


extern int finite (double __value) throw () __attribute__ ((__const__));


extern double drem (double __x, double __y) throw (); extern double __drem (double __x, double __y) throw ();



extern double significand (double __x) throw (); extern double __significand (double __x) throw ();




extern double copysign (double __x, double __y) throw () __attribute__ ((__const__)); extern double __copysign (double __x, double __y) throw () __attribute__ ((__const__));




extern double nan (__const char *__tagb) throw () __attribute__ ((__const__)); extern double __nan (__const char *__tagb) throw () __attribute__ ((__const__));




extern int __isnan (double __value) throw () __attribute__ ((__const__));



extern int isnan (double __value) throw () __attribute__ ((__const__));


extern double j0 (double) throw (); extern double __j0 (double) throw ();
extern double j1 (double) throw (); extern double __j1 (double) throw ();
extern double jn (int, double) throw (); extern double __jn (int, double) throw ();
extern double y0 (double) throw (); extern double __y0 (double) throw ();
extern double y1 (double) throw (); extern double __y1 (double) throw ();
extern double yn (int, double) throw (); extern double __yn (int, double) throw ();





extern double erf (double) throw (); extern double __erf (double) throw ();
extern double erfc (double) throw (); extern double __erfc (double) throw ();
extern double lgamma (double) throw (); extern double __lgamma (double) throw ();



extern double tgamma (double) throw (); extern double __tgamma (double) throw ();




extern double gamma (double) throw (); extern double __gamma (double) throw ();






extern double lgamma_r (double, int *__signgamp) throw (); extern double __lgamma_r (double, int *__signgamp) throw ();






extern double rint (double __x) throw (); extern double __rint (double __x) throw ();


extern double nextafter (double __x, double __y) throw () __attribute__ ((__const__)); extern double __nextafter (double __x, double __y) throw () __attribute__ ((__const__));

extern double nexttoward (double __x, long double __y) throw () __attribute__ ((__const__)); extern double __nexttoward (double __x, long double __y) throw () __attribute__ ((__const__));



extern double remainder (double __x, double __y) throw (); extern double __remainder (double __x, double __y) throw ();



extern double scalb (double __x, double __n) throw (); extern double __scalb (double __x, double __n) throw ();




extern double scalbn (double __x, int __n) throw (); extern double __scalbn (double __x, int __n) throw ();



extern int ilogb (double __x) throw (); extern int __ilogb (double __x) throw ();




extern double scalbln (double __x, long int __n) throw (); extern double __scalbln (double __x, long int __n) throw ();



extern double nearbyint (double __x) throw (); extern double __nearbyint (double __x) throw ();



extern double round (double __x) throw (); extern double __round (double __x) throw ();



extern double trunc (double __x) throw () __attribute__ ((__const__)); extern double __trunc (double __x) throw () __attribute__ ((__const__));




extern double remquo (double __x, double __y, int *__quo) throw (); extern double __remquo (double __x, double __y, int *__quo) throw ();






extern long int lrint (double __x) throw (); extern long int __lrint (double __x) throw ();
extern long long int llrint (double __x) throw (); extern long long int __llrint (double __x) throw ();



extern long int lround (double __x) throw (); extern long int __lround (double __x) throw ();
extern long long int llround (double __x) throw (); extern long long int __llround (double __x) throw ();



extern double fdim (double __x, double __y) throw (); extern double __fdim (double __x, double __y) throw ();


extern double fmax (double __x, double __y) throw (); extern double __fmax (double __x, double __y) throw ();


extern double fmin (double __x, double __y) throw (); extern double __fmin (double __x, double __y) throw ();



extern int __fpclassify (double __value) throw ()
     __attribute__ ((__const__));


extern int __signbit (double __value) throw ()
     __attribute__ ((__const__));



extern double fma (double __x, double __y, double __z) throw (); extern double __fma (double __x, double __y, double __z) throw ();
# 64 "/usr/include/math.h" 2 3
# 82 "/usr/include/math.h" 3
# 1 "/usr/include/bits/mathcalls.h" 1 3
# 54 "/usr/include/bits/mathcalls.h" 3
extern float acosf (float __x) throw (); extern float __acosf (float __x) throw ();

extern float asinf (float __x) throw (); extern float __asinf (float __x) throw ();

extern float atanf (float __x) throw (); extern float __atanf (float __x) throw ();

extern float atan2f (float __y, float __x) throw (); extern float __atan2f (float __y, float __x) throw ();


extern float cosf (float __x) throw (); extern float __cosf (float __x) throw ();

extern float sinf (float __x) throw (); extern float __sinf (float __x) throw ();

extern float tanf (float __x) throw (); extern float __tanf (float __x) throw ();



extern void sincosf (float __x, float *__sinx, float *__cosx) throw (); extern void __sincosf (float __x, float *__sinx, float *__cosx) throw ();






extern float coshf (float __x) throw (); extern float __coshf (float __x) throw ();

extern float sinhf (float __x) throw (); extern float __sinhf (float __x) throw ();

extern float tanhf (float __x) throw (); extern float __tanhf (float __x) throw ();



extern float acoshf (float __x) throw (); extern float __acoshf (float __x) throw ();

extern float asinhf (float __x) throw (); extern float __asinhf (float __x) throw ();

extern float atanhf (float __x) throw (); extern float __atanhf (float __x) throw ();





extern float expf (float __x) throw (); extern float __expf (float __x) throw ();



extern float exp10f (float __x) throw (); extern float __exp10f (float __x) throw ();

extern float pow10f (float __x) throw (); extern float __pow10f (float __x) throw ();



extern float frexpf (float __x, int *__exponent) throw (); extern float __frexpf (float __x, int *__exponent) throw ();


extern float ldexpf (float __x, int __exponent) throw (); extern float __ldexpf (float __x, int __exponent) throw ();


extern float logf (float __x) throw (); extern float __logf (float __x) throw ();


extern float log10f (float __x) throw (); extern float __log10f (float __x) throw ();


extern float modff (float __x, float *__iptr) throw (); extern float __modff (float __x, float *__iptr) throw ();



extern float expm1f (float __x) throw (); extern float __expm1f (float __x) throw ();


extern float log1pf (float __x) throw (); extern float __log1pf (float __x) throw ();


extern float logbf (float __x) throw (); extern float __logbf (float __x) throw ();




extern float exp2f (float __x) throw (); extern float __exp2f (float __x) throw ();


extern float log2f (float __x) throw (); extern float __log2f (float __x) throw ();






extern float powf (float __x, float __y) throw (); extern float __powf (float __x, float __y) throw ();


extern float sqrtf (float __x) throw (); extern float __sqrtf (float __x) throw ();



extern float hypotf (float __x, float __y) throw (); extern float __hypotf (float __x, float __y) throw ();




extern float cbrtf (float __x) throw (); extern float __cbrtf (float __x) throw ();






extern float ceilf (float __x) throw (); extern float __ceilf (float __x) throw ();


extern float fabsf (float __x) throw () __attribute__ ((__const__)); extern float __fabsf (float __x) throw () __attribute__ ((__const__));


extern float floorf (float __x) throw (); extern float __floorf (float __x) throw ();


extern float fmodf (float __x, float __y) throw (); extern float __fmodf (float __x, float __y) throw ();




extern int __isinff (float __value) throw () __attribute__ ((__const__));


extern int __finitef (float __value) throw () __attribute__ ((__const__));




extern int isinff (float __value) throw () __attribute__ ((__const__));


extern int finitef (float __value) throw () __attribute__ ((__const__));


extern float dremf (float __x, float __y) throw (); extern float __dremf (float __x, float __y) throw ();



extern float significandf (float __x) throw (); extern float __significandf (float __x) throw ();




extern float copysignf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) throw () __attribute__ ((__const__));




extern float nanf (__const char *__tagb) throw () __attribute__ ((__const__)); extern float __nanf (__const char *__tagb) throw () __attribute__ ((__const__));




extern int __isnanf (float __value) throw () __attribute__ ((__const__));



extern int isnanf (float __value) throw () __attribute__ ((__const__));


extern float j0f (float) throw (); extern float __j0f (float) throw ();
extern float j1f (float) throw (); extern float __j1f (float) throw ();
extern float jnf (int, float) throw (); extern float __jnf (int, float) throw ();
extern float y0f (float) throw (); extern float __y0f (float) throw ();
extern float y1f (float) throw (); extern float __y1f (float) throw ();
extern float ynf (int, float) throw (); extern float __ynf (int, float) throw ();





extern float erff (float) throw (); extern float __erff (float) throw ();
extern float erfcf (float) throw (); extern float __erfcf (float) throw ();
extern float lgammaf (float) throw (); extern float __lgammaf (float) throw ();



extern float tgammaf (float) throw (); extern float __tgammaf (float) throw ();




extern float gammaf (float) throw (); extern float __gammaf (float) throw ();






extern float lgammaf_r (float, int *__signgamp) throw (); extern float __lgammaf_r (float, int *__signgamp) throw ();






extern float rintf (float __x) throw (); extern float __rintf (float __x) throw ();


extern float nextafterf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __nextafterf (float __x, float __y) throw () __attribute__ ((__const__));

extern float nexttowardf (float __x, long double __y) throw () __attribute__ ((__const__)); extern float __nexttowardf (float __x, long double __y) throw () __attribute__ ((__const__));



extern float remainderf (float __x, float __y) throw (); extern float __remainderf (float __x, float __y) throw ();



extern float scalbf (float __x, float __n) throw (); extern float __scalbf (float __x, float __n) throw ();




extern float scalbnf (float __x, int __n) throw (); extern float __scalbnf (float __x, int __n) throw ();



extern int ilogbf (float __x) throw (); extern int __ilogbf (float __x) throw ();




extern float scalblnf (float __x, long int __n) throw (); extern float __scalblnf (float __x, long int __n) throw ();



extern float nearbyintf (float __x) throw (); extern float __nearbyintf (float __x) throw ();



extern float roundf (float __x) throw (); extern float __roundf (float __x) throw ();



extern float truncf (float __x) throw () __attribute__ ((__const__)); extern float __truncf (float __x) throw () __attribute__ ((__const__));




extern float remquof (float __x, float __y, int *__quo) throw (); extern float __remquof (float __x, float __y, int *__quo) throw ();






extern long int lrintf (float __x) throw (); extern long int __lrintf (float __x) throw ();
extern long long int llrintf (float __x) throw (); extern long long int __llrintf (float __x) throw ();



extern long int lroundf (float __x) throw (); extern long int __lroundf (float __x) throw ();
extern long long int llroundf (float __x) throw (); extern long long int __llroundf (float __x) throw ();



extern float fdimf (float __x, float __y) throw (); extern float __fdimf (float __x, float __y) throw ();


extern float fmaxf (float __x, float __y) throw (); extern float __fmaxf (float __x, float __y) throw ();


extern float fminf (float __x, float __y) throw (); extern float __fminf (float __x, float __y) throw ();



extern int __fpclassifyf (float __value) throw ()
     __attribute__ ((__const__));


extern int __signbitf (float __value) throw ()
     __attribute__ ((__const__));



extern float fmaf (float __x, float __y, float __z) throw (); extern float __fmaf (float __x, float __y, float __z) throw ();
# 83 "/usr/include/math.h" 2 3
# 99 "/usr/include/math.h" 3
# 1 "/usr/include/bits/mathcalls.h" 1 3
# 54 "/usr/include/bits/mathcalls.h" 3
extern long double acosl (long double __x) throw (); extern long double __acosl (long double __x) throw ();

extern long double asinl (long double __x) throw (); extern long double __asinl (long double __x) throw ();

extern long double atanl (long double __x) throw (); extern long double __atanl (long double __x) throw ();

extern long double atan2l (long double __y, long double __x) throw (); extern long double __atan2l (long double __y, long double __x) throw ();


extern long double cosl (long double __x) throw (); extern long double __cosl (long double __x) throw ();

extern long double sinl (long double __x) throw (); extern long double __sinl (long double __x) throw ();

extern long double tanl (long double __x) throw (); extern long double __tanl (long double __x) throw ();



extern void sincosl (long double __x, long double *__sinx, long double *__cosx) throw (); extern void __sincosl (long double __x, long double *__sinx, long double *__cosx) throw ();






extern long double coshl (long double __x) throw (); extern long double __coshl (long double __x) throw ();

extern long double sinhl (long double __x) throw (); extern long double __sinhl (long double __x) throw ();

extern long double tanhl (long double __x) throw (); extern long double __tanhl (long double __x) throw ();



extern long double acoshl (long double __x) throw (); extern long double __acoshl (long double __x) throw ();

extern long double asinhl (long double __x) throw (); extern long double __asinhl (long double __x) throw ();

extern long double atanhl (long double __x) throw (); extern long double __atanhl (long double __x) throw ();





extern long double expl (long double __x) throw (); extern long double __expl (long double __x) throw ();



extern long double exp10l (long double __x) throw (); extern long double __exp10l (long double __x) throw ();

extern long double pow10l (long double __x) throw (); extern long double __pow10l (long double __x) throw ();



extern long double frexpl (long double __x, int *__exponent) throw (); extern long double __frexpl (long double __x, int *__exponent) throw ();


extern long double ldexpl (long double __x, int __exponent) throw (); extern long double __ldexpl (long double __x, int __exponent) throw ();


extern long double logl (long double __x) throw (); extern long double __logl (long double __x) throw ();


extern long double log10l (long double __x) throw (); extern long double __log10l (long double __x) throw ();


extern long double modfl (long double __x, long double *__iptr) throw (); extern long double __modfl (long double __x, long double *__iptr) throw ();



extern long double expm1l (long double __x) throw (); extern long double __expm1l (long double __x) throw ();


extern long double log1pl (long double __x) throw (); extern long double __log1pl (long double __x) throw ();


extern long double logbl (long double __x) throw (); extern long double __logbl (long double __x) throw ();




extern long double exp2l (long double __x) throw (); extern long double __exp2l (long double __x) throw ();


extern long double log2l (long double __x) throw (); extern long double __log2l (long double __x) throw ();






extern long double powl (long double __x, long double __y) throw (); extern long double __powl (long double __x, long double __y) throw ();


extern long double sqrtl (long double __x) throw (); extern long double __sqrtl (long double __x) throw ();



extern long double hypotl (long double __x, long double __y) throw (); extern long double __hypotl (long double __x, long double __y) throw ();




extern long double cbrtl (long double __x) throw (); extern long double __cbrtl (long double __x) throw ();






extern long double ceill (long double __x) throw (); extern long double __ceill (long double __x) throw ();


extern long double fabsl (long double __x) throw () __attribute__ ((__const__)); extern long double __fabsl (long double __x) throw () __attribute__ ((__const__));


extern long double floorl (long double __x) throw (); extern long double __floorl (long double __x) throw ();


extern long double fmodl (long double __x, long double __y) throw (); extern long double __fmodl (long double __x, long double __y) throw ();




extern int __isinfl (long double __value) throw () __attribute__ ((__const__));


extern int __finitel (long double __value) throw () __attribute__ ((__const__));




extern int isinfl (long double __value) throw () __attribute__ ((__const__));


extern int finitel (long double __value) throw () __attribute__ ((__const__));


extern long double dreml (long double __x, long double __y) throw (); extern long double __dreml (long double __x, long double __y) throw ();



extern long double significandl (long double __x) throw (); extern long double __significandl (long double __x) throw ();




extern long double copysignl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __copysignl (long double __x, long double __y) throw () __attribute__ ((__const__));




extern long double nanl (__const char *__tagb) throw () __attribute__ ((__const__)); extern long double __nanl (__const char *__tagb) throw () __attribute__ ((__const__));




extern int __isnanl (long double __value) throw () __attribute__ ((__const__));



extern int isnanl (long double __value) throw () __attribute__ ((__const__));


extern long double j0l (long double) throw (); extern long double __j0l (long double) throw ();
extern long double j1l (long double) throw (); extern long double __j1l (long double) throw ();
extern long double jnl (int, long double) throw (); extern long double __jnl (int, long double) throw ();
extern long double y0l (long double) throw (); extern long double __y0l (long double) throw ();
extern long double y1l (long double) throw (); extern long double __y1l (long double) throw ();
extern long double ynl (int, long double) throw (); extern long double __ynl (int, long double) throw ();





extern long double erfl (long double) throw (); extern long double __erfl (long double) throw ();
extern long double erfcl (long double) throw (); extern long double __erfcl (long double) throw ();
extern long double lgammal (long double) throw (); extern long double __lgammal (long double) throw ();



extern long double tgammal (long double) throw (); extern long double __tgammal (long double) throw ();




extern long double gammal (long double) throw (); extern long double __gammal (long double) throw ();






extern long double lgammal_r (long double, int *__signgamp) throw (); extern long double __lgammal_r (long double, int *__signgamp) throw ();






extern long double rintl (long double __x) throw (); extern long double __rintl (long double __x) throw ();


extern long double nextafterl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __nextafterl (long double __x, long double __y) throw () __attribute__ ((__const__));

extern long double nexttowardl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __nexttowardl (long double __x, long double __y) throw () __attribute__ ((__const__));



extern long double remainderl (long double __x, long double __y) throw (); extern long double __remainderl (long double __x, long double __y) throw ();



extern long double scalbl (long double __x, long double __n) throw (); extern long double __scalbl (long double __x, long double __n) throw ();




extern long double scalbnl (long double __x, int __n) throw (); extern long double __scalbnl (long double __x, int __n) throw ();



extern int ilogbl (long double __x) throw (); extern int __ilogbl (long double __x) throw ();




extern long double scalblnl (long double __x, long int __n) throw (); extern long double __scalblnl (long double __x, long int __n) throw ();



extern long double nearbyintl (long double __x) throw (); extern long double __nearbyintl (long double __x) throw ();



extern long double roundl (long double __x) throw (); extern long double __roundl (long double __x) throw ();



extern long double truncl (long double __x) throw () __attribute__ ((__const__)); extern long double __truncl (long double __x) throw () __attribute__ ((__const__));




extern long double remquol (long double __x, long double __y, int *__quo) throw (); extern long double __remquol (long double __x, long double __y, int *__quo) throw ();






extern long int lrintl (long double __x) throw (); extern long int __lrintl (long double __x) throw ();
extern long long int llrintl (long double __x) throw (); extern long long int __llrintl (long double __x) throw ();



extern long int lroundl (long double __x) throw (); extern long int __lroundl (long double __x) throw ();
extern long long int llroundl (long double __x) throw (); extern long long int __llroundl (long double __x) throw ();



extern long double fdiml (long double __x, long double __y) throw (); extern long double __fdiml (long double __x, long double __y) throw ();


extern long double fmaxl (long double __x, long double __y) throw (); extern long double __fmaxl (long double __x, long double __y) throw ();


extern long double fminl (long double __x, long double __y) throw (); extern long double __fminl (long double __x, long double __y) throw ();



extern int __fpclassifyl (long double __value) throw ()
     __attribute__ ((__const__));


extern int __signbitl (long double __value) throw ()
     __attribute__ ((__const__));



extern long double fmal (long double __x, long double __y, long double __z) throw (); extern long double __fmal (long double __x, long double __y, long double __z) throw ();
# 100 "/usr/include/math.h" 2 3
# 113 "/usr/include/math.h" 3
extern int signgam;
# 154 "/usr/include/math.h" 3
enum
  {
    FP_NAN,

    FP_INFINITE,

    FP_ZERO,

    FP_SUBNORMAL,

    FP_NORMAL

  };
# 240 "/usr/include/math.h" 3
typedef enum
{
  _IEEE_ = -1,
  _SVID_,
  _XOPEN_,
  _POSIX_,
  _ISOC_
} _LIB_VERSION_TYPE;




extern _LIB_VERSION_TYPE _LIB_VERSION;
# 263 "/usr/include/math.h" 3
struct __exception



  {
    int type;
    char *name;
    double arg1;
    double arg2;
    double retval;
  };


extern int matherr (struct __exception *__exc) throw ();
# 350 "/usr/include/math.h" 3
# 1 "/usr/include/bits/mathinline.h" 1 3
# 127 "/usr/include/bits/mathinline.h" 3
__inline int
__signbitf (float __x) throw ()
{
  __extension__ union { float __f; int __i; } __u = { __f: __x };
  return __u.__i < 0;
}
__inline int
__signbit (double __x) throw ()
{
  __extension__ union { double __d; int __i[2]; } __u = { __d: __x };
  return __u.__i[1] < 0;
}
__inline int
__signbitl (long double __x) throw ()
{
  __extension__ union { long double __l; int __i[3]; } __u = { __l: __x };
  return (__u.__i[2] & 0x8000) != 0;
}
# 291 "/usr/include/bits/mathinline.h" 3
__inline double __sgn (double) throw (); __inline double __sgn (double __x) throw () { return __x == 0.0 ? 0.0 : (__x > 0.0 ? 1.0 : -1.0); } __inline float __sgnf (float) throw (); __inline float __sgnf (float __x) throw () { return __x == 0.0 ? 0.0 : (__x > 0.0 ? 1.0 : -1.0); } __inline long double __sgnl (long double) throw (); __inline long double __sgnl (long double __x) throw () { return __x == 0.0 ? 0.0 : (__x > 0.0 ? 1.0 : -1.0); }
# 425 "/usr/include/bits/mathinline.h" 3
__inline double atan2 (double __y, double __x) throw () { register long double __value; __asm __volatile__ ("fpatan" : "=t" (__value) : "0" (__x), "u" (__y) : "st(1)"); return __value; } __inline float atan2f (float __y, float __x) throw () { register long double __value; __asm __volatile__ ("fpatan" : "=t" (__value) : "0" (__x), "u" (__y) : "st(1)"); return __value; } __inline long double atan2l (long double __y, long double __x) throw () { register long double __value; __asm __volatile__ ("fpatan" : "=t" (__value) : "0" (__x), "u" (__y) : "st(1)"); return __value; }
__inline long double __atan2l (long double __y, long double __x) throw () { register long double __value; __asm __volatile__ ("fpatan" : "=t" (__value) : "0" (__x), "u" (__y) : "st(1)"); return __value; }


__inline double fmod (double __x, double __y) throw () { register long double __value; __asm __volatile__ ("1:	fprem\n\t" "fnstsw	%%ax\n\t" "sahf\n\t" "jp	1b" : "=t" (__value) : "0" (__x), "u" (__y) : "ax", "cc"); return __value; } __inline float fmodf (float __x, float __y) throw () { register long double __value; __asm __volatile__ ("1:	fprem\n\t" "fnstsw	%%ax\n\t" "sahf\n\t" "jp	1b" : "=t" (__value) : "0" (__x), "u" (__y) : "ax", "cc"); return __value; } __inline long double fmodl (long double __x, long double __y) throw () { register long double __value; __asm __volatile__ ("1:	fprem\n\t" "fnstsw	%%ax\n\t" "sahf\n\t" "jp	1b" : "=t" (__value) : "0" (__x), "u" (__y) : "ax", "cc"); return __value; }
# 440 "/usr/include/bits/mathinline.h" 3
__inline double sqrt (double __x) throw () { register double __result; __asm __volatile__ ("fsqrt" : "=t" (__result) : "0" (__x)); return __result; } __inline float sqrtf (float __x) throw () { register float __result; __asm __volatile__ ("fsqrt" : "=t" (__result) : "0" (__x)); return __result; } __inline long double sqrtl (long double __x) throw () { register long double __result; __asm __volatile__ ("fsqrt" : "=t" (__result) : "0" (__x)); return __result; }
__inline long double __sqrtl (long double __x) throw () { register long double __result; __asm __volatile__ ("fsqrt" : "=t" (__result) : "0" (__x)); return __result; }


__inline double fabs (double __x) throw () { return __builtin_fabs (__x); }
__inline float fabsf (float __x) throw () { return __builtin_fabsf (__x); }
__inline long double fabsl (long double __x) throw () { return __builtin_fabsl (__x); }
__inline long double __fabsl (long double __x) throw () { return __builtin_fabsl (__x); }
# 466 "/usr/include/bits/mathinline.h" 3
__inline double atan (double __x) throw () { register double __result; __asm __volatile__ ("fld1; fpatan" : "=t" (__result) : "0" (__x) : "st(1)"); return __result; } __inline float atanf (float __x) throw () { register float __result; __asm __volatile__ ("fld1; fpatan" : "=t" (__result) : "0" (__x) : "st(1)"); return __result; } __inline long double atanl (long double __x) throw () { register long double __result; __asm __volatile__ ("fld1; fpatan" : "=t" (__result) : "0" (__x) : "st(1)"); return __result; }

__inline long double __sgn1l (long double) throw (); __inline long double __sgn1l (long double __x) throw () { __extension__ union { long double __xld; unsigned int __xi[3]; } __n = { __xld: __x }; __n.__xi[2] = (__n.__xi[2] & 0x8000) | 0x3fff; __n.__xi[1] = 0x80000000; __n.__xi[0] = 0; return __n.__xld; }
# 492 "/usr/include/bits/mathinline.h" 3
__inline double floor (double __x) throw () { register long double __value; __volatile unsigned short int __cw; __volatile unsigned short int __cwtmp; __asm __volatile ("fnstcw %0" : "=m" (__cw)); __cwtmp = (__cw & 0xf3ff) | 0x0400; __asm __volatile ("fldcw %0" : : "m" (__cwtmp)); __asm __volatile ("frndint" : "=t" (__value) : "0" (__x)); __asm __volatile ("fldcw %0" : : "m" (__cw)); return __value; } __inline float floorf (float __x) throw () { register long double __value; __volatile unsigned short int __cw; __volatile unsigned short int __cwtmp; __asm __volatile ("fnstcw %0" : "=m" (__cw)); __cwtmp = (__cw & 0xf3ff) | 0x0400; __asm __volatile ("fldcw %0" : : "m" (__cwtmp)); __asm __volatile ("frndint" : "=t" (__value) : "0" (__x)); __asm __volatile ("fldcw %0" : : "m" (__cw)); return __value; } __inline long double floorl (long double __x) throw () { register long double __value; __volatile unsigned short int __cw; __volatile unsigned short int __cwtmp; __asm __volatile ("f!
nstcw %0" : "=m" (__cw)); __cwtmp = (__cw & 0xf3ff) | 0x0400; __asm __volatile ("fldcw %0" : : "m" (__cwtmp)); __asm __volatile ("frndint" : "=t" (__value) : "0" (__x)); __asm __volatile ("fldcw %0" : : "m" (__cw)); return __value; }
# 503 "/usr/include/bits/mathinline.h" 3
__inline double ceil (double __x) throw () { register long double __value; __volatile unsigned short int __cw; __volatile unsigned short int __cwtmp; __asm __volatile ("fnstcw %0" : "=m" (__cw)); __cwtmp = (__cw & 0xf3ff) | 0x0800; __asm __volatile ("fldcw %0" : : "m" (__cwtmp)); __asm __volatile ("frndint" : "=t" (__value) : "0" (__x)); __asm __volatile ("fldcw %0" : : "m" (__cw)); return __value; } __inline float ceilf (float __x) throw () { register long double __value; __volatile unsigned short int __cw; __volatile unsigned short int __cwtmp; __asm __volatile ("fnstcw %0" : "=m" (__cw)); __cwtmp = (__cw & 0xf3ff) | 0x0800; __asm __volatile ("fldcw %0" : : "m" (__cwtmp)); __asm __volatile ("frndint" : "=t" (__value) : "0" (__x)); __asm __volatile ("fldcw %0" : : "m" (__cw)); return __value; } __inline long double ceill (long double __x) throw () { register long double __value; __volatile unsigned short int __cw; __volatile unsigned short int __cwtmp; __asm __volatile ("fnst!
cw %0" : "=m" (__cw)); __cwtmp = (__cw & 0xf3ff) | 0x0800; __asm __volatile ("fldcw %0" : : "m" (__cwtmp)); __asm __volatile ("frndint" : "=t" (__value) : "0" (__x)); __asm __volatile ("fldcw %0" : : "m" (__cw)); return __value; }
# 521 "/usr/include/bits/mathinline.h" 3
__inline double
ldexp (double __x, int __y) throw ()
{
  register long double __value; __asm __volatile__ ("fscale" : "=t" (__value) : "0" (__x), "u" ((long double) __y)); return __value;
}
# 539 "/usr/include/bits/mathinline.h" 3
__inline double log1p (double __x) throw () { register long double __value; if (__fabsl (__x) >= 1.0 - 0.5 * 1.41421356237309504880L) __value = logl (1.0 + __x); else __asm __volatile__ ("fldln2\n\t" "fxch\n\t" "fyl2xp1" : "=t" (__value) : "0" (__x) : "st(1)"); return __value; } __inline float log1pf (float __x) throw () { register long double __value; if (__fabsl (__x) >= 1.0 - 0.5 * 1.41421356237309504880L) __value = logl (1.0 + __x); else __asm __volatile__ ("fldln2\n\t" "fxch\n\t" "fyl2xp1" : "=t" (__value) : "0" (__x) : "st(1)"); return __value; } __inline long double log1pl (long double __x) throw () { register long double __value; if (__fabsl (__x) >= 1.0 - 0.5 * 1.41421356237309504880L) __value = logl (1.0 + __x); else __asm __volatile__ ("fldln2\n\t" "fxch\n\t" "fyl2xp1" : "=t" (__value) : "0" (__x) : "st(1)"); return __value; }
# 553 "/usr/include/bits/mathinline.h" 3
__inline double asinh (double __x) throw () { register long double __y = __fabsl (__x); return (log1pl (__y * __y / (__sqrtl (__y * __y + 1.0) + 1.0) + __y) * __sgn1l (__x)); } __inline float asinhf (float __x) throw () { register long double __y = __fabsl (__x); return (log1pl (__y * __y / (__sqrtl (__y * __y + 1.0) + 1.0) + __y) * __sgn1l (__x)); } __inline long double asinhl (long double __x) throw () { register long double __y = __fabsl (__x); return (log1pl (__y * __y / (__sqrtl (__y * __y + 1.0) + 1.0) + __y) * __sgn1l (__x)); }




__inline double acosh (double __x) throw () { return logl (__x + __sqrtl (__x - 1.0) * __sqrtl (__x + 1.0)); } __inline float acoshf (float __x) throw () { return logl (__x + __sqrtl (__x - 1.0) * __sqrtl (__x + 1.0)); } __inline long double acoshl (long double __x) throw () { return logl (__x + __sqrtl (__x - 1.0) * __sqrtl (__x + 1.0)); }


__inline double atanh (double __x) throw () { register long double __y = __fabsl (__x); return -0.5 * log1pl (-(__y + __y) / (1.0 + __y)) * __sgn1l (__x); } __inline float atanhf (float __x) throw () { register long double __y = __fabsl (__x); return -0.5 * log1pl (-(__y + __y) / (1.0 + __y)) * __sgn1l (__x); } __inline long double atanhl (long double __x) throw () { register long double __y = __fabsl (__x); return -0.5 * log1pl (-(__y + __y) / (1.0 + __y)) * __sgn1l (__x); }




__inline double hypot (double __x, double __y) throw () { return __sqrtl (__x * __x + __y * __y); } __inline float hypotf (float __x, float __y) throw () { return __sqrtl (__x * __x + __y * __y); } __inline long double hypotl (long double __x, long double __y) throw () { return __sqrtl (__x * __x + __y * __y); }

__inline double logb (double __x) throw () { register long double __value; register long double __junk; __asm __volatile__ ("fxtract\n\t" : "=t" (__junk), "=u" (__value) : "0" (__x)); return __value; } __inline float logbf (float __x) throw () { register long double __value; register long double __junk; __asm __volatile__ ("fxtract\n\t" : "=t" (__junk), "=u" (__value) : "0" (__x)); return __value; } __inline long double logbl (long double __x) throw () { register long double __value; register long double __junk; __asm __volatile__ ("fxtract\n\t" : "=t" (__junk), "=u" (__value) : "0" (__x)); return __value; }
# 583 "/usr/include/bits/mathinline.h" 3
__inline float
ldexpf (float __x, int __y) throw ()
{
  register long double __value; __asm __volatile__ ("fscale" : "=t" (__value) : "0" (__x), "u" ((long double) __y)); return __value;
}

__inline long double
ldexpl (long double __x, int __y) throw ()
{
  register long double __value; __asm __volatile__ ("fscale" : "=t" (__value) : "0" (__x), "u" ((long double) __y)); return __value;
}
# 607 "/usr/include/bits/mathinline.h" 3
__inline long int
lrintf (float __x) throw ()
{
  long int __lrintres; __asm__ __volatile__ ("fistpl %0" : "=m" (__lrintres) : "t" (__x) : "st"); return __lrintres;
}
__inline long int
lrint (double __x) throw ()
{
  long int __lrintres; __asm__ __volatile__ ("fistpl %0" : "=m" (__lrintres) : "t" (__x) : "st"); return __lrintres;
}
__inline long int
lrintl (long double __x) throw ()
{
  long int __lrintres; __asm__ __volatile__ ("fistpl %0" : "=m" (__lrintres) : "t" (__x) : "st"); return __lrintres;
}
# 630 "/usr/include/bits/mathinline.h" 3
__inline long long int
llrintf (float __x) throw ()
{
  long long int __llrintres; __asm__ __volatile__ ("fistpll %0" : "=m" (__llrintres) : "t" (__x) : "st"); return __llrintres;
}
__inline long long int
llrint (double __x) throw ()
{
  long long int __llrintres; __asm__ __volatile__ ("fistpll %0" : "=m" (__llrintres) : "t" (__x) : "st"); return __llrintres;
}
__inline long long int
llrintl (long double __x) throw ()
{
  long long int __llrintres; __asm__ __volatile__ ("fistpll %0" : "=m" (__llrintres) : "t" (__x) : "st"); return __llrintres;
}







__inline double drem (double __x, double __y) throw () { register double __value; register int __clobbered; __asm __volatile__ ("1:	fprem1\n\t" "fstsw	%%ax\n\t" "sahf\n\t" "jp	1b" : "=t" (__value), "=&a" (__clobbered) : "0" (__x), "u" (__y) : "cc"); return __value; } __inline float dremf (float __x, float __y) throw () { register double __value; register int __clobbered; __asm __volatile__ ("1:	fprem1\n\t" "fstsw	%%ax\n\t" "sahf\n\t" "jp	1b" : "=t" (__value), "=&a" (__clobbered) : "0" (__x), "u" (__y) : "cc"); return __value; } __inline long double dreml (long double __x, long double __y) throw () { register double __value; register int __clobbered; __asm __volatile__ ("1:	fprem1\n\t" "fstsw	%%ax\n\t" "sahf\n\t" "jp	1b" : "=t" (__value), "=&a" (__clobbered) : "0" (__x), "u" (__y) : "cc"); return __value; }
# 665 "/usr/include/bits/mathinline.h" 3
__inline int
__finite (double __x) throw ()
{
  return (__extension__
          (((((union { double __d; int __i[2]; }) {__d: __x}).__i[1]
             | 0x800fffffu) + 1) >> 31));
}
# 351 "/usr/include/math.h" 2 3
# 411 "/usr/include/math.h" 3
}
# 27 "../../../../dist/include/nsUnitConversion.h" 2
# 39 "../../../../dist/include/nsUnitConversion.h"
inline nscoord NSToCoordFloor(float aValue)
{
  return ((0.0f <= aValue) ? nscoord(aValue) : nscoord(aValue - 0.9999999999999999f));
}

inline nscoord NSToCoordCeil(float aValue)
{
  return ((0.0f <= aValue) ? nscoord(aValue + 0.9999999999999999f) : nscoord(aValue));
}

inline nscoord NSToCoordRound(float aValue)
{
  return ((0.0f <= aValue) ? nscoord(aValue + 0.5f) : nscoord(aValue - 0.5f));
}

inline nscoord NSToCoordRoundExclusive(float aValue)
{
  return ((0.0f <= aValue) ? nscoord(aValue + 0.4999999999999999f) :
                             nscoord(aValue - 0.4999999999999999f));
}





inline PRInt32 NSToIntFloor(float aValue)
{
  return ((0.0f <= aValue) ? PRInt32(aValue) : PRInt32(aValue - 0.9999999999999999f));
}

inline PRInt32 NSToIntCeil(float aValue)
{
  return ((0.0f <= aValue) ? PRInt32(aValue + 0.9999999999999999f) : PRInt32(aValue));
}

inline PRInt32 NSToIntRound(float aValue)
{
  return ((0.0f <= aValue) ? PRInt32(aValue + 0.5f) : PRInt32(aValue - 0.5f));
}

inline PRInt32 NSToIntRoundExclusive(float aValue)
{
  return ((0.0f <= aValue) ? PRInt32(aValue + 0.4999999999999999f) :
                             PRInt32(aValue - 0.4999999999999999f));
}





inline nscoord NSFloatPointsToTwips(float aPoints)
{
  return NSToCoordRound(aPoints * 20.0f);
}

inline nscoord NSIntPointsToTwips(PRInt32 aPoints)
{
  return nscoord(aPoints * 20);
}

inline PRInt32 NSTwipsToIntPoints(nscoord aTwips)
{
  return NSToIntRound(aTwips / 20.0f);
}

inline PRInt32 NSTwipsToFloorIntPoints(nscoord aTwips)
{
  return NSToIntFloor(aTwips / 20.0f);
}

inline PRInt32 NSTwipsToCeilIntPoints(nscoord aTwips)
{
  return NSToIntCeil(aTwips / 20.0f);
}

inline float NSTwipsToFloatPoints(nscoord aTwips)
{
  return (float(aTwips) / 20.0f);
}




inline nscoord NSFloatPixelsToTwips(float aPixels, float aTwipsPerPixel)
{
  return NSToCoordRound(aPixels * aTwipsPerPixel);
}

inline nscoord NSIntPixelsToTwips(PRInt32 aPixels, float aTwipsPerPixel)
{
  return NSToCoordRound(float(aPixels) * aTwipsPerPixel);
}

inline float NSTwipsToFloatPixels(nscoord aTwips, float aPixelsPerTwip)
{
  return (float(aTwips) * aPixelsPerTwip);
}

inline PRInt32 NSTwipsToIntPixels(nscoord aTwips, float aPixelsPerTwip)
{
  return NSToIntRound(float(aTwips) * aPixelsPerTwip);
}




inline nscoord NSUnitsToTwips(float aValue, float aPointsPerUnit)
{
  return NSToCoordRound(aValue * aPointsPerUnit * 20.0f);
}

inline float NSTwipsToUnits(nscoord aTwips, float aUnitsPerPoint)
{
  return (aTwips * (aUnitsPerPoint / 20.0f));
}
# 33 "../../../../dist/include/nsRect.h" 2

struct nsRect {
  nscoord x, y;
  nscoord width, height;


  nsRect() : x(0), y(0), width(0), height(0) {}
  nsRect(const nsRect& aRect) {*this = aRect;}
  nsRect(const nsPoint& aOrigin, const nsSize &aSize) {x = aOrigin.x; y = aOrigin.y;
                                                       width = aSize.width; height = aSize.height;}
  nsRect(nscoord aX, nscoord aY, nscoord aWidth, nscoord aHeight) {x = aX; y = aY;
                                                                   width = aWidth; height = aHeight;}



  PRBool IsEmpty() const {
    return (PRBool) ((width <= 0) || (height <= 0));
  }
  void Empty() {width = height = 0;}


  PRBool Contains(const nsRect& aRect) const;
  PRBool Contains(nscoord aX, nscoord aY) const;
  PRBool Contains(const nsPoint& aPoint) const {return Contains(aPoint.x, aPoint.y);}



  PRBool Intersects(const nsRect& aRect) const;






  PRBool IntersectRect(const nsRect& aRect1, const nsRect& aRect2);






  PRBool UnionRect(const nsRect& aRect1, const nsRect& aRect2);


  void SetRect(nscoord aX, nscoord aY, nscoord aWidth, nscoord aHeight) {
    x = aX; y = aY; width = aWidth; height = aHeight;
  }
  void MoveTo(nscoord aX, nscoord aY) {x = aX; y = aY;}
  void MoveTo(const nsPoint& aPoint) {x = aPoint.x; y = aPoint.y;}
  void MoveBy(nscoord aDx, nscoord aDy) {x += aDx; y += aDy;}
  void SizeTo(nscoord aWidth, nscoord aHeight) {width = aWidth; height = aHeight;}
  void SizeTo(const nsSize& aSize) {SizeTo(aSize.width, aSize.height);}
  void SizeBy(nscoord aDeltaWidth, nscoord aDeltaHeight) {width += aDeltaWidth;
                                                          height += aDeltaHeight;}


  void Inflate(nscoord aDx, nscoord aDy);
  void Inflate(const nsSize& aSize) {Inflate(aSize.width, aSize.height);}
  void Inflate(const nsMargin& aMargin);


  void Deflate(nscoord aDx, nscoord aDy);
  void Deflate(const nsSize& aSize) {Deflate(aSize.width, aSize.height);}
  void Deflate(const nsMargin& aMargin);



  PRBool operator==(const nsRect& aRect) const {
    return (PRBool) ((IsEmpty() && aRect.IsEmpty()) ||
                     ((x == aRect.x) && (y == aRect.y) &&
                      (width == aRect.width) && (height == aRect.height)));
  }
  PRBool operator!=(const nsRect& aRect) const {
    return (PRBool) !operator==(aRect);
  }
  nsRect operator+(const nsRect& aRect) const {
    return nsRect(x + aRect.x, y + aRect.y,
                  width + aRect.width, height + aRect.height);
  }
  nsRect operator-(const nsRect& aRect) const {
    return nsRect(x - aRect.x, y - aRect.y,
                  width - aRect.width, height - aRect.height);
  }
  nsRect& operator+=(const nsPoint& aPoint) {x += aPoint.x; y += aPoint.y; return *this;}
  nsRect& operator-=(const nsPoint& aPoint) {x -= aPoint.x; y -= aPoint.y; return *this;}

  nsRect& operator*=(const float aScale) {x = NSToCoordRound(x * aScale);
                                          y = NSToCoordRound(y * aScale);
                                          width = NSToCoordRound(width * aScale);
                                          height = NSToCoordRound(height * aScale);
                                          return *this;}

  nsRect& ScaleRoundOut(const float aScale);
  nsRect& ScaleRoundIn(const float aScale);


  nscoord XMost() const {return x + width;}
  nscoord YMost() const {return y + height;}
};


extern FILE* operator<<(FILE* out, const nsRect& rect);
# 28 "../../../../dist/include/nsGUIEvent.h" 2
# 1 "../../../../dist/include/nsHashtable.h" 1
# 36 "../../../../dist/include/nsHashtable.h"
# 1 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/plhash.h" 1
# 37 "../../../../dist/include/nsHashtable.h" 2
# 1 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prlock.h" 1
# 38 "../../../../dist/include/nsHashtable.h" 2
# 1 "../../../../dist/include/nsCom.h" 1
# 39 "../../../../dist/include/nsHashtable.h" 2
# 1 "../../../../dist/include/nscore.h" 1
# 40 "../../../../dist/include/nsHashtable.h" 2
# 1 "../../../../dist/include/nsString.h" 1
# 41 "../../../../dist/include/nsHashtable.h" 2

class nsHashtable;
class nsStringKey;

class nsHashKey {
protected:
  nsHashKey(void);

public:
  virtual ~nsHashKey(void);
  virtual PRUint32 HashCode(void) const = 0;
  virtual PRBool Equals(const nsHashKey *aKey) const = 0;
  virtual nsHashKey *Clone() const = 0;
# 71 "../../../../dist/include/nsHashtable.h"
};



typedef PRBool (* nsHashtableEnumFunc)(nsHashKey *aKey, void *aData, void* closure);

class nsHashtable {
protected:

  PRLock* mLock;
  PLHashTable mHashtable;
  PRBool mEnumerating;

public:
  nsHashtable(PRUint32 aSize = 16, PRBool threadSafe = 0);
  virtual ~nsHashtable();

  PRInt32 Count(void) { return mHashtable.nentries; }
  PRBool Exists(nsHashKey *aKey);
  void *Put(nsHashKey *aKey, void *aData);
  void *Get(nsHashKey *aKey);
  void *Remove(nsHashKey *aKey);
  nsHashtable *Clone();
  void Enumerate(nsHashtableEnumFunc aEnumFunc, void* closure = __null);
  void Reset();
  void Reset(nsHashtableEnumFunc destroyFunc, void* closure = __null);
};





typedef void* (* nsHashtableCloneElementFunc)(nsHashKey *aKey, void *aData, void* closure);

class nsObjectHashtable : public nsHashtable {
public:
  nsObjectHashtable(nsHashtableCloneElementFunc cloneElementFun,
                    void* cloneElementClosure,
                    nsHashtableEnumFunc destroyElementFun,
                    void* destroyElementClosure,
                    PRUint32 aSize = 16, PRBool threadSafe = 0);
  ~nsObjectHashtable();

  nsHashtable *Clone();
  void Reset();
  PRBool RemoveAndDelete(nsHashKey *aKey);

protected:
  static PRIntn CopyElement(PLHashEntry *he, PRIntn i, void *arg);

  nsHashtableCloneElementFunc mCloneElementFun;
  void* mCloneElementClosure;
  nsHashtableEnumFunc mDestroyElementFun;
  void* mDestroyElementClosure;
};




class nsISupports;

class nsSupportsHashtable
 : private nsHashtable
{
public:
  typedef PRBool (* EnumFunc) (nsHashKey *aKey, void *aData, void* closure);

  nsSupportsHashtable(PRUint32 aSize = 16, PRBool threadSafe = 0)
    : nsHashtable(aSize, threadSafe) {}
  ~nsSupportsHashtable();

  PRInt32 Count (void)
  {
    return nsHashtable::Count();
  }
  PRBool Exists (nsHashKey *aKey)
  {
    return nsHashtable::Exists (aKey);
  }
  PRBool Put (nsHashKey *aKey,
              nsISupports *aData,
              nsISupports **value = 0);
  nsISupports* Get (nsHashKey *aKey);
  PRBool Remove (nsHashKey *aKey, nsISupports **value = 0);
  nsHashtable *Clone();
  void Enumerate (EnumFunc aEnumFunc, void* closure = __null)
  {
    nsHashtable::Enumerate (aEnumFunc, closure);
  }
  void Reset();

 private:
  static PRBool ReleaseElement (nsHashKey *, void *, void *);
  static PRIntn EnumerateCopy (PLHashEntry *, PRIntn, void *);
};




# 1 "../../../../dist/include/nsISupports.h" 1
# 171 "../../../../dist/include/nsHashtable.h" 2

class nsISupportsKey : public nsHashKey {
protected:
  nsISupports* mKey;

public:
  nsISupportsKey(nsISupports* key) {



    mKey = key;
    ns_if_addref(mKey);
  }

  ~nsISupportsKey(void) {
    do { if (mKey) { (mKey)->Release(); (mKey) = 0; } } while (0);
  }

  PRUint32 HashCode(void) const {
    return (PRUint32)mKey;
  }

  PRBool Equals(const nsHashKey *aKey) const {
    {};
    return (mKey == ((nsISupportsKey *) aKey)->mKey);
  }

  nsHashKey *Clone() const {
    return new nsISupportsKey(mKey);
  }
};




class nsVoidKey : public nsHashKey {
protected:
  void* mKey;

public:
  nsVoidKey(void* key) {



    mKey = key;
  }

  PRUint32 HashCode(void) const {
    return (PRUint32)mKey;
  }

  PRBool Equals(const nsHashKey *aKey) const {
    {};
    return (mKey == ((const nsVoidKey *) aKey)->mKey);
  }

  nsHashKey *Clone() const {
    return new nsVoidKey(mKey);
  }

  void* GetValue() { return mKey; }
};




# 1 "../../../../dist/include/nsID.h" 1
# 238 "../../../../dist/include/nsHashtable.h" 2

class nsIDKey : public nsHashKey {
protected:
  nsID mID;

public:
  nsIDKey(const nsID &aID) {



    mID = aID;
  }

  PRUint32 HashCode(void) const {
    return mID.m0;
  }

  PRBool Equals(const nsHashKey *aKey) const {
    {};
    return (mID.Equals(((const nsIDKey *) aKey)->mID));
  }

  nsHashKey *Clone() const {
    return new nsIDKey(mID);
  }
};



# 1 "../../../../dist/include/nsString.h" 1
# 268 "../../../../dist/include/nsHashtable.h" 2


class nsCStringKey : public nsHashKey {
public:

  enum Ownership {
    NEVER_OWN,
    OWN_CLONE,
    OWN
  };

  nsCStringKey(const char* str, PRInt32 strLen = -1, Ownership own = OWN_CLONE);
  nsCStringKey(const nsCString& str);
  ~nsCStringKey(void);

  PRUint32 HashCode(void) const;
  PRBool Equals(const nsHashKey* aKey) const;
  nsHashKey* Clone() const;



  const char* GetString() const { return mStr; }
  PRUint32 GetStringLength() const { return mStrLen; }

protected:
  char* mStr;
  PRUint32 mStrLen;
  Ownership mOwnership;
};


class nsStringKey : public nsHashKey {
public:

  enum Ownership {
    NEVER_OWN,
    OWN_CLONE,
    OWN
  };

  nsStringKey(const PRUnichar* str, PRInt32 strLen = -1, Ownership own = OWN_CLONE);
  nsStringKey(const nsAReadableString& str);
  ~nsStringKey(void);

  PRUint32 HashCode(void) const;
  PRBool Equals(const nsHashKey* aKey) const;
  nsHashKey* Clone() const;



  const PRUnichar* GetString() const { return mStr; }
  PRUint32 GetStringLength() const { return mStrLen; }

protected:
  PRUnichar* mStr;
  PRUint32 mStrLen;
  Ownership mOwnership;
};


class nsOpaqueKey : public nsHashKey {
public:

  enum Ownership {
    NEVER_OWN,
    OWN_CLONE,
    OWN
  };

  nsOpaqueKey(const char* buf, PRUint32 bufLen, Ownership own = OWN_CLONE);
  ~nsOpaqueKey(void);

  PRUint32 HashCode(void) const;
  PRBool Equals(const nsHashKey* aKey) const;
  nsHashKey* Clone() const;



  const char* GetBuffer() const { return mBuf; }
  PRUint32 GetBufferLength() const { return mBufLen; }

protected:
  char* mBuf;
  PRUint32 mBufLen;
  Ownership mOwnership;
};
# 29 "../../../../dist/include/nsGUIEvent.h" 2







# 1 "../../../../dist/include/nsIDOMKeyEvent.h" 1
# 10 "../../../../dist/include/nsIDOMKeyEvent.h"
# 1 "../../../../dist/include/nsIDOMUIEvent.h" 1
# 10 "../../../../dist/include/nsIDOMUIEvent.h"
# 1 "../../../../dist/include/nsIDOMEvent.h" 1
# 10 "../../../../dist/include/nsIDOMEvent.h"
# 1 "../../../../dist/include/domstubs.h" 1
# 17 "../../../../dist/include/domstubs.h"
# 1 "../../../../dist/include/nsAWritableString.h" 1
# 18 "../../../../dist/include/domstubs.h" 2
inline PRBool DOMStringIsNull(const nsAReadableString& aString)
{

  return 0;
}
inline void SetDOMStringToNull(nsAWritableString& aString)
{
  aString.Truncate();

}
typedef PRUint64 DOMTimeStamp;

class nsIDOMAttr;

class nsIDOMCDATASection;

class nsIDOMCharacterData;

class nsIDOMComment;

class nsIDOMDOMImplementation;

class nsIDOMDocument;

class nsIDOMDocumentFragment;

class nsIDOMDocumentType;

class nsIDOMElement;

class nsIDOMEntity;

class nsIDOMEntityReference;

class nsIDOMNSDocument;

class nsIDOMNamedNodeMap;

class nsIDOMNode;

class nsIDOMNodeList;

class nsIDOMNotation;

class nsIDOMProcessingInstruction;

class nsIDOMText;

class DOMException;

class nsIDOMStyleSheetList;

class nsIDOMLinkStyle;

class nsIDOMStyleSheet;

class nsIDOMMediaList;

class nsIDOMAbstractView;

class nsIDOMDocumentView;

class nsIDOMWindow;

class nsIDOMWindowInternal;

class nsIDOMWindowCollection;

class nsIDOMPlugin;

class nsIDOMPluginArray;

class nsIDOMMimeType;

class nsIDOMMimeTypeArray;

class nsIDOMBarProp;

class nsIDOMNavigator;

class nsIDOMScreen;

class nsIDOMHistory;

class nsIDOMEvent;

class nsIDOMEventTarget;

class nsIDOMEventListener;

class nsIDOMHTMLElement;

class nsIDOMHTMLFormElement;

class nsIDOMHTMLCollection;

class nsIDOMCSSValue;

class nsIDOMCSSPrimitiveValue;

class nsIDOMCSSRule;

class nsIDOMCSSRuleList;

class nsIDOMCSSStyleSheet;

class nsIDOMCSSStyleDeclaration;

class nsIDOMCounter;

class nsIDOMRect;

class nsIDOMRGBColor;

class nsIDOMCSSStyleRule;

class nsIDOMCSSStyleRuleCollection;

class nsIDOMHTMLTableCaptionElement;

class nsIDOMHTMLTableSectionElement;

class nsIDOMRange;

class nsIDOMCRMFObject;

class nsIDOMCrypto;

class nsIDOMPkcs11;
# 11 "../../../../dist/include/nsIDOMEvent.h" 2






class nsIDOMEventTarget;
# 27 "../../../../dist/include/nsIDOMEvent.h"
class nsIDOMEvent : public nsISupports {
 public:

  static const nsIID& GetIID() {static const nsIID iid = {0xa66b7b80, 0xff46, 0xbd97, { 0x00, 0x80, 0x5f, 0x8a, 0xe3, 0x8a, 0xdd, 0x32 }}; return iid;}

  enum { CAPTURING_PHASE = 1U };

  enum { AT_TARGET = 2U };

  enum { BUBBLING_PHASE = 3U };

  enum { MOUSEDOWN = 1 };

  enum { MOUSEUP = 2 };

  enum { MOUSEOVER = 4 };

  enum { MOUSEOUT = 8 };

  enum { MOUSEMOVE = 16 };

  enum { MOUSEDRAG = 32 };

  enum { CLICK = 64 };

  enum { DBLCLICK = 128 };

  enum { KEYDOWN = 256 };

  enum { KEYUP = 512 };

  enum { KEYPRESS = 1024 };

  enum { DRAGDROP = 2048 };

  enum { FOCUS = 4096 };

  enum { BLUR = 8192 };

  enum { SELECT = 16384 };

  enum { CHANGE = 32768 };

  enum { RESET = 65536 };

  enum { SUBMIT = 131072 };

  enum { SCROLL = 262144 };

  enum { LOAD = 524288 };

  enum { UNLOAD = 1048576 };

  enum { XFER_DONE = 2097152 };

  enum { ABORT = 4194304 };

  enum { ERROR = 8388608 };

  enum { LOCATE = 16777216 };

  enum { MOVE = 33554432 };

  enum { RESIZE = 67108864 };

  enum { FORWARD = 134217728 };

  enum { HELP = 268435456 };

  enum { BACK = 536870912 };

  enum { TEXT = 1073741824 };

  enum { ALT_MASK = 1 };

  enum { CONTROL_MASK = 2 };

  enum { SHIFT_MASK = 4 };

  enum { META_MASK = 8 };


  virtual nsresult GetType(nsAWritableString & aType) = 0;


  virtual nsresult GetTarget(nsIDOMEventTarget * *aTarget) = 0;


  virtual nsresult GetCurrentTarget(nsIDOMEventTarget * *aCurrentTarget) = 0;


  virtual nsresult GetOriginalTarget(nsIDOMEventTarget * *aOriginalTarget) = 0;


  virtual nsresult GetEventPhase(PRUint16 *aEventPhase) = 0;


  virtual nsresult GetBubbles(PRBool *aBubbles) = 0;


  virtual nsresult GetCancelable(PRBool *aCancelable) = 0;


  virtual nsresult GetTimeStamp(DOMTimeStamp *aTimeStamp) = 0;


  virtual nsresult StopPropagation(void) = 0;


  virtual nsresult PreventBubble(void) = 0;


  virtual nsresult PreventCapture(void) = 0;


  virtual nsresult PreventDefault(void) = 0;


  virtual nsresult InitEvent(const nsAReadableString & eventTypeArg, PRBool canBubbleArg, PRBool cancelableArg) = 0;

};
# 11 "../../../../dist/include/nsIDOMUIEvent.h" 2
# 25 "../../../../dist/include/nsIDOMUIEvent.h"
class nsIDOMUIEvent : public nsIDOMEvent {
 public:

  static const nsIID& GetIID() {static const nsIID iid = {0xa6cf90c3, 0x15b3, 0x11d2, { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }}; return iid;}


  virtual nsresult GetView(nsIDOMAbstractView * *aView) = 0;


  virtual nsresult GetDetail(PRInt32 *aDetail) = 0;


  virtual nsresult InitUIEvent(const nsAReadableString & typeArg, PRBool canBubbleArg, PRBool cancelableArg, nsIDOMAbstractView *viewArg, PRInt32 detailArg) = 0;

};
# 11 "../../../../dist/include/nsIDOMKeyEvent.h" 2
# 25 "../../../../dist/include/nsIDOMKeyEvent.h"
class nsIDOMKeyEvent : public nsIDOMUIEvent {
 public:

  static const nsIID& GetIID() {static const nsIID iid = {0x028e0e6e, 0x8b01, 0x11d3, { 0xaa, 0xe7, 0x00, 0x10, 0x83, 0x8a, 0x31, 0x23 }}; return iid;}

  enum { DOM_VK_CANCEL = 3U };

  enum { DOM_VK_BACK_SPACE = 8U };

  enum { DOM_VK_TAB = 9U };

  enum { DOM_VK_CLEAR = 12U };

  enum { DOM_VK_RETURN = 13U };

  enum { DOM_VK_ENTER = 14U };

  enum { DOM_VK_SHIFT = 16U };

  enum { DOM_VK_CONTROL = 17U };

  enum { DOM_VK_ALT = 18U };

  enum { DOM_VK_PAUSE = 19U };

  enum { DOM_VK_CAPS_LOCK = 20U };

  enum { DOM_VK_ESCAPE = 27U };

  enum { DOM_VK_SPACE = 32U };

  enum { DOM_VK_PAGE_UP = 33U };

  enum { DOM_VK_PAGE_DOWN = 34U };

  enum { DOM_VK_END = 35U };

  enum { DOM_VK_HOME = 36U };

  enum { DOM_VK_LEFT = 37U };

  enum { DOM_VK_UP = 38U };

  enum { DOM_VK_RIGHT = 39U };

  enum { DOM_VK_DOWN = 40U };

  enum { DOM_VK_PRINTSCREEN = 44U };

  enum { DOM_VK_INSERT = 45U };

  enum { DOM_VK_DELETE = 46U };

  enum { DOM_VK_0 = 48U };

  enum { DOM_VK_1 = 49U };

  enum { DOM_VK_2 = 50U };

  enum { DOM_VK_3 = 51U };

  enum { DOM_VK_4 = 52U };

  enum { DOM_VK_5 = 53U };

  enum { DOM_VK_6 = 54U };

  enum { DOM_VK_7 = 55U };

  enum { DOM_VK_8 = 56U };

  enum { DOM_VK_9 = 57U };

  enum { DOM_VK_SEMICOLON = 59U };

  enum { DOM_VK_EQUALS = 61U };

  enum { DOM_VK_A = 65U };

  enum { DOM_VK_B = 66U };

  enum { DOM_VK_C = 67U };

  enum { DOM_VK_D = 68U };

  enum { DOM_VK_E = 69U };

  enum { DOM_VK_F = 70U };

  enum { DOM_VK_G = 71U };

  enum { DOM_VK_H = 72U };

  enum { DOM_VK_I = 73U };

  enum { DOM_VK_J = 74U };

  enum { DOM_VK_K = 75U };

  enum { DOM_VK_L = 76U };

  enum { DOM_VK_M = 77U };

  enum { DOM_VK_N = 78U };

  enum { DOM_VK_O = 79U };

  enum { DOM_VK_P = 80U };

  enum { DOM_VK_Q = 81U };

  enum { DOM_VK_R = 82U };

  enum { DOM_VK_S = 83U };

  enum { DOM_VK_T = 84U };

  enum { DOM_VK_U = 85U };

  enum { DOM_VK_V = 86U };

  enum { DOM_VK_W = 87U };

  enum { DOM_VK_X = 88U };

  enum { DOM_VK_Y = 89U };

  enum { DOM_VK_Z = 90U };

  enum { DOM_VK_NUMPAD0 = 96U };

  enum { DOM_VK_NUMPAD1 = 97U };

  enum { DOM_VK_NUMPAD2 = 98U };

  enum { DOM_VK_NUMPAD3 = 99U };

  enum { DOM_VK_NUMPAD4 = 100U };

  enum { DOM_VK_NUMPAD5 = 101U };

  enum { DOM_VK_NUMPAD6 = 102U };

  enum { DOM_VK_NUMPAD7 = 103U };

  enum { DOM_VK_NUMPAD8 = 104U };

  enum { DOM_VK_NUMPAD9 = 105U };

  enum { DOM_VK_MULTIPLY = 106U };

  enum { DOM_VK_ADD = 107U };

  enum { DOM_VK_SEPARATOR = 108U };

  enum { DOM_VK_SUBTRACT = 109U };

  enum { DOM_VK_DECIMAL = 110U };

  enum { DOM_VK_DIVIDE = 111U };

  enum { DOM_VK_F1 = 112U };

  enum { DOM_VK_F2 = 113U };

  enum { DOM_VK_F3 = 114U };

  enum { DOM_VK_F4 = 115U };

  enum { DOM_VK_F5 = 116U };

  enum { DOM_VK_F6 = 117U };

  enum { DOM_VK_F7 = 118U };

  enum { DOM_VK_F8 = 119U };

  enum { DOM_VK_F9 = 120U };

  enum { DOM_VK_F10 = 121U };

  enum { DOM_VK_F11 = 122U };

  enum { DOM_VK_F12 = 123U };

  enum { DOM_VK_F13 = 124U };

  enum { DOM_VK_F14 = 125U };

  enum { DOM_VK_F15 = 126U };

  enum { DOM_VK_F16 = 127U };

  enum { DOM_VK_F17 = 128U };

  enum { DOM_VK_F18 = 129U };

  enum { DOM_VK_F19 = 130U };

  enum { DOM_VK_F20 = 131U };

  enum { DOM_VK_F21 = 132U };

  enum { DOM_VK_F22 = 133U };

  enum { DOM_VK_F23 = 134U };

  enum { DOM_VK_F24 = 135U };

  enum { DOM_VK_NUM_LOCK = 144U };

  enum { DOM_VK_SCROLL_LOCK = 145U };

  enum { DOM_VK_COMMA = 188U };

  enum { DOM_VK_PERIOD = 190U };

  enum { DOM_VK_SLASH = 191U };

  enum { DOM_VK_BACK_QUOTE = 192U };

  enum { DOM_VK_OPEN_BRACKET = 219U };

  enum { DOM_VK_BACK_SLASH = 220U };

  enum { DOM_VK_CLOSE_BRACKET = 221U };

  enum { DOM_VK_QUOTE = 222U };

  enum { DOM_VK_META = 224U };


  virtual nsresult GetCharCode(PRUint32 *aCharCode) = 0;


  virtual nsresult GetKeyCode(PRUint32 *aKeyCode) = 0;


  virtual nsresult GetAltKey(PRBool *aAltKey) = 0;


  virtual nsresult GetCtrlKey(PRBool *aCtrlKey) = 0;


  virtual nsresult GetShiftKey(PRBool *aShiftKey) = 0;


  virtual nsresult GetMetaKey(PRBool *aMetaKey) = 0;


  virtual nsresult InitKeyEvent(const nsAReadableString & typeArg, PRBool canBubbleArg, PRBool cancelableArg, nsIDOMAbstractView *viewArg, PRBool ctrlKeyArg, PRBool altKeyArg, PRBool shiftKeyArg, PRBool metaKeyArg, PRUint32 keyCodeArg, PRUint32 charCodeArg) = 0;

};
# 37 "../../../../dist/include/nsGUIEvent.h" 2

class nsIRenderingContext;
class nsIRegion;
class nsIWidget;
class nsIMenuItem;
class nsIAccessible;
class nsIContent;





enum nsEventStatus {

  nsEventStatus_eIgnore,

  nsEventStatus_eConsumeNoDefault,

  nsEventStatus_eConsumeDoDefault
};




enum nsSizeMode {
  nsSizeMode_Normal = 0,
  nsSizeMode_Minimized,
  nsSizeMode_Maximized
};




enum nsWindowZ {
  nsWindowZTop = 0,
  nsWindowZBottom,
  nsWindowZRelative
};





struct nsEvent {

  PRUint8 eventStructType;

  PRUint32 message;

  nsPoint point;

  nsPoint refPoint;

  PRUint32 time;

  PRUint32 flags;

  PRUint32 internalAppFlags;

  nsHashKey* userType;
};





struct nsGUIEvent : public nsEvent {

  nsIWidget* widget;

  void* nativeMsg;
};





struct nsSizeEvent : public nsGUIEvent {

    nsRect *windowSize;

    PRInt32 mWinWidth;

    PRInt32 mWinHeight;
};





struct nsSizeModeEvent : public nsGUIEvent {

    nsSizeMode mSizeMode;
};





struct nsZLevelEvent : public nsGUIEvent {

  nsWindowZ mPlacement;
  nsIWidget *mReqBelow,
            *mActualBelow;
  PRBool mImmediate,
             mAdjusted;
};





struct nsPaintEvent : public nsGUIEvent {

    nsIRenderingContext *renderingContext;

    nsIRegion *region;

    nsRect *rect;
};





struct nsScrollbarEvent : public nsGUIEvent {

    PRUint32 position;
};

struct nsScrollPortEvent : public nsGUIEvent {
  enum orientType {
    vertical = 0,
    horizontal = 1,
    both = 2
  };

  orientType orient;
};

struct nsInputEvent : public nsGUIEvent {

    PRBool isShift;

    PRBool isControl;

    PRBool isAlt;


    PRBool isMeta;
};





struct nsMouseEvent : public nsInputEvent {

    PRUint32 clickCount;


    PRBool acceptActivation;
};





struct nsAccessibleEvent : public nsInputEvent {
    nsIAccessible* accessible;
};





struct nsKeyEvent : public nsInputEvent {

    PRUint32 keyCode;

    PRUint32 charCode;

    PRBool isChar;
};




struct nsTextRange {
        PRUint32 mStartOffset;
        PRUint32 mEndOffset;
        PRUint32 mRangeType;
};

typedef struct nsTextRange nsTextRange;
typedef nsTextRange* nsTextRangeArray;

struct nsTextEventReply {
        nsRect mCursorPosition;
        PRBool mCursorIsCollapsed;
};

typedef struct nsTextEventReply nsTextEventReply;

struct nsTextEvent : public nsInputEvent {
        PRUnichar* theText;
        nsTextEventReply theReply;
        PRUint32 rangeCount;
        nsTextRangeArray rangeArray;
  PRBool isChar;
};

struct nsCompositionEvent : public nsInputEvent {
        PRUint32 compositionMessage;
        nsTextEventReply theReply;
};

struct nsMouseScrollEvent : public nsInputEvent {

  enum nsMouseScrollFlags {
    kIsFullPage = 1 << 0,
    kIsVertical = 1 << 1,
    kIsHorizontal = 1 << 2
  };

  PRInt32 scrollFlags;
  PRInt32 delta;
};

struct nsReconversionEventReply {
  PRUnichar *mReconversionString;
};

struct nsReconversionEvent : public nsInputEvent {
  nsReconversionEventReply theReply;
};
# 283 "../../../../dist/include/nsGUIEvent.h"
struct nsMenuEvent : public nsGUIEvent {
  nsIMenuItem * mMenuItem;
  PRUint32 mCommand;
};
# 295 "../../../../dist/include/nsGUIEvent.h"
struct nsFormEvent : public nsEvent {
  nsIContent *originator;
};




struct nsFocusEvent : public nsGUIEvent {
  PRBool isMozWindowTakingFocus;
};





enum nsDragDropEventStatus {

  nsDragDropEventStatus_eDragEntered,

  nsDragDropEventStatus_eDragExited,

  nsDragDropEventStatus_eDrop
};
# 28 "../../../../dist/include/nsIMouseListener.h" 2
# 1 "../../../../dist/include/nsISupports.h" 1
# 29 "../../../../dist/include/nsIMouseListener.h" 2
# 40 "../../../../dist/include/nsIMouseListener.h"
class nsIMouseListener : public nsISupports {
public:
    static const nsIID& GetIID() {static const nsIID iid = { 0xc83f6b81, 0xd7ce, 0x11d2, { 0x83, 0x60, 0xc4, 0xc8, 0x94, 0xc4, 0x91, 0x7c } }; return iid;}






    virtual nsEventStatus MousePressed(const nsGUIEvent & aMouseEvent) = 0;






    virtual nsEventStatus MouseReleased(const nsGUIEvent & aMouseEvent) = 0;







    virtual nsEventStatus MouseClicked(const nsGUIEvent & aMouseEvent) = 0;






    virtual nsEventStatus MouseMoved(const nsGUIEvent & aMouseEvent) = 0;

};
# 29 "../../../../dist/include/nsIWidget.h" 2
# 1 "../../../../dist/include/nsIMenuListener.h" 1
# 26 "../../../../dist/include/nsIMenuListener.h"
# 1 "../../../../dist/include/nsGUIEvent.h" 1
# 27 "../../../../dist/include/nsIMenuListener.h" 2
# 1 "../../../../dist/include/nsISupports.h" 1
# 28 "../../../../dist/include/nsIMenuListener.h" 2
# 41 "../../../../dist/include/nsIMenuListener.h"
class nsIMenuListener : public nsISupports {

  public:
    static const nsIID& GetIID() {static const nsIID iid = { 0xf2e79602, 0x1700, 0x11d5, { 0xbb, 0x6f, 0x90, 0xf2, 0x40, 0xfe, 0x49, 0x3c } };; return iid;}






    virtual nsEventStatus MenuItemSelected(const nsMenuEvent & aMenuEvent) = 0;






    virtual nsEventStatus MenuSelected(const nsMenuEvent & aMenuEvent) = 0;






    virtual nsEventStatus MenuDeselected(const nsMenuEvent & aMenuEvent) = 0;

    virtual nsEventStatus MenuConstruct( const nsMenuEvent & aMenuEvent,
                                          nsIWidget* aParentWindow, void* aNode,
                                          void* aWebShell) = 0;

    virtual nsEventStatus MenuDestruct(const nsMenuEvent & aMenuEvent) = 0;

    virtual nsEventStatus CheckRebuild(PRBool & aMenuEvent) = 0;
    virtual nsEventStatus SetRebuild(PRBool aMenuEvent) = 0;
};
# 30 "../../../../dist/include/nsIWidget.h" 2
# 1 "../../../../dist/include/nsIImage.h" 1
# 26 "../../../../dist/include/nsIImage.h"
# 1 "../../../../dist/include/nsISupports.h" 1
# 27 "../../../../dist/include/nsIImage.h" 2
# 1 "../../../../dist/include/nsRect.h" 1
# 28 "../../../../dist/include/nsIImage.h" 2
# 1 "../../../../dist/include/nsIRenderingContext.h" 1
# 26 "../../../../dist/include/nsIRenderingContext.h"
# 1 "../../../../dist/include/nscore.h" 1
# 27 "../../../../dist/include/nsIRenderingContext.h" 2
# 1 "../../../../dist/include/nsISupports.h" 1
# 28 "../../../../dist/include/nsIRenderingContext.h" 2
# 1 "../../../../dist/include/nsColor.h" 1
# 29 "../../../../dist/include/nsIRenderingContext.h" 2
# 1 "../../../../dist/include/nsCoord.h" 1
# 30 "../../../../dist/include/nsIRenderingContext.h" 2
# 1 "../../../../dist/include/nsIDrawingSurface.h" 1
# 26 "../../../../dist/include/nsIDrawingSurface.h"
# 1 "../../../../dist/include/nscore.h" 1
# 27 "../../../../dist/include/nsIDrawingSurface.h" 2
# 1 "../../../../dist/include/nsISupports.h" 1
# 28 "../../../../dist/include/nsIDrawingSurface.h" 2
# 1 "../../../../dist/include/nsRect.h" 1
# 29 "../../../../dist/include/nsIDrawingSurface.h" 2



typedef struct
{
  PRUint32 mRedZeroMask;
  PRUint32 mGreenZeroMask;
  PRUint32 mBlueZeroMask;
  PRUint32 mAlphaZeroMask;
  PRUint32 mRedMask;
  PRUint32 mGreenMask;
  PRUint32 mBlueMask;
  PRUint32 mAlphaMask;
  PRUint8 mRedCount;
  PRUint8 mGreenCount;
  PRUint8 mBlueCount;
  PRUint8 mAlphaCount;
  PRUint8 mRedShift;
  PRUint8 mGreenShift;
  PRUint8 mBlueShift;
  PRUint8 mAlphaShift;
} nsPixelFormat;







class nsIDrawingSurface : public nsISupports
{
public:
  static const nsIID& GetIID() {static const nsIID iid = { 0x61cc77e0, 0xcaac, 0x11d2, { 0xa8, 0x49, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }; return iid;}
# 79 "../../../../dist/include/nsIDrawingSurface.h"
  virtual nsresult Lock(PRInt32 aX, PRInt32 aY, PRUint32 aWidth, PRUint32 aHeight,
                  void **aBits, PRInt32 *aStride, PRInt32 *aWidthBytes,
                  PRUint32 aFlags) = 0;







  virtual nsresult Unlock(void) = 0;
# 98 "../../../../dist/include/nsIDrawingSurface.h"
  virtual nsresult GetDimensions(PRUint32 *aWidth, PRUint32 *aHeight) = 0;
# 109 "../../../../dist/include/nsIDrawingSurface.h"
  virtual nsresult IsOffscreen(PRBool *aOffScreen) = 0;
# 123 "../../../../dist/include/nsIDrawingSurface.h"
  virtual nsresult IsPixelAddressable(PRBool *aAddressable) = 0;
# 132 "../../../../dist/include/nsIDrawingSurface.h"
  virtual nsresult GetPixelFormat(nsPixelFormat *aFormat) = 0;
};
# 31 "../../../../dist/include/nsIRenderingContext.h" 2

class nsIWidget;
class nsIFontMetrics;
class nsIImage;
class nsTransform2D;
class nsString;
class nsIDeviceContext;
class nsIRegion;

struct nsFont;
struct nsPoint;
struct nsRect;







# 1 "../../../../dist/include/gfxtypes.h" 1
# 14 "../../../../dist/include/gfxtypes.h"
# 1 "../../../../dist/include/gfx2types.h" 1
# 17 "../../../../dist/include/gfx2types.h"
# 1 "../../../../dist/include/gfxcompat.h" 1
# 36 "../../../../dist/include/gfxcompat.h"
# 1 "../../../../dist/include/nsCoord.h" 1
# 37 "../../../../dist/include/gfxcompat.h" 2
# 18 "../../../../dist/include/gfx2types.h" 2




typedef float gfx_dimension;





typedef float gfx_coord;





typedef float gfx_angle;







typedef PRUint32 gfx_color;





typedef PRUint16 gfx_depth;






typedef PRInt32 gfx_format;





typedef float gfx_gamma;
# 15 "../../../../dist/include/gfxtypes.h" 2






typedef PRInt32 nscoord;
# 51 "../../../../dist/include/nsIRenderingContext.h" 2
class imgIContainer;




typedef enum
{
  nsClipCombine_kIntersect = 0,
  nsClipCombine_kUnion = 1,
  nsClipCombine_kSubtract = 2,
  nsClipCombine_kReplace = 3
} nsClipCombine;


typedef enum
{
  nsLineStyle_kNone = 0,
  nsLineStyle_kSolid = 1,
  nsLineStyle_kDashed = 2,
  nsLineStyle_kDotted = 3
} nsLineStyle;
# 80 "../../../../dist/include/nsIRenderingContext.h"
typedef void * nsDrawingSurface;


class nsIRenderingContext : public nsISupports
{
public:
  static const nsIID& GetIID() {static const nsIID iid = { 0xa6cf9068, 0x15b3, 0x11d2,{0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}; return iid;}
# 97 "../../../../dist/include/nsIRenderingContext.h"
  virtual nsresult Init(nsIDeviceContext* aContext, nsIWidget *aWidget) = 0;







  virtual nsresult Init(nsIDeviceContext* aContext, nsDrawingSurface aSurface) = 0;




  virtual nsresult Reset(void) = 0;





  virtual nsresult GetDeviceContext(nsIDeviceContext *& aDeviceContext) = 0;
# 128 "../../../../dist/include/nsIRenderingContext.h"
  virtual nsresult LockDrawingSurface(PRInt32 aX, PRInt32 aY, PRUint32 aWidth, PRUint32 aHeight,
                                void **aBits, PRInt32 *aStride, PRInt32 *aWidthBytes,
                                PRUint32 aFlags) = 0;






  virtual nsresult UnlockDrawingSurface(void) = 0;







  virtual nsresult SelectOffScreenDrawingSurface(nsDrawingSurface aSurface) = 0;





  virtual nsresult GetDrawingSurface(nsDrawingSurface *aSurface) = 0;





  virtual nsresult GetHints(PRUint32& aResult) = 0;




  virtual nsresult PushState(void) = 0;






  virtual nsresult PopState(PRBool &aClipEmpty) = 0;






  virtual nsresult IsVisibleRect(const nsRect& aRect, PRBool &aIsVisible) = 0;
# 185 "../../../../dist/include/nsIRenderingContext.h"
  virtual nsresult SetClipRect(const nsRect& aRect, nsClipCombine aCombine, PRBool &aClipEmpty) = 0;
# 194 "../../../../dist/include/nsIRenderingContext.h"
  virtual nsresult GetClipRect(nsRect &aRect, PRBool &aHasLocalClip) = 0;






  virtual nsresult SetLineStyle(nsLineStyle aLineStyle) = 0;






  virtual nsresult GetLineStyle(nsLineStyle &aLineStyle) = 0;
# 217 "../../../../dist/include/nsIRenderingContext.h"
  virtual nsresult SetClipRegion(const nsIRegion& aRegion, nsClipCombine aCombine, PRBool &aClipEmpty) = 0;







  virtual nsresult CopyClipRegion(nsIRegion &aRegion) = 0;







  virtual nsresult GetClipRegion(nsIRegion **aRegion) = 0;





  virtual nsresult SetColor(nscolor aColor) = 0;





  virtual nsresult GetColor(nscolor &aColor) const = 0;





  virtual nsresult SetFont(const nsFont& aFont) = 0;






  virtual nsresult SetFont(nsIFontMetrics *aFontMetrics) = 0;





  virtual nsresult GetFontMetrics(nsIFontMetrics *&aFontMetrics) = 0;






  virtual nsresult Translate(nscoord aX, nscoord aY) = 0;






  virtual nsresult Scale(float aSx, float aSy) = 0;





  virtual nsresult GetCurrentTransform(nsTransform2D *&aTransform) = 0;
# 296 "../../../../dist/include/nsIRenderingContext.h"
  virtual nsresult CreateDrawingSurface(nsRect *aBounds, PRUint32 aSurfFlags, nsDrawingSurface &aSurface) = 0;





  virtual nsresult DestroyDrawingSurface(nsDrawingSurface aDS) = 0;
# 311 "../../../../dist/include/nsIRenderingContext.h"
  virtual nsresult DrawLine(nscoord aX0, nscoord aY0, nscoord aX1, nscoord aY1) = 0;
# 321 "../../../../dist/include/nsIRenderingContext.h"
  virtual nsresult DrawStdLine(nscoord aX0, nscoord aY0, nscoord aX1, nscoord aY1) = 0;






  virtual nsresult DrawPolyline(const nsPoint aPoints[], PRInt32 aNumPoints) = 0;





  virtual nsresult DrawRect(const nsRect& aRect) = 0;
# 343 "../../../../dist/include/nsIRenderingContext.h"
  virtual nsresult DrawRect(nscoord aX, nscoord aY, nscoord aWidth, nscoord aHeight) = 0;





  virtual nsresult FillRect(const nsRect& aRect) = 0;
# 358 "../../../../dist/include/nsIRenderingContext.h"
  virtual nsresult FillRect(nscoord aX, nscoord aY, nscoord aWidth, nscoord aHeight) = 0;





  virtual nsresult InvertRect(const nsRect& aRect) = 0;
# 373 "../../../../dist/include/nsIRenderingContext.h"
  virtual nsresult InvertRect(nscoord aX, nscoord aY, nscoord aWidth, nscoord aHeight) = 0;






  virtual nsresult DrawPolygon(const nsPoint aPoints[], PRInt32 aNumPoints) = 0;






  virtual nsresult FillPolygon(const nsPoint aPoints[], PRInt32 aNumPoints) = 0;






  virtual nsresult RasterPolygon(const nsPoint aPoints[], PRInt32 aNumPoints)=0;






  virtual nsresult FillStdPolygon(const nsPoint aPoints[], PRInt32 aNumPoints) = 0;





  virtual nsresult DrawEllipse(const nsRect& aRect) = 0;
# 416 "../../../../dist/include/nsIRenderingContext.h"
  virtual nsresult DrawEllipse(nscoord aX, nscoord aY, nscoord aWidth, nscoord aHeight) = 0;





  virtual nsresult FillEllipse(const nsRect& aRect) = 0;
# 431 "../../../../dist/include/nsIRenderingContext.h"
  virtual nsresult FillEllipse(nscoord aX, nscoord aY, nscoord aWidth, nscoord aHeight) = 0;







  virtual nsresult DrawArc(const nsRect& aRect,
                     float aStartAngle, float aEndAngle) = 0;
# 451 "../../../../dist/include/nsIRenderingContext.h"
  virtual nsresult DrawArc(nscoord aX, nscoord aY, nscoord aWidth, nscoord aHeight,
                     float aStartAngle, float aEndAngle) = 0;







  virtual nsresult FillArc(const nsRect& aRect,
                     float aStartAngle, float aEndAngle) = 0;
# 472 "../../../../dist/include/nsIRenderingContext.h"
  virtual nsresult FillArc(nscoord aX, nscoord aY, nscoord aWidth, nscoord aHeight,
                     float aStartAngle, float aEndAngle) = 0;
# 482 "../../../../dist/include/nsIRenderingContext.h"
  virtual nsresult GetWidth(char aC, nscoord &aWidth) = 0;
# 494 "../../../../dist/include/nsIRenderingContext.h"
  virtual nsresult GetWidth(PRUnichar aC, nscoord &aWidth,
                      PRInt32 *aFontID = 0) = 0;
# 507 "../../../../dist/include/nsIRenderingContext.h"
  virtual nsresult GetWidth(const nsString& aString, nscoord &aWidth,
                      PRInt32 *aFontID = 0) = 0;
# 517 "../../../../dist/include/nsIRenderingContext.h"
  virtual nsresult GetWidth(const char* aString, nscoord& aWidth) = 0;
# 527 "../../../../dist/include/nsIRenderingContext.h"
  virtual nsresult GetWidth(const char* aString, PRUint32 aLength,
                      nscoord& aWidth) = 0;
# 541 "../../../../dist/include/nsIRenderingContext.h"
  virtual nsresult GetWidth(const PRUnichar *aString, PRUint32 aLength,
                      nscoord &aWidth, PRInt32 *aFontID = 0) = 0;
# 612 "../../../../dist/include/nsIRenderingContext.h"
  virtual nsresult DrawString(const char *aString, PRUint32 aLength,
                        nscoord aX, nscoord aY,
                        const nscoord* aSpacing = 0) = 0;
# 627 "../../../../dist/include/nsIRenderingContext.h"
  virtual nsresult DrawString(const PRUnichar *aString, PRUint32 aLength,
                        nscoord aX, nscoord aY,
                        PRInt32 aFontID = -1,
                        const nscoord* aSpacing = 0) = 0;
# 642 "../../../../dist/include/nsIRenderingContext.h"
  virtual nsresult DrawString(const nsString& aString, nscoord aX, nscoord aY,
                        PRInt32 aFontID = -1,
                        const nscoord* aSpacing = 0) = 0;






  virtual nsresult DrawImage(nsIImage *aImage, nscoord aX, nscoord aY) = 0;
# 660 "../../../../dist/include/nsIRenderingContext.h"
  virtual nsresult DrawImage(nsIImage *aImage, nscoord aX, nscoord aY,
                       nscoord aWidth, nscoord aHeight) = 0;





  virtual nsresult DrawImage(nsIImage *aImage, const nsRect& aRect) = 0;






  virtual nsresult DrawImage(nsIImage *aImage, const nsRect& aSRect, const nsRect& aDRect)=0;
# 688 "../../../../dist/include/nsIRenderingContext.h"
  virtual nsresult DrawTile(nsIImage *aImage,nscoord aX0,nscoord aY0,nscoord aX1,nscoord aY1,
                        nscoord aWidth,nscoord aHeight) = 0;
# 702 "../../../../dist/include/nsIRenderingContext.h"
  virtual nsresult DrawPath(nsPathPoint aPointArray[],PRInt32 aNumPts) = 0;
# 711 "../../../../dist/include/nsIRenderingContext.h"
  virtual nsresult FillPath(nsPathPoint aPointArray[],PRInt32 aNumPts) = 0;
# 722 "../../../../dist/include/nsIRenderingContext.h"
  virtual nsresult CopyOffScreenBits(nsDrawingSurface aSrcSurf, PRInt32 aSrcX, PRInt32 aSrcY,
                               const nsRect &aDestBounds, PRUint32 aCopyFlags) = 0;

  virtual nsresult RetrieveCurrentNativeGraphicData(PRUint32 * ngd) = 0;
# 734 "../../../../dist/include/nsIRenderingContext.h"
  virtual nsresult DrawTile(nsIImage *aImage, nscoord aSrcXOffset,
                      nscoord aSrcYOffset, const nsRect &aTileRect) = 0;
# 773 "../../../../dist/include/nsIRenderingContext.h"
  virtual nsresult SetRightToLeftText(PRBool aIsRTL) = 0;





  virtual nsresult DrawImage(imgIContainer *aImage, const nsRect * aSrcRect, const nsPoint * aDestPoint) = 0;


  virtual nsresult DrawScaledImage(imgIContainer *aImage, const nsRect * aSrcRect, const nsRect * aDestRect) = 0;


  virtual nsresult DrawTile(imgIContainer *aImage, nscoord aXOffset, nscoord aYOffset, const nsRect * aTargetRect) = 0;


  virtual nsresult DrawScaledTile(imgIContainer *aImage, nscoord aXOffset, nscoord aYOffset, nscoord aTileWidth, nscoord aTileHeight, const nsRect * aTargetRect) = 0;

};
# 29 "../../../../dist/include/nsIImage.h" 2

typedef struct
{



  PRInt32 NumColors;



  PRUint8 *Index;

} nsColorMap;

typedef enum {
    nsMaskRequirements_kNoMask,
    nsMaskRequirements_kNeeds1Bit,
    nsMaskRequirements_kNeeds8Bit
} nsMaskRequirements;
# 59 "../../../../dist/include/nsIImage.h"
class nsIImage : public nsISupports
{

public:
  static const nsIID& GetIID() {static const nsIID iid = { 0x0b4faaa0, 0xaa3a, 0x11d1, { 0xa8, 0x24, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }; return iid;}
# 72 "../../../../dist/include/nsIImage.h"
  virtual nsresult Init(PRInt32 aWidth, PRInt32 aHeight, PRInt32 aDepth, nsMaskRequirements aMaskRequirements) = 0;






  virtual PRInt32 GetBytesPix() = 0;






  virtual PRBool GetIsRowOrderTopToBottom() = 0;






  virtual PRInt32 GetWidth() = 0;






  virtual PRInt32 GetHeight() = 0;





  virtual nsresult SetDecodedRect(PRInt32, PRInt32, PRInt32, PRInt32) = 0;
  virtual PRInt32 GetDecodedX1() = 0;
  virtual PRInt32 GetDecodedY1() = 0;
  virtual PRInt32 GetDecodedX2() = 0;
  virtual PRInt32 GetDecodedY2() = 0;

  virtual nsresult SetNaturalWidth(PRInt32) = 0;
  virtual nsresult SetNaturalHeight(PRInt32) = 0;
  virtual PRInt32 GetNaturalWidth() = 0;
  virtual PRInt32 GetNaturalHeight() = 0;






  virtual PRUint8 * GetBits() = 0;






  virtual PRInt32 GetLineStride() = 0;







  virtual PRBool GetHasAlphaMask() = 0;






  virtual PRUint8 * GetAlphaBits() = 0;






  virtual PRInt32 GetAlphaWidth() = 0;






  virtual PRInt32 GetAlphaHeight() = 0;






  virtual PRInt32 GetAlphaLineStride() = 0;







  virtual void ImageUpdated(nsIDeviceContext *aContext, PRUint8 aFlags, nsRect *aUpdateRect) = 0;






  virtual PRBool IsOptimized() = 0;







  virtual nsresult Optimize(nsIDeviceContext* aContext) = 0;






  virtual nsColorMap * GetColorMap() = 0;
# 207 "../../../../dist/include/nsIImage.h"
  virtual nsresult Draw(nsIRenderingContext &aContext, nsDrawingSurface aSurface, PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight) = 0;
# 223 "../../../../dist/include/nsIImage.h"
  virtual nsresult Draw(nsIRenderingContext &aContext, nsDrawingSurface aSurface, PRInt32 aSX, PRInt32 aSY, PRInt32 aSWidth, PRInt32 aSHeight,
                  PRInt32 aDX, PRInt32 aDY, PRInt32 aDWidth, PRInt32 aDHeight) = 0;
# 237 "../../../../dist/include/nsIImage.h"
  virtual nsresult DrawToImage(nsIImage* aDstImage, PRInt32 aDX, PRInt32 aDY, PRInt32 aDWidth, PRInt32 aDHeight) = 0;







  virtual void SetAlphaLevel(PRInt32 aAlphaLevel) = 0;






  virtual PRInt32 GetAlphaLevel() = 0;






  virtual void* GetBitInfo() = 0;
# 274 "../../../../dist/include/nsIImage.h"
  virtual nsresult LockImagePixels(PRBool aMaskPixels) = 0;
# 287 "../../../../dist/include/nsIImage.h"
  virtual nsresult UnlockImagePixels(PRBool aMaskPixels) = 0;
# 297 "../../../../dist/include/nsIImage.h"
};
# 31 "../../../../dist/include/nsIWidget.h" 2

# 1 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prthread.h" 1
# 59 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prthread.h"
# 1 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prtypes.h" 1
# 60 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prthread.h" 2
# 1 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prinrval.h" 1
# 61 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prthread.h" 2

extern "C" {

typedef struct PRThread PRThread;
typedef struct PRThreadStack PRThreadStack;

typedef enum PRThreadType {
    PR_USER_THREAD,
    PR_SYSTEM_THREAD
} PRThreadType;

typedef enum PRThreadScope {
    PR_LOCAL_THREAD,
    PR_GLOBAL_THREAD,
    PR_GLOBAL_BOUND_THREAD
} PRThreadScope;

typedef enum PRThreadState {
    PR_JOINABLE_THREAD,
    PR_UNJOINABLE_THREAD
} PRThreadState;

typedef enum PRThreadPriority
{
    PR_PRIORITY_FIRST = 0,
    PR_PRIORITY_LOW = 0,
    PR_PRIORITY_NORMAL = 1,
    PR_PRIORITY_HIGH = 2,
    PR_PRIORITY_URGENT = 3,
    PR_PRIORITY_LAST = 3
} PRThreadPriority;
# 118 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prthread.h"
extern PRThread* PR_CreateThread(PRThreadType type,
                     void ( *start)(void *arg),
                     void *arg,
                     PRThreadPriority priority,
                     PRThreadScope scope,
                     PRThreadState state,
                     PRUint32 stackSize);
# 139 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prthread.h"
extern PRStatus PR_JoinThread(PRThread *thread);





extern PRThread* PR_GetCurrentThread(void);





extern PRThreadPriority PR_GetThreadPriority(const PRThread *thread);




extern void PR_SetThreadPriority(PRThread *thread, PRThreadPriority priority);
# 182 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prthread.h"
typedef void ( *PRThreadPrivateDTOR)(void *priv);

extern PRStatus PR_NewThreadPrivateIndex(
    PRUintn *newIndex, PRThreadPrivateDTOR destructor);
# 198 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prthread.h"
extern PRStatus PR_SetThreadPrivate(PRUintn tpdIndex, void *priv);
# 209 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prthread.h"
extern void* PR_GetThreadPrivate(PRUintn tpdIndex);
# 221 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prthread.h"
extern PRStatus PR_Interrupt(PRThread *thread);





extern void PR_ClearInterrupt(void);




extern void PR_BlockInterrupt(void);




extern void PR_UnblockInterrupt(void);
# 246 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prthread.h"
extern PRStatus PR_Sleep(PRIntervalTime ticks);




extern PRThreadScope PR_GetThreadScope(const PRThread *thread);




extern PRThreadType PR_GetThreadType(const PRThread *thread);




extern PRThreadState PR_GetThreadState(const PRThread *thread);

}
# 33 "../../../../dist/include/nsIWidget.h" 2
# 1 "../../../../dist/include/nsGUIEvent.h" 1
# 34 "../../../../dist/include/nsIWidget.h" 2


class nsIAppShell;
class nsIToolkit;
class nsIFontMetrics;
class nsIToolkit;
class nsIRenderingContext;
class nsIEnumerator;
class nsIDeviceContext;
struct nsRect;
struct nsFont;
class nsIMenuBar;
class nsIEventListener;
class nsIRollupListener;
# 57 "../../../../dist/include/nsIWidget.h"
typedef nsEventStatus (* EVENT_CALLBACK)(nsGUIEvent *event);
# 83 "../../../../dist/include/nsIWidget.h"
typedef void* nsNativeWidget;





enum nsWindowType {

  eWindowType_toplevel,

  eWindowType_dialog,

  eWindowType_popup,

  eWindowType_child
};


enum nsBorderStyle
{

  eBorderStyle_none = 0,


  eBorderStyle_all = 1 << 0,


  eBorderStyle_border = 1 << 1,


  eBorderStyle_resizeh = 1 << 2,


  eBorderStyle_title = 1 << 3,


  eBorderStyle_menu = 1 << 4,



  eBorderStyle_minimize = 1 << 5,


  eBorderStyle_maximize = 1 << 6,


  eBorderStyle_close = 1 << 7,


  eBorderStyle_default = -1
};





enum nsCursor {
                eCursor_standard,

                eCursor_wait,

                eCursor_select,

                eCursor_hyperlink,

                eCursor_sizeWE,

                eCursor_sizeNS,

                eCursor_sizeNW,
                eCursor_sizeSE,
                eCursor_sizeNE,
                eCursor_sizeSW,
                eCursor_arrow_north,
                eCursor_arrow_north_plus,
                eCursor_arrow_south,
                eCursor_arrow_south_plus,
                eCursor_arrow_west,
                eCursor_arrow_west_plus,
                eCursor_arrow_east,
                eCursor_arrow_east_plus,
                eCursor_crosshair,

                eCursor_move,
                eCursor_help,
                eCursor_copy,
                eCursor_alias,
                eCursor_context_menu,
                eCursor_cell,
                eCursor_grab,
                eCursor_grabbing,
                eCursor_spinning,
                eCursor_count_up,
                eCursor_count_down,
                eCursor_count_up_down
                };







struct nsWidgetInitData {
  nsWidgetInitData()
    : clipChildren(0), clipSiblings(0),
      mWindowType(eWindowType_child),
      mBorderStyle(eBorderStyle_default)
  {
  }


  PRPackedBool clipChildren, clipSiblings;
  nsWindowType mWindowType;
  nsBorderStyle mBorderStyle;
};





class nsIWidget : public nsISupports {

  public:

    static const nsIID& GetIID() {static const nsIID iid = { 0x18032ad5, 0xb265, 0x11d1, { 0xaa, 0x2a, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 } }; return iid;}
# 238 "../../../../dist/include/nsIWidget.h"
    virtual nsresult Create(nsIWidget *aParent,
                        const nsRect &aRect,
                        EVENT_CALLBACK aHandleEventFunction,
                        nsIDeviceContext *aContext,
                        nsIAppShell *aAppShell = 0,
                        nsIToolkit *aToolkit = 0,
                        nsWidgetInitData *aInitData = 0) = 0;
# 265 "../../../../dist/include/nsIWidget.h"
    virtual nsresult Create(nsNativeWidget aParent,
                        const nsRect &aRect,
                        EVENT_CALLBACK aHandleEventFunction,
                        nsIDeviceContext *aContext,
                        nsIAppShell *aAppShell = 0,
                        nsIToolkit *aToolkit = 0,
                        nsWidgetInitData *aInitData = 0) = 0;







    virtual nsresult GetClientData(void*& aClientData) = 0;
    virtual nsresult SetClientData(void* aClientData) = 0;







    virtual nsresult Destroy(void) = 0;
# 297 "../../../../dist/include/nsIWidget.h"
    virtual nsIWidget* GetParent(void) = 0;
# 306 "../../../../dist/include/nsIWidget.h"
    virtual nsIEnumerator* GetChildren(void) = 0;







    virtual nsresult Show(PRBool aState) = 0;





    virtual nsresult SetModal(PRBool aModal) = 0;





    virtual nsresult IsVisible(PRBool & aState) = 0;
# 339 "../../../../dist/include/nsIWidget.h"
    virtual nsresult ConstrainPosition(PRInt32 *aX, PRInt32 *aY) = 0;
# 348 "../../../../dist/include/nsIWidget.h"
    virtual nsresult Move(PRInt32 aX, PRInt32 aY) = 0;
# 358 "../../../../dist/include/nsIWidget.h"
    virtual nsresult Resize(PRInt32 aWidth,
                      PRInt32 aHeight,
                      PRBool aRepaint) = 0;
# 372 "../../../../dist/include/nsIWidget.h"
    virtual nsresult Resize(PRInt32 aX,
                      PRInt32 aY,
                      PRInt32 aWidth,
                      PRInt32 aHeight,
                      PRBool aRepaint) = 0;




    virtual nsresult SetZIndex(PRInt32 aZIndex) = 0;




    virtual nsresult GetZIndex(PRInt32* aZIndex) = 0;







    virtual nsresult PlaceBehind(nsIWidget *aWidget, PRBool aActivate) = 0;





    virtual nsresult SetSizeMode(PRInt32 aMode) = 0;





    virtual nsresult GetSizeMode(PRInt32* aMode) = 0;







    virtual nsresult Enable(PRBool aState) = 0;




    virtual nsresult SetFocus(PRBool aRaise = 0) = 0;







    virtual nsresult GetBounds(nsRect &aRect) = 0;
# 439 "../../../../dist/include/nsIWidget.h"
    virtual nsresult GetScreenBounds(nsRect &aRect) = 0;
# 449 "../../../../dist/include/nsIWidget.h"
    virtual nsresult GetClientBounds(nsRect &aRect) = 0;







    virtual nsresult GetBorderSize(PRInt32 &aWidth, PRInt32 &aHeight) = 0;







    virtual nscolor GetForegroundColor(void) = 0;
# 474 "../../../../dist/include/nsIWidget.h"
    virtual nsresult SetForegroundColor(const nscolor &aColor) = 0;
# 483 "../../../../dist/include/nsIWidget.h"
    virtual nscolor GetBackgroundColor(void) = 0;
# 492 "../../../../dist/include/nsIWidget.h"
    virtual nsresult SetBackgroundColor(const nscolor &aColor) = 0;







    virtual nsIFontMetrics* GetFont(void) = 0;







    virtual nsresult SetFont(const nsFont &aFont) = 0;







    virtual nsCursor GetCursor(void) = 0;







    virtual nsresult SetCursor(nsCursor aCursor) = 0;






    virtual nsresult GetWindowType(nsWindowType& aWindowType) = 0;





    virtual nsresult Validate() = 0;
# 546 "../../../../dist/include/nsIWidget.h"
    virtual nsresult Invalidate(PRBool aIsSynchronous) = 0;
# 555 "../../../../dist/include/nsIWidget.h"
    virtual nsresult Invalidate(const nsRect & aRect, PRBool aIsSynchronous) = 0;
# 564 "../../../../dist/include/nsIWidget.h"
    virtual nsresult InvalidateRegion(const nsIRegion* aRegion, PRBool aIsSynchronous) = 0;







     virtual nsresult Update() = 0;
# 581 "../../../../dist/include/nsIWidget.h"
    virtual nsresult AddMouseListener(nsIMouseListener * aListener) = 0;
# 590 "../../../../dist/include/nsIWidget.h"
    virtual nsresult AddEventListener(nsIEventListener * aListener) = 0;
# 599 "../../../../dist/include/nsIWidget.h"
    virtual nsresult AddMenuListener(nsIMenuListener * aListener) = 0;







    virtual nsIToolkit* GetToolkit() = 0;
# 616 "../../../../dist/include/nsIWidget.h"
    virtual nsresult SetColorMap(nsColorMap *aColorMap) = 0;
# 628 "../../../../dist/include/nsIWidget.h"
    virtual nsresult Scroll(PRInt32 aDx, PRInt32 aDy, nsRect *aClipRect) = 0;
# 640 "../../../../dist/include/nsIWidget.h"
    virtual nsresult ScrollWidgets(PRInt32 aDx, PRInt32 aDy) = 0;
# 652 "../../../../dist/include/nsIWidget.h"
    virtual nsresult ScrollRect(nsRect &aSrcRect, PRInt32 aDx, PRInt32 aDy) = 0;






    virtual void AddChild(nsIWidget* aChild) = 0;
    virtual void RemoveChild(nsIWidget* aChild) = 0;
    virtual void* GetNativeData(PRUint32 aDataType) = 0;
    virtual void FreeNativeData(void * data, PRUint32 aDataType) = 0;
    virtual nsIRenderingContext* GetRenderingContext() = 0;
    virtual nsIDeviceContext* GetDeviceContext() = 0;
    virtual nsIAppShell *GetAppShell() = 0;
# 674 "../../../../dist/include/nsIWidget.h"
    virtual nsresult SetBorderStyle(nsBorderStyle aBorderStyle) = 0;
# 683 "../../../../dist/include/nsIWidget.h"
    virtual nsresult SetTitle(const nsString& aTitle) = 0;
# 694 "../../../../dist/include/nsIWidget.h"
    virtual nsresult SetIcon(const nsAReadableString& anIconSpec) = 0;
# 703 "../../../../dist/include/nsIWidget.h"
    virtual nsresult SetMenuBar(nsIMenuBar * aMenuBar) = 0;







    virtual nsresult ShowMenuBar(PRBool aShow) = 0;
# 720 "../../../../dist/include/nsIWidget.h"
    virtual nsresult WidgetToScreen(const nsRect& aOldRect, nsRect& aNewRect) = 0;
# 729 "../../../../dist/include/nsIWidget.h"
    virtual nsresult ScreenToWidget(const nsRect& aOldRect, nsRect& aNewRect) = 0;
# 739 "../../../../dist/include/nsIWidget.h"
    virtual nsresult BeginResizingChildren(void) = 0;







    virtual nsresult EndResizingChildren(void) = 0;





    virtual nsresult GetPreferredSize(PRInt32& aWidth, PRInt32& aHeight) = 0;





    virtual nsresult SetPreferredSize(PRInt32 aWidth, PRInt32 aHeight) = 0;





    virtual nsresult DispatchEvent(nsGUIEvent* event, nsEventStatus & aStatus) = 0;






    virtual nsresult Paint(nsIRenderingContext& aRenderingContext,
                     const nsRect& aDirtyRect) = 0;





    virtual nsresult EnableDragDrop(PRBool aEnable) = 0;

    virtual void ConvertToDeviceCoordinates(nscoord &aX,nscoord &aY) = 0;






    virtual nsresult CaptureMouse(PRBool aCapture) = 0;
# 798 "../../../../dist/include/nsIWidget.h"
    virtual nsresult CaptureRollupEvents(nsIRollupListener * aListener, PRBool aDoCapture, PRBool aConsumeRollupEvent) = 0;
# 811 "../../../../dist/include/nsIWidget.h"
  virtual nsresult ModalEventFilter(PRBool aRealEvent, void *aEvent, PRBool *aForWindow) = 0;
# 821 "../../../../dist/include/nsIWidget.h"
  virtual nsresult GetAttention() = 0;

};
# 30 "nsFormControlHelper.h" 2
# 1 "../../base/src/nsLeafFrame.h" 1
# 25 "../../base/src/nsLeafFrame.h"
# 1 "../../base/src/nsFrame.h" 1
# 26 "../../base/src/nsFrame.h"
# 1 "../../../../dist/include/nsIFrame.h" 1
# 25 "../../../../dist/include/nsIFrame.h"
# 1 "/usr/lib/gcc-lib/i386-linux/3.0/include/stdio.h" 1 3
# 26 "../../../../dist/include/nsIFrame.h" 2
# 1 "../../../../dist/include/nslayout.h" 1
# 25 "../../../../dist/include/nslayout.h"
# 1 "../../../../dist/include/nscore.h" 1
# 26 "../../../../dist/include/nslayout.h" 2
# 1 "../../../../dist/include/nsISupports.h" 1
# 27 "../../../../dist/include/nslayout.h" 2
# 1 "../../../../dist/include/nsTraceRefcnt.h" 1
# 28 "../../../../dist/include/nslayout.h" 2
# 27 "../../../../dist/include/nsIFrame.h" 2
# 1 "../../../../dist/include/nsISupports.h" 1
# 28 "../../../../dist/include/nsIFrame.h" 2
# 1 "../../../../dist/include/nsSize.h" 1
# 29 "../../../../dist/include/nsIFrame.h" 2
# 1 "../../../../dist/include/nsGUIEvent.h" 1
# 30 "../../../../dist/include/nsIFrame.h" 2
# 1 "../../../../dist/include/nsStyleConsts.h" 1
# 25 "../../../../dist/include/nsStyleConsts.h"
# 1 "../../../../dist/include/nsFont.h" 1
# 26 "../../../../dist/include/nsStyleConsts.h" 2
# 31 "../../../../dist/include/nsIFrame.h" 2
# 1 "../../../../dist/include/nsStyleStruct.h" 1
# 30 "../../../../dist/include/nsStyleStruct.h"
enum nsStyleStructID {
  eStyleStruct_Font = 1,
  eStyleStruct_Color = 2,
  eStyleStruct_List = 3,
  eStyleStruct_Position = 4,
  eStyleStruct_Text = 5,
  eStyleStruct_Display = 6,
  eStyleStruct_Table = 7,
  eStyleStruct_Content = 8,
  eStyleStruct_UserInterface = 9,
  eStyleStruct_Print = 10,
  eStyleStruct_Margin = 11,
  eStyleStruct_Padding = 12,
  eStyleStruct_Border = 13,
  eStyleStruct_Outline = 14,

  eStyleStruct_XUL = 15,
  eStyleStruct_Max = eStyleStruct_XUL,



  eStyleStruct_BorderPaddingShortcut = 99
};

class nsIPresContext;

struct nsStyleStruct {
};
# 32 "../../../../dist/include/nsIFrame.h" 2
# 1 "../../../../dist/include/nsStyleCoord.h" 1
# 25 "../../../../dist/include/nsStyleCoord.h"
# 1 "../../../../dist/include/nscore.h" 1
# 26 "../../../../dist/include/nsStyleCoord.h" 2
# 1 "../../../../dist/include/nsCoord.h" 1
# 27 "../../../../dist/include/nsStyleCoord.h" 2
# 1 "../../../../dist/include/nsCRT.h" 1
# 28 "../../../../dist/include/nsStyleCoord.h" 2
class nsString;

enum nsStyleUnit {
  eStyleUnit_Null = 0,
  eStyleUnit_Normal = 1,
  eStyleUnit_Auto = 2,
  eStyleUnit_Inherit = 3,
  eStyleUnit_Percent = 10,
  eStyleUnit_Factor = 11,
  eStyleUnit_Coord = 20,
  eStyleUnit_Integer = 30,
  eStyleUnit_Proportional = 31,
  eStyleUnit_Enumerated = 32,
  eStyleUnit_Chars = 33
};

typedef union {
  PRInt32 mInt;
  float mFloat;
} nsStyleUnion;

class nsStyleCoord {
public:
  nsStyleCoord(nsStyleUnit aUnit = eStyleUnit_Null);
  nsStyleCoord(nscoord aValue);
  nsStyleCoord(PRInt32 aValue, nsStyleUnit aUnit);
  nsStyleCoord(float aValue, nsStyleUnit aUnit);
  nsStyleCoord(const nsStyleCoord& aCopy);

  nsStyleCoord& operator=(const nsStyleCoord& aCopy);
  PRBool operator==(const nsStyleCoord& aOther) const;
  PRBool operator!=(const nsStyleCoord& aOther) const;

  nsStyleUnit GetUnit(void) const { return mUnit; }
  nscoord GetCoordValue(void) const;
  PRInt32 GetIntValue(void) const;
  float GetPercentValue(void) const;
  float GetFactorValue(void) const;
  void GetUnionValue(nsStyleUnion& aValue) const;

  void Reset(void);
  void SetCoordValue(nscoord aValue);
  void SetIntValue(PRInt32 aValue, nsStyleUnit aUnit);
  void SetPercentValue(float aValue);
  void SetFactorValue(float aValue);
  void SetNormalValue(void);
  void SetAutoValue(void);
  void SetInheritValue(void);
  void SetUnionValue(const nsStyleUnion& aValue, nsStyleUnit aUnit);

  void AppendToString(nsString& aBuffer) const;
  void ToString(nsString& aBuffer) const;

public:
  nsStyleUnit mUnit;
  nsStyleUnion mValue;
};


class nsStyleSides {
public:
  nsStyleSides(void);


  PRBool operator==(const nsStyleSides& aOther) const;
  PRBool operator!=(const nsStyleSides& aOther) const;

  nsStyleUnit GetLeftUnit(void) const;
  nsStyleUnit GetTopUnit(void) const;
  nsStyleUnit GetRightUnit(void) const;
  nsStyleUnit GetBottomUnit(void) const;

  nsStyleCoord& GetLeft(nsStyleCoord& aCoord) const;
  nsStyleCoord& GetTop(nsStyleCoord& aCoord) const;
  nsStyleCoord& GetRight(nsStyleCoord& aCoord) const;
  nsStyleCoord& GetBottom(nsStyleCoord& aCoord) const;

  void Reset(void);
  void SetLeft(const nsStyleCoord& aCoord);
  void SetTop(const nsStyleCoord& aCoord);
  void SetRight(const nsStyleCoord& aCoord);
  void SetBottom(const nsStyleCoord& aCoord);

  void AppendToString(nsString& aBuffer) const;
  void ToString(nsString& aBuffer) const;

protected:
  PRUint8 mLeftUnit;
  PRUint8 mTopUnit;
  PRUint8 mRightUnit;
  PRUint8 mBottomUnit;
  nsStyleUnion mLeftValue;
  nsStyleUnion mTopValue;
  nsStyleUnion mRightValue;
  nsStyleUnion mBottomValue;
};




inline PRBool nsStyleCoord::operator!=(const nsStyleCoord& aOther) const
{
  return PRBool(! ((*this) == aOther));
}

inline PRInt32 nsStyleCoord::GetCoordValue(void) const
{
  {};
  if (mUnit == eStyleUnit_Coord) {
    return mValue.mInt;
  }
  return 0;
}

inline PRInt32 nsStyleCoord::GetIntValue(void) const
{
  {};



  if ((mUnit == eStyleUnit_Proportional) ||
      (mUnit == eStyleUnit_Enumerated) ||
      (mUnit == eStyleUnit_Chars) ||
      (mUnit == eStyleUnit_Integer)) {
    return mValue.mInt;
  }
  return 0;
}

inline float nsStyleCoord::GetPercentValue(void) const
{
  {};
  if (mUnit == eStyleUnit_Percent) {
    return mValue.mFloat;
  }
  return 0.0f;
}

inline float nsStyleCoord::GetFactorValue(void) const
{
  {};
  if (mUnit == eStyleUnit_Factor) {
    return mValue.mFloat;
  }
  return 0.0f;
}

inline void nsStyleCoord::GetUnionValue(nsStyleUnion& aValue) const
{
  nsCRT::memcpy(&aValue, &mValue, sizeof(nsStyleUnion));
}




inline PRBool nsStyleSides::operator!=(const nsStyleSides& aOther) const
{
  return PRBool(! ((*this) == aOther));
}

inline nsStyleUnit nsStyleSides::GetLeftUnit(void) const
{
  return (nsStyleUnit)mLeftUnit;
}

inline nsStyleUnit nsStyleSides::GetTopUnit(void) const
{
  return (nsStyleUnit)mTopUnit;
}

inline nsStyleUnit nsStyleSides::GetRightUnit(void) const
{
  return (nsStyleUnit)mRightUnit;
}

inline nsStyleUnit nsStyleSides::GetBottomUnit(void) const
{
  return (nsStyleUnit)mBottomUnit;
}

inline nsStyleCoord& nsStyleSides::GetLeft(nsStyleCoord& aCoord) const
{
  aCoord.SetUnionValue(mLeftValue, (nsStyleUnit)mLeftUnit);
  return aCoord;
}

inline nsStyleCoord& nsStyleSides::GetTop(nsStyleCoord& aCoord) const
{
  aCoord.SetUnionValue(mTopValue, (nsStyleUnit)mTopUnit);
  return aCoord;
}

inline nsStyleCoord& nsStyleSides::GetRight(nsStyleCoord& aCoord) const
{
  aCoord.SetUnionValue(mRightValue, (nsStyleUnit)mRightUnit);
  return aCoord;
}

inline nsStyleCoord& nsStyleSides::GetBottom(nsStyleCoord& aCoord) const
{
  aCoord.SetUnionValue(mBottomValue, (nsStyleUnit)mBottomUnit);
  return aCoord;
}

inline void nsStyleSides::SetLeft(const nsStyleCoord& aCoord)
{
  mLeftUnit = aCoord.GetUnit();
  aCoord.GetUnionValue(mLeftValue);
}

inline void nsStyleSides::SetTop(const nsStyleCoord& aCoord)
{
  mTopUnit = aCoord.GetUnit();
  aCoord.GetUnionValue(mTopValue);
}

inline void nsStyleSides::SetRight(const nsStyleCoord& aCoord)
{
  mRightUnit = aCoord.GetUnit();
  aCoord.GetUnionValue(mRightValue);
}

inline void nsStyleSides::SetBottom(const nsStyleCoord& aCoord)
{
  mBottomUnit = aCoord.GetUnit();
  aCoord.GetUnionValue(mBottomValue);
}
# 33 "../../../../dist/include/nsIFrame.h" 2
# 1 "../../../../dist/include/nsHTMLReflowState.h" 1
# 25 "../../../../dist/include/nsHTMLReflowState.h"
# 1 "../../../../dist/include/nslayout.h" 1
# 26 "../../../../dist/include/nsHTMLReflowState.h" 2

class nsIFrame;
class nsIPresContext;
class nsIReflowCommand;
class nsIRenderingContext;
class nsISpaceManager;
class nsLineLayout;

struct nsStyleDisplay;
struct nsStylePosition;
struct nsStyleBorder;
struct nsStyleMargin;
struct nsStylePadding;
struct nsStyleText;
struct nsHypotheticalBox;
# 57 "../../../../dist/include/nsHTMLReflowState.h"
enum nsReflowReason {
  eReflowReason_Initial = 0,
  eReflowReason_Incremental = 1,
  eReflowReason_Resize = 2,
  eReflowReason_StyleChange = 3,

  eReflowReason_Dirty = 4
};




typedef PRUint32 nsCSSFrameType;
# 113 "../../../../dist/include/nsHTMLReflowState.h"
struct nsHTMLReflowState {


  const nsHTMLReflowState* parentReflowState;


  nsIFrame* frame;


  nsReflowReason reason;


  nsIReflowCommand* reflowCommand;
# 134 "../../../../dist/include/nsHTMLReflowState.h"
  nscoord availableWidth, availableHeight;


  nsIRenderingContext* rendContext;


  PRPackedBool isTopOfPage;



  nsCSSFrameType mFrameType;


  nsISpaceManager* mSpaceManager;


  nsLineLayout* mLineLayout;
# 163 "../../../../dist/include/nsHTMLReflowState.h"
  nscoord mComputedWidth;
# 178 "../../../../dist/include/nsHTMLReflowState.h"
  nscoord mComputedHeight;


  nsMargin mComputedMargin;


  nsMargin mComputedBorderPadding;


  nsMargin mComputedPadding;



  nsMargin mComputedOffsets;


  nscoord mComputedMinWidth, mComputedMaxWidth;
  nscoord mComputedMinHeight, mComputedMaxHeight;


  nscoord mCompactMarginWidth;






  nscoord mAlignCharOffset;



  PRPackedBool mUseAlignCharOffset;


  const nsStyleDisplay* mStyleDisplay;
  const nsStylePosition* mStylePosition;
  const nsStyleBorder* mStyleBorder;
  const nsStyleMargin* mStyleMargin;
  const nsStylePadding* mStylePadding;
  const nsStyleText* mStyleText;



  PRInt32 mReflowDepth;


  nscoord mRightEdge;
# 238 "../../../../dist/include/nsHTMLReflowState.h"
  nsHTMLReflowState(nsIPresContext* aPresContext,
                    nsIFrame* aFrame,
                    nsReflowReason aReason,
                    nsIRenderingContext* aRenderingContext,
                    const nsSize& aAvailableSpace);



  nsHTMLReflowState(nsIPresContext* aPresContext,
                    nsIFrame* aFrame,
                    nsIReflowCommand& aReflowCommand,
                    nsIRenderingContext* aRenderingContext,
                    const nsSize& aAvailableSpace);




  nsHTMLReflowState(nsIPresContext* aPresContext,
                    const nsHTMLReflowState& aParentReflowState,
                    nsIFrame* aFrame,
                    const nsSize& aAvailableSpace,
                    nsReflowReason aReason);



  nsHTMLReflowState(nsIPresContext* aPresContext,
                    const nsHTMLReflowState& aParentReflowState,
                    nsIFrame* aFrame,
                    const nsSize& aAvailableSpace);



  nsHTMLReflowState(nsIPresContext* aPresContext,
                    const nsHTMLReflowState& aParentReflowState,
                    nsIFrame* aFrame,
                    const nsSize& aAvailableSpace,
                    nscoord aContainingBlockWidth,
                    nscoord aContainingBlockHeight);






  static const nsHTMLReflowState*
    GetContainingBlockReflowState(const nsHTMLReflowState* aParentRS);






  static nscoord
    GetContainingBlockContentWidth(const nsHTMLReflowState* aParentRS);






  static const nsHTMLReflowState*
    GetPageBoxReflowState(const nsHTMLReflowState* aParentRS);
# 309 "../../../../dist/include/nsHTMLReflowState.h"
  static void ComputeBorderPaddingFor(nsIFrame* aFrame,
                                      const nsHTMLReflowState* aParentRS,
                                      nsMargin& aResult);






  static nscoord CalcLineHeight(nsIPresContext* aPresContext,
                                nsIRenderingContext* aRenderingContext,
                                nsIFrame* aFrame);

  static PRBool UseComputedHeight();

  static nsCSSFrameType DetermineFrameType(nsIFrame* aFrame);

  void ComputeContainingBlockRectangle(nsIPresContext* aPresContext,
                                       const nsHTMLReflowState* aContainingBlockRS,
                                       nscoord& aContainingBlockWidth,
                                       nscoord& aContainingBlockHeight);

  void CalculateBlockSideMargins(nscoord aAvailWidth,
                                 nscoord aComputedWidth);


protected:


  void Init(nsIPresContext* aPresContext,
            nscoord aContainingBlockWidth = -1,
            nscoord aContainingBlockHeight = -1);

  void InitConstraints(nsIPresContext* aPresContext,
                       nscoord aContainingBlockWidth,
                       nscoord aContainingBlockHeight);

  void CalculateHypotheticalBox(nsIPresContext* aPresContext,
                                nsIFrame* aPlaceholderFrame,
                                nsIFrame* aBlockFrame,
                                nsMargin& aBlockContentArea,
                                nsIFrame* aAbsoluteContainingBlockFrame,
                                nsHypotheticalBox& aHypotheticalBox);

  void InitAbsoluteConstraints(nsIPresContext* aPresContext,
                               const nsHTMLReflowState* cbrs,
                               nscoord aContainingBlockWidth,
                               nscoord aContainingBlockHeight);

  void ComputeRelativeOffsets(const nsHTMLReflowState* cbrs,
                              nscoord aContainingBlockWidth,
                              nscoord aContainingBlockHeight);

  void ComputeBlockBoxData(nsIPresContext* aPresContext,
                           const nsHTMLReflowState* cbrs,
                           nsStyleUnit aWidthUnit,
                           nsStyleUnit aHeightUnit,
                           nscoord aContainingBlockWidth,
                           nscoord aContainingBlockHeight);

  void ComputeHorizontalValue(nscoord aContainingBlockWidth,
                                     nsStyleUnit aUnit,
                                     const nsStyleCoord& aCoord,
                                     nscoord& aResult);

  void ComputeVerticalValue(nscoord aContainingBlockHeight,
                                   nsStyleUnit aUnit,
                                   const nsStyleCoord& aCoord,
                                   nscoord& aResult);

  static nsCSSFrameType DetermineFrameType(nsIFrame* aFrame,
                                           const nsStylePosition* aPosition,
                                           const nsStyleDisplay* aDisplay);



  void ComputeMargin(nscoord aContainingBlockWidth,
                     const nsHTMLReflowState* aContainingBlockRS);



  void ComputePadding(nscoord aContainingBlockWidth,
                      const nsHTMLReflowState* aContainingBlockRS);




  void ComputeMinMaxValues(nscoord aContainingBlockWidth,
                           nscoord aContainingBlockHeight,
                           const nsHTMLReflowState* aContainingBlockRS);

  nscoord CalculateHorizBorderPaddingMargin(nscoord aContainingBlockWidth);





  void AdjustComputedHeight(void);
  void AdjustComputedWidth(void);
};
# 34 "../../../../dist/include/nsIFrame.h" 2
# 55 "../../../../dist/include/nsIFrame.h"
class nsIAtom;
class nsIContent;
class nsIPresContext;
class nsIPresShell;
class nsIRenderingContext;
class nsISizeOfHandler;
class nsIStyleContext;
class nsIView;
class nsIWidget;
class nsAutoString;
class nsString;
class nsIFocusTracker;
class nsStyleChangeList;
class nsBlockFrame;
class nsLineLayout;

struct nsPeekOffsetStruct;
struct nsPoint;
struct nsRect;
struct nsStyleStruct;
class nsIDOMRange;
class nsICaret;
class nsISelectionController;
struct PRLogModuleInfo;

class nsIAccessible;
# 100 "../../../../dist/include/nsIFrame.h"
typedef PRUint32 nsSplittableType;
# 118 "../../../../dist/include/nsIFrame.h"
typedef PRUint32 nsFrameState;
# 210 "../../../../dist/include/nsIFrame.h"
enum nsFramePaintLayer {
  eFramePaintLayer_Underlay = 0,
  eFramePaintLayer_Content = 1,
  eFramePaintLayer_Overlay = 2
};

enum nsSelectionAmount {
  eSelectCharacter = 0,
  eSelectWord = 1,
  eSelectLine = 2,
  eSelectBeginLine = 3,
  eSelectEndLine = 4,
  eSelectNoAmount = 5,
  eSelectDir = 6,
  eSelectParagraph = 7
};

enum nsDirection {
  eDirNext = 0,
  eDirPrevious= 1
};

enum nsSpread {
  eSpreadNone = 0,
  eSpreadAcross = 1,
  eSpreadDown = 2
};

enum nsContextProviderRelationship {
  eContextProvider_Ancestor = 0,
  eContextProvider_Descendant = 1
};
# 257 "../../../../dist/include/nsIFrame.h"
struct nsHTMLReflowMetrics {
  nscoord width, height;
  nscoord ascent, descent;


  nsSize* maxElementSize;



  nscoord mMaximumWidth;
# 280 "../../../../dist/include/nsIFrame.h"
  nscoord mCarriedOutBottomMargin;
# 290 "../../../../dist/include/nsIFrame.h"
  nsRect mOverflowArea;

  PRUint32 mFlags;


  PRBool mNothingChanged;

  nsHTMLReflowMetrics(nsSize* aMaxElementSize, PRUint32 aFlags = 0) {
    maxElementSize = aMaxElementSize;
    mMaximumWidth = 0;
    mFlags = aFlags;
    mCarriedOutBottomMargin = 0;
    mOverflowArea.x = 0;
    mOverflowArea.y = 0;
    mOverflowArea.width = 0;
    mOverflowArea.height = 0;
    mNothingChanged = 0;







    width = height = 0;
    ascent = descent = 0;
  }

  void AddBorderPaddingToMaxElementSize(const nsMargin& aBorderPadding) {
    maxElementSize->width += aBorderPadding.left + aBorderPadding.right;
    maxElementSize->height += aBorderPadding.top + aBorderPadding.bottom;
  }

  nsHTMLReflowMetrics& operator=(const nsHTMLReflowMetrics& aOther)
  {
    if (maxElementSize && aOther.maxElementSize) {
      maxElementSize->width = aOther.maxElementSize->width;
      maxElementSize->height = aOther.maxElementSize->height;
    }
    mMaximumWidth = aOther.mMaximumWidth;
    mFlags = aOther.mFlags;
    mCarriedOutBottomMargin = aOther.mCarriedOutBottomMargin;
    mOverflowArea.x = aOther.mOverflowArea.x;
    mOverflowArea.y = aOther.mOverflowArea.y;
    mOverflowArea.width = aOther.mOverflowArea.width;
    mOverflowArea.height = aOther.mOverflowArea.height;
    mNothingChanged = aOther.mNothingChanged;




    width = aOther.width;
    height = aOther.height;
    ascent = aOther.ascent;
    descent = aOther.descent;
    return *this;
  }

};
# 382 "../../../../dist/include/nsIFrame.h"
typedef PRUint32 nsReflowStatus;
# 452 "../../../../dist/include/nsIFrame.h"
typedef PRBool nsDidReflowStatus;
# 473 "../../../../dist/include/nsIFrame.h"
class nsIFrame : public nsISupports
{
public:
  static const nsIID& GetIID() {static const nsIID iid = { 0xa6cf9050, 0x15b3, 0x11d2,{0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}; return iid;}
# 495 "../../../../dist/include/nsIFrame.h"
  virtual nsresult Init(nsIPresContext* aPresContext,
                   nsIContent* aContent,
                   nsIFrame* aParent,
                   nsIStyleContext* aContext,
                   nsIFrame* aPrevInFlow) = 0;





  virtual nsresult Destroy(nsIPresContext* aPresContext) = 0;
# 525 "../../../../dist/include/nsIFrame.h"
  virtual nsresult SetInitialChildList(nsIPresContext* aPresContext,
                                  nsIAtom* aListName,
                                  nsIFrame* aChildList) = 0;
# 543 "../../../../dist/include/nsIFrame.h"
  virtual nsresult AppendFrames(nsIPresContext* aPresContext,
                          nsIPresShell& aPresShell,
                          nsIAtom* aListName,
                          nsIFrame* aFrameList) = 0;
# 563 "../../../../dist/include/nsIFrame.h"
  virtual nsresult InsertFrames(nsIPresContext* aPresContext,
                          nsIPresShell& aPresShell,
                          nsIAtom* aListName,
                          nsIFrame* aPrevFrame,
                          nsIFrame* aFrameList) = 0;
# 585 "../../../../dist/include/nsIFrame.h"
  virtual nsresult RemoveFrame(nsIPresContext* aPresContext,
                         nsIPresShell& aPresShell,
                         nsIAtom* aListName,
                         nsIFrame* aOldFrame) = 0;
# 607 "../../../../dist/include/nsIFrame.h"
  virtual nsresult ReplaceFrame(nsIPresContext* aPresContext,
                          nsIPresShell& aPresShell,
                          nsIAtom* aListName,
                          nsIFrame* aOldFrame,
                          nsIFrame* aNewFrame) = 0;







  virtual nsresult GetContent(nsIContent** aContent) const = 0;





  virtual nsresult GetOffsets(PRInt32 &start, PRInt32 &end) const = 0;







  virtual nsresult GetStyleContext(nsIStyleContext** aStyleContext) const = 0;
  virtual nsresult SetStyleContext(nsIPresContext* aPresContext,
                              nsIStyleContext* aContext) = 0;




  virtual nsresult GetStyleData(nsStyleStructID aSID,
                           const nsStyleStruct*& aStyleStruct) const = 0;

  virtual nsresult GetStyle(nsStyleStructID aSID, nsStyleStruct& aStruct) const = 0;

  virtual nsresult CalcBorderPadding(nsMargin& aBorderPadding) const = 0;
# 657 "../../../../dist/include/nsIFrame.h"
  virtual nsresult GetAdditionalStyleContext(PRInt32 aIndex,
                                        nsIStyleContext** aStyleContext) const = 0;
  virtual nsresult SetAdditionalStyleContext(PRInt32 aIndex,
                                        nsIStyleContext* aStyleContext) = 0;




  virtual nsresult GetParent(nsIFrame** aParent) const = 0;
  virtual nsresult SetParent(const nsIFrame* aParent) = 0;
# 676 "../../../../dist/include/nsIFrame.h"
  virtual nsresult GetRect(nsRect& aRect) const = 0;
  virtual nsresult GetOrigin(nsPoint& aPoint) const = 0;
  virtual nsresult GetSize(nsSize& aSize) const = 0;
  virtual nsresult SetRect(nsIPresContext* aPresContext,
                      const nsRect& aRect) = 0;
  virtual nsresult MoveTo(nsIPresContext* aPresContext,
                     nscoord aX,
                     nscoord aY) = 0;
  virtual nsresult SizeTo(nsIPresContext* aPresContext,
                     nscoord aWidth,
                     nscoord aHeight) = 0;
# 698 "../../../../dist/include/nsIFrame.h"
  virtual nsresult GetAdditionalChildListName(PRInt32 aIndex,
                                         nsIAtom** aListName) const = 0;
# 709 "../../../../dist/include/nsIFrame.h"
  virtual nsresult FirstChild(nsIPresContext* aPresContext,
                         nsIAtom* aListName,
                         nsIFrame** aFirstChild) const = 0;




  virtual nsresult GetNextSibling(nsIFrame** aNextSibling) const = 0;
  virtual nsresult SetNextSibling(nsIFrame* aNextSibling) = 0;






  virtual nsresult Paint(nsIPresContext* aPresContext,
                    nsIRenderingContext& aRenderingContext,
                    const nsRect& aDirtyRect,
                    nsFramePaintLayer aWhichLayer) = 0;
# 744 "../../../../dist/include/nsIFrame.h"
  virtual nsresult HandleEvent(nsIPresContext* aPresContext,
                          nsGUIEvent* aEvent,
                          nsEventStatus* aEventStatus) = 0;

  virtual nsresult GetContentForEvent(nsIPresContext* aPresContext,
                                 nsEvent* aEvent,
                                 nsIContent** aContent) = 0;

  virtual nsresult GetContentAndOffsetsFromPoint(nsIPresContext* aCX,
                                           const nsPoint& aPoint,
                                           nsIContent ** aNewContent,
                                           PRInt32& aContentOffset,
                                           PRInt32& aContentOffsetEnd,
                                           PRBool& aBeginFrameContent) = 0;





  virtual nsresult GetCursor(nsIPresContext* aPresContext,
                        nsPoint& aPoint,
                        PRInt32& aCursor) = 0;
# 774 "../../../../dist/include/nsIFrame.h"
  virtual nsresult GetFrameForPoint(nsIPresContext* aPresContext,
                               const nsPoint& aPoint,
                               nsFramePaintLayer aWhichLayer,
                               nsIFrame** aFrame) = 0;







  virtual nsresult GetPointFromOffset(nsIPresContext* inPresContext,
                                 nsIRenderingContext* inRendContext,
                                 PRInt32 inOffset,
                                 nsPoint* outPoint) = 0;
# 798 "../../../../dist/include/nsIFrame.h"
  virtual nsresult GetChildFrameContainingOffset(PRInt32 inContentOffset,
                                 PRBool inHint,
                                 PRInt32* outFrameContentOffset,
                                 nsIFrame* *outChildFrame) = 0;






  virtual nsresult GetFrameState(nsFrameState* aResult) = 0;





  virtual nsresult SetFrameState(nsFrameState aNewState) = 0;
# 825 "../../../../dist/include/nsIFrame.h"
  virtual nsresult ContentChanged(nsIPresContext* aPresContext,
                             nsIContent* aChild,
                             nsISupports* aSubContent) = 0;
# 839 "../../../../dist/include/nsIFrame.h"
  virtual nsresult AttributeChanged(nsIPresContext* aPresContext,
                               nsIContent* aChild,
                               PRInt32 aNameSpaceID,
                               nsIAtom* aAttribute,
                               PRInt32 aHint) = 0;
# 854 "../../../../dist/include/nsIFrame.h"
  virtual nsresult ContentStateChanged(nsIPresContext* aPresContext,
                                  nsIContent* aChild,
                                  PRInt32 aHint) = 0;




  virtual nsresult IsSplittable(nsSplittableType& aIsSplittable) const = 0;




  virtual nsresult GetPrevInFlow(nsIFrame** aPrevInFlow) const = 0;
  virtual nsresult SetPrevInFlow(nsIFrame*) = 0;
  virtual nsresult GetNextInFlow(nsIFrame** aNextInFlow) const = 0;
  virtual nsresult SetNextInFlow(nsIFrame*) = 0;
# 880 "../../../../dist/include/nsIFrame.h"
  virtual nsresult WillReflow(nsIPresContext* aPresContext) = 0;
# 922 "../../../../dist/include/nsIFrame.h"
  virtual nsresult Reflow(nsIPresContext* aPresContext,
                    nsHTMLReflowMetrics& aReflowMetrics,
                    const nsHTMLReflowState& aReflowState,
                    nsReflowStatus& aStatus) = 0;
# 942 "../../../../dist/include/nsIFrame.h"
  virtual nsresult DidReflow(nsIPresContext* aPresContext,
                        nsDidReflowStatus aStatus) = 0;
# 958 "../../../../dist/include/nsIFrame.h"
  virtual nsresult CanContinueTextRun(PRBool& aContinueTextRun) const = 0;




  virtual nsresult AdjustFrameSize(nscoord aExtraSpace, nscoord& aUsedSpace) = 0;



  virtual nsresult TrimTrailingWhiteSpace(nsIPresContext* aPresContext,
                                    nsIRenderingContext& aRC,
                                    nscoord& aDeltaWidth) = 0;




  virtual nsresult GetView(nsIPresContext* aPresContext,
                      nsIView** aView) const = 0;
  virtual nsresult SetView(nsIPresContext* aPresContext,
                      nsIView* aView) = 0;




  virtual nsresult GetParentWithView(nsIPresContext* aPresContext,
                                nsIFrame** aParent) const = 0;





  virtual nsresult GetOffsetFromView(nsIPresContext* aPresContext,
                                nsPoint& aOffset,
                                nsIView** aView) const = 0;







  virtual nsresult GetWindow(nsIPresContext* aPresContext,
                        nsIWidget** aWidget) const = 0;






  virtual nsresult GetFrameType(nsIAtom** aType) const = 0;




  virtual nsresult IsPercentageBase(PRBool& aBase) const = 0;





  virtual nsresult Scrolled(nsIView *aView) = 0;
# 1030 "../../../../dist/include/nsIFrame.h"
  virtual nsresult SetSelected(nsIPresContext* aPresContext,
                          nsIDOMRange* aRange,
                          PRBool aSelected,
                          nsSpread aSpread) = 0;

  virtual nsresult GetSelected(PRBool *aSelected) const = 0;
# 1046 "../../../../dist/include/nsIFrame.h"
  virtual nsresult IsSelectable(PRBool* aIsSelectable, PRUint8* aSelectStyle) const = 0;






  virtual nsresult GetSelectionController(nsIPresContext *aPresContext, nsISelectionController **aSelCon) = 0;
# 1064 "../../../../dist/include/nsIFrame.h"
  virtual nsresult CaptureMouse(nsIPresContext* aPresContext, PRBool aGrabMouseEvents) = 0;
# 1073 "../../../../dist/include/nsIFrame.h"
  virtual nsresult PeekOffset(nsIPresContext* aPresContext, nsPeekOffsetStruct *aPos) = 0;
# 1086 "../../../../dist/include/nsIFrame.h"
  virtual nsresult CheckVisibility(nsIPresContext* aContext, PRInt32 aStartIndex, PRInt32 aEndIndex, PRBool aRecurse, PRBool *aFinished, PRBool *_retval)=0;







  virtual nsresult ReflowDirtyChild(nsIPresShell* aPresShell, nsIFrame* aChild) = 0;
# 1103 "../../../../dist/include/nsIFrame.h"
  virtual nsresult GetAccessible(nsIAccessible** aAccessible) = 0;





  virtual nsresult ReflowCommandNotify(nsIPresShell* aShell,
                                 nsIReflowCommand* aRC,
                                 PRBool aCommandAdded) = 0;
# 1131 "../../../../dist/include/nsIFrame.h"
  virtual nsresult GetParentStyleContextProvider(nsIPresContext* aPresContext,
                                           nsIFrame** aProviderFrame,
                                           nsContextProviderRelationship& aRelationship) = 0;
# 1144 "../../../../dist/include/nsIFrame.h"
  virtual nsresult IsVisibleForPainting(nsIPresContext * aPresContext,
                                  nsIRenderingContext& aRenderingContext,
                                  PRBool aCheckVis,
                                  PRBool* aIsVisible) = 0;





  virtual nsresult GetBidiProperty(nsIPresContext* aPresContext,
                             nsIAtom* aPropertyName,
                             void** aPropertyValue,
                             long aSize = sizeof(void*) ) const = 0;
  virtual nsresult SetBidiProperty(nsIPresContext* aPresContext,
                             nsIAtom* aPropertyName,
                             void* aPropertyValue) const = 0;


private:
  virtual nsrefcnt AddRef(void) = 0;
  virtual nsrefcnt Release(void) = 0;
};
# 27 "../../base/src/nsFrame.h" 2
# 1 "../../../../dist/include/nsRect.h" 1
# 28 "../../base/src/nsFrame.h" 2
# 1 "../../../../dist/include/nsString.h" 1
# 29 "../../base/src/nsFrame.h" 2
# 1 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prlog.h" 1
# 22 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prlog.h"
# 1 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prtypes.h" 1
# 23 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prlog.h" 2

extern "C" {
# 119 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prlog.h"
typedef enum PRLogModuleLevel {
    PR_LOG_NONE = 0,
    PR_LOG_ALWAYS = 1,
    PR_LOG_ERROR = 2,
    PR_LOG_WARNING = 3,
    PR_LOG_DEBUG = 4,

    PR_LOG_NOTICE = PR_LOG_DEBUG,
    PR_LOG_WARN = PR_LOG_WARNING,
    PR_LOG_MIN = PR_LOG_DEBUG,
    PR_LOG_MAX = PR_LOG_DEBUG
} PRLogModuleLevel;






typedef struct PRLogModuleInfo {
    const char *name;
    PRLogModuleLevel level;
    struct PRLogModuleInfo *next;
} PRLogModuleInfo;




extern PRLogModuleInfo* PR_NewLogModule(const char *name);





extern PRBool PR_SetLogFile(const char *name);





extern void PR_SetLogBuffering(PRIntn buffer_size);







extern void PR_LogPrint(const char *fmt, ...);




extern void PR_LogFlush(void);
# 235 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prlog.h"
}
# 30 "../../base/src/nsFrame.h" 2




# 1 "../../../../dist/include/nsIPresShell.h" 1
# 40 "../../../../dist/include/nsIPresShell.h"
# 1 "../../../../dist/include/nslayout.h" 1
# 41 "../../../../dist/include/nsIPresShell.h" 2
# 1 "../../../../dist/include/nsISupports.h" 1
# 42 "../../../../dist/include/nsIPresShell.h" 2
# 1 "../../../../dist/include/nsCoord.h" 1
# 43 "../../../../dist/include/nsIPresShell.h" 2
# 1 "../../../../dist/include/nsISelection.h" 1
# 17 "../../../../dist/include/nsISelection.h"
class nsIDOMNode;

class nsIDOMRange;
# 36 "../../../../dist/include/nsISelection.h"
class nsISelection : public nsISupports {
 public:

  static const nsIID& GetIID() {static const nsIID iid = {0xb2c7ed59, 0x8634, 0x4352, { 0x9e, 0x37, 0x54, 0x84, 0xc8, 0xb6, 0xe4, 0xe1 }}; return iid;}





  virtual nsresult GetAnchorNode(nsIDOMNode * *aAnchorNode) = 0;





  virtual nsresult GetAnchorOffset(PRInt32 *aAnchorOffset) = 0;





  virtual nsresult GetFocusNode(nsIDOMNode * *aFocusNode) = 0;





  virtual nsresult GetFocusOffset(PRInt32 *aFocusOffset) = 0;





  virtual nsresult GetIsCollapsed(PRBool *aIsCollapsed) = 0;





  virtual nsresult GetRangeCount(PRInt32 *aRangeCount) = 0;





  virtual nsresult GetRangeAt(PRInt32 index, nsIDOMRange **_retval) = 0;
# 91 "../../../../dist/include/nsISelection.h"
  virtual nsresult Collapse(nsIDOMNode *parentNode, PRInt32 offset) = 0;
# 101 "../../../../dist/include/nsISelection.h"
  virtual nsresult Extend(nsIDOMNode *parentNode, PRInt32 offset) = 0;







  virtual nsresult CollapseToStart(void) = 0;







  virtual nsresult CollapseToEnd(void) = 0;
# 127 "../../../../dist/include/nsISelection.h"
  virtual nsresult ContainsNode(nsIDOMNode *node, PRBool entirelyContained, PRBool *_retval) = 0;






  virtual nsresult SelectAllChildren(nsIDOMNode *parentNode) = 0;





  virtual nsresult AddRange(nsIDOMRange *range) = 0;





  virtual nsresult RemoveRange(nsIDOMRange *range) = 0;





  virtual nsresult RemoveAllRanges(void) = 0;





  virtual nsresult DeleteFromDocument(void) = 0;







  virtual nsresult SelectionLanguageChange(PRBool langRTL) = 0;





  virtual nsresult ToString(PRUnichar **_retval) = 0;

};
# 44 "../../../../dist/include/nsIPresShell.h" 2
# 1 "../../../../dist/include/nsIReflowCommand.h" 1
# 25 "../../../../dist/include/nsIReflowCommand.h"
# 1 "../../../../dist/include/nsISupports.h" 1
# 26 "../../../../dist/include/nsIReflowCommand.h" 2
# 1 "/usr/lib/gcc-lib/i386-linux/3.0/include/stdio.h" 1 3
# 27 "../../../../dist/include/nsIReflowCommand.h" 2

class nsIAtom;
class nsIFrame;
class nsIPresContext;
class nsIRenderingContext;
struct nsHTMLReflowMetrics;
struct nsSize;
# 65 "../../../../dist/include/nsIReflowCommand.h"
class nsIReflowCommand : public nsISupports {
public:
  static const nsIID& GetIID() { static nsIID iid = { 0xc3658e40, 0xff20, 0x11d1, {0x85, 0xbc, 0x0, 0xa0, 0x24, 0x68, 0xfa, 0xb6}}; return iid; }

  enum ReflowType {





    ContentChanged,





    StyleChanged,




    PullupReflow,
    PushReflow,




    CheckPullupReflow,


    ReflowDirty,


    Timeout,


    UserDefined
  };
# 112 "../../../../dist/include/nsIReflowCommand.h"
  virtual nsresult Dispatch(nsIPresContext* aPresContext,
                      nsHTMLReflowMetrics& aDesiredSize,
                      const nsSize& aMaxSize,
                      nsIRenderingContext& aRendContext) = 0;






  virtual nsresult GetNext(nsIFrame*& aNextFrame, PRBool aRemove = 1) = 0;




  virtual nsresult GetTarget(nsIFrame*& aTargetFrame) const = 0;




  virtual nsresult SetTarget(nsIFrame* aTargetFrame) = 0;




  virtual nsresult GetType(ReflowType& aReflowType) const = 0;




  virtual nsresult GetChildFrame(nsIFrame*& aChildFrame) const = 0;
# 152 "../../../../dist/include/nsIReflowCommand.h"
  virtual nsresult GetChildListName(nsIAtom*& aListName) const = 0;






  virtual nsresult SetChildListName(nsIAtom* aListName) = 0;





  virtual nsresult GetPrevSiblingFrame(nsIFrame*& aSiblingFrame) const = 0;




  virtual nsresult List(FILE* out) const = 0;




  virtual nsresult GetFlags(PRInt32* aFlags) = 0;
  virtual nsresult SetFlags(PRInt32 aFlags) = 0;
};
# 45 "../../../../dist/include/nsIPresShell.h" 2
# 1 "../../../../dist/include/nsGUIEvent.h" 1
# 46 "../../../../dist/include/nsIPresShell.h" 2

# 1 "../../../../dist/include/nsISelectionController.h" 1
# 21 "../../../../dist/include/nsISelectionController.h"
class nsISelection;
typedef short SelectionType;
typedef short SelectionRegion;
class nsIDOMNode;
# 34 "../../../../dist/include/nsISelectionController.h"
class nsISelectionController : public nsISupports {
 public:

  static const nsIID& GetIID() {static const nsIID iid = {0xd2d1d179, 0x85a7, 0x11d3, { 0x99, 0x32, 0x00, 0x10, 0x83, 0x01, 0x23, 0x3c }}; return iid;}

  enum { SELECTION_NONE = 0 };

  enum { SELECTION_NORMAL = 1 };

  enum { SELECTION_SPELLCHECK = 2 };

  enum { SELECTION_IME_RAWINPUT = 4 };

  enum { SELECTION_IME_SELECTEDRAWTEXT = 8 };

  enum { SELECTION_IME_CONVERTEDTEXT = 16 };

  enum { SELECTION_IME_SELECTEDCONVERTEDTEXT = 32 };

  enum { NUM_SELECTIONTYPES = 6 };

  enum { SELECTION_ANCHOR_REGION = 0 };

  enum { SELECTION_FOCUS_REGION = 1 };

  enum { NUM_SELECTION_REGIONS = 2 };

  enum { SELECTION_OFF = 0 };

  enum { SELECTION_HIDDEN = 1 };

  enum { SELECTION_ON = 2 };

  enum { SELECTION_DISABLED = 3 };





  virtual nsresult SetDisplaySelection(PRInt16 toggle) = 0;





  virtual nsresult GetDisplaySelection(PRInt16 *_retval) = 0;






  virtual nsresult SetDisplayNonTextSelection(PRBool toggle) = 0;






  virtual nsresult GetDisplayNonTextSelection(PRBool *_retval) = 0;
# 103 "../../../../dist/include/nsISelectionController.h"
  virtual nsresult GetSelection(PRInt16 type, nsISelection **_retval) = 0;
# 113 "../../../../dist/include/nsISelectionController.h"
  virtual nsresult ScrollSelectionIntoView(PRInt16 type, PRInt16 region) = 0;







  virtual nsresult RepaintSelection(PRInt16 type) = 0;
# 131 "../../../../dist/include/nsISelectionController.h"
  virtual nsresult SetCaretEnabled(PRBool enabled) = 0;
# 140 "../../../../dist/include/nsISelectionController.h"
  virtual nsresult SetCaretWidth(PRInt16 pixels) = 0;
# 149 "../../../../dist/include/nsISelectionController.h"
  virtual nsresult SetCaretReadOnly(PRBool readOnly) = 0;
# 158 "../../../../dist/include/nsISelectionController.h"
  virtual nsresult GetCaretEnabled(PRBool *_retval) = 0;
# 168 "../../../../dist/include/nsISelectionController.h"
  virtual nsresult CharacterMove(PRBool forward, PRBool extend) = 0;
# 178 "../../../../dist/include/nsISelectionController.h"
  virtual nsresult WordMove(PRBool forward, PRBool extend) = 0;
# 188 "../../../../dist/include/nsISelectionController.h"
  virtual nsresult LineMove(PRBool forward, PRBool extend) = 0;
# 199 "../../../../dist/include/nsISelectionController.h"
  virtual nsresult IntraLineMove(PRBool forward, PRBool extend) = 0;
# 209 "../../../../dist/include/nsISelectionController.h"
  virtual nsresult PageMove(PRBool forward, PRBool extend) = 0;





  virtual nsresult CompleteScroll(PRBool forward) = 0;
# 225 "../../../../dist/include/nsISelectionController.h"
  virtual nsresult CompleteMove(PRBool forward, PRBool extend) = 0;





  virtual nsresult ScrollPage(PRBool forward) = 0;





  virtual nsresult ScrollLine(PRBool forward) = 0;





  virtual nsresult ScrollHorizontal(PRBool left) = 0;




  virtual nsresult SelectAll(void) = 0;
# 258 "../../../../dist/include/nsISelectionController.h"
  virtual nsresult CheckVisibility(nsIDOMNode *node, PRInt16 startOffset, PRInt16 endOffset, PRBool *_retval) = 0;

};
# 48 "../../../../dist/include/nsIPresShell.h" 2


class nsIContent;
class nsIContentIterator;
class nsIDocument;
class nsIDocumentObserver;
class nsIFrame;
class nsIPresContext;
class nsIStyleSet;
class nsIViewManager;
class nsIDeviceContext;
class nsIRenderingContext;
class nsIPageSequenceFrame;
class nsString;
class nsStringArray;
class nsICaret;
class nsIStyleContext;
class nsIFrameSelection;
class nsIFrameManager;
class nsILayoutHistoryState;
class nsIArena;
class nsIReflowCallback;
class nsISupportsArray;
# 106 "../../../../dist/include/nsIPresShell.h"
enum nsAttributeChangeType {
  eChangeType_Set = 0,
  eChangeType_Remove = 1
};
# 122 "../../../../dist/include/nsIPresShell.h"
class nsIPresShell : public nsISupports {
public:
  static const nsIID& GetIID() { static nsIID iid = { 0x76e79c60, 0x944e, 0x11d1, {0x93, 0x23, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; return iid; }

  virtual nsresult Init(nsIDocument* aDocument,
                  nsIPresContext* aPresContext,
                  nsIViewManager* aViewManager,
                  nsIStyleSet* aStyleSet) = 0;




  virtual nsresult AllocateFrame(size_t aSize, void** aResult) = 0;
  virtual nsresult FreeFrame(size_t aSize, void* aFreeChunk) = 0;


  virtual nsresult PushStackMemory() = 0;
  virtual nsresult PopStackMemory() = 0;
  virtual nsresult AllocateStackMemory(size_t aSize, void** aResult) = 0;

  virtual nsresult GetDocument(nsIDocument** aResult) = 0;

  virtual nsresult GetPresContext(nsIPresContext** aResult) = 0;

  virtual nsresult GetViewManager(nsIViewManager** aResult) = 0;

  virtual nsresult GetStyleSet(nsIStyleSet** aResult) = 0;

  virtual nsresult GetActiveAlternateStyleSheet(nsString& aSheetTitle) = 0;

  virtual nsresult SelectAlternateStyleSheet(const nsString& aSheetTitle) = 0;
# 162 "../../../../dist/include/nsIPresShell.h"
  virtual nsresult SetPreferenceStyleRules(PRBool aForceReflow) = 0;
# 171 "../../../../dist/include/nsIPresShell.h"
  virtual nsresult EnablePrefStyleRules(PRBool aEnable, PRUint8 aPrefType=0xFF) = 0;
  virtual nsresult ArePrefStyleRulesEnabled(PRBool& aEnabled) = 0;





  virtual nsresult ListAlternateStyleSheets(nsStringArray& aTitleList) = 0;





  virtual nsresult GetFrameSelection(nsIFrameSelection** aSelection) = 0;


  virtual nsresult BeginObservingDocument() = 0;


  virtual nsresult EndObservingDocument() = 0;
# 199 "../../../../dist/include/nsIPresShell.h"
  virtual nsresult InitialReflow(nscoord aWidth, nscoord aHeight) = 0;





  virtual nsresult ResizeReflow(nscoord aWidth, nscoord aHeight) = 0;




  virtual nsresult StyleChangeReflow() = 0;

  virtual nsresult GetRootFrame(nsIFrame** aFrame) const = 0;





  virtual nsresult GetPageSequenceFrame(nsIPageSequenceFrame** aResult) const = 0;
# 234 "../../../../dist/include/nsIPresShell.h"
  virtual nsresult GetPrimaryFrameFor(nsIContent* aContent,
                                nsIFrame** aPrimaryFrame) const = 0;





  virtual nsresult GetStyleContextFor(nsIFrame* aFrame,
                                nsIStyleContext** aStyleContext) const = 0;







  virtual nsresult GetLayoutObjectFor(nsIContent* aContent,
                                nsISupports** aResult) const = 0;





  virtual nsresult GetSubShellFor(nsIContent* aContent,
                            nsISupports** aResult) const = 0;





  virtual nsresult SetSubShellFor(nsIContent* aContent,
                            nsISupports* aSubShell) = 0;





  virtual nsresult GetPlaceholderFrameFor(nsIFrame* aFrame,
                                    nsIFrame** aPlaceholderFrame) const = 0;




  virtual nsresult AppendReflowCommand(nsIReflowCommand* aReflowCommand) = 0;
  virtual nsresult CancelReflowCommand(nsIFrame* aTargetFrame, nsIReflowCommand::ReflowType* aCmdType) = 0;
  virtual nsresult CancelAllReflowCommands() = 0;







  virtual nsresult IsSafeToFlush(PRBool& aIsSafeToFlush) = 0;





  virtual nsresult FlushPendingNotifications() = 0;




  virtual nsresult PostDOMEvent(nsIContent* aContent, nsEvent* aEvent)=0;




  virtual nsresult PostAttributeChange(nsIContent* aContent,
                                 PRInt32 aNameSpaceID,
                                 nsIAtom* aName,
                                 const nsString& aValue,
                                 PRBool aNotify,
                                 nsAttributeChangeType aType) = 0;

  virtual nsresult PostReflowCallback(nsIReflowCallback* aCallback) = 0;
  virtual nsresult CancelReflowCallback(nsIReflowCallback* aCallback) = 0;



  virtual nsresult BeginReflowBatching() = 0;
  virtual nsresult EndReflowBatching(PRBool aFlushPendingReflows) = 0;
  virtual nsresult GetReflowBatchingStatus(PRBool* aIsBatching) = 0;

  virtual nsresult ClearFrameRefs(nsIFrame* aFrame) = 0;





  virtual nsresult CreateRenderingContext(nsIFrame *aFrame,
                                    nsIRenderingContext** aContext) = 0;
# 335 "../../../../dist/include/nsIPresShell.h"
  virtual nsresult CantRenderReplacedElement(nsIPresContext* aPresContext,
                                       nsIFrame* aFrame) = 0;






  virtual nsresult GoToAnchor(const nsString& aAnchorName) = 0;
# 373 "../../../../dist/include/nsIPresShell.h"
  virtual nsresult ScrollFrameIntoView(nsIFrame *aFrame,
                                 PRIntn aVPercent,
                                 PRIntn aHPercent) const = 0;






  virtual nsresult NotifyDestroyingFrame(nsIFrame* aFrame) = 0;




  virtual nsresult GetFrameManager(nsIFrameManager** aFrameManager) const = 0;




  virtual nsresult DoCopy() = 0;




  virtual nsresult DoCopyLinkLocation(nsIDOMNode* aNode) = 0;




  virtual nsresult DoCopyImageLocation(nsIDOMNode* aNode) = 0;
  virtual nsresult DoCopyImageContents(nsIDOMNode* aNode) = 0;




  virtual nsresult GetCaret(nsICaret **aOutCaret) = 0;
# 419 "../../../../dist/include/nsIPresShell.h"
  virtual nsresult SetDisplayNonTextSelection(PRBool aInEnable) = 0;
# 428 "../../../../dist/include/nsIPresShell.h"
  virtual nsresult GetDisplayNonTextSelection(PRBool *aOutEnabled) = 0;




  virtual nsresult HandleEventWithTarget(nsEvent* aEvent,
                                   nsIFrame* aFrame,
                                   nsIContent* aContent,
                                   PRUint32 aFlags,
                                   nsEventStatus* aStatus) = 0;




  virtual nsresult HandleDOMEventWithTarget(nsIContent* aTargetContent,
                            nsEvent* aEvent,
                            nsEventStatus* aStatus) = 0;




  virtual nsresult GetEventTargetFrame(nsIFrame** aFrame) = 0;





  virtual nsresult CaptureHistoryState(nsILayoutHistoryState** aLayoutHistoryState, PRBool aLeavingPage = 0) = 0;
  virtual nsresult GetHistoryState(nsILayoutHistoryState** aLayoutHistoryState) = 0;
  virtual nsresult SetHistoryState(nsILayoutHistoryState* aLayoutHistoryState) = 0;





  virtual nsresult IsReflowLocked(PRBool* aIsLocked) = 0;
# 472 "../../../../dist/include/nsIPresShell.h"
  enum GeneratedContentType {Before, After};
  virtual nsresult GetGeneratedContentIterator(nsIContent* aContent,
                                         GeneratedContentType aType,
                                         nsIContentIterator** aIterator) const = 0;
# 487 "../../../../dist/include/nsIPresShell.h"
  virtual nsresult SetAnonymousContentFor(nsIContent* aContent, nsISupportsArray* aAnonymousElements) = 0;
# 498 "../../../../dist/include/nsIPresShell.h"
  virtual nsresult GetAnonymousContentFor(nsIContent* aContent, nsISupportsArray** aAnonymousElements) = 0;





  virtual nsresult ReleaseAnonymousContent() = 0;






  virtual nsresult IsPaintingSuppressed(PRBool* aResult)=0;




  virtual nsresult UnsuppressPainting() = 0;

  enum InterruptType {Timeout};



  virtual nsresult SendInterruptNotificationTo(nsIFrame* aFrame,
                                         InterruptType aInterruptType) = 0;



  virtual nsresult CancelInterruptNotificationTo(nsIFrame* aFrame,
                                           InterruptType aInterruptType) = 0;
# 537 "../../../../dist/include/nsIPresShell.h"
  static PRBool GetVerifyReflowEnable();




  static void SetVerifyReflowEnable(PRBool aEnabled);




  static PRInt32 GetVerifyReflowFlags();
# 565 "../../../../dist/include/nsIPresShell.h"
  virtual nsresult SetCursorBidiLevel(PRUint8 aLevel) = 0;




  virtual nsresult GetCursorBidiLevel(PRUint8 *aOutLevel) = 0;




  virtual nsresult UndefineCursorBidiLevel(void) = 0;




  virtual nsresult BidiStyleChangeReflow(void) = 0;


};





extern nsresult
  NS_NewPresShell(nsIPresShell** aInstancePtrResult);
# 35 "../../base/src/nsFrame.h" 2
# 1 "../../../../dist/include/nsIReflowCommand.h" 1
# 36 "../../base/src/nsFrame.h" 2
# 1 "../../../../dist/include/nsIFrameSelection.h" 1
# 33 "../../../../dist/include/nsIFrameSelection.h"
# 1 "../../../../dist/include/nsISupports.h" 1
# 34 "../../../../dist/include/nsIFrameSelection.h" 2
# 1 "../../../../dist/include/nsIFrame.h" 1
# 35 "../../../../dist/include/nsIFrameSelection.h" 2
# 1 "../../../../dist/include/nsIFocusTracker.h" 1
# 27 "../../../../dist/include/nsIFocusTracker.h"
# 1 "../../../../dist/include/nsISupports.h" 1
# 28 "../../../../dist/include/nsIFocusTracker.h" 2
# 1 "../../../../dist/include/nsIFrame.h" 1
# 29 "../../../../dist/include/nsIFocusTracker.h" 2


class nsIPresContext;







class nsIFocusTracker : public nsISupports
{
public:
  static const nsIID& GetIID() { static nsIID iid = { 0x81ac51d1, 0x923b, 0x11d2, { 0x91, 0x8f, 0x0, 0x80, 0xc8, 0xe4, 0x4d, 0xb5 } }; return iid; }





  virtual nsresult ScrollFrameIntoView(nsIFrame *aFrame) = 0;
# 63 "../../../../dist/include/nsIFocusTracker.h"
  virtual nsresult GetPrimaryFrameFor(nsIContent* aContent,
                                nsIFrame** aPrimaryFrame) const = 0;






  virtual nsresult GetPresContext(nsIPresContext **aContext) = 0;
};
# 36 "../../../../dist/include/nsIFrameSelection.h" 2
# 1 "../../../../dist/include/nsISelection.h" 1
# 37 "../../../../dist/include/nsIFrameSelection.h" 2
# 1 "../../../../dist/include/nsIPresShell.h" 1
# 38 "../../../../dist/include/nsIFrameSelection.h" 2
# 1 "../../../../dist/include/nsIContent.h" 1
# 25 "../../../../dist/include/nsIContent.h"
# 1 "/usr/lib/gcc-lib/i386-linux/3.0/include/stdio.h" 1 3
# 26 "../../../../dist/include/nsIContent.h" 2
# 1 "../../../../dist/include/nslayout.h" 1
# 27 "../../../../dist/include/nsIContent.h" 2
# 1 "../../../../dist/include/nsISupports.h" 1
# 28 "../../../../dist/include/nsIContent.h" 2
# 1 "../../../../dist/include/nsGUIEvent.h" 1
# 29 "../../../../dist/include/nsIContent.h" 2
# 1 "../../../../dist/include/nsAWritableString.h" 1
# 30 "../../../../dist/include/nsIContent.h" 2


class nsIAtom;
class nsIDocument;
class nsIPresContext;
class nsVoidArray;
class nsIDOMEvent;
class nsIContent;
class nsISupportsArray;
class nsIDOMRange;
class nsISizeOfHandler;
class nsINodeInfo;
class nsIEventListenerManager;
# 51 "../../../../dist/include/nsIContent.h"
class nsIContent : public nsISupports {
public:
  static const nsIID& GetIID() {static const nsIID iid = { 0x78030220, 0x9447, 0x11d1, {0x93, 0x23, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; return iid;}

  virtual nsresult GetDocument(nsIDocument*& aResult) const = 0;

  virtual nsresult SetDocument(nsIDocument* aDocument, PRBool aDeep, PRBool aCompileEventHandlers) = 0;

  virtual nsresult GetParent(nsIContent*& aResult) const = 0;

  virtual nsresult SetParent(nsIContent* aParent) = 0;




  virtual nsresult GetNameSpaceID(PRInt32& aResult) const = 0;

  virtual nsresult GetTag(nsIAtom*& aResult) const = 0;

  virtual nsresult GetNodeInfo(nsINodeInfo*& aResult) const = 0;

  virtual nsresult CanContainChildren(PRBool& aResult) const = 0;

  virtual nsresult ChildCount(PRInt32& aResult) const = 0;

  virtual nsresult ChildAt(PRInt32 aIndex, nsIContent*& aResult) const = 0;

  virtual nsresult IndexOf(nsIContent* aPossibleChild, PRInt32& aIndex) const = 0;

  virtual nsresult InsertChildAt(nsIContent* aKid, PRInt32 aIndex,
                           PRBool aNotify, PRBool aDeepSetDocument) = 0;

  virtual nsresult ReplaceChildAt(nsIContent* aKid, PRInt32 aIndex,
                            PRBool aNotify, PRBool aDeepSetDocument) = 0;

  virtual nsresult AppendChildTo(nsIContent* aKid, PRBool aNotify,
                           PRBool aDeepSetDocument) = 0;

  virtual nsresult RemoveChildAt(PRInt32 aIndex, PRBool aNotify) = 0;
# 101 "../../../../dist/include/nsIContent.h"
  virtual nsresult NormalizeAttributeString(const nsAReadableString& aStr,
                                      nsINodeInfo*& aNodeInfo) = 0;
# 118 "../../../../dist/include/nsIContent.h"
  virtual nsresult SetAttribute(PRInt32 aNameSpaceID, nsIAtom* aName,
                          const nsAReadableString& aValue,
                          PRBool aNotify) = 0;
# 136 "../../../../dist/include/nsIContent.h"
  virtual nsresult SetAttribute(nsINodeInfo* aNodeInfo,
                          const nsAReadableString& aValue,
                          PRBool aNotify) = 0;
# 157 "../../../../dist/include/nsIContent.h"
  virtual nsresult GetAttribute(PRInt32 aNameSpaceID, nsIAtom* aName,
                          nsAWritableString& aResult) const = 0;
# 180 "../../../../dist/include/nsIContent.h"
  virtual nsresult GetAttribute(PRInt32 aNameSpaceID, nsIAtom* aName,
                          nsIAtom*& aPrefix, nsAWritableString& aResult) const = 0;
# 192 "../../../../dist/include/nsIContent.h"
  virtual nsresult UnsetAttribute(PRInt32 aNameSpaceID, nsIAtom* aAttribute,
                            PRBool aNotify) = 0;
# 204 "../../../../dist/include/nsIContent.h"
  virtual nsresult GetAttributeNameAt(PRInt32 aIndex,
                                PRInt32& aNameSpaceID,
                                nsIAtom*& aName,
                                nsIAtom*& aPrefix) const = 0;
# 216 "../../../../dist/include/nsIContent.h"
  virtual nsresult GetAttributeCount(PRInt32& aCountResult) const = 0;
# 233 "../../../../dist/include/nsIContent.h"
  virtual nsresult SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const = 0;






  virtual nsresult List(FILE* out = stdout, PRInt32 aIndent = 0) const = 0;






  virtual nsresult DumpContent(FILE* out = stdout, PRInt32 aIndent = 0,PRBool aDumpAll=1) const = 0;
# 259 "../../../../dist/include/nsIContent.h"
  virtual nsresult RangeAdd(nsIDOMRange& aRange) = 0;
  virtual nsresult RangeRemove(nsIDOMRange& aRange) = 0;
  virtual nsresult GetRangeList(nsVoidArray*& aResult) const = 0;




  virtual nsresult HandleDOMEvent(nsIPresContext* aPresContext,
                            nsEvent* aEvent,
                            nsIDOMEvent** aDOMEvent,
                            PRUint32 aFlags,
                            nsEventStatus* aEventStatus) = 0;
# 281 "../../../../dist/include/nsIContent.h"
  virtual nsresult GetContentID(PRUint32* aID) = 0;
  virtual nsresult SetContentID(PRUint32 aID) = 0;






  virtual nsresult SetFocus(nsIPresContext* aPresContext) = 0;
  virtual nsresult RemoveFocus(nsIPresContext* aPresContext) = 0;






  virtual nsresult SetBindingParent(nsIContent* aContent) = 0;
  virtual nsresult GetBindingParent(nsIContent** aContent) = 0;




  enum {
    eTEXT = 0x00000001,
    eELEMENT = 0x00000002,
    eHTML = 0x00000004,
    eHTML_FORM_CONTROL = 0x00000008
  };





  virtual PRBool IsContentOfType(PRUint32 aFlags) = 0;

  virtual nsresult GetListenerManager(nsIEventListenerManager** aResult) = 0;
};
# 39 "../../../../dist/include/nsIFrameSelection.h" 2
# 1 "../../../../dist/include/nsCOMPtr.h" 1
# 40 "../../../../dist/include/nsIFrameSelection.h" 2
# 1 "../../../../dist/include/nsIStyleContext.h" 1
# 25 "../../../../dist/include/nsIStyleContext.h"
# 1 "../../../../dist/include/nslayout.h" 1
# 26 "../../../../dist/include/nsIStyleContext.h" 2
# 1 "../../../../dist/include/nsISupports.h" 1
# 27 "../../../../dist/include/nsIStyleContext.h" 2
# 1 "../../../../dist/include/nsColor.h" 1
# 28 "../../../../dist/include/nsIStyleContext.h" 2
# 1 "../../../../dist/include/nsCoord.h" 1
# 29 "../../../../dist/include/nsIStyleContext.h" 2
# 1 "../../../../dist/include/nsMargin.h" 1
# 30 "../../../../dist/include/nsIStyleContext.h" 2
# 1 "../../../../dist/include/nsRect.h" 1
# 31 "../../../../dist/include/nsIStyleContext.h" 2
# 1 "../../../../dist/include/nsFont.h" 1
# 32 "../../../../dist/include/nsIStyleContext.h" 2
# 1 "../../../../dist/include/nsVoidArray.h" 1
# 26 "../../../../dist/include/nsVoidArray.h"
# 1 "../../../../dist/include/nscore.h" 1
# 27 "../../../../dist/include/nsVoidArray.h" 2
# 1 "../../../../dist/include/nsAWritableString.h" 1
# 28 "../../../../dist/include/nsVoidArray.h" 2
class nsISizeOfHandler;


typedef PRBool (* nsVoidArrayEnumFunc)(void* aElement, void *aData);


class nsVoidArray {
public:
  nsVoidArray();
  nsVoidArray(PRInt32 aCount);
  virtual ~nsVoidArray();

  nsVoidArray& operator=(const nsVoidArray& other);

  void SizeOf(nsISizeOfHandler* aHandler, PRUint32* aResult) const;

  PRInt32 Count() const {
    return mImpl ? mImpl->mCount : 0;
  }

  void* ElementAt(PRInt32 aIndex) const;
  void* operator[](PRInt32 aIndex) const { return ElementAt(aIndex); }

  PRInt32 IndexOf(void* aPossibleElement) const;

  PRBool InsertElementAt(void* aElement, PRInt32 aIndex);

  PRBool ReplaceElementAt(void* aElement, PRInt32 aIndex);

  PRBool AppendElement(void* aElement) {
    return InsertElementAt(aElement, Count());
  }

  PRBool RemoveElement(void* aElement);
  PRBool RemoveElementAt(PRInt32 aIndex);
  void Clear();

  void Compact();

  PRBool EnumerateForwards(nsVoidArrayEnumFunc aFunc, void* aData);
  PRBool EnumerateBackwards(nsVoidArrayEnumFunc aFunc, void* aData);

protected:
  struct Impl {






    PRUint32 mBits;




    PRInt32 mCount;




    void* mArray[1];
  };

  Impl* mImpl;

  enum {
    kArrayOwnerMask = 1 << 31,
    kArraySizeMask = ~kArrayOwnerMask
  };



  PRInt32 GetArraySize() const;
  void SetArraySize(PRInt32 aSize);
  PRBool IsArrayOwner() const;
  void SetArrayOwner(PRBool aOwner);

private:

  nsVoidArray(const nsVoidArray& other);
};



class nsAutoVoidArray : public nsVoidArray {
public:
  nsAutoVoidArray();

protected:


  enum { kAutoBufSize = 8 };
  char mAutoBuf[sizeof(Impl) + (kAutoBufSize - 1) * sizeof(void*)];
};


class nsString;

typedef PRBool (*nsStringArrayEnumFunc)(nsString& aElement, void *aData);

class nsStringArray: protected nsVoidArray
{
public:
  nsStringArray(void);
  virtual ~nsStringArray(void);

  nsStringArray& operator=(const nsStringArray& other);

  void SizeOf(nsISizeOfHandler* aHandler, PRUint32* aResult) const;

  PRInt32 Count(void) const {
    return nsVoidArray::Count();
  }

  void StringAt(PRInt32 aIndex, nsAWritableString& aString) const;
  nsString* StringAt(PRInt32 aIndex) const;
  nsString* operator[](PRInt32 aIndex) const { return StringAt(aIndex); }

  PRInt32 IndexOf(const nsAReadableString& aPossibleString) const;
  PRInt32 IndexOfIgnoreCase(const nsAReadableString& aPossibleString) const;

  PRBool InsertStringAt(const nsAReadableString& aString, PRInt32 aIndex);

  PRBool ReplaceStringAt(const nsAReadableString& aString, PRInt32 aIndex);

  PRBool AppendString(const nsAReadableString& aString) {
    return InsertStringAt(aString, Count());
  }

  PRBool RemoveString(const nsAReadableString& aString);
  PRBool RemoveStringIgnoreCase(const nsAReadableString& aString);
  PRBool RemoveStringAt(PRInt32 aIndex);
  void Clear(void);

  void Compact(void) {
    nsVoidArray::Compact();
  }

  PRBool EnumerateForwards(nsStringArrayEnumFunc aFunc, void* aData);
  PRBool EnumerateBackwards(nsStringArrayEnumFunc aFunc, void* aData);

private:

  nsStringArray(const nsStringArray& other);
};


class nsCString;

typedef PRBool (*nsCStringArrayEnumFunc)(nsCString& aElement, void *aData);

class nsCStringArray: protected nsVoidArray
{
public:
  nsCStringArray(void);
  virtual ~nsCStringArray(void);

  nsCStringArray& operator=(const nsCStringArray& other);

  void SizeOf(nsISizeOfHandler* aHandler, PRUint32* aResult) const;

  PRInt32 Count(void) const {
    return nsVoidArray::Count();
  }

  void CStringAt(PRInt32 aIndex, nsCString& aCString) const;
  nsCString* CStringAt(PRInt32 aIndex) const;
  nsCString* operator[](PRInt32 aIndex) const { return CStringAt(aIndex); }

  PRInt32 IndexOf(const nsCString& aPossibleString) const;
  PRInt32 IndexOfIgnoreCase(const nsCString& aPossibleString) const;

  PRBool InsertCStringAt(const nsCString& aCString, PRInt32 aIndex);

  PRBool ReplaceCStringAt(const nsCString& aCString, PRInt32 aIndex);

  PRBool AppendCString(const nsCString& aCString) {
    return InsertCStringAt(aCString, Count());
  }

  PRBool RemoveCString(const nsCString& aCString);
  PRBool RemoveCStringIgnoreCase(const nsCString& aCString);
  PRBool RemoveCStringAt(PRInt32 aIndex);
  void Clear(void);

  void Compact(void) {
    nsVoidArray::Compact();
  }

  PRBool EnumerateForwards(nsCStringArrayEnumFunc aFunc, void* aData);
  PRBool EnumerateBackwards(nsCStringArrayEnumFunc aFunc, void* aData);

private:

  nsCStringArray(const nsCStringArray& other);
};
# 33 "../../../../dist/include/nsIStyleContext.h" 2
# 1 "../../../../dist/include/nsStyleCoord.h" 1
# 34 "../../../../dist/include/nsIStyleContext.h" 2
# 1 "../../../../dist/include/nsStyleStruct.h" 1
# 35 "../../../../dist/include/nsIStyleContext.h" 2
# 1 "../../../../dist/include/nsStyleConsts.h" 1
# 36 "../../../../dist/include/nsIStyleContext.h" 2
# 1 "../../../../dist/include/nsIStyleSet.h" 1
# 25 "../../../../dist/include/nsIStyleSet.h"
# 1 "/usr/lib/gcc-lib/i386-linux/3.0/include/stdio.h" 1 3
# 26 "../../../../dist/include/nsIStyleSet.h" 2
# 1 "../../../../dist/include/nsISupports.h" 1
# 27 "../../../../dist/include/nsIStyleSet.h" 2
# 1 "../../../../dist/include/nslayout.h" 1
# 28 "../../../../dist/include/nsIStyleSet.h" 2

class nsIAtom;
class nsIStyleRule;
class nsIStyleSheet;
class nsIStyleContext;
class nsIStyleRuleSupplier;
class nsIPresContext;
class nsIContent;
class nsIFrame;
class nsIDocument;
class nsIFrameManager;
class nsISupportsArray;
struct nsFindFrameHint;

# 1 "../../../../dist/include/nsVoidArray.h" 1
# 43 "../../../../dist/include/nsIStyleSet.h" 2
class nsISizeOfHandler;

class nsICSSPseudoComparator;
# 65 "../../../../dist/include/nsIStyleSet.h"
class nsIStyleSet : public nsISupports {
public:
  static const nsIID& GetIID() { static nsIID iid = {0xe59396b0, 0xb244, 0x11d1, {0x80, 0x31, 0x00, 0x60, 0x08, 0x15, 0x9b, 0x5a}}; return iid; }



  virtual void AppendOverrideStyleSheet(nsIStyleSheet* aSheet) = 0;
  virtual void InsertOverrideStyleSheetAfter(nsIStyleSheet* aSheet,
                                             nsIStyleSheet* aAfterSheet) = 0;
  virtual void InsertOverrideStyleSheetBefore(nsIStyleSheet* aSheet,
                                              nsIStyleSheet* aBeforeSheet) = 0;
  virtual void RemoveOverrideStyleSheet(nsIStyleSheet* aSheet) = 0;
  virtual PRInt32 GetNumberOfOverrideStyleSheets() = 0;
  virtual nsIStyleSheet* GetOverrideStyleSheetAt(PRInt32 aIndex) = 0;


  virtual void AddDocStyleSheet(nsIStyleSheet* aSheet, nsIDocument* aDocument) = 0;
  virtual void RemoveDocStyleSheet(nsIStyleSheet* aSheet) = 0;
  virtual PRInt32 GetNumberOfDocStyleSheets() = 0;
  virtual nsIStyleSheet* GetDocStyleSheetAt(PRInt32 aIndex) = 0;

  virtual void AppendBackstopStyleSheet(nsIStyleSheet* aSheet) = 0;
  virtual void InsertBackstopStyleSheetAfter(nsIStyleSheet* aSheet,
                                             nsIStyleSheet* aAfterSheet) = 0;
  virtual void InsertBackstopStyleSheetBefore(nsIStyleSheet* aSheet,
                                              nsIStyleSheet* aBeforeSheet) = 0;
  virtual void RemoveBackstopStyleSheet(nsIStyleSheet* aSheet) = 0;
  virtual PRInt32 GetNumberOfBackstopStyleSheets() = 0;
  virtual nsIStyleSheet* GetBackstopStyleSheetAt(PRInt32 aIndex) = 0;
  virtual void ReplaceBackstopStyleSheets(nsISupportsArray* aNewSheets) = 0;



  virtual nsresult EnableQuirkStyleSheet(PRBool aEnable) = 0;


  virtual nsresult NotifyStyleSheetStateChanged(PRBool aDisabled) = 0;


  virtual nsIStyleContext* ResolveStyleFor(nsIPresContext* aPresContext,
                                           nsIContent* aContent,
                                           nsIStyleContext* aParentContext,
                                           PRBool aForceUnique = 0) = 0;


  virtual nsIStyleContext* ResolvePseudoStyleFor(nsIPresContext* aPresContext,
                                                 nsIContent* aParentContent,
                                                 nsIAtom* aPseudoTag,
                                                 nsIStyleContext* aParentContext,
                                                 PRBool aForceUnique = 0,
                                                 nsICSSPseudoComparator* aComparator = 0) = 0;




  virtual nsIStyleContext* ProbePseudoStyleFor(nsIPresContext* aPresContext,
                                               nsIContent* aParentContent,
                                               nsIAtom* aPseudoTag,
                                               nsIStyleContext* aParentContext,
                                               PRBool aForceUnique = 0) = 0;



  virtual nsresult ReParentStyleContext(nsIPresContext* aPresContext,
                                   nsIStyleContext* aStyleContext,
                                   nsIStyleContext* aNewParentContext,
                                   nsIStyleContext** aNewStyleContext) = 0;


  virtual nsresult HasStateDependentStyle(nsIPresContext* aPresContext,
                                     nsIContent* aContent) = 0;


  virtual nsresult ConstructRootFrame(nsIPresContext* aPresContext,
                                 nsIContent* aDocElement,
                                 nsIFrame*& aFrameSubTree) = 0;




  virtual nsresult ReconstructDocElementHierarchy(nsIPresContext* aPresContext) = 0;


  virtual nsresult ContentAppended(nsIPresContext* aPresContext,
                             nsIContent* aContainer,
                             PRInt32 aNewIndexInContainer) = 0;
  virtual nsresult ContentInserted(nsIPresContext* aPresContext,
                             nsIContent* aContainer,
                             nsIContent* aChild,
                             PRInt32 aIndexInContainer) = 0;
  virtual nsresult ContentReplaced(nsIPresContext* aPresContext,
                             nsIContent* aContainer,
                             nsIContent* aOldChild,
                             nsIContent* aNewChild,
                             PRInt32 aIndexInContainer) = 0;
  virtual nsresult ContentRemoved(nsIPresContext* aPresContext,
                            nsIContent* aContainer,
                            nsIContent* aChild,
                            PRInt32 aIndexInContainer) = 0;

  virtual nsresult ContentChanged(nsIPresContext* aPresContext,
                            nsIContent* aContent,
                            nsISupports* aSubContent) = 0;
  virtual nsresult ContentStatesChanged(nsIPresContext* aPresContext,
                                  nsIContent* aContent1,
                                  nsIContent* aContent2) = 0;
  virtual nsresult AttributeChanged(nsIPresContext* aPresContext,
                              nsIContent* aChild,
                              PRInt32 aNameSpaceID,
                              nsIAtom* aAttribute,
                              PRInt32 aHint) = 0;


  virtual nsresult StyleRuleChanged(nsIPresContext* aPresContext,
                              nsIStyleSheet* aStyleSheet,
                              nsIStyleRule* aStyleRule,
                              PRInt32 aHint) = 0;
  virtual nsresult StyleRuleAdded(nsIPresContext* aPresContext,
                            nsIStyleSheet* aStyleSheet,
                            nsIStyleRule* aStyleRule) = 0;
  virtual nsresult StyleRuleRemoved(nsIPresContext* aPresContext,
                              nsIStyleSheet* aStyleSheet,
                              nsIStyleRule* aStyleRule) = 0;






  virtual nsresult CantRenderReplacedElement(nsIPresContext* aPresContext,
                                       nsIFrame* aFrame) = 0;


  virtual nsresult CreateContinuingFrame(nsIPresContext* aPresContext,
                                   nsIFrame* aFrame,
                                   nsIFrame* aParentFrame,
                                   nsIFrame** aContinuingFrame) = 0;
# 214 "../../../../dist/include/nsIStyleSet.h"
  virtual nsresult FindPrimaryFrameFor(nsIPresContext* aPresContext,
                                 nsIFrameManager* aFrameManager,
                                 nsIContent* aContent,
                                 nsIFrame** aFrame,
                                 nsFindFrameHint* aHint=0) = 0;



  virtual nsresult SetStyleRuleSupplier(nsIStyleRuleSupplier* aSupplier)=0;
  virtual nsresult GetStyleRuleSupplier(nsIStyleRuleSupplier** aSupplier)=0;

  virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) = 0;
  virtual void ListContexts(nsIStyleContext* aRootContext, FILE* out = stdout, PRInt32 aIndent = 0) = 0;

  virtual void SizeOf(nsISizeOfHandler *aSizeofHandler, PRUint32 &aSize) = 0;
  virtual void ResetUniqueStyleItems(void) = 0;



  virtual nsresult AttributeAffectsStyle(nsIAtom *aAttribute, nsIContent *aContent,
                                   PRBool &aAffects) = 0;
# 246 "../../../../dist/include/nsIStyleSet.h"
};

extern nsresult
  NS_NewStyleSet(nsIStyleSet** aInstancePtrResult);


class nsUniqueStyleItems : private nsVoidArray
{
public :

  static nsUniqueStyleItems *GetUniqueStyleItems( void ){
    if(mInstance == 0){



      new nsUniqueStyleItems;

      {};



    }
    return mInstance;
  }

  void *GetItem(void *aPtr){
    PRInt32 index = nsVoidArray::IndexOf(aPtr);
    if( index != -1){
      return nsVoidArray::ElementAt(index);
    } else {
      return 0;
    }
  }

  PRBool AddItem(void *aPtr){
    if(nsVoidArray::IndexOf(aPtr) == -1){
      return nsVoidArray::AppendElement(aPtr);
    } else {
      return 0;
    }
  }

  PRBool RemoveItem(void *aPtr){
    return nsVoidArray::RemoveElement(aPtr);
  }

  PRInt32 Count(void){
    return nsVoidArray::Count();
  }

  void Clear(void){
    nsVoidArray::Clear();
  }
protected:

  nsUniqueStyleItems( const nsUniqueStyleItems& src);
  nsUniqueStyleItems& operator =(const nsUniqueStyleItems& src);


  nsUniqueStyleItems(void) : nsVoidArray(){
    {};
    mInstance=this;
  }

  static nsUniqueStyleItems *mInstance;
};
# 321 "../../../../dist/include/nsIStyleSet.h"
struct nsFindFrameHint
{
  nsIFrame *mPrimaryFrameForPrevSibling;
  nsFindFrameHint() {
    mPrimaryFrameForPrevSibling = 0;
  };
};
# 37 "../../../../dist/include/nsIStyleContext.h" 2
# 1 "../../../../dist/include/nsCOMPtr.h" 1
# 38 "../../../../dist/include/nsIStyleContext.h" 2
# 1 "../../../../dist/include/nsILanguageAtom.h" 1
# 29 "../../../../dist/include/nsILanguageAtom.h"
class nsILanguageAtom : public nsISupports {
 public:

  static const nsIID& GetIID() {static const nsIID iid = {0xa6cf911e, 0x15b3, 0x11d2, { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }}; return iid;}


  virtual nsresult GetLanguage(PRUnichar * *aLanguage) = 0;


  virtual nsresult GetLanguageGroup(nsIAtom * *aLanguageGroup) = 0;


  virtual nsresult LanguageIs(const PRUnichar *aLanguage, PRBool *_retval) = 0;

};
# 39 "../../../../dist/include/nsIStyleContext.h" 2
# 1 "../../../../dist/include/nsIFrame.h" 1
# 40 "../../../../dist/include/nsIStyleContext.h" 2

class nsISizeOfHandler;

class nsIFrame;
class nsIPresContext;
class nsISupportsArray;
class nsIStyleContext;
class nsAutoStyleStruct;


inline void CalcSidesFor(const nsIFrame* aFrame, const nsStyleSides& aSides,
                         PRUint8 aSpacing,
                         const nscoord* aEnumTable, PRInt32 aNumEnums,
                         nsMargin& aResult);




struct nsStyleFont : public nsStyleStruct {
  nsStyleFont(void)
    : mFont(0, 0, 0,
            400, 0x0, 0),
      mFixedFont(0, 0, 0,
                 400, 0x0, 0)
    {}
  ~nsStyleFont(void) {};

  nsFont mFont;
  nsFont mFixedFont;
  PRUint8 mFlags;

protected:
  nsStyleFont(const nsFont& aVariableFont, const nsFont& aFixedFont)
  : mFont(aVariableFont),
    mFixedFont(aFixedFont)
  {}
  nsStyleFont(nsIPresContext* aPresContext);
};


struct nsStyleColor : public nsStyleStruct {
  nsStyleColor(void) {}
  ~nsStyleColor(void) {}

  nscolor mColor;

  PRUint8 mBackgroundAttachment;
  PRUint8 mBackgroundFlags;
  PRUint8 mBackgroundRepeat;

  nscolor mBackgroundColor;
  nscoord mBackgroundXPosition;
  nscoord mBackgroundYPosition;
  nsString mBackgroundImage;

  PRUint8 mCursor;
  nsString mCursorImage;
  float mOpacity;

  PRBool BackgroundIsTransparent() const {return (mBackgroundFlags &
    (0x01 | 0x02)) ==
    (0x01 | 0x02);}
};
# 114 "../../../../dist/include/nsIStyleContext.h"
struct nsStyleMargin: public nsStyleStruct {
  nsStyleMargin(void) {};
  ~nsStyleMargin(void) {};

  nsStyleSides mMargin;

  PRBool GetMargin(nsMargin& aMargin) const
  {
    if (mHasCachedMargin) {
      aMargin = mCachedMargin;
      return 1;
    }
    return 0;
  }


  void CalcMarginFor(const nsIFrame* aFrame, nsMargin& aMargin) const
  {
    if (mHasCachedMargin) {
      aMargin = mCachedMargin;
    } else {
      CalcSidesFor(aFrame, mMargin, 0, 0, 0, aMargin);
    }
  }

friend class StyleMarginBlob;
protected:
  PRPackedBool mHasCachedMargin;
  nsMargin mCachedMargin;
};


struct nsStylePadding: public nsStyleStruct {
  nsStylePadding(void) {};
  ~nsStylePadding(void) {};

  nsStyleSides mPadding;

  PRBool GetPadding(nsMargin& aPadding) const
  {
    if (mHasCachedPadding) {
      aPadding = mCachedPadding;
      return 1;
    }
    return 0;
  }


  void CalcPaddingFor(const nsIFrame* aFrame, nsMargin& aPadding) const
  {
    if (mHasCachedPadding) {
      aPadding = mCachedPadding;
    } else {
      CalcSidesFor(aFrame, mPadding, 1, 0, 0, aPadding);
    }
  }

friend class StylePaddingBlob;
protected:
  PRPackedBool mHasCachedPadding;
  nsMargin mCachedPadding;
};


struct nsStyleBorder: public nsStyleStruct {
  nsStyleBorder(void) {};
  ~nsStyleBorder(void) {};

  nsStyleSides mBorder;
  nsStyleSides mBorderRadius;
  PRUint8 mFloatEdge;

  PRBool GetBorder(nsMargin& aBorder) const
  {
    if (mHasCachedBorder) {
      aBorder = mCachedBorder;
      return 1;
    }
    return 0;
  }

  PRUint8 GetBorderStyle(PRUint8 aSide) const
  {
    {};
    return (mBorderStyle[aSide] & 0x3F);
  }

  void SetBorderStyle(PRUint8 aSide, PRUint8 aStyle)
  {
    {};
    mBorderStyle[aSide] &= ~0x3F;
    mBorderStyle[aSide] |= (aStyle & 0x3F);

  }


  PRBool GetBorderColor(PRUint8 aSide, nscolor& aColor) const
  {
    {};
    if ((mBorderStyle[aSide] & 0x40) == 0) {
      aColor = mBorderColor[aSide];
      return 1;
    }
    return 0;
  }

  void SetBorderColor(PRUint8 aSide, nscolor aColor)
  {
    {};
    mBorderColor[aSide] = aColor;
    mBorderStyle[aSide] &= ~0x40;
    mBorderStyle[aSide] |= 0x80;
  }

  void SetBorderTransparent(PRUint8 aSide)
  {
    {};
    mBorderStyle[aSide] |= (0x80 | 0x40);
  }

  void UnsetBorderColor(PRUint8 aSide)
  {
    {};
    mBorderStyle[aSide] &= 0x3F;
  }


  void CalcBorderFor(const nsIFrame* aFrame, nsMargin& aBorder) const
  {
    if (mHasCachedBorder) {
      aBorder = mCachedBorder;
    } else {
      CalcSidesFor(aFrame, mBorder, 2, mBorderWidths, 3, aBorder);
    }
  }

friend class StyleBorderBlob;
protected:
  PRPackedBool mHasCachedBorder;
  nsMargin mCachedBorder;

  PRUint8 mBorderStyle[4];
  nscolor mBorderColor[4];


  nscoord mBorderWidths[3];
};


struct nsStyleBorderPadding: public nsStyleStruct {
  nsStyleBorderPadding(void) { mHasCachedBorderPadding = 0; };
  ~nsStyleBorderPadding(void) {};

  PRBool GetBorderPadding(nsMargin& aBorderPadding) const {
    if (mHasCachedBorderPadding) {
      aBorderPadding = mCachedBorderPadding;
      return 1;
    }
    return 0;
  }

  void SetBorderPadding(nsMargin aBorderPadding) {
    mCachedBorderPadding = aBorderPadding;
    mHasCachedBorderPadding = 1;
  }

protected:
  nsMargin mCachedBorderPadding;
  PRPackedBool mHasCachedBorderPadding;
};


struct nsStyleOutline: public nsStyleStruct {
  nsStyleOutline(void) {};
  ~nsStyleOutline(void) {};

  nsStyleSides mOutlineRadius;


  nsStyleCoord mOutlineWidth;

  PRBool GetOutlineWidth(nscoord& aWidth) const
  {
    if (mHasCachedOutline) {
      aWidth = mCachedOutlineWidth;
      return 1;
    }
    return 0;
  }

  PRUint8 GetOutlineStyle(void) const
  {
    return (mOutlineStyle & 0x3F);
  }

  void SetOutlineStyle(PRUint8 aStyle)
  {
    mOutlineStyle &= ~0x3F;
    mOutlineStyle |= (aStyle & 0x3F);
  }


  PRBool GetOutlineColor(nscolor& aColor) const
  {
    if ((mOutlineStyle & 0x40) == 0) {
      aColor = mOutlineColor;
      return 1;
    }
    return 0;
  }

  void SetOutlineColor(nscolor aColor)
  {
    mOutlineColor = aColor;
    mOutlineStyle &= ~0x40;
    mOutlineStyle |= 0x80;
  }

  void SetOutlineInvert(void)
  {
    mOutlineStyle |= (0x80 | 0x40);
  }

friend class StyleOutlineBlob;
protected:
  PRPackedBool mHasCachedOutline;
  nscoord mCachedOutlineWidth;

  PRUint8 mOutlineStyle;
  nscolor mOutlineColor;


  nscoord mBorderWidths[3];
};


struct nsStyleList : public nsStyleStruct {
  nsStyleList(void) {};
  ~nsStyleList(void) {};

  PRUint8 mListStyleType;
  PRUint8 mListStylePosition;
  nsString mListStyleImage;
};

struct nsStylePosition : public nsStyleStruct {
  nsStylePosition(void) {};
  ~nsStylePosition(void) {};

  PRUint8 mPosition;

  nsStyleSides mOffset;
  nsStyleCoord mWidth;
  nsStyleCoord mMinWidth;
  nsStyleCoord mMaxWidth;
  nsStyleCoord mHeight;
  nsStyleCoord mMinHeight;
  nsStyleCoord mMaxHeight;
  PRUint8 mBoxSizing;

  nsStyleCoord mZIndex;

  PRBool IsAbsolutelyPositioned() const {return (2 == mPosition) ||
                                                (3 == mPosition);}

  PRBool IsPositioned() const {return IsAbsolutelyPositioned() ||
                                      (1 == mPosition);}
};

struct nsStyleText : public nsStyleStruct {
  nsStyleText(void) {};
  ~nsStyleText(void) {};

  PRUint8 mTextAlign;
  PRUint8 mTextDecoration;
  PRUint8 mTextTransform;
  PRUint8 mWhiteSpace;

  PRUint8 mUnicodeBidi;


  nsStyleCoord mLetterSpacing;
  nsStyleCoord mLineHeight;
  nsStyleCoord mTextIndent;
  nsStyleCoord mWordSpacing;
  nsStyleCoord mVerticalAlign;

  PRBool WhiteSpaceIsSignificant() const {
    return mWhiteSpace == 1;
  }
};

struct nsStyleDisplay : public nsStyleStruct {
  nsStyleDisplay(void) {};
  ~nsStyleDisplay(void) {};

  PRUint8 mDirection;

  PRUint8 mExplicitDirection ;

  PRUint8 mDisplay;
  PRUint8 mFloats;
  PRUint8 mBreakType;
  PRPackedBool mBreakBefore;
  PRPackedBool mBreakAfter;
  PRUint8 mVisible;
  PRUint8 mOverflow;

  PRUint8 mClipFlags;






  nsRect mClip;

  nsCOMPtr<nsILanguageAtom> mLanguage;

  PRBool IsBlockLevel() const {return (1 == mDisplay) ||
                                      (4 == mDisplay) ||
                                      (8 == mDisplay);}

  PRBool IsFloating() const {
    return 0 != mFloats;
  }

        PRBool IsVisible() const {
                return (mVisible == 1);
        }

        PRBool IsVisibleOrCollapsed() const {
                return ((mVisible == 1) ||
                                                (mVisible == 2));
        }
};

struct nsStyleTable: public nsStyleStruct {
  nsStyleTable(void) {};
  ~nsStyleTable(void) {};

  PRUint8 mLayoutStrategy;
  PRUint8 mFrame;
  PRUint8 mRules;
  PRUint8 mBorderCollapse;
  nsStyleCoord mBorderSpacingX;
  nsStyleCoord mBorderSpacingY;
  nsStyleCoord mCellPadding;
  PRUint8 mCaptionSide;
  PRUint8 mEmptyCells;
  PRInt32 mCols;
  PRInt32 mSpan;
  nsStyleCoord mSpanWidth;
};

enum nsStyleContentType {
  eStyleContentType_String = 1,
  eStyleContentType_URL = 10,
  eStyleContentType_Attr = 20,
  eStyleContentType_Counter = 30,
  eStyleContentType_Counters = 31,
  eStyleContentType_OpenQuote = 40,
  eStyleContentType_CloseQuote = 41,
  eStyleContentType_NoOpenQuote = 42,
  eStyleContentType_NoCloseQuote = 43
};

struct nsStyleContentData {
  nsStyleContentType mType;
  nsString mContent;
};

struct nsStyleCounterData {
  nsString mCounter;
  PRInt32 mValue;
};




struct nsStyleContent: public nsStyleStruct {
  nsStyleContent(void) {

    mContentCount = 0;
    mContents = 0;
    mIncrementCount = 0;
    mIncrements = 0;
    mResetCount = 0;
    mResets = 0;
    mQuotesCount = 0;
    mQuotes = 0;
  }

  ~nsStyleContent(void) {
    if (mContents) { delete[] mContents; mContents = 0; };
    if (mIncrements) { delete[] mIncrements; mIncrements = 0; };
    if (mResets) { delete[] mResets; mResets = 0; };
    if (mQuotes) { delete[] mQuotes; mQuotes = 0; };
  }

  PRUint32 ContentCount(void) const { return mContentCount; }
  nsresult GetContentAt(PRUint32 aIndex, nsStyleContentType& aType, nsString& aContent) const {
    if (aIndex < mContentCount) {
      aType = mContents[aIndex].mType;
      aContent = mContents[aIndex].mContent;
      return 0;
    }
    return ((nsresult) 0x80070057L);
  }

  nsresult AllocateContents(PRUint32 aCount) {
    if (aCount != mContentCount) {
      if (mContents) { delete[] mContents; mContents = 0; };
      if (aCount) {
        mContents = new nsStyleContentData[aCount];
        if (! mContents) {
          mContentCount = 0;
          return ((nsresult) 0x8007000eL);
        }
      }
      mContentCount = aCount;
    }
    return 0;
  }

  nsresult SetContentAt(PRUint32 aIndex, nsStyleContentType aType, const nsString& aContent) {
    if (aIndex < mContentCount) {
      mContents[aIndex].mType = aType;
      if (aType < eStyleContentType_OpenQuote) {
        mContents[aIndex].mContent = aContent;
      }
      else {
        mContents[aIndex].mContent.Truncate();
      }
      return 0;
    }
    return ((nsresult) 0x80070057L);
  }

  PRUint32 CounterIncrementCount(void) const { return mIncrementCount; }
  nsresult GetCounterIncrementAt(PRUint32 aIndex, nsString& aCounter, PRInt32& aIncrement) const {
    if (aIndex < mIncrementCount) {
      aCounter = mIncrements[aIndex].mCounter;
      aIncrement = mIncrements[aIndex].mValue;
      return 0;
    }
    return ((nsresult) 0x80070057L);
  }

  nsresult AllocateCounterIncrements(PRUint32 aCount) {
    if (aCount != mIncrementCount) {
      if (mIncrements) { delete[] mIncrements; mIncrements = 0; };
      if (aCount) {
        mIncrements = new nsStyleCounterData[aCount];
        if (! mIncrements) {
          mIncrementCount = 0;
          return ((nsresult) 0x8007000eL);
        }
      }
      mIncrementCount = aCount;
    }
    return 0;
  }

  nsresult SetCounterIncrementAt(PRUint32 aIndex, const nsString& aCounter, PRInt32 aIncrement) {
    if (aIndex < mIncrementCount) {
      mIncrements[aIndex].mCounter = aCounter;
      mIncrements[aIndex].mValue = aIncrement;
      return 0;
    }
    return ((nsresult) 0x80070057L);
  }

  PRUint32 CounterResetCount(void) const { return mResetCount; }
  nsresult GetCounterResetAt(PRUint32 aIndex, nsString& aCounter, PRInt32& aValue) const {
    if (aIndex < mResetCount) {
      aCounter = mResets[aIndex].mCounter;
      aValue = mResets[aIndex].mValue;
      return 0;
    }
    return ((nsresult) 0x80070057L);
  }

  nsresult AllocateCounterResets(PRUint32 aCount) {
    if (aCount != mResetCount) {
      if (mResets) { delete[] mResets; mResets = 0; };
      if (aCount) {
        mResets = new nsStyleCounterData[aCount];
        if (! mResets) {
          mResetCount = 0;
          return ((nsresult) 0x8007000eL);
        }
      }
      mResetCount = aCount;
    }
    return 0;
  }

  nsresult SetCounterResetAt(PRUint32 aIndex, const nsString& aCounter, PRInt32 aValue) {
    if (aIndex < mResetCount) {
      mResets[aIndex].mCounter = aCounter;
      mResets[aIndex].mValue = aValue;
      return 0;
    }
    return ((nsresult) 0x80070057L);
  }

  nsStyleCoord mMarkerOffset;

  PRUint32 QuotesCount(void) const { return mQuotesCount; }
  nsresult GetQuotesAt(PRUint32 aIndex, nsString& aOpen, nsString& aClose) const {
    if (aIndex < mQuotesCount) {
      aIndex *= 2;
      aOpen = mQuotes[aIndex];
      aClose = mQuotes[++aIndex];
      return 0;
    }
    return ((nsresult) 0x80070057L);
  }

  nsresult AllocateQuotes(PRUint32 aCount) {
    if (aCount != mQuotesCount) {
      if (mQuotes) { delete[] mQuotes; mQuotes = 0; };
      if (aCount) {
        mQuotes = new nsString[aCount * 2];
        if (! mQuotes) {
          mQuotesCount = 0;
          return ((nsresult) 0x8007000eL);
        }
      }
      mQuotesCount = aCount;
    }
    return 0;
  }

  nsresult SetQuotesAt(PRUint32 aIndex, const nsString& aOpen, const nsString& aClose) {
    if (aIndex < mQuotesCount) {
      aIndex *= 2;
      mQuotes[aIndex] = aOpen;
      mQuotes[++aIndex] = aClose;
      return 0;
    }
    return ((nsresult) 0x80070057L);
  }

friend class StyleContentBlob;
protected:
  PRUint32 mContentCount;
  nsStyleContentData* mContents;

  PRUint32 mIncrementCount;
  nsStyleCounterData* mIncrements;

  PRUint32 mResetCount;
  nsStyleCounterData* mResets;

  PRUint32 mQuotesCount;
  nsString* mQuotes;
};

struct nsStyleUserInterface: public nsStyleStruct {
  nsStyleUserInterface(void) {};
  ~nsStyleUserInterface(void) {};

  PRUint8 mUserInput;
  PRUint8 mUserModify;
  PRUint8 mUserSelect;
  PRUint8 mUserFocus;
  PRUnichar mKeyEquivalent;
  PRUint8 mResizer;
  nsString mBehavior;
};

struct nsStylePrint: public nsStyleStruct {
  nsStylePrint(void) {};
  ~nsStylePrint(void) {};

  PRUint8 mPageBreakBefore;
  PRUint8 mPageBreakAfter;
  PRUint8 mPageBreakInside;
        nsString mPage;
  PRUint32 mWidows;
  PRUint32 mOrphans;
  PRUint8 mMarks;
  nsStyleCoord mSizeWidth;
  nsStyleCoord mSizeHeight;
};


struct nsStyleXUL : public nsStyleStruct {
  nsStyleXUL() {};
  ~nsStyleXUL() {};





  PRUint8 mBoxOrient;
};






struct nsBorderEdges;


struct nsBorderEdge
{

  nscoord mWidth;

  nscoord mLength;
  PRUint8 mStyle;
  nscolor mColor;

  PRUint8 mSide;

  nsBorderEdges * mInsideNeighbor;

  nsBorderEdge();
};

inline nsBorderEdge::nsBorderEdge()
{
  mWidth=0;
  mLength=0;
  mStyle=0;
  mColor=0;
  mSide=3;
  mInsideNeighbor = 0;
};




struct nsBorderEdges
{
  nsVoidArray mEdges[4];
  nsMargin mMaxBorderWidth;
  PRPackedBool mOutsideEdge;

  nsBorderEdges();
};

inline nsBorderEdges::nsBorderEdges()
{
  mMaxBorderWidth.SizeTo(0,0,0,0);
  mOutsideEdge = 1;
};
# 775 "../../../../dist/include/nsIStyleContext.h"
class nsIStyleContext : public nsISupports {
public:
  static const nsIID& GetIID() { static nsIID iid = { 0x26a4d970, 0xa342, 0x11d1, {0x89, 0x74, 0x00, 0x60, 0x08, 0x91, 0x1b, 0x81} }; return iid; }

  virtual PRBool Equals(const nsIStyleContext* aOther) const = 0;
  virtual PRUint32 HashValue(void) const = 0;

  virtual nsIStyleContext* GetParent(void) const = 0;
  virtual nsISupportsArray* GetStyleRules(void) const = 0;
  virtual PRInt32 GetStyleRuleCount(void) const = 0;
  virtual nsresult GetPseudoType(nsIAtom*& aPseudoTag) const = 0;

  virtual nsresult FindChildWithRules(const nsIAtom* aPseudoTag,
                                nsISupportsArray* aRules,
                                nsIStyleContext*& aResult) = 0;


  virtual nsresult GetStyle(nsStyleStructID aSID, nsStyleStruct& aStruct) const = 0;


  virtual nsresult CalcStyleDifference(nsIStyleContext* aOther, PRInt32& aHint, PRBool aStopAtFirst = 0) const = 0;


  virtual void List(FILE* out, PRInt32 aIndent) = 0;

  virtual void SizeOf(nsISizeOfHandler *aSizeOfHandler, PRUint32 &aSize) = 0;
# 814 "../../../../dist/include/nsIStyleContext.h"
  virtual const nsStyleStruct* GetStyleData(nsStyleStructID aSID) = 0;


  virtual void ForceUnique(void) = 0;

  virtual nsresult RemapStyle(nsIPresContext* aPresContext, PRBool aRecurse = 1) = 0;


  virtual void RecalcAutomaticData(nsIPresContext* aPresContext) = 0;


  virtual void CalcBorderPaddingFor(const nsIFrame* aFrame, nsMargin& aBorderPadding) const = 0;
# 843 "../../../../dist/include/nsIStyleContext.h"
  virtual void ReadMutableStyleData(nsStyleStructID aSID, nsStyleStruct** aStyleStruct) = 0;
  virtual nsresult WriteMutableStyleData(nsStyleStructID aSID, nsStyleStruct* aStyleStruct) = 0;
};



inline nscoord CalcSideFor(const nsIFrame* aFrame, const nsStyleCoord& aCoord,
                           PRUint8 aSpacing, PRUint8 aSide,
                           const nscoord* aEnumTable, PRInt32 aNumEnums)
{
  nscoord result = 0;

  switch (aCoord.GetUnit()) {
    case eStyleUnit_Auto:

      break;

    case eStyleUnit_Inherit:
      nsIFrame* parentFrame;
      aFrame->GetParent(&parentFrame);
      if (0 != parentFrame) {
        nsIStyleContext* parentContext;
        parentFrame->GetStyleContext(&parentContext);
        if (0 != parentContext) {
          nsMargin parentSpacing;
          switch (aSpacing) {
            case 0:
              {
                const nsStyleMargin* parentMargin = (const nsStyleMargin*)parentContext->GetStyleData(eStyleStruct_Margin);
                parentMargin->CalcMarginFor(parentFrame, parentSpacing);
              }

              break;
            case 1:
              {
                const nsStylePadding* parentPadding = (const nsStylePadding*)parentContext->GetStyleData(eStyleStruct_Padding);
                parentPadding->CalcPaddingFor(parentFrame, parentSpacing);
              }

              break;
            case 2:
              {
                const nsStyleBorder* parentBorder = (const nsStyleBorder*)parentContext->GetStyleData(eStyleStruct_Border);
                parentBorder->CalcBorderFor(parentFrame, parentSpacing);
              }

              break;
          }
          switch (aSide) {
            case 3: result = parentSpacing.left; break;
            case 0: result = parentSpacing.top; break;
            case 1: result = parentSpacing.right; break;
            case 2: result = parentSpacing.bottom; break;
          }
          do { (parentContext)->Release(); (parentContext) = 0; } while (0);
        }
      }
      break;

    case eStyleUnit_Percent:
      {
        nscoord baseWidth = 0;
        PRBool isBase = 0;
        nsIFrame* frame;
        aFrame->GetParent(&frame);
        while (0 != frame) {
          frame->IsPercentageBase(isBase);
          if (isBase) {
            nsSize size;
            frame->GetSize(size);
            baseWidth = size.width;
            break;
          }
          frame->GetParent(&frame);
        }
        result = (nscoord)((float)baseWidth * aCoord.GetPercentValue());
      }
      break;

    case eStyleUnit_Coord:
      result = aCoord.GetCoordValue();
      break;

    case eStyleUnit_Enumerated:
      if (0 != aEnumTable) {
        PRInt32 value = aCoord.GetIntValue();
        if ((0 <= value) && (value < aNumEnums)) {
          return aEnumTable[aCoord.GetIntValue()];
        }
      }
      break;

    case eStyleUnit_Null:
    case eStyleUnit_Normal:
    case eStyleUnit_Integer:
    case eStyleUnit_Proportional:
    default:
      result = 0;
      break;
  }
  if ((1 == aSpacing) || (2 == aSpacing)) {
    if (result < 0) {
      result = 0;
    }
  }
  return result;
}

inline void CalcSidesFor(const nsIFrame* aFrame, const nsStyleSides& aSides,
                         PRUint8 aSpacing,
                         const nscoord* aEnumTable, PRInt32 aNumEnums,
                         nsMargin& aResult)
{
  nsStyleCoord coord;

  aResult.left = CalcSideFor(aFrame, aSides.GetLeft(coord), aSpacing, 3,
                             aEnumTable, aNumEnums);
  aResult.top = CalcSideFor(aFrame, aSides.GetTop(coord), aSpacing, 0,
                            aEnumTable, aNumEnums);
  aResult.right = CalcSideFor(aFrame, aSides.GetRight(coord), aSpacing, 1,
                              aEnumTable, aNumEnums);
  aResult.bottom = CalcSideFor(aFrame, aSides.GetBottom(coord), aSpacing, 2,
                               aEnumTable, aNumEnums);
}



extern nsresult
  NS_NewStyleContext(nsIStyleContext** aInstancePtrResult,
                     nsIStyleContext* aParentContext,
                     nsIAtom* aPseudoType,
                     nsISupportsArray* aRules,
                     nsIPresContext* aPresContext);
# 41 "../../../../dist/include/nsIFrameSelection.h" 2
# 1 "../../../../dist/include/nsISelectionController.h" 1
# 42 "../../../../dist/include/nsIFrameSelection.h" 2
# 54 "../../../../dist/include/nsIFrameSelection.h"
struct SelectionDetails
{
  PRInt32 mStart;
  PRInt32 mEnd;
  SelectionType mType;
  SelectionDetails *mNext;
};
# 75 "../../../../dist/include/nsIFrameSelection.h"
struct nsPeekOffsetStruct
{
  void SetData(nsIFocusTracker *aTracker,
               nscoord aDesiredX,
               nsSelectionAmount aAmount,
               nsDirection aDirection,
               PRInt32 aStartOffset,
               PRBool aEatingWS,
               PRBool aPreferLeft,
               PRBool aJumpLines)
      {
       mTracker=aTracker;mDesiredX=aDesiredX;mAmount=aAmount;
       mDirection=aDirection;mStartOffset=aStartOffset;mEatingWS=aEatingWS;
       mPreferLeft=aPreferLeft;mJumpLines = aJumpLines;
      }
  nsIFocusTracker *mTracker;
  nscoord mDesiredX;
  nsSelectionAmount mAmount;
  nsDirection mDirection;
  PRInt32 mStartOffset;
  nsCOMPtr<nsIContent> mResultContent;
  PRInt32 mContentOffset;
  PRInt32 mContentOffsetEnd;
  nsIFrame *mResultFrame;
  PRBool mEatingWS;
  PRBool mPreferLeft;
  PRBool mJumpLines;
};

class nsIScrollableView;


class nsIFrameSelection : public nsISupports {
public:
  static const nsIID& GetIID() { static nsIID iid = { 0xf46e4171, 0xdeaa, 0x11d1, { 0x97, 0xfc, 0x0, 0x60, 0x97, 0x3, 0xc1, 0x4e } }; return iid; }
  enum HINT {HINTLEFT=0,HINTRIGHT=1}mHint;






  virtual nsresult Init(nsIFocusTracker *aTracker, nsIContent *aLimiter) = 0;




  virtual nsresult SetScrollableView(nsIScrollableView *aScrollView) =0;




  virtual nsresult GetScrollableView(nsIScrollableView **aScrollView) =0;





  virtual nsresult ShutDown() = 0;







  virtual nsresult HandleTextEvent(nsGUIEvent *aGuiEvent) = 0;







  virtual nsresult HandleKeyEvent(nsIPresContext* aPresContext, nsGUIEvent *aGuiEvent) = 0;
# 164 "../../../../dist/include/nsIFrameSelection.h"
  virtual nsresult HandleClick(nsIContent *aNewFocus, PRUint32 aContentOffset, PRUint32 aContentEndOffset ,
                       PRBool aContinueSelection, PRBool aMultipleSelection, PRBool aHint) = 0;






  virtual nsresult HandleDrag(nsIPresContext *aPresContext, nsIFrame *aFrame, nsPoint& aPoint) = 0;
# 186 "../../../../dist/include/nsIFrameSelection.h"
  virtual nsresult HandleTableSelection(nsIContent *aParentContent, PRInt32 aContentOffset, PRInt32 aTarget, nsMouseEvent *aMouseEvent) = 0;
# 196 "../../../../dist/include/nsIFrameSelection.h"
  virtual nsresult StartAutoScrollTimer(nsIPresContext *aPresContext, nsIFrame *aFrame, nsPoint& aPoint, PRUint32 aDelay) = 0;



  virtual nsresult StopAutoScrollTimer() = 0;





  virtual nsresult EnableFrameNotification(PRBool aEnable) = 0;
# 216 "../../../../dist/include/nsIFrameSelection.h"
  virtual nsresult LookUpSelection(nsIContent *aContent, PRInt32 aContentOffset, PRInt32 aContentLength,
                             SelectionDetails **aReturnDetails, PRBool aSlowCheck) = 0;





  virtual nsresult SetMouseDownState(PRBool aState)=0;





  virtual nsresult GetMouseDownState(PRBool *aState)=0;




  virtual nsresult GetTableCellSelection(PRBool *aState)=0;




  virtual nsresult GetTableCellSelectionStyleColor(const nsStyleColor **aStyleColor)=0;





  virtual nsresult GetSelection(SelectionType aSelectionType, nsISelection **aSelection)=0;
# 254 "../../../../dist/include/nsIFrameSelection.h"
  virtual nsresult ScrollSelectionIntoView(SelectionType aSelectionType, SelectionRegion aRegion)=0;





  virtual nsresult RepaintSelection(nsIPresContext* aPresContext, SelectionType aSelectionType)=0;
# 269 "../../../../dist/include/nsIFrameSelection.h"
  virtual nsresult GetFrameForNodeOffset(nsIContent *aNode, PRInt32 aOffset, HINT aHint, nsIFrame **aReturnFrame, PRInt32 *aReturnOffset)=0;
# 279 "../../../../dist/include/nsIFrameSelection.h"
  virtual nsresult AdjustOffsetsFromStyle(nsIFrame *aFrame, PRBool *changeSelection,
        nsIContent** outContent, PRInt32* outStartOffset, PRInt32* outEndOffset)=0;


  virtual nsresult GetHint(HINT *aHint)=0;
  virtual nsresult SetHint(HINT aHint)=0;






  virtual nsresult CharacterMove(PRBool aForward, PRBool aExtend)=0;






  virtual nsresult WordMove(PRBool aForward, PRBool aExtend)=0;






  virtual nsresult LineMove(PRBool aForward, PRBool aExtend)=0;






  virtual nsresult IntraLineMove(PRBool aForward, PRBool aExtend)=0;




  virtual nsresult SelectAll()=0;



  virtual nsresult SetDisplaySelection(PRInt16 aState)=0;
  virtual nsresult GetDisplaySelection(PRInt16 *aState)=0;
# 335 "../../../../dist/include/nsIFrameSelection.h"
  virtual nsresult SetDelayCaretOverExistingSelection(PRBool aDelay)=0;
# 344 "../../../../dist/include/nsIFrameSelection.h"
  virtual nsresult GetDelayCaretOverExistingSelection(PRBool *aDelay)=0;
# 354 "../../../../dist/include/nsIFrameSelection.h"
  virtual nsresult SetDelayedCaretData(nsMouseEvent *aMouseEvent)=0;







  virtual nsresult GetDelayedCaretData(nsMouseEvent **aMouseEvent)=0;







  virtual nsresult GetLimiter(nsIContent **aLimiterContent)=0;
# 386 "../../../../dist/include/nsIFrameSelection.h"
  virtual nsresult GetPrevNextBidiLevels(nsIPresContext *aPresContext, nsIContent *aNode, PRUint32 aContentOffset,
                                   nsIFrame **aPrevFrame, nsIFrame **aNextFrame, PRUint8 *aPrevLevel, PRUint8 *aNextLevel)=0;
# 398 "../../../../dist/include/nsIFrameSelection.h"
  virtual nsresult GetFrameFromLevel(nsIPresContext *aPresContext, nsIFrame *aFrameIn, nsDirection aDirection, PRUint8 aBidiLevel,
                               nsIFrame **aFrameOut)=0;


};
# 37 "../../base/src/nsFrame.h" 2
# 107 "../../base/src/nsFrame.h"
class nsFrame : public nsIFrame



{
public:




  friend nsresult NS_NewEmptyFrame(nsIPresShell* aShell, nsIFrame** aInstancePtrResult);



  void* operator new(size_t sz, nsIPresShell* aPresShell);





  void operator delete(void* aPtr, size_t sz);

private:


  void* operator new(size_t sz) throw () { return 0; };




public:


  virtual nsresult QueryInterface(const nsIID& aIID, void** aInstancePtr);


  virtual nsresult Init(nsIPresContext* aPresContext,
                   nsIContent* aContent,
                   nsIFrame* aParent,
                   nsIStyleContext* aContext,
                   nsIFrame* asPrevInFlow);
  virtual nsresult SetInitialChildList(nsIPresContext* aPresContext,
                                  nsIAtom* aListName,
                                  nsIFrame* aChildList);
  virtual nsresult AppendFrames(nsIPresContext* aPresContext,
                           nsIPresShell& aPresShell,
                           nsIAtom* aListName,
                           nsIFrame* aFrameList);
  virtual nsresult InsertFrames(nsIPresContext* aPresContext,
                           nsIPresShell& aPresShell,
                           nsIAtom* aListName,
                           nsIFrame* aPrevFrame,
                           nsIFrame* aFrameList);
  virtual nsresult RemoveFrame(nsIPresContext* aPresContext,
                          nsIPresShell& aPresShell,
                          nsIAtom* aListName,
                          nsIFrame* aOldFrame);
  virtual nsresult ReplaceFrame(nsIPresContext* aPresContext,
                           nsIPresShell& aPresShell,
                           nsIAtom* aListName,
                           nsIFrame* aOldFrame,
                           nsIFrame* aNewFrame);
  virtual nsresult Destroy(nsIPresContext* aPresContext);
  virtual nsresult GetContent(nsIContent** aContent) const;
  virtual nsresult GetStyleContext(nsIStyleContext** aStyleContext) const;
  virtual nsresult SetStyleContext(nsIPresContext* aPresContext,
                              nsIStyleContext* aContext);
  virtual nsresult GetStyleData(nsStyleStructID aSID,
                           const nsStyleStruct*& aStyleStruct) const;
  virtual nsresult GetStyle(nsStyleStructID aSID, nsStyleStruct& aStruct) const;
  virtual nsresult CalcBorderPadding(nsMargin& aBorderPadding) const;
  virtual nsresult GetAdditionalStyleContext(PRInt32 aIndex,
                                        nsIStyleContext** aStyleContext) const;
  virtual nsresult SetAdditionalStyleContext(PRInt32 aIndex,
                                        nsIStyleContext* aStyleContext);
  virtual nsresult GetParent(nsIFrame** aParent) const;
  virtual nsresult SetParent(const nsIFrame* aParent);
  virtual nsresult GetRect(nsRect& aRect) const;
  virtual nsresult GetOrigin(nsPoint& aPoint) const;
  virtual nsresult GetSize(nsSize& aSize) const;
  virtual nsresult SetRect(nsIPresContext* aPresContext, const nsRect& aRect);
  virtual nsresult MoveTo(nsIPresContext* aPresContext, nscoord aX, nscoord aY);
  virtual nsresult SizeTo(nsIPresContext* aPresContext, nscoord aWidth, nscoord aHeight);
  virtual nsresult GetAdditionalChildListName(PRInt32 aIndex, nsIAtom** aListName) const;
  virtual nsresult FirstChild(nsIPresContext* aPresContext,
                         nsIAtom* aListName,
                         nsIFrame** aFirstChild) const;
  virtual nsresult Paint(nsIPresContext* aPresContext,
                    nsIRenderingContext& aRenderingContext,
                    const nsRect& aDirtyRect,
                    nsFramePaintLayer aWhichLayer);
  virtual nsresult HandleEvent(nsIPresContext* aPresContext,
                          nsGUIEvent* aEvent,
                          nsEventStatus* aEventStatus);
  virtual nsresult GetContentForEvent(nsIPresContext* aPresContext,
                                 nsEvent* aEvent,
                                 nsIContent** aContent);
  virtual nsresult GetCursor(nsIPresContext* aPresContext,
                        nsPoint& aPoint,
                        PRInt32& aCursor);
  virtual nsresult GetFrameForPoint(nsIPresContext* aPresContext,
                               const nsPoint& aPoint,
                               nsFramePaintLayer aWhichLayer,
                               nsIFrame** aFrame);

  virtual nsresult GetPointFromOffset(nsIPresContext* inPresContext,
                                 nsIRenderingContext* inRendContext,
                                 PRInt32 inOffset,
                                 nsPoint* outPoint);

  virtual nsresult GetChildFrameContainingOffset(PRInt32 inContentOffset,
                                 PRBool inHint,
                                 PRInt32* outFrameContentOffset,
                                 nsIFrame* *outChildFrame);

  static nsresult GetNextPrevLineFromeBlockFrame(nsIPresContext* aPresContext,
                                        nsPeekOffsetStruct *aPos,
                                        nsIFrame *aBlockFrame,
                                        PRInt32 aLineStart,
                                        PRInt8 aOutSideLimit
                                        );

  virtual nsresult GetFrameState(nsFrameState* aResult);
  virtual nsresult SetFrameState(nsFrameState aNewState);

  virtual nsresult ContentChanged(nsIPresContext* aPresContext,
                             nsIContent* aChild,
                             nsISupports* aSubContent);
  virtual nsresult AttributeChanged(nsIPresContext* aPresContext,
                               nsIContent* aChild,
                               PRInt32 aNameSpaceID,
                               nsIAtom* aAttribute,
                               PRInt32 aHint);
  virtual nsresult ContentStateChanged(nsIPresContext* aPresContext,
                                  nsIContent* aChild,
                                  PRInt32 aHint);
  virtual nsresult IsSplittable(nsSplittableType& aIsSplittable) const;
  virtual nsresult GetPrevInFlow(nsIFrame** aPrevInFlow) const;
  virtual nsresult SetPrevInFlow(nsIFrame*);
  virtual nsresult GetNextInFlow(nsIFrame** aNextInFlow) const;
  virtual nsresult SetNextInFlow(nsIFrame*);
  virtual nsresult GetView(nsIPresContext* aPresContext, nsIView** aView) const;
  virtual nsresult SetView(nsIPresContext* aPresContext, nsIView* aView);
  virtual nsresult GetParentWithView(nsIPresContext* aPresContext, nsIFrame** aParent) const;
  virtual nsresult GetOffsetFromView(nsIPresContext* aPresContext, nsPoint& aOffset, nsIView** aView) const;
  virtual nsresult GetWindow(nsIPresContext* aPresContext, nsIWidget**) const;
  virtual nsresult GetFrameType(nsIAtom** aType) const;
  virtual nsresult IsPercentageBase(PRBool& aBase) const;
  virtual nsresult GetNextSibling(nsIFrame** aNextSibling) const;
  virtual nsresult SetNextSibling(nsIFrame* aNextSibling);
  virtual nsresult Scrolled(nsIView *aView);
# 266 "../../base/src/nsFrame.h"
  virtual nsresult SetSelected(nsIPresContext* aPresContext, nsIDOMRange *aRange,PRBool aSelected, nsSpread aSpread);
  virtual nsresult GetSelected(PRBool *aSelected) const;
  virtual nsresult IsSelectable(PRBool* aIsSelectable, PRUint8* aSelectStyle) const;

  virtual nsresult GetSelectionController(nsIPresContext *aPresContext, nsISelectionController **aSelCon);
  virtual nsresult PeekOffset(nsIPresContext* aPresContext, nsPeekOffsetStruct *aPos) ;
  virtual nsresult CheckVisibility(nsIPresContext* aContext, PRInt32 aStartIndex, PRInt32 aEndIndex, PRBool aRecurse, PRBool *aFinished, PRBool *_retval);

  virtual nsresult PeekOffsetParagraph(nsIPresContext* aPresContext,
                                  nsPeekOffsetStruct *aPos);
  virtual nsresult GetOffsets(PRInt32 &aStart, PRInt32 &aEnd) const;
  virtual nsresult ReflowDirtyChild(nsIPresShell* aPresShell, nsIFrame* aChild);
  virtual nsresult ReflowCommandNotify(nsIPresShell* aPresShell,
                                  nsIReflowCommand* aRC,
                                  PRBool aCommandAdded);

  virtual nsresult GetAccessible(nsIAccessible** aAccessible);

  virtual nsresult GetParentStyleContextProvider(nsIPresContext* aPresContext,
                                           nsIFrame** aProviderFrame,
                                           nsContextProviderRelationship& aRelationship);


  virtual nsresult IsVisibleForPainting(nsIPresContext * aPresContext,
                                  nsIRenderingContext& aRenderingContext,
                                  PRBool aCheckVis,
                                  PRBool* aIsVisible);


  virtual nsresult WillReflow(nsIPresContext* aPresContext);
  virtual nsresult Reflow(nsIPresContext* aPresContext,
                     nsHTMLReflowMetrics& aDesiredSize,
                     const nsHTMLReflowState& aReflowState,
                     nsReflowStatus& aStatus);
  virtual nsresult DidReflow(nsIPresContext* aPresContext,
                        nsDidReflowStatus aStatus);
  virtual nsresult CanContinueTextRun(PRBool& aContinueTextRun) const;
  virtual nsresult AdjustFrameSize(nscoord aExtraSpace, nscoord& aUsedSpace);
  virtual nsresult TrimTrailingWhiteSpace(nsIPresContext* aPresContext,
                                    nsIRenderingContext& aRC,
                                    nscoord& aDeltaWidth);





  virtual nsresult HandlePress(nsIPresContext* aPresContext,
                         nsGUIEvent * aEvent,
                         nsEventStatus* aEventStatus);

  virtual nsresult HandleMultiplePress(nsIPresContext* aPresContext,
                         nsGUIEvent * aEvent,
                         nsEventStatus* aEventStatus);

  virtual nsresult HandleDrag(nsIPresContext* aPresContext,
                        nsGUIEvent * aEvent,
                        nsEventStatus* aEventStatus);

  virtual nsresult HandleRelease(nsIPresContext* aPresContext,
                           nsGUIEvent * aEvent,
                           nsEventStatus* aEventStatus);

  virtual nsresult GetContentAndOffsetsFromPoint(nsIPresContext* aCX,
                                           const nsPoint& aPoint,
                                           nsIContent ** aNewContent,
                                           PRInt32& aContentOffset,
                                           PRInt32& aContentOffsetEnd,
                                           PRBool& aBeginFrameContent);
  virtual nsresult PeekBackwardAndForward(nsSelectionAmount aAmountBack,
                                    nsSelectionAmount aAmountForward,
                                    PRInt32 aStartPos,
                                    nsIPresContext* aPresContext,
                                    PRBool aJumpLines);







  void Invalidate(nsIPresContext* aPresContext,
                         const nsRect& aDamageRect,
                         PRBool aImmediate = 0) const;



  static PRInt32 ContentIndexInContainer(const nsIFrame* aFrame);






  PRBool IsFrameTreeTooDeep(const nsHTMLReflowState& aReflowState,
                            nsHTMLReflowMetrics& aMetrics);

  virtual nsresult GetClosestViewForFrame(nsIPresContext* aPresContext,
                                          nsIFrame *aFrame,
                                          nsIView **aView);

  static nsresult CreateAndPostReflowCommand(nsIPresShell* aPresShell,
                                             nsIFrame* aTargetFrame,
                                             nsIReflowCommand::ReflowType aReflowType,
                                             nsIFrame* aChildFrame,
                                             nsIAtom* aAttribute,
                                             nsIAtom* aListName);


  virtual nsresult CaptureMouse(nsIPresContext* aPresContext, PRBool aGrabMouseEvents);
  PRBool IsMouseCaptured(nsIPresContext* aPresContext);

  virtual nsresult GetBidiProperty(nsIPresContext* aPresContext,
                             nsIAtom* aPropertyName,
                             void** aPropertyValue,
                             long aSize = sizeof(void*) ) const;
  virtual nsresult SetBidiProperty(nsIPresContext* aPresContext,
                             nsIAtom* aPropertyName,
                             void* aPropertyValue) const ;
# 434 "../../base/src/nsFrame.h"
protected:

  nsFrame();
  virtual ~nsFrame();

  PRInt16 DisplaySelection(nsIPresContext* aPresContext, PRBool isOkToTurnOn = 0);


  virtual nsresult GetFrameFromDirection(nsIPresContext* aPresContext, nsPeekOffsetStruct *aPos);


  virtual nsresult DidSetStyleContext(nsIPresContext* aPresContext);


  nsresult GetSelectionForVisCheck(nsIPresContext * aPresContext, nsISelection** aSelection);


  static PRInt32 GetLineNumber(nsIFrame *aFrame);

  static void GetLastLeaf(nsIPresContext* aPresContext, nsIFrame **aFrame);
  static void GetFirstLeaf(nsIPresContext* aPresContext, nsIFrame **aFrame);
# 464 "../../base/src/nsFrame.h"
  virtual nsresult GetDataForTableSelection(nsIFrameSelection *aFrameSelection, nsMouseEvent *aMouseEvent,
                                      nsIContent **aParentContent, PRInt32 *aContentOffset, PRInt32 *aTarget);

  static void XMLQuote(nsString& aString);



  void SetDefaultBackgroundColor(nsIPresContext* aPresContext);

  virtual PRBool ParentDisablesSelection() const;





  void SetOverflowClipRect(nsIRenderingContext& aRenderingContext);

  nsRect mRect;
  nsIContent* mContent;
  nsIStyleContext* mStyleContext;
  nsIFrame* mParent;
  nsIFrame* mNextSibling;
  nsFrameState mState;

protected:
  virtual nsrefcnt AddRef(void);
  virtual nsrefcnt Release(void);
};
# 26 "../../base/src/nsLeafFrame.h" 2







class nsLeafFrame : public nsFrame {
public:


  virtual nsresult Paint(nsIPresContext* aPresContext,
                   nsIRenderingContext& aRenderingContext,
                   const nsRect& aDirtyRect,
                   nsFramePaintLayer aWhichLayer);
  virtual nsresult Reflow(nsIPresContext* aPresContext,
                    nsHTMLReflowMetrics& aDesiredSize,
                    const nsHTMLReflowState& aReflowState,
                    nsReflowStatus& aStatus);
  virtual nsresult ContentChanged(nsIPresContext* aPresContext,
                            nsIContent* aChild,
                            nsISupports* aSubContent);




protected:
  virtual ~nsLeafFrame();







  virtual void GetDesiredSize(nsIPresContext* aPresContext,
                              const nsHTMLReflowState& aReflowState,
                              nsHTMLReflowMetrics& aDesiredSize) = 0;




  void AddBordersAndPadding(nsIPresContext* aPresContext,
                            const nsHTMLReflowState& aReflowState,
                            nsHTMLReflowMetrics& aDesiredSize,
                            nsMargin& aBorderPadding);
};
# 31 "nsFormControlHelper.h" 2
# 1 "../../../../dist/include/nsCoord.h" 1
# 32 "nsFormControlHelper.h" 2
# 1 "../../../../dist/include/nsIStyleContext.h" 1
# 33 "nsFormControlHelper.h" 2
# 1 "../../../../dist/include/nsIPresContext.h" 1
# 26 "../../../../dist/include/nsIPresContext.h"
# 1 "../../../../dist/include/nslayout.h" 1
# 27 "../../../../dist/include/nsIPresContext.h" 2
# 1 "../../../../dist/include/nsISupports.h" 1
# 28 "../../../../dist/include/nsIPresContext.h" 2
# 1 "../../../../dist/include/nsRect.h" 1
# 29 "../../../../dist/include/nsIPresContext.h" 2
# 1 "../../../../dist/include/nsColor.h" 1
# 30 "../../../../dist/include/nsIPresContext.h" 2
# 1 "../../../../dist/include/nsIFrameImageLoader.h" 1
# 25 "../../../../dist/include/nsIFrameImageLoader.h"
# 1 "../../../../dist/include/nslayout.h" 1
# 26 "../../../../dist/include/nsIFrameImageLoader.h" 2
# 1 "../../../../dist/include/nsISupports.h" 1
# 27 "../../../../dist/include/nsIFrameImageLoader.h" 2
# 1 "../../../../dist/include/nsColor.h" 1
# 28 "../../../../dist/include/nsIFrameImageLoader.h" 2

class nsIFrame;
class nsIImage;
class nsIImageGroup;
class nsIPresContext;
class nsString;
struct nsSize;





enum nsImageAnimation {
    eImageAnimation_Normal = 0,
    eImageAnimation_None = 1,
    eImageAnimation_LoopOnce = 2
};




class nsIFrameImageLoader;
typedef nsresult (*nsIFrameImageLoaderCB)(nsIPresContext* aPresContext,
                                          nsIFrameImageLoader* aLoader,
                                          nsIFrame* aFrame,
                                          void* aClosure,
                                          PRUint32 aStatus);







class nsIFrameImageLoader : public nsISupports {
public:
  static const nsIID& GetIID() {static nsIID iid = { 0xa6cf90ec, 0x15b3, 0x11d2,{0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}; return iid;}

  virtual nsresult Init(nsIPresContext* aPresContext,
                  nsIImageGroup* aGroup,
                  const nsString& aURL,
                  const nscolor* aBackgroundColor,
                  const nsSize* aDesiredSize,
                  nsIFrame* aFrame,
                  nsImageAnimation aAnimationMode,
                  nsIFrameImageLoaderCB aCallBack,
                  void* aClosure, void* aKey) = 0;

  virtual nsresult StopImageLoad(PRBool aStopChrome = 1) = 0;

  virtual nsresult AbortImageLoad() = 0;

  virtual nsresult IsSameImageRequest(const nsString& aURL,
                                const nscolor* aBackgroundColor,
                                const nsSize* aDesiredSize,
                                PRBool* aResult) = 0;

  virtual nsresult AddFrame(nsIFrame* aFrame, nsIFrameImageLoaderCB aCallBack,
                      void* aClosure, void* aKey) = 0;

  virtual nsresult RemoveFrame(void* aKey) = 0;

  virtual nsresult SafeToDestroy(PRBool* aResult) = 0;

  virtual nsresult GetURL(nsString& aResult) = 0;
  virtual nsresult GetPresContext(nsIPresContext** aPresContext) = 0;

  virtual nsresult GetImage(nsIImage** aResult) = 0;


  virtual nsresult GetSize(nsSize& aResult) = 0;

  virtual nsresult GetImageLoadStatus(PRUint32* aLoadStatus) = 0;



  virtual nsresult GetIntrinsicSize(nsSize& aResult) = 0;
  virtual nsresult GetNaturalImageSize(PRUint32* naturalWidth, PRUint32 *naturalHeight) = 0;
};
# 31 "../../../../dist/include/nsIPresContext.h" 2
# 1 "../../../../dist/include/nsILanguageAtom.h" 1
# 32 "../../../../dist/include/nsIPresContext.h" 2

class nsAutoString;
class nsBidiPresUtils;


struct nsFont;

class nsIContent;
class nsIDocument;
class nsIDeviceContext;
class nsIFontMetrics;
class nsIFrame;
class nsIImage;
class nsIImageGroup;
class nsILinkHandler;
class nsIPresShell;
class nsIPref;
class nsIStyleContext;
class nsIAtom;
class nsString;
class nsIEventStateManager;
class nsIURI;
class nsILookAndFeel;
class nsICSSPseudoComparator;
# 65 "../../../../dist/include/nsIPresContext.h"
enum nsCompatibility {
  eCompatibility_Standard = 1,
  eCompatibility_NavQuirks = 2
};

enum nsWidgetRendering {
  eWidgetRendering_Native = 1,
  eWidgetRendering_Gfx = 2,
  eWidgetRendering_PartialGfx = 3
};

enum nsWidgetType {
  eWidgetType_Button = 1,
  eWidgetType_Checkbox = 2,
  eWidgetType_Radio = 3,
  eWidgetType_Text = 4
};

enum nsLanguageSpecificTransformType {
  eLanguageSpecificTransformType_Unknown = -1,
  eLanguageSpecificTransformType_None = 0,
  eLanguageSpecificTransformType_Japanese,
  eLanguageSpecificTransformType_Korean
};


const PRUint32 kPresContext_UseDocumentColors = 0x01;
const PRUint32 kPresContext_UseDocumentFonts = 0x02;
const PRUint32 kPresContext_UnderlineLinks = 0x03;



class nsIPresContext : public nsISupports {
public:
  static const nsIID& GetIID() { static nsIID iid = { 0x0a5d12e0, 0x944e, 0x11d1, {0x93, 0x23, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; return iid; }




  virtual nsresult Init(nsIDeviceContext* aDeviceContext) = 0;





  virtual nsresult Stop(PRBool aStopChrome = 1) = 0;





  virtual nsresult SetShell(nsIPresShell* aShell) = 0;




  virtual nsresult GetShell(nsIPresShell** aResult) = 0;




  virtual nsresult GetCompatibilityMode(nsCompatibility* aModeResult) = 0;
  virtual nsresult SetCompatibilityMode(nsCompatibility aMode) = 0;




  virtual nsresult GetWidgetRenderingMode(nsWidgetRendering* aModeResult) = 0;
  virtual nsresult SetWidgetRenderingMode(nsWidgetRendering aMode) = 0;




  virtual nsresult GetImageAnimationMode(nsImageAnimation* aModeResult) = 0;
  virtual nsresult SetImageAnimationMode(nsImageAnimation aMode) = 0;




  virtual nsresult GetLookAndFeel(nsILookAndFeel** aLookAndFeel) = 0;




  virtual nsresult GetBaseURL(nsIURI** aURLResult) = 0;




  virtual nsresult GetMedium(nsIAtom** aMediumResult) = 0;




  virtual nsresult RemapStyleAndReflow(void) = 0;





  virtual nsresult ResolveStyleContextFor(nsIContent* aContent,
                                    nsIStyleContext* aParentContext,
                                    PRBool aForceUnique,
                                    nsIStyleContext** aResult) = 0;






  virtual nsresult ResolvePseudoStyleContextFor(nsIContent* aParentContent,
                                          nsIAtom* aPseudoTag,
                                          nsIStyleContext* aParentContext,
                                          PRBool aForceUnique,
                                          nsIStyleContext** aResult) = 0;
# 189 "../../../../dist/include/nsIPresContext.h"
  virtual nsresult ResolvePseudoStyleWithComparator(nsIContent* aParentContent,
                                              nsIAtom* aPseudoTag,
                                              nsIStyleContext* aParentContext,
                                              PRBool aForceUnique,
                                              nsICSSPseudoComparator* aComparator,
                                              nsIStyleContext** aResult) = 0;







  virtual nsresult ProbePseudoStyleContextFor(nsIContent* aParentContent,
                                        nsIAtom* aPseudoTag,
                                        nsIStyleContext* aParentContext,
                                        PRBool aForceUnique,
                                        nsIStyleContext** aResult) = 0;





  virtual nsresult ReParentStyleContext(nsIFrame* aFrame,
                                  nsIStyleContext* aNewParentContext) = 0;





  virtual nsresult GetMetricsFor(const nsFont& aFont, nsIFontMetrics** aResult) = 0;


  virtual nsresult GetDefaultFont(nsFont& aResult) = 0;

  virtual nsresult SetDefaultFont(const nsFont& aFont) = 0;
  virtual const nsFont& GetDefaultFontDeprecated() = 0;


  virtual nsresult GetDefaultFixedFont(nsFont& aResult) = 0;

  virtual nsresult SetDefaultFixedFont(const nsFont& aFont) = 0;
  virtual const nsFont& GetDefaultFixedFontDeprecated() = 0;






  virtual nsresult GetCachedBoolPref(PRUint32 prefType, PRBool &aValue) = 0;




  virtual nsresult GetFontScaler(PRInt32* aResult) = 0;
  virtual nsresult SetFontScaler(PRInt32 aScaler) = 0;




  virtual nsresult GetDefaultColor(nscolor* aColor) = 0;
  virtual nsresult GetDefaultBackgroundColor(nscolor* aColor) = 0;
  virtual nsresult GetDefaultBackgroundImage(nsString& aImage) = 0;
  virtual nsresult GetDefaultBackgroundImageRepeat(PRUint8* aRepeat) = 0;
  virtual nsresult GetDefaultBackgroundImageOffset(nscoord* aX, nscoord* aY) = 0;
  virtual nsresult GetDefaultBackgroundImageAttachment(PRUint8* aRepeat) = 0;
  virtual nsresult GetDefaultLinkColor(nscolor* aColor) = 0;
  virtual nsresult GetDefaultVisitedLinkColor(nscolor* aColor) = 0;
  virtual nsresult GetFocusBackgroundColor(nscolor* aColor) = 0;
  virtual nsresult GetFocusTextColor(nscolor* aColor) = 0;
  virtual nsresult GetUseFocusColors(PRBool& useFocusColors) = 0;
  virtual nsresult GetFocusRingWidth(PRUint8 *focusRingWidth) = 0;
  virtual nsresult GetFocusRingOnAnything(PRBool& focusRingOnAnything) = 0;


  virtual nsresult SetDefaultColor(nscolor aColor) = 0;
  virtual nsresult SetDefaultBackgroundColor(nscolor aColor) = 0;
  virtual nsresult SetDefaultBackgroundImage(const nsString& aImage) = 0;
  virtual nsresult SetDefaultBackgroundImageRepeat(PRUint8 aRepeat) = 0;
  virtual nsresult SetDefaultBackgroundImageOffset(nscoord aX, nscoord aY) = 0;
  virtual nsresult SetDefaultBackgroundImageAttachment(PRUint8 aRepeat) = 0;
  virtual nsresult SetDefaultLinkColor(nscolor aColor) = 0;
  virtual nsresult SetDefaultVisitedLinkColor(nscolor aColor) = 0;

  virtual nsresult GetImageGroup(nsIImageGroup** aGroupResult) = 0;
# 290 "../../../../dist/include/nsIPresContext.h"
  virtual nsresult StartLoadImage(const nsString& aURL,
                            const nscolor* aBackgroundColor,
                            const nsSize* aDesiredSize,
                            nsIFrame* aTargetFrame,
                            nsIFrameImageLoaderCB aCallBack,
                            void* aClosure,
                            void* aKey,
                            nsIFrameImageLoader** aResult) = 0;




  virtual nsresult StopLoadImage(void* aKey,
                           nsIFrameImageLoader* aLoader) = 0;




  virtual nsresult StopAllLoadImagesFor(nsIFrame* aTargetFrame, void* aKey) = 0;

  virtual nsresult SetContainer(nsISupports* aContainer) = 0;

  virtual nsresult GetContainer(nsISupports** aResult) = 0;


  virtual nsresult SetLinkHandler(nsILinkHandler* aHandler) = 0;
  virtual nsresult GetLinkHandler(nsILinkHandler** aResult) = 0;







  virtual nsresult GetVisibleArea(nsRect& aResult) = 0;





  virtual nsresult SetVisibleArea(const nsRect& r) = 0;





  virtual nsresult IsPaginated(PRBool* aResult) = 0;
# 347 "../../../../dist/include/nsIPresContext.h"
  virtual nsresult GetPageDim(nsRect* aActualRect, nsRect* aAdjRect) = 0;
# 356 "../../../../dist/include/nsIPresContext.h"
  virtual nsresult SetPageDim(nsRect* aRect) = 0;

  virtual nsresult GetPixelsToTwips(float* aResult) const = 0;

  virtual nsresult GetTwipsToPixels(float* aResult) const = 0;






  virtual nsresult GetScaledPixelsToTwips(float* aScale) const = 0;


  virtual nsresult GetDeviceContext(nsIDeviceContext** aResult) const = 0;

  virtual nsresult GetEventStateManager(nsIEventStateManager** aManager) = 0;
  virtual nsresult GetLanguage(nsILanguageAtom** aLanguage) = 0;
# 383 "../../../../dist/include/nsIPresContext.h"
  virtual nsresult GetLanguageSpecificTransformType(
              nsLanguageSpecificTransformType* aType) = 0;
# 394 "../../../../dist/include/nsIPresContext.h"
  virtual nsresult GetBidiEnabled(PRBool* aBidiEnabled) const = 0;






  virtual nsresult SetBidiEnabled(PRBool aBidiEnabled) const = 0;
# 417 "../../../../dist/include/nsIPresContext.h"
  virtual nsresult SetVisualMode(PRBool aIsVisual) = 0;






  virtual nsresult IsVisualMode(PRBool& aIsVisual) const = 0;






  virtual nsresult GetBidiUtils(nsBidiPresUtils** aBidiUtils) = 0;




  virtual nsresult SetBidi(PRUint32 aBidiOptions, PRBool aForceReflow = 0) = 0;




  virtual nsresult GetBidi(PRUint32* aBidiOptions) = 0;






  virtual nsresult IsVisRTL(PRBool &aResult) = 0;





  virtual nsresult IsArabicEncoding(PRBool &aResult) = 0;





  virtual nsresult SetIsBidiSystem(PRBool aIsBidi) = 0;





  virtual nsresult GetIsBidiSystem(PRBool &aResult) const = 0;




  virtual nsresult GetBidiCharset(nsAutoString &aCharSet) = 0;





  virtual nsresult SetIsRenderingOnlySelection(PRBool aResult) = 0;
  virtual nsresult IsRenderingOnlySelection(PRBool* aResult) = 0;





};
# 493 "../../../../dist/include/nsIPresContext.h"
extern nsresult
  NS_NewGalleyContext(nsIPresContext** aInstancePtrResult);



extern nsresult
  NS_NewPrintPreviewContext(nsIPresContext** aInstancePtrResult);
# 34 "nsFormControlHelper.h" 2

class nsIView;

class nsStyleCoord;
class nsFormFrame;
# 54 "nsFormControlHelper.h"
enum nsMouseState {
  eMouseNone,
  eMouseEnter,
  eMouseExit,
  eMouseDown,
  eMouseUp
};

struct nsInputDimensionSpec
{
  nsIAtom* mColSizeAttr;
  PRBool mColSizeAttrInPixels;
  nsIAtom* mColValueAttr;

  nsString* mColDefaultValue;
  nscoord mColDefaultSize;
  PRBool mColDefaultSizeInPixels;
  nsIAtom* mRowSizeAttr;
  nscoord mRowDefaultSize;

  nsInputDimensionSpec(nsIAtom* aColSizeAttr, PRBool aColSizeAttrInPixels,
                       nsIAtom* aColValueAttr, nsString* aColDefaultValue,
                       nscoord aColDefaultSize, PRBool aColDefaultSizeInPixels,
                       nsIAtom* aRowSizeAttr, nscoord aRowDefaultSize)
                       : mColSizeAttr(aColSizeAttr), mColSizeAttrInPixels(aColSizeAttrInPixels),
                         mColValueAttr(aColValueAttr),
                         mColDefaultValue(aColDefaultValue), mColDefaultSize(aColDefaultSize),
                         mColDefaultSizeInPixels(aColDefaultSizeInPixels),
                         mRowSizeAttr(aRowSizeAttr), mRowDefaultSize(aRowDefaultSize)
  {
  }

};
# 95 "nsFormControlHelper.h"
class nsFormControlHelper
{

public:


  static nscoord CalculateSize (nsIPresContext* aPresContext,
                                nsIRenderingContext* aRendContext,
                                nsIFormControlFrame* aFrame,
                                const nsSize& aCSSSize,
                                nsInputDimensionSpec& aDimensionSpec,
                                nsSize& aDesiredSize,
                                nsSize& aMinSize,
                                PRBool& aWidthExplicit,
                                PRBool& aHeightExplicit,
                                nscoord& aRowSize);

  static nscoord GetTextSize(nsIPresContext* aContext, nsIFormControlFrame* aFrame,
                             const nsString& aString, nsSize& aSize,
                             nsIRenderingContext *aRendContext);

  static nscoord GetTextSize(nsIPresContext* aContext, nsIFormControlFrame* aFrame,
                             PRInt32 aNumChars, nsSize& aSize,
                             nsIRenderingContext *aRendContext);

  static nsresult GetFont(nsIFormControlFrame * aFormFrame,
                          nsIPresContext* aPresContext,
                          nsIStyleContext * aStyleContext,
                          const nsFont*& aFont);


  static nsresult GetFrameFontFM(nsIPresContext* aPresContext,
                                 nsIFormControlFrame * aFrame,
                                 nsIFontMetrics** aFontMet);

  static nscoord CalcNavQuirkSizing(nsIPresContext* aPresContext,
                                    nsIRenderingContext* aRendContext,
                                    nsIFontMetrics* aFontMet,
                                    nsIFormControlFrame* aFrame,
                                    nsInputDimensionSpec& aSpec,
                                    nsSize& aSize);

  static void ForceDrawFrame(nsIPresContext* aPresContext, nsIFrame * aFrame);


  static void PlatformToDOMLineBreaks(nsString &aString);

  static nsresult GetValue(nsIContent* aContent, nsString* aResult);
  static nsresult GetName(nsIContent* aContent, nsString* aResult);
  static nsresult GetInputElementValue(nsIContent* aContent, nsString* aText, PRBool aInitialValue);







  static PRBool GetBool(const nsAReadableString& aValue);
# 162 "nsFormControlHelper.h"
  static void GetBoolString(const PRBool aValue, nsAWritableString& aResult);

  static nsCompatibility GetRepChars(nsIPresContext* aPresContext, char& char1, char& char2);


  typedef enum {
    eHTMLTextWrap_Off = 1,
    eHTMLTextWrap_Hard = 2,
    eHTMLTextWrap_Soft = 3
  } nsHTMLTextWrap;




  static nsresult GetWrapProperty(nsIContent * aContent, nsString &aOutValue);

  static nsresult GetWrapPropertyEnum(nsIContent * aContent, nsHTMLTextWrap& aWrapProp);


  static nsresult GetLocalizedString(const char * aPropFileName, const char* aKey, nsString& oVal);
  static const char * GetHTMLPropertiesFileName() { return "chrome://communicator/locale/layout/HtmlForm.properties"; }

  static nsresult GetDisabled(nsIContent* aContent, PRBool* oIsDisabled);


  static nsresult DoManualSubmitOrReset(nsIPresContext* aPresContext,
                                        nsIPresShell* aPresShell,
                                        nsIFrame* aFormFrame,
                                        nsIFrame* aFormControlFrame,
                                        PRBool aDoSubmit,
                                        PRBool aDoDOMEvent);
# 215 "nsFormControlHelper.h"
  nsresult SetCurrentCheckState(PRBool aState);
# 224 "nsFormControlHelper.h"
  nsresult GetDefaultCheckState(PRBool* aState);
# 240 "nsFormControlHelper.h"
   enum nsArrowDirection {
    eArrowDirection_Left,
    eArrowDirection_Right,
    eArrowDirection_Up,
    eArrowDirection_Down
   };
# 259 "nsFormControlHelper.h"
   static void SetupPoints(PRUint32 aNumberOfPoints, nscoord* aPoints,
     nsPoint* aPolygon, nscoord aScaleFactor, nscoord aX, nscoord aY,
     nscoord aCenterX, nscoord aCenterY);
# 276 "nsFormControlHelper.h"
  static void PaintLine(nsIRenderingContext& aRenderingContext,
                 nscoord aSX, nscoord aSY, nscoord aEX, nscoord aEY,
                 PRBool aHorz, nscoord aWidth, nscoord aOnePixel);
# 287 "nsFormControlHelper.h"
  static void PaintFixedSizeCheckMark(nsIRenderingContext& aRenderingContext,
                                     float aPixelsToTwips);
# 299 "nsFormControlHelper.h"
  static void PaintCheckMark(nsIRenderingContext& aRenderingContext,
                             float aPixelsToTwips, const nsRect & aRect);
# 310 "nsFormControlHelper.h"
  static void PaintFixedSizeCheckMarkBorder(nsIRenderingContext& aRenderingContext,
                         float aPixelsToTwips, const nsStyleColor& aBackgroundColor);
# 327 "nsFormControlHelper.h"
  static void PaintRectangularButton(nsIPresContext* aPresContext,
                            nsIRenderingContext& aRenderingContext,
                            const nsRect& aDirtyRect, const nsRect& aRect,
                            PRBool aShift, PRBool aShowFocus, PRBool aDisabled,
                                                                      PRBool aDrawOutline,
                                                                      nsIStyleContext* aOutlineStyle,
                                                                      nsIStyleContext* aFocusStyle,
                            nsIStyleContext* aStyleContext, nsString& aLabel,
                            nsIFrame* aForFrame);

protected:
  nsFormControlHelper();
  virtual ~nsFormControlHelper();


};
# 24 "nsFormControlHelper.cpp" 2
# 1 "../../../../dist/include/nsHTMLParts.h" 1
# 25 "../../../../dist/include/nsHTMLParts.h"
# 1 "../../../../dist/include/nscore.h" 1
# 26 "../../../../dist/include/nsHTMLParts.h" 2
# 1 "../../../../dist/include/nsISupports.h" 1
# 27 "../../../../dist/include/nsHTMLParts.h" 2
# 1 "../../../../dist/include/nsIReflowCommand.h" 1
# 28 "../../../../dist/include/nsHTMLParts.h" 2
class nsIArena;
class nsIAtom;
class nsINodeInfo;
class nsIContent;
class nsIContentIterator;
class nsIDocument;
class nsIHTMLContent;
class nsIHTMLContentSink;
class nsIHTMLFragmentContentSink;
class nsIPresContext;
class nsITextContent;
class nsIURI;
class nsString;
class nsIWebShell;
class nsIPresShell;
class nsIChannel;
# 60 "../../../../dist/include/nsHTMLParts.h"
extern nsresult
NS_NewGeneratedContentIterator(nsIPresContext* aPresContext,
                               nsIFrame* aFrame,
                               nsIContentIterator** aIterator);



extern nsresult
NS_NewHTMLAnchorElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLAppletElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLAreaElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLBRElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLBaseElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLBaseFontElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLBodyElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLButtonElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLDListElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLDelElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLDirectoryElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLDivElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLEmbedElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLFieldSetElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLFontElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLFormElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLFrameElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLFrameSetElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLHRElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLHeadElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLHeadingElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLHtmlElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLIFrameElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLImageElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLInputElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLInsElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLIsIndexElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLLIElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLLabelElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLLegendElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLLinkElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLMapElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLMenuElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLMetaElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLModElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLOListElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLObjectElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLOptGroupElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLOptionElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLParagraphElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLParamElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLPreElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLQuoteElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLScriptElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLSelectElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLSpacerElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLSpanElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLStyleElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLTableCaptionElement(nsIHTMLContent** aResult,nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLTableCellElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLTableColElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLTableColGroupElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLTableElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLTableRowElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLTableSectionElement(nsIHTMLContent** aResult,nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLTbodyElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLTextAreaElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLTfootElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLTheadElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLTitleElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLUListElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLWBRElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);

extern nsresult
NS_NewHTMLUnknownElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo);







extern nsresult
NS_CreateHTMLElement(nsIHTMLContent** aResult,
                     nsINodeInfo *aNodeInfo,
                     PRBool aCaseSensitive);







extern nsresult NS_NewBlockFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame,
                                 PRUint32 aFlags = 0);


extern nsresult
NS_NewAttributeContent(nsIContent ** aResult);





extern nsresult NS_NewSelectsAreaFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame,
                                       PRUint32 aFlags = 0x01000000);



extern nsresult NS_NewAreaFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame,
                                PRUint32 aFlags = 0x00800000|0x01000000);


inline nsresult NS_NewTableCellInnerFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame) {
  return NS_NewBlockFrame(aPresShell, aNewFrame,
                          0x00800000|0x01000000|0x00400000);
}



inline nsresult NS_NewDocumentElementFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame) {
  return NS_NewAreaFrame(aPresShell, aNewFrame, 0x00800000|0x00400000);
}


inline nsresult NS_NewAbsoluteItemWrapperFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame) {
  return NS_NewAreaFrame(aPresShell, aNewFrame, 0x00800000|0x00400000);
}


inline nsresult NS_NewFloatingItemWrapperFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame) {
  return NS_NewAreaFrame(aPresShell, aNewFrame, 0x00800000|0x00100000);
}



inline nsresult NS_NewRelativeItemWrapperFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame) {
  return NS_NewAreaFrame(aPresShell, aNewFrame);
}

extern nsresult NS_NewBRFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame);

extern nsresult NS_NewCommentFrame(nsIPresShell* aPresShell, nsIFrame** aFrameResult);
extern nsresult NS_NewHRFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame);


extern nsresult NS_NewHTMLFrameOuterFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame);

extern nsresult NS_NewHTMLFramesetFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame);

extern nsresult NS_NewViewportFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame);
extern nsresult NS_NewCanvasFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame);
extern nsresult NS_NewImageFrame(nsIPresShell* aPresShell, nsIFrame** aFrameResult);
extern nsresult NS_NewInlineFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame);
extern nsresult NS_NewPositionedInlineFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame);
extern nsresult NS_NewObjectFrame(nsIPresShell* aPresShell, nsIFrame** aFrameResult);
extern nsresult NS_NewSpacerFrame(nsIPresShell* aPresShell, nsIFrame** aResult);
extern nsresult NS_NewTextFrame(nsIPresShell* aPresShell, nsIFrame** aResult);
extern nsresult NS_NewContinuingTextFrame(nsIPresShell* aPresShell, nsIFrame** aResult);
extern nsresult NS_NewEmptyFrame(nsIPresShell* aPresShell, nsIFrame** aResult);
inline nsresult NS_NewWBRFrame(nsIPresShell* aPresShell, nsIFrame** aResult) {
  return NS_NewEmptyFrame(aPresShell, aResult);
}
extern nsresult NS_NewScrollFrame(nsIPresShell* aPresShell, nsIFrame** aResult);
extern nsresult NS_NewSimplePageSequenceFrame(nsIPresShell* aPresShell, nsIFrame** aResult);
extern nsresult NS_NewPageFrame(nsIPresShell* aPresShell, nsIFrame** aResult);
extern nsresult NS_NewFirstLetterFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame);
extern nsresult NS_NewFirstLineFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame);


extern nsresult NS_NewFormFrame(nsIPresShell* aPresShell, nsIFrame** aResult, PRUint32 aFlags);
extern nsresult NS_NewGfxButtonControlFrame(nsIPresShell* aPresShell, nsIFrame** aResult);
extern nsresult NS_NewNativeButtonControlFrame(nsIPresShell* aPresShell, nsIFrame** aResult);
extern nsresult NS_NewImageControlFrame(nsIPresShell* aPresShell, nsIFrame** aResult);
extern nsresult NS_NewHTMLButtonControlFrame(nsIPresShell* aPresShell, nsIFrame** aResult);
extern nsresult NS_NewGfxCheckboxControlFrame(nsIPresShell* aPresShell, nsIFrame** aResult);
extern nsresult NS_NewNativeCheckboxControlFrame(nsIPresShell* aPresShell, nsIFrame** aResult);
extern nsresult NS_NewFieldSetFrame(nsIPresShell* aPresShell, nsIFrame** aResult, PRUint32 aFlags);
extern nsresult NS_NewFileControlFrame(nsIPresShell* aPresShell, nsIFrame** aResult);
extern nsresult NS_NewLabelFrame(nsIPresShell* aPresShell, nsIFrame** aResult, PRUint32 aStateFlags);
extern nsresult NS_NewLegendFrame(nsIPresShell* aPresShell, nsIFrame** aResult);
extern nsresult NS_NewNativeTextControlFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame);
extern nsresult NS_NewGfxTextControlFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame);
extern nsresult NS_NewGfxAutoTextControlFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame);
extern nsresult NS_NewGfxRadioControlFrame(nsIPresShell* aPresShell, nsIFrame** aResult);
extern nsresult NS_NewNativeRadioControlFrame(nsIPresShell* aPresShell, nsIFrame** aResult);
extern nsresult NS_NewNativeSelectControlFrame(nsIPresShell* aPresShell, nsIFrame** aResult);
extern nsresult NS_NewListControlFrame(nsIPresShell* aPresShell, nsIFrame** aResult);
extern nsresult NS_NewComboboxControlFrame(nsIPresShell* aPresShell, nsIFrame** aResult, PRUint32 aFlags);
extern nsresult NS_NewIsIndexFrame(nsIPresShell* aPresShell, nsIFrame** aResult);


extern nsresult NS_NewTableOuterFrame(nsIPresShell* aPresShell, nsIFrame** aResult);
extern nsresult NS_NewTableFrame(nsIPresShell* aPresShell, nsIFrame** aResult);
extern nsresult NS_NewTableCaptionFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame);

extern nsresult NS_NewTableColFrame(nsIPresShell* aPresShell, nsIFrame** aResult);
extern nsresult NS_NewTableColGroupFrame(nsIPresShell* aPresShell, nsIFrame** aResult);
extern nsresult NS_NewTableRowFrame(nsIPresShell* aPresShell, nsIFrame** aResult);
extern nsresult NS_NewTableRowGroupFrame(nsIPresShell* aPresShell, nsIFrame** aResult);
extern nsresult NS_NewTableCellFrame(nsIPresShell* aPresShell, nsIFrame** aResult);


extern nsresult NS_NewHTMLContentSink(nsIHTMLContentSink** aInstancePtrResult,
                                      nsIDocument* aDoc,
                                      nsIURI* aURL,
                                      nsIWebShell* aWebShell,
                                      nsIChannel* aChannel);
extern nsresult NS_NewHTMLFragmentContentSink(nsIHTMLFragmentContentSink** aInstancePtrResult);


extern nsresult
NS_NewHTMLReflowCommand(nsIReflowCommand** aInstancePtrResult,
                        nsIFrame* aTargetFrame,
                        nsIReflowCommand::ReflowType aReflowType,
                        nsIFrame* aChildFrame = 0,
                        nsIAtom* aAttribute = 0);
# 25 "nsFormControlHelper.cpp" 2
# 1 "../../../../dist/include/nsIHTMLContent.h" 1
# 25 "../../../../dist/include/nsIHTMLContent.h"
# 1 "../../../../dist/include/nsIXMLContent.h" 1
# 27 "../../../../dist/include/nsIXMLContent.h"
# 1 "../../../../dist/include/nsISupports.h" 1
# 28 "../../../../dist/include/nsIXMLContent.h" 2
# 1 "../../../../dist/include/nsIStyledContent.h" 1
# 25 "../../../../dist/include/nsIStyledContent.h"
# 1 "../../../../dist/include/nsIContent.h" 1
# 26 "../../../../dist/include/nsIStyledContent.h" 2

class nsString;
class nsIStyleRule;
class nsIStyleContext;
class nsISupportsArray;







class nsIStyledContent : public nsIContent {
public:
  static const nsIID& GetIID() { static nsIID iid = { 0xc1e84e01, 0xcd15, 0x11d2, { 0x96, 0xed, 0x0, 0x10, 0x4b, 0x7b, 0x7d, 0xeb } }; return iid; }

  virtual nsresult GetID(nsIAtom*& aResult) const = 0;
  virtual nsresult GetClasses(nsVoidArray& aArray) const = 0;
  virtual nsresult HasClass(nsIAtom* aClass) const = 0;

  virtual nsresult GetContentStyleRules(nsISupportsArray* aRules) = 0;
  virtual nsresult GetInlineStyleRules(nsISupportsArray* aRules) = 0;
# 57 "../../../../dist/include/nsIStyledContent.h"
  virtual nsresult GetMappedAttributeImpact(const nsIAtom* aAttribute,
                                      PRInt32& aHint) const = 0;

};
# 29 "../../../../dist/include/nsIXMLContent.h" 2

class nsINameSpace;
class nsINodeInfo;
class nsIWebShell;
class nsIURI;
# 42 "../../../../dist/include/nsIXMLContent.h"
class nsIXMLContent : public nsIStyledContent {
public:
  static const nsIID& GetIID() { static nsIID iid = { 0xa6cf90cb, 0x15b3, 0x11d2, { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } }; return iid; }

  virtual nsresult SetContainingNameSpace(nsINameSpace* aNameSpace) = 0;
  virtual nsresult GetContainingNameSpace(nsINameSpace*& aNameSpace) const = 0;
# 58 "../../../../dist/include/nsIXMLContent.h"
  virtual nsresult MaybeTriggerAutoLink(nsIWebShell *aShell) = 0;

  virtual nsresult GetXMLBaseURI(nsIURI **aURI) = 0;
};
# 73 "../../../../dist/include/nsIXMLContent.h"
extern nsresult
NS_NewXMLElement(nsIXMLContent** aResult, nsINodeInfo* aNodeInfo);


extern nsresult
NS_NewXMLProcessingInstruction(nsIContent** aInstancePtrResult,
                               const nsAReadableString& aTarget,
                               const nsAReadableString& aData);

extern nsresult
NS_NewXMLEntity(nsIContent** aInstancePtrResult,
                const nsAReadableString& aName,
                const nsAReadableString& aPublicId,
                const nsAReadableString& aSystemId,
                const nsAReadableString& aNotationName);

extern nsresult
NS_NewXMLNotation(nsIContent** aInstancePtrResult,
                  const nsAReadableString& aName,
                  const nsAReadableString& aPublicId,
                  const nsAReadableString& aSystemId);

class nsIDOMNamedNodeMap;

extern nsresult
NS_NewXMLNamedNodeMap(nsIDOMNamedNodeMap** aInstancePtrResult,
                      nsISupportsArray *aArray);

extern nsresult
NS_NewXMLCDATASection(nsIContent** aInstancePtrResult);
# 26 "../../../../dist/include/nsIHTMLContent.h" 2
# 1 "../../../../dist/include/nsHTMLValue.h" 1
# 25 "../../../../dist/include/nsHTMLValue.h"
# 1 "../../../../dist/include/nscore.h" 1
# 26 "../../../../dist/include/nsHTMLValue.h" 2
# 1 "../../../../dist/include/nsColor.h" 1
# 27 "../../../../dist/include/nsHTMLValue.h" 2
# 1 "../../../../dist/include/nsString.h" 1
# 28 "../../../../dist/include/nsHTMLValue.h" 2
# 1 "../../../../dist/include/nsISupports.h" 1
# 29 "../../../../dist/include/nsHTMLValue.h" 2

enum nsHTMLUnit {
  eHTMLUnit_Null = 0,
  eHTMLUnit_Empty = 1,
  eHTMLUnit_String = 10,
  eHTMLUnit_ISupports = 20,
  eHTMLUnit_Integer = 50,
  eHTMLUnit_Enumerated = 51,
  eHTMLUnit_Proportional = 52,
  eHTMLUnit_Color = 80,
  eHTMLUnit_ColorName = 81,
  eHTMLUnit_Percent = 90,


  eHTMLUnit_Pixel = 600
};

class nsHTMLValue {
public:
  nsHTMLValue(nsHTMLUnit aUnit = eHTMLUnit_Null);
  nsHTMLValue(PRInt32 aValue, nsHTMLUnit aUnit);
  nsHTMLValue(float aValue);
  nsHTMLValue(const nsAReadableString& aValue, nsHTMLUnit aUnit = eHTMLUnit_String);
  nsHTMLValue(nsISupports* aValue);
  nsHTMLValue(nscolor aValue);
  nsHTMLValue(const nsHTMLValue& aCopy);
  ~nsHTMLValue(void);

  nsHTMLValue& operator=(const nsHTMLValue& aCopy);
  PRBool operator==(const nsHTMLValue& aOther) const;
  PRBool operator!=(const nsHTMLValue& aOther) const;
  PRUint32 HashValue(void) const;

  nsHTMLUnit GetUnit(void) const { return mUnit; }
  PRInt32 GetIntValue(void) const;
  PRInt32 GetPixelValue(void) const;
  float GetPercentValue(void) const;
  nsAWritableString& GetStringValue(nsAWritableString& aBuffer) const;
  nsISupports* GetISupportsValue(void) const;
  nscolor GetColorValue(void) const;

  void Reset(void);
  void SetIntValue(PRInt32 aValue, nsHTMLUnit aUnit);
  void SetPixelValue(PRInt32 aValue);
  void SetPercentValue(float aValue);
  void SetStringValue(const nsAReadableString& aValue, nsHTMLUnit aUnit = eHTMLUnit_String);
  void SetISupportsValue(nsISupports* aValue);
  void SetColorValue(nscolor aValue);
  void SetEmptyValue(void);

  void AppendToString(nsAWritableString& aBuffer) const;
  void ToString(nsAWritableString& aBuffer) const;

protected:
  nsHTMLUnit mUnit;
  union {
    PRInt32 mInt;
    float mFloat;
    PRUnichar* mString;
    nsISupports* mISupports;
    nscolor mColor;
  } mValue;
};

inline PRInt32 nsHTMLValue::GetIntValue(void) const
{
  {};



  if ((mUnit == eHTMLUnit_Integer) ||
      (mUnit == eHTMLUnit_Enumerated) ||
      (mUnit == eHTMLUnit_Proportional)) {
    return mValue.mInt;
  }
  else if (mUnit == eHTMLUnit_String) {
    if (mValue.mString) {
      PRInt32 err=0;
      nsAutoString str(mValue.mString);
      return str.ToInteger(&err);
    }
  }
  return 0;
}

inline PRInt32 nsHTMLValue::GetPixelValue(void) const
{
  {};
  if (mUnit == eHTMLUnit_Pixel) {
    return mValue.mInt;
  }
  return 0;
}

inline float nsHTMLValue::GetPercentValue(void) const
{
  {};
  if (mUnit == eHTMLUnit_Percent) {
    return mValue.mFloat;
  }
  return 0.0f;
}

inline nsAWritableString& nsHTMLValue::GetStringValue(nsAWritableString& aBuffer) const
{
  {};

  aBuffer.SetLength(0);
  if (((mUnit == eHTMLUnit_String) || (mUnit == eHTMLUnit_ColorName)) &&
      (0 != mValue.mString)) {
    aBuffer.Append(mValue.mString);
  }
  return aBuffer;
}

inline nsISupports* nsHTMLValue::GetISupportsValue(void) const
{
  {};
  if (mUnit == eHTMLUnit_ISupports) {
    nsISupports *result = mValue.mISupports;
    ns_if_addref(result);
    return result;
  }
  return 0;
}

inline nscolor nsHTMLValue::GetColorValue(void) const
{
  {};

  if (mUnit == eHTMLUnit_Color) {
    return mValue.mColor;
  }
  if ((mUnit == eHTMLUnit_ColorName) && (mValue.mString)) {
    nscolor color;
    if (NS_ColorNameToRGB(nsAutoString(mValue.mString), &color)) {
      return color;
    }
  }
  return ((nscolor) ((255 << 24) | ((0)<<16) | ((0)<<8) | (0)));
}

inline PRBool nsHTMLValue::operator!=(const nsHTMLValue& aOther) const
{
  return PRBool(! ((*this) == aOther));
}
# 27 "../../../../dist/include/nsIHTMLContent.h" 2
class nsString;
class nsIFrame;
class nsIStyleRule;
class nsIMutableStyleContext;
class nsIPresContext;
class nsIHTMLMappedAttributes;
class nsIURI;






typedef void (*nsMapAttributesFunc)(const nsIHTMLMappedAttributes* aAttributes,
                                    nsIMutableStyleContext* aContext,
                                    nsIPresContext* aPresContext);


class nsIHTMLContent : public nsIXMLContent
{
public:
  static const nsIID& GetIID() {static const nsIID iid = { 0xb9e110b0, 0x94d6, 0x11d1, {0x89, 0x5c, 0x00, 0x60, 0x08, 0x91, 0x1b, 0x81} }; return iid;}





  virtual nsresult Compact() = 0;

  virtual nsresult SetHTMLAttribute(nsIAtom* aAttribute,
                              const nsHTMLValue& aValue,
                              PRBool aNotify) = 0;

  virtual nsresult GetHTMLAttribute(nsIAtom* aAttribute,
                              nsHTMLValue& aValue) const = 0;
  virtual nsresult GetAttributeMappingFunctions(nsMapAttributesFunc& aFontMapFunc,
                                          nsMapAttributesFunc& aMapFunc) const = 0;

  virtual nsresult AttributeToString(nsIAtom* aAttribute,
                               const nsHTMLValue& aValue,
                               nsAWritableString& aResult) const = 0;

  virtual nsresult StringToAttribute(nsIAtom* aAttribute,
                               const nsAReadableString& aValue,
                               nsHTMLValue& aResult) = 0;







  virtual nsresult GetBaseURL(nsIURI*& aBaseURL) const = 0;







  virtual nsresult GetBaseTarget(nsAWritableString& aBaseTarget) const = 0;
};
# 26 "nsFormControlHelper.cpp" 2
# 1 "../../../../dist/include/nsIRenderingContext.h" 1
# 27 "nsFormControlHelper.cpp" 2
# 1 "../../../../dist/include/nsIPresShell.h" 1
# 28 "nsFormControlHelper.cpp" 2
# 1 "../../../../dist/include/nsIPresContext.h" 1
# 29 "nsFormControlHelper.cpp" 2
# 1 "../../../../dist/include/nsIStyleContext.h" 1
# 30 "nsFormControlHelper.cpp" 2
# 1 "../../base/src/nsLeafFrame.h" 1
# 31 "nsFormControlHelper.cpp" 2
# 1 "../../style/src/nsCSSRendering.h" 1
# 25 "../../style/src/nsCSSRendering.h"
# 1 "../../../../dist/include/nsIRenderingContext.h" 1
# 26 "../../style/src/nsCSSRendering.h" 2
# 1 "../../../../dist/include/nsIStyleContext.h" 1
# 27 "../../style/src/nsCSSRendering.h" 2
struct nsPoint;

class nsCSSRendering {
public:
# 39 "../../style/src/nsCSSRendering.h"
  static void PaintBorder(nsIPresContext* aPresContext,
                          nsIRenderingContext& aRenderingContext,
                          nsIFrame* aForFrame,
                          const nsRect& aDirtyRect,
                          const nsRect& aBorderArea,
                          const nsStyleBorder& aBorderStyle,
                          nsIStyleContext* aStyleContext,
                          PRIntn aSkipSides,
                          nsRect* aGap = 0,
                          nscoord aHardBorderSize = 0,
                          PRBool aShouldIgnoreRounded = 0);
# 59 "../../style/src/nsCSSRendering.h"
  static void PaintOutline(nsIPresContext* aPresContext,
                          nsIRenderingContext& aRenderingContext,
                          nsIFrame* aForFrame,
                          const nsRect& aDirtyRect,
                          const nsRect& aBorderArea,
                          const nsStyleBorder& aBorderStyle,
                          const nsStyleOutline& aOutlineStyle,
                          nsIStyleContext* aStyleContext,
                          PRIntn aSkipSides,
                          nsRect* aGap = 0);
# 81 "../../style/src/nsCSSRendering.h"
  static void PaintBorderEdges(nsIPresContext* aPresContext,
                               nsIRenderingContext& aRenderingContext,
                               nsIFrame* aForFrame,
                               const nsRect& aDirtyRect,
                               const nsRect& aBorderArea,
                               nsBorderEdges * aBorderEdges,
                               nsIStyleContext* aStyleContext,
                               PRIntn aSkipSides,
                               nsRect* aGap = 0);
# 99 "../../style/src/nsCSSRendering.h"
  static void PaintBackground(nsIPresContext* aPresContext,
                              nsIRenderingContext& aRenderingContext,
                              nsIFrame* aForFrame,
                              const nsRect& aDirtyRect,
                              const nsRect& aBorderArea,
                              const nsStyleColor& aColor,
                              const nsStyleBorder& aBorder,
                              nscoord aDX,
                              nscoord aDY);

  static void DrawDashedSides(PRIntn startSide,
                              nsIRenderingContext& aContext,
                              const nsRect& aDirtyRect,
                              const PRUint8 borderStyles[],
                              const nscolor borderColors[],
                              const nsRect& borderOutside,
                              const nsRect& borderInside,
                              PRIntn aSkipSides,
                              nsRect* aGap);

  static void DrawDashedSides(PRIntn startSide,
                              nsIRenderingContext& aContext,
                              const nsRect& aDirtyRect,
                              const nsStyleBorder* aBorderStyle,
                              const nsStyleOutline* aOutlineStyle,
                              PRBool aDoOutline,
                              const nsRect& borderOutside,
                              const nsRect& borderInside,
                              PRIntn aSkipSides,
                              nsRect* aGap);




  static void DrawDashedSegments(nsIRenderingContext& aContext,
                                 const nsRect& aBounds,
                                 nsBorderEdges * aBorderEdges,
                                 PRIntn aSkipSides,
                                 nsRect* aGap);







  static nscolor TransformColor(nscolor aMapColor,PRBool aNoBackGround);

protected:







  static void PaintRoundedBorder(nsIPresContext* aPresContext,
                          nsIRenderingContext& aRenderingContext,
                          nsIFrame* aForFrame,
                          const nsRect& aDirtyRect,
                          const nsRect& aBorderArea,
                          const nsStyleBorder* aBorderStyle,
                          const nsStyleOutline* aOutlineStyle,
                          nsIStyleContext* aStyleContext,
                          PRIntn aSkipSides,
                          PRInt16 aBorderRadius[4],nsRect* aGap = 0,
                          PRBool aIsOutline=0);


  static void RenderSide(nsFloatPoint aPoints[],nsIRenderingContext& aRenderingContext,
                        const nsStyleBorder* aBorderStyle,const nsStyleOutline* aOutlineStyle,nsIStyleContext* aStyleContext,
                        PRUint8 aSide,nsMargin &aBorThick,nscoord aTwipsPerPixel,
                        PRBool aIsOutline=0);

  static void PaintRoundedBackground(nsIPresContext* aPresContext,
                              nsIRenderingContext& aRenderingContext,
                              nsIFrame* aForFrame,
                              const nsRect& aDirtyRect,
                              const nsRect& aBorderArea,
                              const nsStyleColor& aColor,
                              nscoord aDX,
                              nscoord aDY,
                              PRInt16 aTheRadius[4]);


  static nscolor MakeBevelColor(PRIntn whichSide, PRUint8 style,
                                nscolor aBackgroundColor,
                                nscolor aBorderColor,
                                PRBool aSpecialCase);

  static PRIntn MakeSide(nsPoint aPoints[],
                         nsIRenderingContext& aContext,
                         PRIntn whichSide,
                         const nsRect& outside, const nsRect& inside,
                         PRIntn aSkipSides,
                         PRIntn borderPart, float borderFrac,
                         nscoord twipsPerPixel);

  static void DrawSide(nsIRenderingContext& aContext,
                       PRIntn whichSide,
                       const PRUint8 borderStyle,
                       const nscolor borderColor,
                       const nscolor aBackgroundColor,
                       const nsRect& borderOutside,
                       const nsRect& borderInside,
                       PRIntn aSkipSides,
                       nscoord twipsPerPixel,
                       nsRect* aGap = 0);


  static void DrawLine (nsIRenderingContext& aContext,
                        nscoord aX1, nscoord aY1, nscoord aX2, nscoord aY2,
                        nsRect* aGap);

  static void FillPolygon (nsIRenderingContext& aContext,
                           const nsPoint aPoints[],
                           PRInt32 aNumPoints,
                           nsRect* aGap);

};







class QBCurve
{

public:
        nsFloatPoint mAnc1;
        nsFloatPoint mCon;
        nsFloatPoint mAnc2;

  QBCurve() {mAnc1.x=0;mAnc1.y=0;mCon=mAnc2=mAnc1;}
  void SetControls(nsFloatPoint &aAnc1,nsFloatPoint &aCon,nsFloatPoint &aAnc2) { mAnc1 = aAnc1; mCon = aCon; mAnc2 = aAnc2;}
  void SetPoints(float a1x,float a1y,float acx,float acy,float a2x,float a2y) {mAnc1.MoveTo(a1x,a1y),mCon.MoveTo(acx,acy),mAnc2.MoveTo(a2x,a2y);}
# 246 "../../style/src/nsCSSRendering.h"
  void SubDivide(nsIRenderingContext *aRenderingContext,nsPoint aPointArray[],PRInt32 *aCurIndex);







  void MidPointDivide(QBCurve *A,QBCurve *B);
};







class RoundedRect
{

public:
  PRInt32 mRoundness[4];

  PRBool mDoRound;

  PRInt16 mLeft;
  PRInt16 mRight;
  PRInt16 mTop;
  PRInt16 mBottom;





  void RoundRect() {mRoundness[0]=0;}
# 291 "../../style/src/nsCSSRendering.h"
  void Set(nscoord aLeft,nscoord aTop,PRInt32 aWidth,PRInt32 aHeight,PRInt16 aRadius[4],PRInt16 aNumTwipPerPix);
# 300 "../../style/src/nsCSSRendering.h"
  void CalcInsetCurves(QBCurve &aULCurve,QBCurve &aURCurve,QBCurve &aLLCurve,QBCurve &aLRCurve,nsMargin &aBorder);
# 310 "../../style/src/nsCSSRendering.h"
  void GetRoundedBorders(QBCurve &aULCurve,QBCurve &aURCurve,QBCurve &aLLCurve,QBCurve &aLRCurve);

};
# 32 "nsFormControlHelper.cpp" 2
# 1 "../../base/src/nsHTMLIIDs.h" 1
# 25 "../../base/src/nsHTMLIIDs.h"
# 1 "../../../../dist/include/nsISupports.h" 1
# 26 "../../base/src/nsHTMLIIDs.h" 2


extern const nsIID kIAreaFrameIID;
extern const nsIID kIHTMLContentIID;
extern const nsIID kIHTMLReflowIID;
extern const nsIID kIPageSequenceFrameIID;
extern const nsIID kIStyledContentIID;
extern const nsIID kITextContentIID;
# 33 "nsFormControlHelper.cpp" 2
# 1 "../../../../dist/include/nsIView.h" 1
# 26 "../../../../dist/include/nsIView.h"
# 1 "/usr/lib/gcc-lib/i386-linux/3.0/include/stdio.h" 1 3
# 27 "../../../../dist/include/nsIView.h" 2
# 1 "../../../../dist/include/nsISupports.h" 1
# 28 "../../../../dist/include/nsIView.h" 2
# 1 "../../../../dist/include/nsCoord.h" 1
# 29 "../../../../dist/include/nsIView.h" 2
# 1 "../../../../dist/include/nsIWidget.h" 1
# 30 "../../../../dist/include/nsIView.h" 2
# 1 "../../../../dist/include/nsGUIEvent.h" 1
# 31 "../../../../dist/include/nsIView.h" 2

class nsIViewManager;
class nsIRegion;
class nsIRenderingContext;
class nsTransform2D;
class nsIFrame;
class nsIViewObserver;
class nsVoidArray;
struct nsRect;




struct nsViewClip {
  nscoord mLeft;
  nscoord mRight;
  nscoord mTop;
  nscoord mBottom;
};






enum nsViewVisibility {
  nsViewVisibility_kHide = 0,
  nsViewVisibility_kShow = 1,
  nsViewVisibility_kInherit = 2
};
# 78 "../../../../dist/include/nsIView.h"
class nsIView : public nsISupports
{
public:
  static const nsIID& GetIID() {static const nsIID iid = { 0xf0a21c40, 0xa7e1, 0x11d1, { 0xa8, 0x24, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }; return iid;}
# 94 "../../../../dist/include/nsIView.h"
  virtual nsresult Init(nsIViewManager* aManager,
                                                       const nsRect &aBounds,
                   const nsIView *aParent,
                                                 nsViewVisibility aVisibilityFlag = nsViewVisibility_kShow) = 0;
# 109 "../../../../dist/include/nsIView.h"
  virtual nsresult Destroy() = 0;





  virtual nsresult GetViewManager(nsIViewManager *&aViewMgr) const = 0;
# 126 "../../../../dist/include/nsIView.h"
  virtual nsresult Paint(nsIRenderingContext& rc, const nsRect& rect,
                    PRUint32 aPaintFlags, PRBool &aResult) = 0;
# 138 "../../../../dist/include/nsIView.h"
  virtual nsresult Paint(nsIRenderingContext& rc, const nsIRegion& region,
                    PRUint32 aPaintFlags, PRBool &aResult) = 0;
# 149 "../../../../dist/include/nsIView.h"
  virtual nsresult HandleEvent(nsGUIEvent *event,
                          PRUint32 aEventFlags,
                          nsEventStatus* aStatus,
                          PRBool aForceHandle,
                          PRBool& aHandled) = 0;







  virtual nsresult SetPosition(nscoord x, nscoord y) = 0;







  virtual nsresult GetPosition(nscoord *x, nscoord *y) const = 0;







  virtual nsresult SetDimensions(nscoord width, nscoord height, PRBool aPaint = 1) = 0;
  virtual nsresult GetDimensions(nscoord *width, nscoord *height) const = 0;






  virtual nsresult SetBounds(const nsRect &aBounds, PRBool aPaint = 1) = 0;
# 195 "../../../../dist/include/nsIView.h"
  virtual nsresult SetBounds(nscoord aX, nscoord aY,
                        nscoord aWidth, nscoord aHeight,
                        PRBool aPaint = 1) = 0;





  virtual nsresult GetBounds(nsRect &aBounds) const = 0;
# 215 "../../../../dist/include/nsIView.h"
  virtual nsresult SetChildClip(nscoord aLeft, nscoord aTop, nscoord aRight, nscoord aBottom) = 0;
# 224 "../../../../dist/include/nsIView.h"
  virtual nsresult GetChildClip(nscoord *aLeft, nscoord *aTop, nscoord *aRight, nscoord *aBottom) const = 0;






  virtual nsresult SetVisibility(nsViewVisibility aVisibility) = 0;





  virtual nsresult GetVisibility(nsViewVisibility &aVisibility) const = 0;







  virtual nsresult SetZParent(nsIView *aZParent) = 0;
  virtual nsresult GetZParent(nsIView *&aZParent) const = 0;






  virtual nsresult SetZIndex(PRInt32 aZIndex) = 0;






  virtual nsresult GetZIndex(PRInt32 &aZIndex) const = 0;
# 269 "../../../../dist/include/nsIView.h"
  virtual nsresult SetAutoZIndex(PRBool aAutoZIndex) = 0;





  virtual nsresult GetAutoZIndex(PRBool &aAutoZIndex) const = 0;
# 285 "../../../../dist/include/nsIView.h"
  virtual nsresult SetFloating(PRBool aFloatingView) = 0;
  virtual nsresult GetFloating(PRBool &aFloatingView) const = 0;






  virtual nsresult SetParent(nsIView *aParent) = 0;





  virtual nsresult GetParent(nsIView *&aParent) const = 0;





  virtual nsresult GetNextSibling(nsIView *&aNextSibling) const = 0;





  virtual nsresult SetNextSibling(nsIView* aNextSibling) = 0;
# 321 "../../../../dist/include/nsIView.h"
  virtual nsresult InsertChild(nsIView *aChild, nsIView *aSibling) = 0;






  virtual nsresult RemoveChild(nsIView *aChild) = 0;





  virtual nsresult GetChildCount(PRInt32 &aCount) const = 0;







  virtual nsresult GetChild(PRInt32 index, nsIView*& aChild) const = 0;







  virtual nsresult SetOpacity(float aOpacity) = 0;







  virtual nsresult GetOpacity(float &aOpacity) const = 0;







  virtual nsresult HasTransparency(PRBool &aTransparent) const = 0;






  virtual nsresult SetContentTransparency(PRBool aTransparent) = 0;





  virtual nsresult SetClientData(void *aData) = 0;





  virtual nsresult GetClientData(void *&aData) const = 0;
# 394 "../../../../dist/include/nsIView.h"
  virtual nsresult GetOffsetFromWidget(nscoord *aDx, nscoord *aDy, nsIWidget *&aWidget) = 0;





  virtual nsresult GetDirtyRegion(nsIRegion *&aRegion) const = 0;
# 415 "../../../../dist/include/nsIView.h"
  virtual nsresult CreateWidget(const nsIID &aWindowIID,
                          nsWidgetInitData *aWidgetInitData = 0,
                                                        nsNativeWidget aNative = 0,
                          PRBool aEnableDragDrop = 1) = 0;
# 429 "../../../../dist/include/nsIView.h"
  virtual nsresult SetWidget(nsIWidget *aWidget) = 0;
# 438 "../../../../dist/include/nsIView.h"
  virtual nsresult GetWidget(nsIWidget *&aWidget) const = 0;






  virtual nsresult HasWidget(PRBool *aHasWidget) const = 0;






  virtual nsresult List(FILE* out = stdout, PRInt32 aIndent = 0) const = 0;






  virtual nsresult SetViewFlags(PRUint32 aFlags) = 0;






  virtual nsresult ClearViewFlags(PRUint32 aFlags) = 0;






  virtual nsresult GetViewFlags(PRUint32 *aFlags) const = 0;






  virtual nsresult SetCompositorFlags(PRUint32 aFlags) = 0;
  virtual nsresult GetCompositorFlags(PRUint32 *aFlags) = 0;







  virtual nsresult GetExtents(nsRect *aExtents) = 0;


  virtual nsresult IgnoreSetPosition(PRBool aShouldIgnore) = 0;




  virtual nsresult SynchWidgetSizePosition() = 0;
# 506 "../../../../dist/include/nsIView.h"
  virtual nsresult GetClippedRect(nsRect& aClippedRect, PRBool& aIsClipped, PRBool& aEmpty) const = 0;


private:
  virtual nsrefcnt AddRef(void) = 0;
  virtual nsrefcnt Release(void) = 0;
};
# 34 "nsFormControlHelper.cpp" 2
# 1 "../../../../dist/include/nsIViewManager.h" 1
# 26 "../../../../dist/include/nsIViewManager.h"
# 1 "../../../../dist/include/nscore.h" 1
# 27 "../../../../dist/include/nsIViewManager.h" 2
# 1 "../../../../dist/include/nsISupports.h" 1
# 28 "../../../../dist/include/nsIViewManager.h" 2
# 1 "../../../../dist/include/nsCoord.h" 1
# 29 "../../../../dist/include/nsIViewManager.h" 2
# 1 "../../../../dist/include/nsIView.h" 1
# 30 "../../../../dist/include/nsIViewManager.h" 2

class nsIRegion;
class nsIEvent;
class nsIPresContext;
class nsIView;
class nsIScrollableView;
class nsIWidget;
class nsICompositeListener;
struct nsRect;

enum nsContentQuality {
  nsContentQuality_kGood = 0,
  nsContentQuality_kFair,
  nsContentQuality_kPoor,
  nsContentQuality_kUnknown
};





class nsIViewManager : public nsISupports
{
public:

  static const nsIID& GetIID() { static nsIID iid = { 0x3a8863d0, 0xa7f3, 0x11d1, { 0xa8, 0x24, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }; return iid; }
# 65 "../../../../dist/include/nsIViewManager.h"
  virtual nsresult Init(nsIDeviceContext* aContext, nscoord aX = 0, nscoord aY = 0) = 0;





  virtual nsresult GetRootView(nsIView *&aView) = 0;
# 83 "../../../../dist/include/nsIViewManager.h"
  virtual nsresult SetRootView(nsIView *aView, nsIWidget* aWidget = 0) = 0;







  virtual nsresult GetWindowDimensions(nscoord *width, nscoord *height) = 0;
# 100 "../../../../dist/include/nsIViewManager.h"
  virtual nsresult SetWindowDimensions(nscoord width, nscoord height) = 0;




  virtual nsresult ResetScrolling(void) = 0;




  virtual nsresult Composite(void) = 0;







  virtual nsresult UpdateView(nsIView *aView, PRUint32 aUpdateFlags) = 0;
# 128 "../../../../dist/include/nsIViewManager.h"
  virtual nsresult UpdateView(nsIView *aView, const nsRect &aRect, PRUint32 aUpdateFlags) = 0;






  virtual nsresult UpdateAllViews(PRUint32 aUpdateFlags) = 0;
# 144 "../../../../dist/include/nsIViewManager.h"
  virtual nsresult UpdateViewAfterScroll(nsIView *aView, PRInt32 aDX, PRInt32 aDY) = 0;
# 153 "../../../../dist/include/nsIViewManager.h"
  virtual nsresult DispatchEvent(nsGUIEvent *aEvent, nsEventStatus* aStatus) = 0;
# 162 "../../../../dist/include/nsIViewManager.h"
  virtual nsresult GrabMouseEvents(nsIView *aView, PRBool& aResult) = 0;
# 171 "../../../../dist/include/nsIViewManager.h"
  virtual nsresult GrabKeyEvents(nsIView *aView, PRBool& aResult) = 0;





  virtual nsresult GetMouseEventGrabber(nsIView *&aView) = 0;





  virtual nsresult GetKeyEventGrabber(nsIView *&aView) = 0;
# 195 "../../../../dist/include/nsIViewManager.h"
  virtual nsresult InsertChild(nsIView *aParent, nsIView *aChild, nsIView *aSibling,
                          PRBool aAbove) = 0;
# 207 "../../../../dist/include/nsIViewManager.h"
  virtual nsresult InsertChild(nsIView *aParent, nsIView *aChild,
                          PRInt32 aZIndex) = 0;

  virtual nsresult InsertZPlaceholder(nsIView *aParent, nsIView *aZChild,
                                 PRInt32 aZIndex) = 0;







  virtual nsresult RemoveChild(nsIView *aParent, nsIView *aChild) = 0;
# 228 "../../../../dist/include/nsIViewManager.h"
  virtual nsresult MoveViewBy(nsIView *aView, nscoord aX, nscoord aY) = 0;
# 238 "../../../../dist/include/nsIViewManager.h"
  virtual nsresult MoveViewTo(nsIView *aView, nscoord aX, nscoord aY) = 0;
# 250 "../../../../dist/include/nsIViewManager.h"
  virtual nsresult ResizeView(nsIView *aView, nscoord aWidth, nscoord aHeight, PRBool aRepaintExposedAreaOnly = 0) = 0;







  virtual nsresult SetViewChildClip(nsIView *aView, nsRect *aRect) = 0;







  virtual nsresult SetViewVisibility(nsIView *aView, nsViewVisibility aVisible) = 0;
# 276 "../../../../dist/include/nsIViewManager.h"
  virtual nsresult SetViewZIndex(nsIView *aView, PRInt32 aZindex) = 0;
# 287 "../../../../dist/include/nsIViewManager.h"
  virtual nsresult SetViewAutoZIndex(nsIView *aView, PRBool aAutoZIndex) = 0;







  virtual nsresult MoveViewAbove(nsIView *aView, nsIView *aOther) = 0;







  virtual nsresult MoveViewBelow(nsIView *aView, nsIView *aOther) = 0;







  virtual nsresult IsViewShown(nsIView *aView, PRBool &aResult) = 0;







  virtual nsresult GetViewClipAbsolute(nsIView *aView, nsRect *aRect, PRBool &aResult) = 0;






  virtual nsresult SetViewContentTransparency(nsIView *aView, PRBool aTransparent) = 0;







  virtual nsresult SetViewOpacity(nsIView *aView, float aOpacity) = 0;






  virtual nsresult SetViewObserver(nsIViewObserver *aObserver) = 0;






  virtual nsresult GetViewObserver(nsIViewObserver *&aObserver) = 0;





  virtual nsresult GetDeviceContext(nsIDeviceContext *&aContext) = 0;





  virtual nsresult ShowQuality(PRBool aShow) = 0;





  virtual nsresult GetShowQuality(PRBool &aResult) = 0;





  virtual nsresult SetQuality(nsContentQuality aQuality) = 0;





  virtual nsresult DisableRefresh(void) = 0;







  virtual nsresult EnableRefresh(PRUint32 aUpdateFlags) = 0;







  virtual nsresult BeginUpdateViewBatch(void) = 0;
# 403 "../../../../dist/include/nsIViewManager.h"
  virtual nsresult EndUpdateViewBatch(PRUint32 aUpdateFlags) = 0;







  virtual nsresult SetRootScrollableView(nsIScrollableView *aScrollable) = 0;







  virtual nsresult GetRootScrollableView(nsIScrollableView **aScrollable) = 0;




  virtual nsresult Display(nsIView *aView, nscoord aX, nscoord aY) = 0;






  virtual nsresult AddCompositeListener(nsICompositeListener *aListener) = 0;






  virtual nsresult RemoveCompositeListener(nsICompositeListener *aListener) = 0;
# 447 "../../../../dist/include/nsIViewManager.h"
  virtual nsresult GetWidgetForView(nsIView *aView, nsIWidget **aWidget) = 0;







  virtual nsresult GetWidget(nsIWidget **aWidget) = 0;







  virtual nsresult ForceUpdate() = 0;
# 473 "../../../../dist/include/nsIViewManager.h"
  virtual nsresult GetOffset(nscoord *aX, nscoord *aY) = 0;




  virtual nsresult IsCachingWidgetChanges(PRBool* aCaching)=0;






  virtual nsresult CacheWidgetChanges(PRBool aCache)=0;
# 496 "../../../../dist/include/nsIViewManager.h"
  virtual nsresult AllowDoubleBuffering(PRBool aDoubleBuffer)=0;







  virtual nsresult IsPainting(PRBool& aIsPainting)=0;






  virtual nsresult FlushPendingInvalidates()=0;
# 521 "../../../../dist/include/nsIViewManager.h"
  virtual nsresult SetDefaultBackgroundColor(nscolor aColor)=0;






  virtual nsresult GetDefaultBackgroundColor(nscolor* aColor)=0;
};
# 35 "nsFormControlHelper.cpp" 2
# 1 "../../../../dist/include/nsCoord.h" 1
# 36 "nsFormControlHelper.cpp" 2
# 1 "../../../../dist/include/nsWidgetsCID.h" 1
# 37 "nsFormControlHelper.cpp" 2
# 1 "../../../../dist/include/nsViewsCID.h" 1
# 26 "../../../../dist/include/nsViewsCID.h"
# 1 "../../../../dist/include/nsISupports.h" 1
# 27 "../../../../dist/include/nsViewsCID.h" 2
# 1 "../../../../dist/include/nsIFactory.h" 1
# 25 "../../../../dist/include/nsIFactory.h"
class nsIFactory : public nsISupports {
 public:

  static const nsIID& GetIID() {static const nsIID iid = {0x00000001, 0x0000, 0x0000, { 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 }}; return iid;}


  virtual nsresult CreateInstance(nsISupports *aOuter, const nsIID & iid, void * *result) = 0;


  virtual nsresult LockFactory(PRBool lock) = 0;

};
# 28 "../../../../dist/include/nsViewsCID.h" 2
# 1 "../../../../dist/include/nsIComponentManager.h" 1
# 18 "../../../../dist/include/nsIComponentManager.h"
# 1 "../../../../dist/include/nsIEnumerator.h" 1
# 35 "../../../../dist/include/nsIEnumerator.h"
class nsISimpleEnumerator : public nsISupports {
 public:

  static const nsIID& GetIID() {static const nsIID iid = {0xd1899240, 0xf9d2, 0x11d2, { 0xbd, 0xd6, 0x00, 0x00, 0x64, 0x65, 0x73, 0x74 }}; return iid;}
# 53 "../../../../dist/include/nsIEnumerator.h"
  virtual nsresult HasMoreElements(PRBool *_retval) = 0;
# 70 "../../../../dist/include/nsIEnumerator.h"
  virtual nsresult GetNext(nsISupports **_retval) = 0;

};
# 141 "../../../../dist/include/nsIEnumerator.h"
class nsIEnumerator : public nsISupports {
 public:

  static const nsIID& GetIID() {static const nsIID iid = {0xad385286, 0xcbc4, 0x11d2, { 0x8c, 0xca, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3 }}; return iid;}




  virtual nsresult First(void) = 0;




  virtual nsresult Next(void) = 0;





  virtual nsresult CurrentItem(nsISupports **_retval) = 0;





  virtual nsresult IsDone(void) = 0;

};
# 255 "../../../../dist/include/nsIEnumerator.h"
class nsIBidirectionalEnumerator : public nsIEnumerator {
 public:

  static const nsIID& GetIID() {static const nsIID iid = {0x75f158a0, 0xcadd, 0x11d2, { 0x8c, 0xca, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3 }}; return iid;}




  virtual nsresult Last(void) = 0;




  virtual nsresult Prev(void) = 0;

};
# 331 "../../../../dist/include/nsIEnumerator.h"
extern "C" nsresult
NS_NewEmptyEnumerator(nsISimpleEnumerator** aResult);




extern "C" nsresult
NS_NewConjoiningEnumerator(nsIEnumerator* first, nsIEnumerator* second,
                           nsIBidirectionalEnumerator* *aInstancePtrResult);



extern "C" nsresult
NS_NewUnionEnumerator(nsIEnumerator* first, nsIEnumerator* second,
                      nsIEnumerator* *aInstancePtrResult);



extern "C" nsresult
NS_NewIntersectionEnumerator(nsIEnumerator* first, nsIEnumerator* second,
                             nsIEnumerator* *aInstancePtrResult);
# 19 "../../../../dist/include/nsIComponentManager.h" 2






class nsIFile;
# 35 "../../../../dist/include/nsIComponentManager.h"
class nsIComponentManager : public nsISupports {
 public:

  static const nsIID& GetIID() {static const nsIID iid = {0x8458a740, 0xd5dc, 0x11d2, { 0x92, 0xfb, 0x00, 0xe0, 0x98, 0x05, 0x57, 0x0f }}; return iid;}
# 49 "../../../../dist/include/nsIComponentManager.h"
  virtual nsresult FindFactory(const nsCID & aClass, nsIFactory **_retval) = 0;
# 60 "../../../../dist/include/nsIComponentManager.h"
  virtual nsresult GetClassObject(const nsCID & aClass, const nsIID & aIID, void * *_retval) = 0;
# 73 "../../../../dist/include/nsIComponentManager.h"
  virtual nsresult ContractIDToClassID(const char *aContractID, nsCID *aClass) = 0;
# 86 "../../../../dist/include/nsIComponentManager.h"
  virtual nsresult CLSIDToContractID(const nsCID & aClass, char **aClassName, char **_retval) = 0;
# 98 "../../../../dist/include/nsIComponentManager.h"
  virtual nsresult CreateInstance(const nsCID & aClass, nsISupports *aDelegate, const nsIID & aIID, void * *_retval) = 0;
# 112 "../../../../dist/include/nsIComponentManager.h"
  virtual nsresult CreateInstanceByContractID(const char *aContractID, nsISupports *aDelegate, const nsIID & IID, void * *_retval) = 0;
# 124 "../../../../dist/include/nsIComponentManager.h"
  virtual nsresult RegistryLocationForSpec(nsIFile *aSpec, char **_retval) = 0;
# 133 "../../../../dist/include/nsIComponentManager.h"
  virtual nsresult SpecForRegistryLocation(const char *aLocation, nsIFile **_retval) = 0;
# 148 "../../../../dist/include/nsIComponentManager.h"
  virtual nsresult RegisterFactory(const nsCID & aClass, const char *aClassName, const char *aContractID, nsIFactory *aFactory, PRBool aReplace) = 0;
# 169 "../../../../dist/include/nsIComponentManager.h"
  virtual nsresult RegisterComponent(const nsCID & aClass, const char *aClassName, const char *aContractID, const char *aLocation, PRBool aReplace, PRBool aPersist) = 0;
# 191 "../../../../dist/include/nsIComponentManager.h"
  virtual nsresult RegisterComponentWithType(const nsCID & aClass, const char *aClassName, const char *aContractID, nsIFile *aSpec, const char *aLocation, PRBool aReplace, PRBool aPersist, const char *aType) = 0;
# 209 "../../../../dist/include/nsIComponentManager.h"
  virtual nsresult RegisterComponentSpec(const nsCID & aClass, const char *aClassName, const char *aContractID, nsIFile *aLibrary, PRBool aReplace, PRBool aPersist) = 0;
# 228 "../../../../dist/include/nsIComponentManager.h"
  virtual nsresult RegisterComponentLib(const nsCID & aClass, const char *aClassName, const char *aContractID, const char *aDllName, PRBool aReplace, PRBool aPersist) = 0;
# 240 "../../../../dist/include/nsIComponentManager.h"
  virtual nsresult UnregisterFactory(const nsCID & aClass, nsIFactory *aFactory) = 0;
# 254 "../../../../dist/include/nsIComponentManager.h"
  virtual nsresult UnregisterComponent(const nsCID & aClass, const char *aLocation) = 0;
# 263 "../../../../dist/include/nsIComponentManager.h"
  virtual nsresult UnregisterComponentSpec(const nsCID & aClass, nsIFile *aLibrarySpec) = 0;







  virtual nsresult FreeLibraries(void) = 0;




  enum { NS_Startup = 0 };

  enum { NS_Script = 1 };

  enum { NS_Timer = 2 };

  enum { NS_Shutdown = 3 };
# 295 "../../../../dist/include/nsIComponentManager.h"
  virtual nsresult AutoRegister(PRInt32 when, nsIFile *directory) = 0;
# 308 "../../../../dist/include/nsIComponentManager.h"
  virtual nsresult AutoRegisterComponent(PRInt32 when, nsIFile *aFileLocation) = 0;
# 317 "../../../../dist/include/nsIComponentManager.h"
  virtual nsresult AutoUnregisterComponent(PRInt32 when, nsIFile *aFileLocation) = 0;
# 329 "../../../../dist/include/nsIComponentManager.h"
  virtual nsresult IsRegistered(const nsCID & aClass, PRBool *_retval) = 0;
# 339 "../../../../dist/include/nsIComponentManager.h"
  virtual nsresult EnumerateCLSIDs(nsIEnumerator **_retval) = 0;
# 349 "../../../../dist/include/nsIComponentManager.h"
  virtual nsresult EnumerateContractIDs(nsIEnumerator **_retval) = 0;

};
# 602 "../../../../dist/include/nsIComponentManager.h"
# 1 "../../../../dist/include/nsComponentManagerUtils.h" 1
# 23 "../../../../dist/include/nsComponentManagerUtils.h"
# 1 "../../../../dist/include/nsCOMPtr.h" 1
# 24 "../../../../dist/include/nsComponentManagerUtils.h" 2
# 34 "../../../../dist/include/nsComponentManagerUtils.h"
extern "C" nsresult NSGetFactory(nsISupports* aServMgr,
                                           const nsCID &aClass,
                                           const char *aClassName,
                                           const char *aContractID,
                                           nsIFactory **aFactory);
extern "C" PRBool NSCanUnload(nsISupports* aServMgr);
extern "C" nsresult NSRegisterSelf(nsISupports* aServMgr, const char *fullpath);
extern "C" nsresult NSUnregisterSelf(nsISupports* aServMgr, const char *fullpath);

typedef nsresult (*nsFactoryProc)(nsISupports* aServMgr,
                                  const nsCID &aClass,
                                  const char *aClassName,
                                  const char *aContractID,
                                  nsIFactory **aFactory);
typedef PRBool (*nsCanUnloadProc)(nsISupports* aServMgr);
typedef nsresult (*nsRegisterProc)(nsISupports* aServMgr, const char *path);
typedef nsresult (*nsUnregisterProc)(nsISupports* aServMgr, const char *path);
# 63 "../../../../dist/include/nsComponentManagerUtils.h"
extern nsresult
NS_GetGlobalComponentManager(nsIComponentManager* *result);





class nsComponentManager {
public:
  static nsresult Initialize(void);


  static nsresult FindFactory(const nsCID &aClass,
                              nsIFactory **aFactory);


  static nsresult GetClassObject(const nsCID &aClass, const nsIID &aIID,
                                 void **aResult);


  static nsresult ContractIDToClassID(const char *aContractID,
                                nsCID *aClass);



  static nsresult CLSIDToContractID(nsCID *aClass,
                                char* *aClassName,
                                char* *aContractID);


  static nsresult CreateInstance(const nsCID &aClass,
                                 nsISupports *aDelegate,
                                 const nsIID &aIID,
                                 void **aResult);


  static nsresult CreateInstance(const char *aContractID,
                                 nsISupports *aDelegate,
                                 const nsIID &aIID,
                                 void **aResult);


  static nsresult RegisterFactory(const nsCID &aClass,
                                  const char *aClassName,
                                  const char *aContractID,
                                  nsIFactory *aFactory,
                                  PRBool aReplace);
# 118 "../../../../dist/include/nsComponentManagerUtils.h"
  static nsresult RegisterComponent(const nsCID &aClass,
                               const char *aClassName,
                               const char *aContractID,
                               const char *aLibraryPersistentDescriptor,
                               PRBool aReplace,
                               PRBool aPersist);



  static nsresult RegisterComponentSpec(const nsCID &aClass,
                                   const char *aClassName,
                                   const char *aContractID,
                                   nsIFile *aLibrary,
                                   PRBool aReplace,
                                   PRBool aPersist);




  static nsresult RegisterComponentLib(const nsCID &aClass,
                                       const char *aClassName,
                                       const char *aContractID,
                                       const char *adllName,
                                       PRBool aReplace,
                                       PRBool aPersist);



  static nsresult UnregisterFactory(const nsCID &aClass,
                                    nsIFactory *aFactory);


  static nsresult UnregisterComponent(const nsCID &aClass,
                                      const char *aLibrary);


  static nsresult UnregisterComponentSpec(const nsCID &aClass,
                                          nsIFile *aLibrarySpec);


  static nsresult FreeLibraries(void);





  static nsresult AutoRegister(PRInt32 when, nsIFile* directory);
  static nsresult AutoRegisterComponent(PRInt32 when, nsIFile *component);
  static nsresult AutoUnregisterComponent(PRInt32 when, nsIFile *component);


  static nsresult IsRegistered(const nsCID &aClass,
                               PRBool *aRegistered);


  static nsresult EnumerateCLSIDs(nsIEnumerator** aEmumerator);


  static nsresult EnumerateContractIDs(nsIEnumerator** aEmumerator);

};


class nsCreateInstanceByCID : public nsCOMPtr_helper
        {
                public:
                        nsCreateInstanceByCID( const nsCID& aCID, nsISupports* aOuter, nsresult* aErrorPtr )
                                        : mCID(aCID),
                                                mOuter(aOuter),
                                                mErrorPtr(aErrorPtr)
                                {

                                }

                        virtual nsresult operator()( const nsIID&, void** ) const;

                private:
                        const nsCID& mCID;
                        nsISupports* mOuter;
                        nsresult* mErrorPtr;
        };

class nsCreateInstanceByContractID : public nsCOMPtr_helper
        {
                public:
                        nsCreateInstanceByContractID( const char* aContractID, nsISupports* aOuter, nsresult* aErrorPtr )
                                        : mContractID(aContractID),
                                                mOuter(aOuter),
                                                mErrorPtr(aErrorPtr)
                                {

                                }

                        virtual nsresult operator()( const nsIID&, void** ) const;

                private:
                        const char* mContractID;
                        nsISupports* mOuter;
                        nsresult* mErrorPtr;
        };

class nsCreateInstanceFromCategory : public nsCOMPtr_helper
{
public:
    nsCreateInstanceFromCategory(const char *aCategory, const char *aEntry,
                                 nsISupports *aOuter, nsresult *aErrorPtr)
        : mCategory(aCategory),
          mEntry(aEntry),
          mErrorPtr(aErrorPtr)
    {

    }
    virtual nsresult operator()( const nsIID&, void** ) const;
    virtual ~nsCreateInstanceFromCategory() {};

private:
    const char *mCategory;
    const char *mEntry;
    nsISupports *mOuter;
    nsresult *mErrorPtr;
};

inline
const nsCreateInstanceByCID
do_CreateInstance( const nsCID& aCID, nsresult* error = 0 )
        {
                return nsCreateInstanceByCID(aCID, 0, error);
        }

inline
const nsCreateInstanceByCID
do_CreateInstance( const nsCID& aCID, nsISupports* aOuter, nsresult* error = 0 )
        {
                return nsCreateInstanceByCID(aCID, aOuter, error);
        }

inline
const nsCreateInstanceByContractID
do_CreateInstance( const char* aContractID, nsresult* error = 0 )
        {
                return nsCreateInstanceByContractID(aContractID, 0, error);
        }

inline
const nsCreateInstanceByContractID
do_CreateInstance( const char* aContractID, nsISupports* aOuter, nsresult* error = 0 )
        {
                return nsCreateInstanceByContractID(aContractID, aOuter, error);
        }

inline
const nsCreateInstanceFromCategory
do_CreateInstanceFromCategory( const char *aCategory, const char *aEntry,
                               nsresult *aErrorPtr = 0)
{
    return nsCreateInstanceFromCategory(aCategory, aEntry, 0, aErrorPtr);
}

inline
const nsCreateInstanceFromCategory
do_CreateInstanceFromCategory( const char *aCategory, const char *aEntry,
                               nsISupports *aOuter, nsresult *aErrorPtr = 0)
{
    return nsCreateInstanceFromCategory(aCategory, aEntry, aOuter, aErrorPtr);
}


extern const char xpcomKeyName[];
extern const char xpcomComponentsKeyName[];
extern const char lastModValueName[];
extern const char fileSizeValueName[];
extern const char nativeComponentType[];
# 603 "../../../../dist/include/nsIComponentManager.h" 2
# 29 "../../../../dist/include/nsViewsCID.h" 2
# 38 "nsFormControlHelper.cpp" 2
# 1 "../../../../dist/include/nsIComponentManager.h" 1
# 39 "nsFormControlHelper.cpp" 2
# 1 "../../../../dist/include/nsGUIEvent.h" 1
# 40 "nsFormControlHelper.cpp" 2
# 1 "../../../../dist/include/nsIFontMetrics.h" 1
# 26 "../../../../dist/include/nsIFontMetrics.h"
# 1 "../../../../dist/include/nsISupports.h" 1
# 27 "../../../../dist/include/nsIFontMetrics.h" 2
# 1 "../../../../dist/include/nsCoord.h" 1
# 28 "../../../../dist/include/nsIFontMetrics.h" 2

struct nsFont;
class nsString;
class nsIDeviceContext;
class nsIAtom;
# 44 "../../../../dist/include/nsIFontMetrics.h"
typedef void* nsFontHandle;
# 63 "../../../../dist/include/nsIFontMetrics.h"
class nsIFontMetrics : public nsISupports
{
public:
  static const nsIID& GetIID() {static const nsIID iid = { 0xc74cb770, 0xa33e, 0x11d1, { 0xa8, 0x24, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }; return iid;}







  virtual nsresult Init(const nsFont& aFont, nsIAtom* aLangGroup,
                   nsIDeviceContext *aContext) = 0;





  virtual nsresult Destroy() = 0;




  virtual nsresult GetXHeight(nscoord& aResult) = 0;






  virtual nsresult GetSuperscriptOffset(nscoord& aResult) = 0;






  virtual nsresult GetSubscriptOffset(nscoord& aResult) = 0;






  virtual nsresult GetStrikeout(nscoord& aOffset, nscoord& aSize) = 0;






  virtual nsresult GetUnderline(nscoord& aOffset, nscoord& aSize) = 0;
# 123 "../../../../dist/include/nsIFontMetrics.h"
  virtual nsresult GetHeight(nscoord &aHeight) = 0;
# 132 "../../../../dist/include/nsIFontMetrics.h"
  virtual nsresult GetNormalLineHeight(nscoord &aHeight) = 0;






  virtual nsresult GetLeading(nscoord &aLeading) = 0;







  virtual nsresult GetEmHeight(nscoord &aHeight) = 0;




  virtual nsresult GetEmAscent(nscoord &aAscent) = 0;




  virtual nsresult GetEmDescent(nscoord &aDescent) = 0;





  virtual nsresult GetMaxHeight(nscoord &aHeight) = 0;







  virtual nsresult GetMaxAscent(nscoord &aAscent) = 0;





  virtual nsresult GetMaxDescent(nscoord &aDescent) = 0;




  virtual nsresult GetMaxAdvance(nscoord &aAdvance) = 0;




  virtual nsresult GetFont(const nsFont *&aFont) = 0;




  virtual nsresult GetLangGroup(nsIAtom** aLangGroup) = 0;




  virtual nsresult GetFontHandle(nsFontHandle &aHandle) = 0;







};
# 41 "nsFormControlHelper.cpp" 2
# 1 "../../../../dist/include/nsIFormControl.h" 1
# 25 "../../../../dist/include/nsIFormControl.h"
# 1 "../../../../dist/include/nsISupports.h" 1
# 26 "../../../../dist/include/nsIFormControl.h" 2
class nsIDOMHTMLFormElement;
# 62 "../../../../dist/include/nsIFormControl.h"
class nsIFormControl : public nsISupports {
public:

  static const nsIID& GetIID() { static nsIID iid = { 0x282ff440, 0xcd7e, 0x11d1, {0x89, 0xad, 0x00, 0x60, 0x08, 0x91, 0x1b, 0x81} }; return iid; }






  virtual nsresult GetForm(nsIDOMHTMLFormElement** aForm) = 0;






  virtual nsresult SetForm(nsIDOMHTMLFormElement* aForm,
                     PRBool aRemoveFromForm = 1) = 0;






  virtual nsresult GetType(PRInt32* aType) = 0;

  virtual nsresult Init() = 0;

};
# 42 "nsFormControlHelper.cpp" 2
# 1 "../../../../dist/include/nsIDeviceContext.h" 1
# 26 "../../../../dist/include/nsIDeviceContext.h"
# 1 "../../../../dist/include/nsISupports.h" 1
# 27 "../../../../dist/include/nsIDeviceContext.h" 2
# 1 "../../../../dist/include/nsCoord.h" 1
# 28 "../../../../dist/include/nsIDeviceContext.h" 2
# 1 "../../../../dist/include/nsRect.h" 1
# 29 "../../../../dist/include/nsIDeviceContext.h" 2
# 1 "../../../../dist/include/nsIWidget.h" 1
# 30 "../../../../dist/include/nsIDeviceContext.h" 2

class nsIRenderingContext;
class nsIView;
class nsIFontMetrics;
class nsIWidget;
class nsIDeviceContextSpec;
class nsIAtom;

struct nsFont;
struct nsColor;


typedef void * nsNativeDeviceContext;






typedef void * nsPalette;


struct nsPaletteInfo {
  PRPackedBool isPaletteDevice;
  PRUint16 sizePalette;
  PRUint16 numReserved;
  nsPalette palette;
};





  typedef enum {

    eSystemAttr_Color_WindowBackground,
    eSystemAttr_Color_WindowForeground,
    eSystemAttr_Color_WidgetBackground,
    eSystemAttr_Color_WidgetForeground,
    eSystemAttr_Color_WidgetSelectBackground,
    eSystemAttr_Color_WidgetSelectForeground,
    eSystemAttr_Color_Widget3DHighlight,
    eSystemAttr_Color_Widget3DShadow,
    eSystemAttr_Color_TextBackground,
    eSystemAttr_Color_TextForeground,
    eSystemAttr_Color_TextSelectBackground,
    eSystemAttr_Color_TextSelectForeground,

    eSystemAttr_Size_WindowTitleHeight,
    eSystemAttr_Size_WindowBorderWidth,
    eSystemAttr_Size_WindowBorderHeight,
    eSystemAttr_Size_Widget3DBorder,
    eSystemAttr_Size_ScrollbarHeight,
    eSystemAttr_Size_ScrollbarWidth,

    eSystemAttr_Font_Caption,
    eSystemAttr_Font_Icon,
    eSystemAttr_Font_Menu,
    eSystemAttr_Font_MessageBox,
    eSystemAttr_Font_SmallCaption,
    eSystemAttr_Font_StatusBar,

                eSystemAttr_Font_Window,
                eSystemAttr_Font_Document,
                eSystemAttr_Font_Workspace,
                eSystemAttr_Font_Desktop,
                eSystemAttr_Font_Info,
                eSystemAttr_Font_Dialog,
                eSystemAttr_Font_Button,
                eSystemAttr_Font_PullDownMenu,
                eSystemAttr_Font_List,
                eSystemAttr_Font_Field,

    eSystemAttr_Font_Tooltips,
    eSystemAttr_Font_Widget
  } nsSystemAttrID;

  typedef union {
    PRUint32 mSize;
    nscolor * mColor;
    nsFont * mFont;
  } SystemAttrStruct;
# 123 "../../../../dist/include/nsIDeviceContext.h"
struct _NI_ColorSpace;
typedef _NI_ColorSpace NI_ColorSpace;
typedef NI_ColorSpace IL_ColorSpace;

class nsIDeviceContext : public nsISupports
{
public:
  static const nsIID& GetIID() {static const nsIID iid = { 0x5931c580, 0xb917, 0x11d1, { 0xa8, 0x24, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }; return iid;}






  virtual nsresult Init(nsNativeWidget aWidget) = 0;







  virtual nsresult CreateRenderingContext(nsIView *aView, nsIRenderingContext *&aContext) = 0;







  virtual nsresult CreateRenderingContext(nsIWidget *aWidget, nsIRenderingContext *&aContext) = 0;







  virtual nsresult CreateRenderingContext(nsIRenderingContext *&aContext) = 0;
# 171 "../../../../dist/include/nsIDeviceContext.h"
  virtual nsresult InitRenderingContext(nsIRenderingContext *aContext, nsIWidget *aWindow) = 0;
# 180 "../../../../dist/include/nsIDeviceContext.h"
  virtual nsresult SupportsNativeWidgets(PRBool &aSupportsWidgets) = 0;







  virtual nsresult GetDevUnitsToTwips(float &aDevUnitsToTwips) const = 0;






  virtual nsresult GetTwipsToDevUnits(float &aTwipsToDevUnits) const = 0;
# 209 "../../../../dist/include/nsIDeviceContext.h"
  virtual nsresult SetAppUnitsToDevUnits(float aAppUnits) = 0;
# 219 "../../../../dist/include/nsIDeviceContext.h"
  virtual nsresult SetDevUnitsToAppUnits(float aDevUnits) = 0;







  virtual nsresult GetAppUnitsToDevUnits(float &aAppUnits) const = 0;







  virtual nsresult GetDevUnitsToAppUnits(float &aDevUnits) const = 0;
# 247 "../../../../dist/include/nsIDeviceContext.h"
  virtual nsresult GetCanonicalPixelScale(float &aScale) const = 0;
# 256 "../../../../dist/include/nsIDeviceContext.h"
  virtual nsresult GetScrollBarDimensions(float &aWidth, float &aHeight) const = 0;
# 265 "../../../../dist/include/nsIDeviceContext.h"
  virtual nsresult GetSystemAttribute(nsSystemAttrID anID, SystemAttrStruct * aInfo) const = 0;
# 275 "../../../../dist/include/nsIDeviceContext.h"
  virtual nsresult GetMetricsFor(const nsFont& aFont, nsIAtom* aLangGroup,
                            nsIFontMetrics*& aMetrics) = 0;
# 285 "../../../../dist/include/nsIDeviceContext.h"
  virtual nsresult GetMetricsFor(const nsFont& aFont, nsIFontMetrics*& aMetrics) = 0;



  virtual nsresult SetZoom(float aZoom) = 0;
  virtual nsresult GetZoom(float &aZoom) const = 0;



  virtual nsresult SetTextZoom(float aTextZoom) = 0;
  virtual nsresult GetTextZoom(float &aTextZoom) const = 0;





  virtual nsresult GetDrawingSurface(nsIRenderingContext &aContext, nsDrawingSurface &aSurface) = 0;


  virtual nsresult GetGamma(float &aGamms) = 0;
  virtual nsresult SetGamma(float aGamma) = 0;


  virtual nsresult GetGammaTable(PRUint8 *&aGammaTable) = 0;




  virtual nsresult LoadIconImage(PRInt32 aId, nsIImage*& aImage) = 0;






  virtual nsresult CheckFontExistence(const nsString& aFaceName) = 0;
  virtual nsresult FirstExistingFont(const nsFont& aFont, nsString& aFaceName) = 0;

  virtual nsresult GetLocalFontName(const nsString& aFaceName, nsString& aLocalName,
                              PRBool& aAliased) = 0;






  virtual nsresult FlushFontCache(void) = 0;




  virtual nsresult GetDepth(PRUint32& aDepth) = 0;







  virtual nsresult GetILColorSpace(IL_ColorSpace*& aColorSpace) = 0;




  virtual nsresult GetPaletteInfo(nsPaletteInfo&) = 0;




  virtual nsresult ConvertPixel(nscolor aColor, PRUint32 & aPixel) = 0;
# 363 "../../../../dist/include/nsIDeviceContext.h"
  virtual nsresult GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight) = 0;
# 372 "../../../../dist/include/nsIDeviceContext.h"
  virtual nsresult GetRect ( nsRect &aRect ) = 0;
# 384 "../../../../dist/include/nsIDeviceContext.h"
  virtual nsresult GetClientRect(nsRect &aRect) = 0;
# 396 "../../../../dist/include/nsIDeviceContext.h"
  virtual nsresult GetDeviceContextFor(nsIDeviceContextSpec *aDevice,
                                 nsIDeviceContext *&aContext) = 0;
# 408 "../../../../dist/include/nsIDeviceContext.h"
  virtual nsresult BeginDocument(PRUnichar * aTitle) = 0;







  virtual nsresult EndDocument(void) = 0;







  virtual nsresult BeginPage(void) = 0;







  virtual nsresult EndPage(void) = 0;
};
# 43 "nsFormControlHelper.cpp" 2
# 1 "../../../../dist/include/nsHTMLAtoms.h" 1
# 25 "../../../../dist/include/nsHTMLAtoms.h"
# 1 "../../../../dist/include/nsIAtom.h" 1
# 26 "../../../../dist/include/nsHTMLAtoms.h" 2
# 36 "../../../../dist/include/nsHTMLAtoms.h"
class nsHTMLAtoms {
public:

  static void AddRefAtoms();
  static void ReleaseAtoms();
# 50 "../../../../dist/include/nsHTMLAtoms.h"
# 1 "../../../../dist/include/nsHTMLAtomList.h" 1
# 39 "../../../../dist/include/nsHTMLAtomList.h"
static nsIAtom* mozAnonymousBlock;
static nsIAtom* mozAnonymousPositionedBlock;
static nsIAtom* mozFirstLineFixup;
static nsIAtom* mozLetterFrame;
static nsIAtom* mozLineFrame;
static nsIAtom* mozListBulletPseudo;
static nsIAtom* mozSingleLineTextControlFrame;
static nsIAtom* mozFocusInnerPseudo;
static nsIAtom* mozFocusOuterPseudo;
static nsIAtom* mozDisplayComboboxControlFrame;

static nsIAtom* _baseHref;
static nsIAtom* _baseTarget;
static nsIAtom* a;
static nsIAtom* abbr;
static nsIAtom* above;
static nsIAtom* accept;
static nsIAtom* acceptcharset;
static nsIAtom* accesskey;
static nsIAtom* action;
static nsIAtom* align;
static nsIAtom* alink;
static nsIAtom* alt;
static nsIAtom* applet;
static nsIAtom* archive;
static nsIAtom* area;
static nsIAtom* axis;
static nsIAtom* background;
static nsIAtom* base;
static nsIAtom* below;

static nsIAtom* bdo;

static nsIAtom* bgcolor;
static nsIAtom* blockquote;
static nsIAtom* body;
static nsIAtom* border;
static nsIAtom* bordercolor;
static nsIAtom* bottompadding;
static nsIAtom* br;
static nsIAtom* b;
static nsIAtom* button;
static nsIAtom* buttonContentPseudo;
static nsIAtom* caption;
static nsIAtom* cellContentPseudo;
static nsIAtom* cellpadding;
static nsIAtom* cellspacing;
static nsIAtom* ch;
static nsIAtom* _char;
static nsIAtom* charoff;
static nsIAtom* charset;
static nsIAtom* checked;
static nsIAtom* cite;
static nsIAtom* kClass;
static nsIAtom* classid;
static nsIAtom* clear;
static nsIAtom* clip;
static nsIAtom* code;
static nsIAtom* codebase;
static nsIAtom* codetype;
static nsIAtom* color;
static nsIAtom* col;
static nsIAtom* colgroup;
static nsIAtom* cols;
static nsIAtom* colspan;
static nsIAtom* combobox;
static nsIAtom* columnPseudo;
static nsIAtom* commentPseudo;
static nsIAtom* compact;
static nsIAtom* content;
static nsIAtom* coords;
static nsIAtom* dd;
static nsIAtom* defaultchecked;
static nsIAtom* defaultselected;
static nsIAtom* defaultvalue;
static nsIAtom* declare;
static nsIAtom* defer;
static nsIAtom* dir;
static nsIAtom* div;
static nsIAtom* disabled;
static nsIAtom* dl;
static nsIAtom* dropDownListPseudo;
static nsIAtom* dt;

static nsIAtom* datetime;
static nsIAtom* data;
static nsIAtom* dfn;
static nsIAtom* em;
static nsIAtom* embed;
static nsIAtom* encoding;
static nsIAtom* enctype;
static nsIAtom* face;
static nsIAtom* fieldset;
static nsIAtom* fieldsetContentPseudo;
static nsIAtom* firstLetterPseudo;
static nsIAtom* firstLinePseudo;
static nsIAtom* font;
static nsIAtom* fontWeight;
static nsIAtom* _for;
static nsIAtom* form;
static nsIAtom* frame;
static nsIAtom* frameborder;
static nsIAtom* frameset;
static nsIAtom* framesetBlankPseudo;
static nsIAtom* gutter;
static nsIAtom* h1;
static nsIAtom* h2;
static nsIAtom* h3;
static nsIAtom* h4;
static nsIAtom* h5;
static nsIAtom* h6;
static nsIAtom* head;
static nsIAtom* headerContentBase;
static nsIAtom* headerContentLanguage;
static nsIAtom* headerContentScriptType;
static nsIAtom* headerContentStyleType;
static nsIAtom* headerContentType;
static nsIAtom* headerDefaultStyle;
static nsIAtom* headerWindowTarget;
static nsIAtom* headers;
static nsIAtom* height;
static nsIAtom* hidden;
static nsIAtom* horizontalFramesetBorderPseudo;
static nsIAtom* hr;
static nsIAtom* href;
static nsIAtom* hreflang;
static nsIAtom* hspace;
static nsIAtom* html;
static nsIAtom* httpEquiv;
static nsIAtom* ibPseudo;
static nsIAtom* i;
static nsIAtom* id;
static nsIAtom* iframe;
static nsIAtom* ilayer;
static nsIAtom* img;
static nsIAtom* index;
static nsIAtom* input;
static nsIAtom* isindex;
static nsIAtom* ismap;
static nsIAtom* label;
static nsIAtom* labelContentPseudo;
static nsIAtom* lang;
static nsIAtom* layer;
static nsIAtom* layout;
static nsIAtom* li;
static nsIAtom* link;
static nsIAtom* left;
static nsIAtom* leftpadding;
static nsIAtom* legend;
static nsIAtom* legendContentPseudo;
static nsIAtom* length;
static nsIAtom* longdesc;
static nsIAtom* lowsrc;
static nsIAtom* map;
static nsIAtom* marginheight;
static nsIAtom* marginwidth;
static nsIAtom* maxlength;
static nsIAtom* mayscript;
static nsIAtom* media;
static nsIAtom* menu;
static nsIAtom* meta;
static nsIAtom* method;
static nsIAtom* multicol;
static nsIAtom* multiple;
static nsIAtom* name;
static nsIAtom* noembed;
static nsIAtom* noframes;
static nsIAtom* nohref;
static nsIAtom* noresize;
static nsIAtom* noscript;
static nsIAtom* noshade;
static nsIAtom* nowrap;
static nsIAtom* object;
static nsIAtom* ol;
static nsIAtom* option;
static nsIAtom* overflow;
static nsIAtom* p;
static nsIAtom* pagex;
static nsIAtom* pagey;
static nsIAtom* param;
static nsIAtom* placeholderPseudo;
static nsIAtom* pointSize;
static nsIAtom* pre;
static nsIAtom* processingInstructionPseudo;
static nsIAtom* profile;
static nsIAtom* prompt;
static nsIAtom* radioPseudo;
static nsIAtom* checkPseudo;
static nsIAtom* readonly;
static nsIAtom* refresh;
static nsIAtom* rel;
static nsIAtom* repeat;
static nsIAtom* rev;
static nsIAtom* rightpadding;
static nsIAtom* rows;
static nsIAtom* rowspan;
static nsIAtom* rules;
static nsIAtom* s;
static nsIAtom* scheme;
static nsIAtom* scope;
static nsIAtom* script;
static nsIAtom* scrolling;
static nsIAtom* select;
static nsIAtom* selected;
static nsIAtom* selectedindex;
static nsIAtom* setcookie;
static nsIAtom* shape;
static nsIAtom* size;
static nsIAtom* spacer;
static nsIAtom* span;
static nsIAtom* src;
static nsIAtom* standby;
static nsIAtom* start;
static nsIAtom* strike;
static nsIAtom* strong;
static nsIAtom* style;
static nsIAtom* summary;
static nsIAtom* suppress;
static nsIAtom* tabindex;
static nsIAtom* table;
static nsIAtom* tablePseudo;
static nsIAtom* tableCellPseudo;
static nsIAtom* tableColGroupPseudo;
static nsIAtom* tableColPseudo;
static nsIAtom* tableOuterPseudo;
static nsIAtom* tableRowGroupPseudo;
static nsIAtom* tableRowPseudo;
static nsIAtom* tabstop;
static nsIAtom* target;
static nsIAtom* tbody;
static nsIAtom* td;
static nsIAtom* tfoot;
static nsIAtom* thead;
static nsIAtom* text;
static nsIAtom* textarea;
static nsIAtom* textPseudo;
static nsIAtom* th;
static nsIAtom* title;
static nsIAtom* top;
static nsIAtom* toppadding;
static nsIAtom* tr;
static nsIAtom* tt;
static nsIAtom* type;
static nsIAtom* u;
static nsIAtom* ul;
static nsIAtom* usemap;
static nsIAtom* valign;
static nsIAtom* value;
static nsIAtom* valuetype;
static nsIAtom* variable;
static nsIAtom* vcard_name;
static nsIAtom* version;
static nsIAtom* verticalFramesetBorderPseudo;
static nsIAtom* visibility;
static nsIAtom* vlink;
static nsIAtom* vspace;
static nsIAtom* wbr;
static nsIAtom* width;
static nsIAtom* wrap;
static nsIAtom* wrappedFramePseudo;
static nsIAtom* zindex;
static nsIAtom* z_index;

static nsIAtom* moz_tristate;
static nsIAtom* moz_tristatevalue;
# 51 "../../../../dist/include/nsHTMLAtoms.h" 2

};
# 44 "nsFormControlHelper.cpp" 2
# 1 "../../../../dist/include/nsIButton.h" 1
# 26 "../../../../dist/include/nsIButton.h"
# 1 "../../../../dist/include/nsIWidget.h" 1
# 27 "../../../../dist/include/nsIButton.h" 2
# 1 "../../../../dist/include/nsString.h" 1
# 28 "../../../../dist/include/nsIButton.h" 2
# 38 "../../../../dist/include/nsIButton.h"
class nsIButton : public nsISupports {

public:
   static const nsIID& GetIID() {static const nsIID iid = { 0x18032ad0, 0xb265, 0x11d1, { 0xaa, 0x2a, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 } }; return iid;}
# 50 "../../../../dist/include/nsIButton.h"
    virtual nsresult SetLabel(const nsString &aText) = 0;
# 59 "../../../../dist/include/nsIButton.h"
    virtual nsresult GetLabel(nsString &aBuffer) = 0;

};
# 45 "nsFormControlHelper.cpp" 2
# 1 "../../../../dist/include/nsICheckButton.h" 1
# 30 "../../../../dist/include/nsICheckButton.h"
# 1 "../../../../dist/include/nsISupports.h" 1
# 31 "../../../../dist/include/nsICheckButton.h" 2
# 1 "../../../../dist/include/nsIWidget.h" 1
# 32 "../../../../dist/include/nsICheckButton.h" 2







class nsICheckButton : public nsISupports {

public:
    static const nsIID& GetIID() {static const nsIID iid = { 0x961085f5, 0xbd28, 0x11d1, { 0x97, 0xef, 0x0, 0x60, 0x97, 0x3, 0xc1, 0x4e } }; return iid;}
# 51 "../../../../dist/include/nsICheckButton.h"
    virtual nsresult SetLabel(const nsString &aText) = 0;
# 60 "../../../../dist/include/nsICheckButton.h"
    virtual nsresult GetLabel(nsString &aBuffer) = 0;







    virtual nsresult SetState(const PRBool aState) = 0;







    virtual nsresult GetState(PRBool& aState) = 0;

};
# 46 "nsFormControlHelper.cpp" 2
# 1 "../../../../dist/include/nsITextWidget.h" 1
# 25 "../../../../dist/include/nsITextWidget.h"
# 1 "../../../../dist/include/nsIWidget.h" 1
# 26 "../../../../dist/include/nsITextWidget.h" 2
# 1 "../../../../dist/include/nsString.h" 1
# 27 "../../../../dist/include/nsITextWidget.h" 2






struct nsTextWidgetInitData : public nsWidgetInitData {
  nsTextWidgetInitData()
    : mIsPassword(0),
      mIsReadOnly(0)
  {
  }

  PRBool mIsPassword;
  PRBool mIsReadOnly;
};
# 53 "../../../../dist/include/nsITextWidget.h"
class nsITextWidget : public nsISupports
{

  public:
    static const nsIID& GetIID() {static const nsIID iid = { 0xf8030011, 0xc342, 0x11d1, { 0x97, 0xf0, 0x0, 0x60, 0x97, 0x3, 0xc1, 0x4e } }; return iid;}
# 69 "../../../../dist/include/nsITextWidget.h"
    virtual nsresult GetText(nsString &aTextBuffer, PRUint32 aBufferSize, PRUint32& aActualSize) = 0;
# 80 "../../../../dist/include/nsITextWidget.h"
    virtual nsresult SetText(const nsString &aText, PRUint32& aActualSize) = 0;
# 95 "../../../../dist/include/nsITextWidget.h"
    virtual nsresult InsertText(const nsString &aText, PRUint32 aStartPos, PRUint32 aEndPos, PRUint32& aActualSize) = 0;






    virtual nsresult RemoveText(void) = 0;
# 112 "../../../../dist/include/nsITextWidget.h"
    virtual nsresult SetPassword(PRBool aIsPassword) = 0;
# 121 "../../../../dist/include/nsITextWidget.h"
    virtual nsresult SetMaxTextLength(PRUint32 aChars) = 0;
# 133 "../../../../dist/include/nsITextWidget.h"
    virtual nsresult SetReadOnly(PRBool aNewReadOnlyFlag, PRBool& aOldReadOnlyFlag) = 0;






    virtual nsresult SelectAll() = 0;
# 149 "../../../../dist/include/nsITextWidget.h"
    virtual nsresult SetSelection(PRUint32 aStartSel, PRUint32 aEndSel) = 0;
# 158 "../../../../dist/include/nsITextWidget.h"
    virtual nsresult GetSelection(PRUint32 *aStartSel, PRUint32 *aEndSel) = 0;







    virtual nsresult SetCaretPosition(PRUint32 aPosition) = 0;







    virtual nsresult GetCaretPosition(PRUint32& aPosition) = 0;

};
# 47 "nsFormControlHelper.cpp" 2
# 1 "../../../../dist/include/nsISupports.h" 1
# 48 "nsFormControlHelper.cpp" 2
# 1 "../../../../dist/include/nsStyleConsts.h" 1
# 49 "nsFormControlHelper.cpp" 2
# 1 "../../../../dist/include/nsUnitConversion.h" 1
# 50 "nsFormControlHelper.cpp" 2
# 1 "../../../../dist/include/nsStyleUtil.h" 1
# 25 "../../../../dist/include/nsStyleUtil.h"
# 1 "../../../../dist/include/nslayout.h" 1
# 26 "../../../../dist/include/nsStyleUtil.h" 2
# 1 "../../../../dist/include/nsCoord.h" 1
# 27 "../../../../dist/include/nsStyleUtil.h" 2
# 1 "../../../../dist/include/nsIPresContext.h" 1
# 28 "../../../../dist/include/nsStyleUtil.h" 2
# 1 "../../../../dist/include/nsILinkHandler.h" 1
# 25 "../../../../dist/include/nsILinkHandler.h"
# 1 "../../../../dist/include/nsISupports.h" 1
# 26 "../../../../dist/include/nsILinkHandler.h" 2

class nsIInputStream;
class nsIContent;
class nsString;
struct nsGUIEvent;





enum nsLinkState {
  eLinkState_Unknown = 0,
  eLinkState_Unvisited = 1,
  eLinkState_Visited = 2,
  eLinkState_NotLink = 3
};




enum nsLinkVerb {
  eLinkVerb_Replace = 0,
  eLinkVerb_New = 1,
  eLinkVerb_Embed = 2,
  eLinkVerb_Undefined = 3
};




class nsILinkHandler : public nsISupports {
public:
  static const nsIID& GetIID() {static const nsIID iid = { 0xa6cf905b, 0x15b3, 0x11d2,{0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}; return iid;}
# 67 "../../../../dist/include/nsILinkHandler.h"
  virtual nsresult OnLinkClick(nsIContent* aContent,
                         nsLinkVerb aVerb,
                         const PRUnichar* aURLSpec,
                         const PRUnichar* aTargetSpec,
                         nsIInputStream* aPostDataStream = 0,
                         nsIInputStream* aHeadersDataStream = 0) = 0;







  virtual nsresult OnOverLink(nsIContent* aContent,
                        const PRUnichar* aURLSpec,
                        const PRUnichar* aTargetSpec) = 0;




  virtual nsresult GetLinkState(const char* aLinkURI, nsLinkState& aState) = 0;
};
# 29 "../../../../dist/include/nsStyleUtil.h" 2

class nsIStyleContext;
struct nsStyleColor;

enum nsFontSizeType {
  eFontSize_HTML = 1,
  eFontSize_CSS = 2
};



class nsStyleUtil {
public:

  static float GetScalingFactor(PRInt32 aScaler);

  static nscoord CalcFontPointSize(PRInt32 aHTMLSize, PRInt32 aBasePointSize,
                                   float aScalingFactor, nsIPresContext* aPresContext,
                                   nsFontSizeType aFontSizeType = eFontSize_HTML);

  static PRInt32 FindNextSmallerFontSize(nscoord aFontSize, PRInt32 aBasePointSize,
                                         float aScalingFactor, nsIPresContext* aPresContext,
                                         nsFontSizeType aFontSizeType = eFontSize_HTML);

  static PRInt32 FindNextLargerFontSize(nscoord aFontSize, PRInt32 aBasePointSize,
                                        float aScalingFactor, nsIPresContext* aPresContext,
                                        nsFontSizeType aFontSizeType = eFontSize_HTML);

  static PRInt32 ConstrainFontWeight(PRInt32 aWeight);

  static const nsStyleColor* FindNonTransparentBackground(nsIStyleContext* aContext,
                                                          PRBool aStartAtParent = 0);

  static PRBool IsHTMLLink(nsIContent *aContent, nsIAtom *aTag, nsIPresContext *aPresContext, nsLinkState *aState);
  static PRBool IsSimpleXlink(nsIContent *aContent, nsIPresContext *aPresContext, nsLinkState *aState);

};
# 51 "nsFormControlHelper.cpp" 2
# 1 "nsFormFrame.h" 1
# 25 "nsFormFrame.h"
# 1 "../../../../dist/include/nsIFormManager.h" 1
# 26 "nsFormFrame.h" 2
# 1 "../../base/src/nsBlockFrame.h" 1
# 25 "../../base/src/nsBlockFrame.h"
# 1 "../../base/src/nsHTMLContainerFrame.h" 1
# 25 "../../base/src/nsHTMLContainerFrame.h"
# 1 "../../base/src/nsContainerFrame.h" 1
# 25 "../../base/src/nsContainerFrame.h"
# 1 "../../base/src/nsSplittableFrame.h" 1
# 25 "../../base/src/nsSplittableFrame.h"
# 1 "../../base/src/nsFrame.h" 1
# 26 "../../base/src/nsSplittableFrame.h" 2


class nsSplittableFrame : public nsFrame
{
public:
  virtual nsresult Init(nsIPresContext* aPresContext,
                  nsIContent* aContent,
                  nsIFrame* aParent,
                  nsIStyleContext* aContext,
                  nsIFrame* aPrevInFlow);

  virtual nsresult IsSplittable(nsSplittableType& aIsSplittable) const;





  virtual nsresult GetPrevInFlow(nsIFrame** aPrevInFlow) const;
  virtual nsresult SetPrevInFlow(nsIFrame*);
  virtual nsresult GetNextInFlow(nsIFrame** aNextInFlow) const;
  virtual nsresult SetNextInFlow(nsIFrame*);




  nsIFrame* GetFirstInFlow() const;




  nsIFrame* GetLastInFlow() const;



  static void RemoveFromFlow(nsIFrame* aFrame);


  static void BreakFromPrevFlow(nsIFrame* aFrame);

  nsIFrame* GetPrevInFlow();
  nsIFrame* GetNextInFlow();

protected:




  nsIFrame* mPrevInFlow;
  nsIFrame* mNextInFlow;
};
# 26 "../../base/src/nsContainerFrame.h" 2
# 1 "../../../../dist/include/nsFrameList.h" 1
# 25 "../../../../dist/include/nsFrameList.h"
# 1 "../../../../dist/include/nsIFrame.h" 1
# 26 "../../../../dist/include/nsFrameList.h" 2





class nsFrameList {
public:
  nsFrameList() {
    mFirstChild = 0;
  }

  nsFrameList(nsIFrame* aHead) {
    mFirstChild = aHead;
  }

  ~nsFrameList() {
  }

  void DestroyFrames(nsIPresContext* aPresContext);

  void SetFrames(nsIFrame* aFrameList) {
    mFirstChild = aFrameList;
  }

  void AppendFrames(nsIFrame* aParent, nsIFrame* aFrameList);

  void AppendFrames(nsIFrame* aParent, nsFrameList& aFrameList) {
    AppendFrames(aParent, aFrameList.mFirstChild);
    aFrameList.mFirstChild = 0;
  }

  void AppendFrame(nsIFrame* aParent, nsIFrame* aFrame);




  PRBool RemoveFrame(nsIFrame* aFrame);




  PRBool RemoveFirstChild();




  PRBool DestroyFrame(nsIPresContext* aPresContext, nsIFrame* aFrame);

  void InsertFrame(nsIFrame* aParent,
                   nsIFrame* aPrevSibling,
                   nsIFrame* aNewFrame);

  void InsertFrames(nsIFrame* aParent,
                    nsIFrame* aPrevSibling,
                    nsIFrame* aFrameList);

  void InsertFrames(nsIFrame* aParent, nsIFrame* aPrevSibling,
                    nsFrameList& aFrameList) {
    InsertFrames(aParent, aPrevSibling, aFrameList.FirstChild());
    aFrameList.mFirstChild = 0;
  }

  PRBool ReplaceFrame(nsIFrame* aParent,
                      nsIFrame* aOldFrame,
                      nsIFrame* aNewFrame);

  PRBool ReplaceAndDestroyFrame(nsIPresContext* aPresContext,
                                nsIFrame* aParent,
                                nsIFrame* aOldFrame,
                                nsIFrame* aNewFrame);

  PRBool Split(nsIFrame* aAfterFrame, nsIFrame** aNextFrameResult);

  nsIFrame* PullFrame(nsIFrame* aParent,
                      nsIFrame* aLastChild,
                      nsFrameList& aFromList);

  nsIFrame* FirstChild() const {
    return mFirstChild;
  }

  nsIFrame* LastChild() const;

  nsIFrame* FrameAt(PRInt32 aIndex) const;

  PRBool IsEmpty() const {
    return 0 == mFirstChild;
  }

  PRBool NotEmpty() const {
    return 0 != mFirstChild;
  }

  PRBool ContainsFrame(const nsIFrame* aFrame) const;

  PRInt32 GetLength() const;

  nsIFrame* GetPrevSiblingFor(nsIFrame* aFrame) const;





  nsIFrame* GetPrevVisualFor(nsIFrame* aFrame) const;




  nsIFrame* GetNextVisualFor(nsIFrame* aFrame) const;


  void VerifyParent(nsIFrame* aParent) const;





protected:
  nsIFrame* mFirstChild;
};
# 27 "../../base/src/nsContainerFrame.h" 2
# 39 "../../base/src/nsContainerFrame.h"
class nsContainerFrame : public nsSplittableFrame
{
public:

  virtual nsresult Init(nsIPresContext* aPresContext,
                  nsIContent* aContent,
                  nsIFrame* aParent,
                  nsIStyleContext* aContext,
                  nsIFrame* aPrevInFlow);
  virtual nsresult SetInitialChildList(nsIPresContext* aPresContext,
                                 nsIAtom* aListName,
                                 nsIFrame* aChildList);
  virtual nsresult FirstChild(nsIPresContext* aPresContext,
                        nsIAtom* aListName,
                        nsIFrame** aFirstChild) const;
  virtual nsresult Destroy(nsIPresContext* aPresContext);
  virtual nsresult Paint(nsIPresContext* aPresContext,
                   nsIRenderingContext& aRenderingContext,
                   const nsRect& aDirtyRect,
                   nsFramePaintLayer aWhichLayer);
  virtual nsresult GetFrameForPoint(nsIPresContext* aPresContext,
                              const nsPoint& aPoint,
                              nsFramePaintLayer aWhichLayer,
                              nsIFrame** aFrame);
  virtual nsresult ReplaceFrame(nsIPresContext* aPresContext,
                          nsIPresShell& aPresShell,
                          nsIAtom* aListName,
                          nsIFrame* aOldFrame,
                          nsIFrame* aNewFrame);
  virtual nsresult ReflowDirtyChild(nsIPresShell* aPresShell, nsIFrame* aChild);







  virtual void DeleteChildsNextInFlow(nsIPresContext* aPresContext,
                                      nsIFrame* aChild);

  static PRInt32 LengthOf(nsIFrame* aFrameList) {
    nsFrameList tmp(aFrameList);
    return tmp.GetLength();
  }


  static void PositionFrameView(nsIPresContext* aPresContext,
                                nsIFrame* aKidFrame,
                                nsIView* aView);
# 102 "../../base/src/nsContainerFrame.h"
  static void SyncFrameViewAfterReflow(nsIPresContext* aPresContext,
                                       nsIFrame* aFrame,
                                       nsIView* aView,
                                       const nsRect* aCombinedArea,
                                       PRUint32 aFlags = 0);
# 119 "../../base/src/nsContainerFrame.h"
  nsresult ReflowChild(nsIFrame* aKidFrame,
                       nsIPresContext* aPresContext,
                       nsHTMLReflowMetrics& aDesiredSize,
                       const nsHTMLReflowState& aReflowState,
                       nscoord aX,
                       nscoord aY,
                       PRUint32 aFlags,
                       nsReflowStatus& aStatus);
# 149 "../../base/src/nsContainerFrame.h"
  static nsresult FinishReflowChild(nsIFrame* aKidFrame,
                                    nsIPresContext* aPresContext,
                                    nsHTMLReflowMetrics& aDesiredSize,
                                    nscoord aX,
                                    nscoord aY,
                                    PRUint32 aFlags);


  static void PositionChildViews(nsIPresContext* aPresContext,
                                 nsIFrame* aFrame);

protected:
  nsContainerFrame();
  ~nsContainerFrame();

  nsresult GetFrameForPointUsing(nsIPresContext* aPresContext,
                                 const nsPoint& aPoint,
                                 nsIAtom* aList,
                                 nsFramePaintLayer aWhichLayer,
                                 PRBool aConsiderSelf,
                                 nsIFrame** aFrame);

  virtual void PaintChildren(nsIPresContext* aPresContext,
                             nsIRenderingContext& aRenderingContext,
                             const nsRect& aDirtyRect,
                             nsFramePaintLayer aWhichLayer);

  virtual void PaintChild(nsIPresContext* aPresContext,
                          nsIRenderingContext& aRenderingContext,
                          const nsRect& aDirtyRect,
                          nsIFrame* aFrame,
                          nsFramePaintLayer aWhichLayer);




  nsIFrame* GetOverflowFrames(nsIPresContext* aPresContext,
                              PRBool aRemoveProperty) const;




  nsresult SetOverflowFrames(nsIPresContext* aPresContext,
                             nsIFrame* aOverflowFrames);
# 203 "../../base/src/nsContainerFrame.h"
  PRBool MoveOverflowToChildList(nsIPresContext* aPresContext);
# 219 "../../base/src/nsContainerFrame.h"
  void PushChildren(nsIPresContext* aPresContext,
                    nsIFrame* aFromChild,
                    nsIFrame* aPrevSibling);

  nsFrameList mFrames;
};
# 26 "../../base/src/nsHTMLContainerFrame.h" 2
class nsString;
class nsAbsoluteFrame;
class nsPlaceholderFrame;
struct nsStyleDisplay;
struct nsStylePosition;
# 46 "../../base/src/nsHTMLContainerFrame.h"
class nsHTMLContainerFrame : public nsContainerFrame {
public:
  virtual nsresult Paint(nsIPresContext* aPresContext,
                    nsIRenderingContext& aRenderingContext,
                    const nsRect& aDirtyRect,
                    nsFramePaintLayer aWhichLayer);
# 60 "../../base/src/nsHTMLContainerFrame.h"
  static nsresult CreateNextInFlow(nsIPresContext* aPresContext,
                                   nsIFrame* aOuterFrame,
                                   nsIFrame* aFrame,
                                   nsIFrame*& aNextInFlowResult);
# 75 "../../base/src/nsHTMLContainerFrame.h"
  static nsresult CreateViewForFrame(nsIPresContext* aPresContext,
                                     nsIFrame* aFrame,
                                     nsIStyleContext* aStyleContext,
                                     nsIFrame* aContentParentFrame,
                                     PRBool aForce);

  static nsresult ReparentFrameView(nsIPresContext* aPresContext,
                                    nsIFrame* aChildFrame,
                                    nsIFrame* aOldParentFrame,
                                    nsIFrame* aNewParentFrame);

  static nsresult ReparentFrameViewList(nsIPresContext* aPresContext,
                                        nsIFrame* aChildFrameList,
                                        nsIFrame* aOldParentFrame,
                                        nsIFrame* aNewParentFrame);

protected:
  virtual PRIntn GetSkipSides() const = 0;
};
# 26 "../../base/src/nsBlockFrame.h" 2
# 1 "../../base/src/nsHTMLParts.h" 1
# 27 "../../base/src/nsBlockFrame.h" 2
# 1 "../../base/src/nsAbsoluteContainingBlock.h" 1
# 25 "../../base/src/nsAbsoluteContainingBlock.h"
# 1 "../../../../dist/include/nslayout.h" 1
# 26 "../../base/src/nsAbsoluteContainingBlock.h" 2
# 1 "../../../../dist/include/nsFrameList.h" 1
# 27 "../../base/src/nsAbsoluteContainingBlock.h" 2

class nsIAtom;
class nsIFrame;
class nsIPresContext;
# 43 "../../base/src/nsAbsoluteContainingBlock.h"
class nsAbsoluteContainingBlock
{
public:
  nsresult FirstChild(const nsIFrame* aDelegatingFrame,
                      nsIAtom* aListName,
                      nsIFrame** aFirstChild) const;

  nsresult SetInitialChildList(nsIFrame* aDelegatingFrame,
                               nsIPresContext* aPresContext,
                               nsIAtom* aListName,
                               nsIFrame* aChildList);
  nsresult AppendFrames(nsIFrame* aDelegatingFrame,
                        nsIPresContext* aPresContext,
                        nsIPresShell& aPresShell,
                        nsIAtom* aListName,
                        nsIFrame* aFrameList);
  nsresult InsertFrames(nsIFrame* aDelegatingFrame,
                        nsIPresContext* aPresContext,
                        nsIPresShell& aPresShell,
                        nsIAtom* aListName,
                        nsIFrame* aPrevFrame,
                        nsIFrame* aFrameList);
  nsresult RemoveFrame(nsIFrame* aDelegatingFrame,
                       nsIPresContext* aPresContext,
                       nsIPresShell& aPresShell,
                       nsIAtom* aListName,
                       nsIFrame* aOldFrame);
# 78 "../../base/src/nsAbsoluteContainingBlock.h"
  nsresult Reflow(nsIFrame* aDelegatingFrame,
                  nsIPresContext* aPresContext,
                  const nsHTMLReflowState& aReflowState,
                  nscoord aContainingBlockWidth,
                  nscoord aContainingBlockHeight,
                  nsRect& aChildBounds);
# 92 "../../base/src/nsAbsoluteContainingBlock.h"
  nsresult IncrementalReflow(nsIFrame* aDelegatingFrame,
                             nsIPresContext* aPresContext,
                             const nsHTMLReflowState& aReflowState,
                             nscoord aContainingBlockWidth,
                             nscoord aContainingBlockHeight,
                             PRBool& aWasHandled,
                             nsRect& aChildBounds);

  void DestroyFrames(nsIFrame* aDelegatingFrame,
                     nsIPresContext* aPresContext);

  PRBool HasAbsoluteFrames() {return mAbsoluteFrames.NotEmpty();}

protected:
  nsresult ReflowAbsoluteFrame(nsIFrame* aDelegatingFrame,
                               nsIPresContext* aPresContext,
                               const nsHTMLReflowState& aReflowState,
                               nscoord aContainingBlockWidth,
                               nscoord aContainingBlockHeight,
                               nsIFrame* aKidFrame,
                               nsReflowReason aReason,
                               nsReflowStatus& aStatus);

  void CalculateChildBounds(nsIPresContext* aPresContext, nsRect& aChildBounds);

protected:
  nsFrameList mAbsoluteFrames;
};
# 28 "../../base/src/nsBlockFrame.h" 2

class nsBlockReflowState;
class nsBulletFrame;
class nsLineBox;
class nsFirstLineFrame;
class nsILineIterator;
# 48 "../../base/src/nsBlockFrame.h"
extern const nsIID kBlockFrameCID;
# 57 "../../base/src/nsBlockFrame.h"
class nsBlockFrame : public nsHTMLContainerFrame
{
public:
  friend nsresult NS_NewBlockFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame, PRUint32 aFlags);


  virtual nsresult QueryInterface(const nsIID& aIID, void** aInstancePtr);


  virtual nsresult Init(nsIPresContext* aPresContext,
                  nsIContent* aContent,
                  nsIFrame* aParent,
                  nsIStyleContext* aContext,
                  nsIFrame* aPrevInFlow);
  virtual nsresult SetInitialChildList(nsIPresContext* aPresContext,
                                 nsIAtom* aListName,
                                 nsIFrame* aChildList);
  virtual nsresult AppendFrames(nsIPresContext* aPresContext,
                           nsIPresShell& aPresShell,
                           nsIAtom* aListName,
                           nsIFrame* aFrameList);
  virtual nsresult InsertFrames(nsIPresContext* aPresContext,
                           nsIPresShell& aPresShell,
                           nsIAtom* aListName,
                           nsIFrame* aPrevFrame,
                           nsIFrame* aFrameList);
  virtual nsresult RemoveFrame(nsIPresContext* aPresContext,
                          nsIPresShell& aPresShell,
                          nsIAtom* aListName,
                          nsIFrame* aOldFrame);
  virtual nsresult FirstChild(nsIPresContext* aPresContext,
                        nsIAtom* aListName,
                        nsIFrame** aFirstChild) const;
  virtual nsresult GetAdditionalChildListName(PRInt32 aIndex,
                                        nsIAtom** aListName) const;
  virtual nsresult Destroy(nsIPresContext* aPresContext);
  virtual nsresult IsSplittable(nsSplittableType& aIsSplittable) const;
  virtual nsresult IsPercentageBase(PRBool& aBase) const;
  virtual nsresult Paint(nsIPresContext* aPresContext,
                   nsIRenderingContext& aRenderingContext,
                   const nsRect& aDirtyRect,
                   nsFramePaintLayer aWhichLayer);
  virtual nsresult GetFrameType(nsIAtom** aType) const;






  virtual nsresult GetFrameForPoint(nsIPresContext* aPresContext, const nsPoint& aPoint, nsFramePaintLayer aWhichLayer, nsIFrame** aFrame);
  virtual nsresult HandleEvent(nsIPresContext* aPresContext,
                         nsGUIEvent* aEvent,
                         nsEventStatus* aEventStatus);
  virtual nsresult ReflowDirtyChild(nsIPresShell* aPresShell, nsIFrame* aChild);

  virtual nsresult IsVisibleForPainting(nsIPresContext * aPresContext,
                                  nsIRenderingContext& aRenderingContext,
                                  PRBool aCheckVis,
                                  PRBool* aIsVisible);


  virtual nsresult Reflow(nsIPresContext* aPresContext,
                    nsHTMLReflowMetrics& aDesiredSize,
                    const nsHTMLReflowState& aReflowState,
                    nsReflowStatus& aStatus);

  virtual nsresult AttributeChanged(nsIPresContext* aPresContext,
                              nsIContent* aChild,
                              PRInt32 aNameSpaceID,
                              nsIAtom* aAttribute,
                              PRInt32 aHint);
# 144 "../../base/src/nsBlockFrame.h"
  virtual void DeleteChildsNextInFlow(nsIPresContext* aPresContext,
                                      nsIFrame* aNextInFlow);





  nsIFrame* GetTopBlockChild();




  nsresult UpdateSpaceManager(nsIPresContext* aPresContext,
                              nsISpaceManager* aSpaceManager);

  nsLineBox* FindLineFor(nsIFrame* aFrame, nsLineBox** aPrevLineResult,
                         PRBool* aIsFloaterResult);

  static nsresult GetCurrentLine(nsBlockReflowState *aState, nsLineBox **aOutCurrentLine);

  static void CombineRects(const nsRect& r1, nsRect& r2);

protected:
  nsBlockFrame();
  virtual ~nsBlockFrame();

  nsIStyleContext* GetFirstLetterStyle(nsIPresContext* aPresContext);







  nsresult GetClosestLine(nsILineIterator *aLI,
                             const nsPoint &aOrigin,
                             const nsPoint &aPoint,
                             PRInt32 &aClosestLine);

  void SetFlags(PRUint32 aFlags) {
    mState &= ~0xFFF00000;
    mState |= aFlags;
  }

  PRBool HaveOutsideBullet() const {





    return 0 != (mState & 0x40000000);
  }




  PRBool IsIncrementalDamageConstrained(const nsBlockReflowState& aState) const;




  void SlideLine(nsBlockReflowState& aState,
                 nsLineBox* aLine, nscoord aDY);





  PRBool DrainOverflowLines(nsIPresContext* aPresContext);

  virtual PRIntn GetSkipSides() const;

  virtual void ComputeFinalSize(const nsHTMLReflowState& aReflowState,
                                nsBlockReflowState& aState,
                                nsHTMLReflowMetrics& aMetrics);







  nsresult AddFrames(nsIPresContext* aPresContext,
                     nsIFrame* aFrameList,
                     nsIFrame* aPrevSibling);





  void FixParentAndView(nsIPresContext* aPresContext, nsIFrame* aFrame);






  nsresult DoRemoveFrame(nsIPresContext* aPresContext,
                         nsIFrame* aDeletedFrame);



  nsresult PrepareInitialReflow(nsBlockReflowState& aState);


  nsresult PrepareStyleChangedReflow(nsBlockReflowState& aState);




  nsresult PrepareChildIncrementalReflow(nsBlockReflowState& aState);




  nsresult PrepareResizeReflow(nsBlockReflowState& aState);


  nsresult ReflowDirtyLines(nsBlockReflowState& aState);


  void RecoverStateFrom(nsBlockReflowState& aState,
                        nsLineBox* aLine,
                        nsRect* aDamageRect);
# 280 "../../base/src/nsBlockFrame.h"
  nsresult ReflowLine(nsBlockReflowState& aState,
                      nsLineBox* aLine,
                      PRBool* aKeepReflowGoing,
                      PRBool aDamageDirtyArea = 0);

  nsresult PlaceLine(nsBlockReflowState& aState,
                     nsLineLayout& aLineLayout,
                     nsLineBox* aLine,
                     PRBool* aKeepReflowGoing,
                     PRBool aUpdateMaximumWidth);

  nsresult MarkLineDirty (nsLineBox* aLine,
                          nsLineBox* aPrevLine);


  void PostPlaceLine(nsBlockReflowState& aState,
                     nsLineBox* aLine,
                     const nsSize& aMaxElementSize);

  void ComputeLineMaxElementSize(nsBlockReflowState& aState,
                                 nsLineBox* aLine,
                                 nsSize* aMaxElementSize);


  PRBool ShouldJustifyLine(nsBlockReflowState& aState, nsLineBox* aLine);

  void DeleteLine(nsBlockReflowState& aState, nsLineBox* aLine);




  PRBool ShouldApplyTopMargin(nsBlockReflowState& aState,
                              nsLineBox* aLine);

  nsresult ReflowBlockFrame(nsBlockReflowState& aState,
                            nsLineBox* aLine,
                            PRBool* aKeepGoing);

  nsresult ReflowInlineFrames(nsBlockReflowState& aState,
                              nsLineBox* aLine,
                              PRBool* aKeepLineGoing,
                              PRBool aDamageDirtyArea,
                              PRBool aUpdateMaximumWidth = 0);

  nsresult DoReflowInlineFrames(nsBlockReflowState& aState,
                                nsLineLayout& aLineLayout,
                                nsLineBox* aLine,
                                PRBool* aKeepReflowGoing,
                                PRUint8* aLineReflowStatus,
                                PRBool aUpdateMaximumWidth,
                                PRBool aDamageDirtyArea);

  nsresult DoReflowInlineFramesAuto(nsBlockReflowState& aState,
                                    nsLineBox* aLine,
                                    PRBool* aKeepReflowGoing,
                                    PRUint8* aLineReflowStatus,
                                    PRBool aUpdateMaximumWidth,
                                    PRBool aDamageDirtyArea);

  nsresult DoReflowInlineFramesMalloc(nsBlockReflowState& aState,
                                      nsLineBox* aLine,
                                      PRBool* aKeepReflowGoing,
                                      PRUint8* aLineReflowStatus,
                                      PRBool aUpdateMaximumWidth,
                                      PRBool aDamageDirtyArea);

  nsresult ReflowInlineFrame(nsBlockReflowState& aState,
                             nsLineLayout& aLineLayout,
                             nsLineBox* aLine,
                             nsIFrame* aFrame,
                             PRUint8* aLineReflowStatus);

  nsresult ReflowFloater(nsBlockReflowState& aState,
                         nsPlaceholderFrame* aPlaceholder,
                         nsRect& aCombinedRectResult,
                         nsMargin& aMarginResult,
                         nsMargin& aComputedOffsetsResult,
                         nscoord& aMaxElementWidthResult);




  virtual nsresult CreateContinuationFor(nsBlockReflowState& aState,
                                         nsLineBox* aLine,
                                         nsIFrame* aFrame,
                                         PRBool& aMadeNewFrame);

  nsresult SplitLine(nsBlockReflowState& aState,
                     nsLineLayout& aLineLayout,
                     nsLineBox* aLine,
                     nsIFrame* aFrame);

  nsBlockFrame* FindFollowingBlockFrame(nsIFrame* aFrame);

  nsresult PullFrame(nsBlockReflowState& aState,
                     nsLineBox* aLine,
                     PRBool aDamageDeletedLine,
                     nsIFrame*& aFrameResult);

  nsresult PullFrame(nsBlockReflowState& aState,
                     nsLineBox* aToLine,
                     nsLineBox** aFromList,
                     PRBool aUpdateGeometricParent,
                     PRBool aDamageDeletedLines,
                     nsIFrame*& aFrameResult,
                     PRBool& aStopPulling);

  void PushLines(nsBlockReflowState& aState);



  virtual void PaintChildren(nsIPresContext* aPresContext,
                             nsIRenderingContext& aRenderingContext,
                             const nsRect& aDirtyRect,
                             nsFramePaintLayer aWhichLayer);

  void PaintFloaters(nsIPresContext* aPresContext,
                     nsIRenderingContext& aRenderingContext,
                     const nsRect& aDirtyRect);

  void PropagateReflowDamage(nsBlockReflowState& aState,
                             nsLineBox* aLine,
                             const nsRect& aOldCombinedArea,
                             nscoord aDeltaY);

  void BuildFloaterList();




  void RenumberLists(nsIPresContext* aPresContext);

  PRBool RenumberListsIn(nsIPresContext* aPresContext,
                         nsIFrame* aContainerFrame,
                         PRInt32* aOrdinal,
                         PRInt32 aDepth);

  PRBool RenumberListsInBlock(nsIPresContext* aPresContext,
                              nsBlockFrame* aContainerFrame,
                              PRInt32* aOrdinal,
                              PRInt32 aDepth);

  PRBool RenumberListsFor(nsIPresContext* aPresContext, nsIFrame* aKid, PRInt32* aOrdinal, PRInt32 aDepth);

  PRBool FrameStartsCounterScope(nsIFrame* aFrame);

  nsresult UpdateBulletPosition(nsBlockReflowState& aState);

  void ReflowBullet(nsBlockReflowState& aState,
                    nsHTMLReflowMetrics& aMetrics);



  nsLineBox* GetOverflowLines(nsIPresContext* aPresContext,
                              PRBool aRemoveProperty) const;

  nsresult SetOverflowLines(nsIPresContext* aPresContext,
                            nsLineBox* aOverflowFrames);

  nsIFrame* LastChild();
# 449 "../../base/src/nsBlockFrame.h"
  nscoord mAscent;

  nsLineBox* mLines;


  nsFrameList mFloaters;



  nsBulletFrame* mBullet;

  friend class nsBlockReflowState;

private:
  nsAbsoluteContainingBlock mAbsoluteContainer;
# 484 "../../base/src/nsBlockFrame.h"
};
# 27 "nsFormFrame.h" 2
# 1 "../../../../dist/include/nsVoidArray.h" 1
# 28 "nsFormFrame.h" 2
# 1 "../../../../dist/include/nsIFileSpec.h" 1
# 17 "../../../../dist/include/nsIFileSpec.h"
# 1 "../../../../dist/include/nsFileSpec.h" 1
# 131 "../../../../dist/include/nsFileSpec.h"
# 1 "../../../../dist/include/nscore.h" 1
# 132 "../../../../dist/include/nsFileSpec.h" 2
# 1 "../../../../dist/include/nsError.h" 1
# 133 "../../../../dist/include/nsFileSpec.h" 2
# 1 "../../../../dist/include/nsString.h" 1
# 134 "../../../../dist/include/nsFileSpec.h" 2
# 1 "../../../../dist/include/nsCRT.h" 1
# 135 "../../../../dist/include/nsFileSpec.h" 2
# 1 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prtypes.h" 1
# 136 "../../../../dist/include/nsFileSpec.h" 2
# 160 "../../../../dist/include/nsFileSpec.h"
# 1 "../../../../dist/include/nsILocalFile.h" 1
# 10 "../../../../dist/include/nsILocalFile.h"
# 1 "../../../../dist/include/nsIFile.h" 1
# 17 "../../../../dist/include/nsIFile.h"
class nsISimpleEnumerator;
# 27 "../../../../dist/include/nsIFile.h"
class nsIFile : public nsISupports {
 public:

  static const nsIID& GetIID() {static const nsIID iid = {0xc8c0a080, 0x0868, 0x11d3, { 0x91, 0x5f, 0xd9, 0xd8, 0x89, 0xd4, 0x8e, 0x3c }}; return iid;}







  enum { NORMAL_FILE_TYPE = 0U };

  enum { DIRECTORY_TYPE = 1U };
# 53 "../../../../dist/include/nsIFile.h"
  virtual nsresult Append(const char *node) = 0;


  virtual nsresult AppendUnicode(const PRUnichar *node) = 0;





  virtual nsresult Normalize(void) = 0;
# 85 "../../../../dist/include/nsIFile.h"
  virtual nsresult Create(PRUint32 type, PRUint32 permissions) = 0;





  virtual nsresult GetLeafName(char * *aLeafName) = 0;
  virtual nsresult SetLeafName(const char * aLeafName) = 0;


  virtual nsresult GetUnicodeLeafName(PRUnichar * *aUnicodeLeafName) = 0;
  virtual nsresult SetUnicodeLeafName(const PRUnichar * aUnicodeLeafName) = 0;
# 122 "../../../../dist/include/nsIFile.h"
  virtual nsresult CopyTo(nsIFile *newParentDir, const char *newName) = 0;


  virtual nsresult CopyToUnicode(nsIFile *newParentDir, const PRUnichar *newName) = 0;
# 136 "../../../../dist/include/nsIFile.h"
  virtual nsresult CopyToFollowingLinks(nsIFile *newParentDir, const char *newName) = 0;


  virtual nsresult CopyToFollowingLinksUnicode(nsIFile *newParentDir, const PRUnichar *newName) = 0;
# 167 "../../../../dist/include/nsIFile.h"
  virtual nsresult MoveTo(nsIFile *newParentDir, const char *newName) = 0;


  virtual nsresult MoveToUnicode(nsIFile *newParentDir, const PRUnichar *newName) = 0;







  virtual nsresult Spawn(const char **args, PRUint32 count) = 0;
# 187 "../../../../dist/include/nsIFile.h"
  virtual nsresult Delete(PRBool recursive) = 0;





  virtual nsresult GetPermissions(PRUint32 *aPermissions) = 0;
  virtual nsresult SetPermissions(PRUint32 aPermissions) = 0;


  virtual nsresult GetPermissionsOfLink(PRUint32 *aPermissionsOfLink) = 0;
  virtual nsresult SetPermissionsOfLink(PRUint32 aPermissionsOfLink) = 0;







  virtual nsresult GetLastModificationDate(PRInt64 *aLastModificationDate) = 0;
  virtual nsresult SetLastModificationDate(PRInt64 aLastModificationDate) = 0;


  virtual nsresult GetLastModificationDateOfLink(PRInt64 *aLastModificationDateOfLink) = 0;
  virtual nsresult SetLastModificationDateOfLink(PRInt64 aLastModificationDateOfLink) = 0;
# 220 "../../../../dist/include/nsIFile.h"
  virtual nsresult GetFileSize(PRInt64 *aFileSize) = 0;
  virtual nsresult SetFileSize(PRInt64 aFileSize) = 0;


  virtual nsresult GetFileSizeOfLink(PRInt64 *aFileSizeOfLink) = 0;
# 248 "../../../../dist/include/nsIFile.h"
  virtual nsresult GetTarget(char * *aTarget) = 0;


  virtual nsresult GetUnicodeTarget(PRUnichar * *aUnicodeTarget) = 0;


  virtual nsresult GetPath(char * *aPath) = 0;


  virtual nsresult GetUnicodePath(PRUnichar * *aUnicodePath) = 0;


  virtual nsresult Exists(PRBool *_retval) = 0;


  virtual nsresult IsWritable(PRBool *_retval) = 0;


  virtual nsresult IsReadable(PRBool *_retval) = 0;


  virtual nsresult IsExecutable(PRBool *_retval) = 0;


  virtual nsresult IsHidden(PRBool *_retval) = 0;


  virtual nsresult IsDirectory(PRBool *_retval) = 0;


  virtual nsresult IsFile(PRBool *_retval) = 0;


  virtual nsresult IsSymlink(PRBool *_retval) = 0;





  virtual nsresult IsSpecial(PRBool *_retval) = 0;
# 315 "../../../../dist/include/nsIFile.h"
  virtual nsresult CreateUnique(const char *suggestedName, PRUint32 type, PRUint32 permissions) = 0;
# 329 "../../../../dist/include/nsIFile.h"
  virtual nsresult Clone(nsIFile **_retval) = 0;





  virtual nsresult Equals(nsIFile *inFile, PRBool *_retval) = 0;






  virtual nsresult Contains(nsIFile *inFile, PRBool recur, PRBool *_retval) = 0;





  virtual nsresult GetParent(nsIFile * *aParent) = 0;
# 358 "../../../../dist/include/nsIFile.h"
  virtual nsresult GetDirectoryEntries(nsISimpleEnumerator * *aDirectoryEntries) = 0;






  virtual nsresult GetURL(char * *aURL) = 0;
  virtual nsresult SetURL(const char * aURL) = 0;

};
# 831 "../../../../dist/include/nsIFile.h"
# 1 "../../../../dist/include/nsIServiceManager.h" 1
# 27 "../../../../dist/include/nsIServiceManager.h"
# 1 "../../../../dist/include/nsIComponentManager.h" 1
# 28 "../../../../dist/include/nsIServiceManager.h" 2
# 1 "../../../../dist/include/nsID.h" 1
# 29 "../../../../dist/include/nsIServiceManager.h" 2





class nsIShutdownListener;
class nsIDirectoryServiceProvider;
# 87 "../../../../dist/include/nsIServiceManager.h"
class nsIServiceManager : public nsISupports {
public:

    static const nsIID& GetIID() {static const nsIID iid = { 0xcf0df3b0, 0x3401, 0x11d2, {0x81, 0x63, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} }; return iid;};







    virtual nsresult
    RegisterService(const nsCID& aClass, nsISupports* aService) = 0;
# 111 "../../../../dist/include/nsIServiceManager.h"
    virtual nsresult
    UnregisterService(const nsCID& aClass) = 0;

    virtual nsresult
    GetService(const nsCID& aClass, const nsIID& aIID,
               nsISupports* *result,
               nsIShutdownListener* shutdownListener = 0) = 0;


    virtual nsresult
    ReleaseService(const nsCID& aClass, nsISupports* service,
                   nsIShutdownListener* shutdownListener = 0) = 0;




    virtual nsresult
    RegisterService(const char* aContractID, nsISupports* aService) = 0;

    virtual nsresult
    UnregisterService(const char* aContractID) = 0;

    virtual nsresult
    GetService(const char* aContractID, const nsIID& aIID,
               nsISupports* *result,
               nsIShutdownListener* shutdownListener = 0) = 0;


    virtual nsresult
    ReleaseService(const char* aContractID, nsISupports* service,
                   nsIShutdownListener* shutdownListener = 0) = 0;

};
# 158 "../../../../dist/include/nsIServiceManager.h"
class nsIShutdownListener : public nsISupports {
public:

    static const nsIID& GetIID() {static const nsIID iid = { 0x56decae0, 0x3406, 0x11d2, {0x81, 0x63, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} }; return iid;};

    virtual nsresult
    OnShutdown(const nsCID& aClass, nsISupports* service) = 0;

};




class nsServiceManager {
public:

    static nsresult
    RegisterService(const nsCID& aClass, nsISupports* aService);

    static nsresult
    UnregisterService(const nsCID& aClass);

    static nsresult
    GetService(const nsCID& aClass, const nsIID& aIID,
               nsISupports* *result,
               nsIShutdownListener* shutdownListener = 0);


    static nsresult
    ReleaseService(const nsCID& aClass, nsISupports* service,
                   nsIShutdownListener* shutdownListener = 0);




    static nsresult
    RegisterService(const char* aContractID, nsISupports* aService);

    static nsresult
    UnregisterService(const char* aContractID);

    static nsresult
    GetService(const char* aContractID, const nsIID& aIID,
               nsISupports* *result,
               nsIShutdownListener* shutdownListener = 0);


    static nsresult
    ReleaseService(const char* aContractID, nsISupports* service,
                   nsIShutdownListener* shutdownListener = 0);



    static nsresult GetGlobalServiceManager(nsIServiceManager* *result);



    static nsresult ShutdownGlobalServiceManager(nsIServiceManager* *result);
};




class nsGetServiceByCID : public nsCOMPtr_helper
  {
    public:
      nsGetServiceByCID( const nsCID& aCID, nsISupports* aServiceManager, nsresult* aErrorPtr )
          : mCID(aCID),
            mServiceManager( do_QueryInterface(aServiceManager) ),
            mErrorPtr(aErrorPtr)
        {

        }

          virtual nsresult operator()( const nsIID&, void** ) const;
        virtual ~nsGetServiceByCID() {};

    private:
      const nsCID& mCID;
      nsCOMPtr<nsIServiceManager> mServiceManager;
      nsresult* mErrorPtr;
  };

inline
const nsGetServiceByCID
do_GetService( const nsCID& aCID, nsresult* error = 0 )
  {
    return nsGetServiceByCID(aCID, 0, error);
  }

inline
const nsGetServiceByCID
do_GetService( const nsCID& aCID, nsISupports* aServiceManager, nsresult* error = 0 )
  {
    return nsGetServiceByCID(aCID, aServiceManager, error);
  }

class nsGetServiceByContractID : public nsCOMPtr_helper
  {
    public:
      nsGetServiceByContractID( const char* aContractID, nsISupports* aServiceManager, nsresult* aErrorPtr )
          : mContractID(aContractID),
            mServiceManager( do_QueryInterface(aServiceManager) ),
            mErrorPtr(aErrorPtr)
        {

        }

          virtual nsresult operator()( const nsIID&, void** ) const;

        virtual ~nsGetServiceByContractID() {};

    private:
      const char* mContractID;
      nsCOMPtr<nsIServiceManager> mServiceManager;
      nsresult* mErrorPtr;
  };

inline
const nsGetServiceByContractID
do_GetService( const char* aContractID, nsresult* error = 0 )
  {
    return nsGetServiceByContractID(aContractID, 0, error);
  }

inline
const nsGetServiceByContractID
do_GetService( const char* aContractID, nsISupports* aServiceManager, nsresult* error = 0 )
  {
    return nsGetServiceByContractID(aContractID, aServiceManager, error);
  }

class nsGetServiceFromCategory : public nsCOMPtr_helper
{
public:
  nsGetServiceFromCategory(const char* aCategory, const char* aEntry,
                           nsISupports* aServiceManager,
                           nsresult* aErrorPtr)
    : mCategory(aCategory),
      mEntry(aEntry),
      mServiceManager( do_QueryInterface(aServiceManager) ),
      mErrorPtr(aErrorPtr)
  {

  }

  virtual nsresult operator()( const nsIID&, void** ) const;
  virtual ~nsGetServiceFromCategory() {};
protected:
  const char* mCategory;
  const char* mEntry;
  nsCOMPtr<nsIServiceManager> mServiceManager;
  nsresult* mErrorPtr;
};

inline
const nsGetServiceFromCategory
do_GetServiceFromCategory( const char* category, const char* entry,
                           nsresult* error = 0)
  {
    return nsGetServiceFromCategory(category, entry, 0, error);
  }
# 356 "../../../../dist/include/nsIServiceManager.h"
extern nsresult
NS_NewServiceManager(nsIServiceManager* *result);
# 369 "../../../../dist/include/nsIServiceManager.h"
extern nsresult
NS_InitXPCOM(nsIServiceManager* *result, nsIFile* binDirectory);




extern nsresult
NS_InitXPCOM2(nsIServiceManager* *result, nsIFile* binDirectory, nsIDirectoryServiceProvider* appFileLocationProvider);
# 386 "../../../../dist/include/nsIServiceManager.h"
extern nsresult
NS_ShutdownXPCOM(nsIServiceManager* servMgr);
# 832 "../../../../dist/include/nsIFile.h" 2
# 1 "../../../../dist/include/nsIProperties.h" 1
# 25 "../../../../dist/include/nsIProperties.h"
class nsIProperties : public nsISupports {
 public:

  static const nsIID& GetIID() {static const nsIID iid = {0x61c1b3c0, 0xb1bf, 0x11d3, { 0x93, 0xb6, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40 }}; return iid;}







  virtual nsresult Define(const char *prop, nsISupports *initialValue) = 0;







  virtual nsresult Undefine(const char *prop) = 0;







  virtual nsresult Get(const char *prop, const nsIID & uuid, void * *result) = 0;







  virtual nsresult Set(const char *prop, nsISupports *value) = 0;





  virtual nsresult Has(const char *prop, PRBool *_retval) = 0;

};
# 165 "../../../../dist/include/nsIProperties.h"
# 1 "../../../../dist/include/nsIComponentManager.h" 1
# 166 "../../../../dist/include/nsIProperties.h" 2
inline nsresult
NS_NewIProperties(nsISupports* outer, nsIProperties* *result)
{
    static const nsCID kPropertiesCID = { 0x4de2bc90, 0xb1bf, 0x11d3, {0x93, 0xb6, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40} };
    return nsComponentManager::CreateInstance(kPropertiesCID,
                                              outer,
                                              nsCOMTypeInfo<nsIProperties>::GetIID(),
                                              (void**)result);
}
# 833 "../../../../dist/include/nsIFile.h" 2
# 1 "../../../../dist/include/nsCOMPtr.h" 1
# 834 "../../../../dist/include/nsIFile.h" 2

inline nsresult
NS_GetSpecialDirectory(const char* specialDirName, nsIFile* *result)
{
    nsresult rv;
    static const nsCID kDirectoryServiceCID = {0xf00152d0,0xb40b,0x11d3,{0x8c, 0x9c, 0x00, 0x00, 0x64, 0x65, 0x73, 0x74}};
    nsCOMPtr<nsIProperties> serv = do_GetService(kDirectoryServiceCID, &rv);;
    if (((rv) & 0x80000000)) return rv;
    nsCOMPtr<nsISupports> dir;
    rv = serv->Get(specialDirName, nsCOMTypeInfo<nsIFile>::GetIID(), getter_AddRefs(dir));
    if (((rv) & 0x80000000)) return rv;
    *result = (nsIFile*)dir.get();
    if (*result)
        (*result)->AddRef();
    return 0;
}
# 11 "../../../../dist/include/nsILocalFile.h" 2






# 1 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h" 1
# 29 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
# 1 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prlong.h" 1
# 30 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h" 2
# 1 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prtime.h" 1
# 31 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h" 2
# 1 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prinrval.h" 1
# 32 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h" 2
# 1 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prinet.h" 1
# 48 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prinet.h"
# 1 "/usr/include/sys/types.h" 1 3
# 49 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prinet.h" 2
# 1 "/usr/include/sys/socket.h" 1 3
# 23 "/usr/include/sys/socket.h" 3
# 1 "/usr/include/features.h" 1 3
# 24 "/usr/include/sys/socket.h" 2 3

extern "C" {

# 1 "/usr/include/sys/uio.h" 1 3
# 22 "/usr/include/sys/uio.h" 3
# 1 "/usr/include/features.h" 1 3
# 23 "/usr/include/sys/uio.h" 2 3

# 1 "/usr/include/sys/types.h" 1 3
# 25 "/usr/include/sys/uio.h" 2 3

extern "C" {


# 1 "/usr/include/bits/uio.h" 1 3
# 24 "/usr/include/bits/uio.h" 3
# 1 "/usr/include/sys/types.h" 1 3
# 25 "/usr/include/bits/uio.h" 2 3
# 42 "/usr/include/bits/uio.h" 3
struct iovec
  {
    void *iov_base;
    size_t iov_len;
  };
# 30 "/usr/include/sys/uio.h" 2 3







extern ssize_t readv (int __fd, __const struct iovec *__vector, int __count)
     throw ();






extern ssize_t writev (int __fd, __const struct iovec *__vector, int __count)
     throw ();

}
# 28 "/usr/include/sys/socket.h" 2 3

# 1 "/usr/lib/gcc-lib/i386-linux/3.0/include/stddef.h" 1 3
# 30 "/usr/include/sys/socket.h" 2 3





# 1 "/usr/include/bits/socket.h" 1 3
# 29 "/usr/include/bits/socket.h" 3
# 1 "/usr/lib/gcc-lib/i386-linux/3.0/include/stddef.h" 1 3
# 30 "/usr/include/bits/socket.h" 2 3

# 1 "/usr/lib/gcc-lib/i386-linux/3.0/include/limits.h" 1 3
# 32 "/usr/include/bits/socket.h" 2 3
# 1 "/usr/include/sys/types.h" 1 3
# 33 "/usr/include/bits/socket.h" 2 3



typedef __socklen_t socklen_t;




enum __socket_type
{
  SOCK_STREAM = 1,


  SOCK_DGRAM = 2,


  SOCK_RAW = 3,

  SOCK_RDM = 4,

  SOCK_SEQPACKET = 5,


  SOCK_PACKET = 10



};
# 140 "/usr/include/bits/socket.h" 3
# 1 "/usr/include/bits/sockaddr.h" 1 3
# 29 "/usr/include/bits/sockaddr.h" 3
typedef unsigned short int sa_family_t;
# 141 "/usr/include/bits/socket.h" 2 3


struct sockaddr
  {
    sa_family_t sa_family;
    char sa_data[14];
  };
# 160 "/usr/include/bits/socket.h" 3
struct sockaddr_storage
  {
    sa_family_t ss_family;
    __uint32_t __ss_align;
    char __ss_padding[(128 - (2 * sizeof (__uint32_t)))];
  };



enum
  {
    MSG_OOB = 0x01,

    MSG_PEEK = 0x02,

    MSG_DONTROUTE = 0x04,



    MSG_TRYHARD = MSG_DONTROUTE,


    MSG_CTRUNC = 0x08,

    MSG_PROXY = 0x10,

    MSG_TRUNC = 0x20,

    MSG_DONTWAIT = 0x40,

    MSG_EOR = 0x80,

    MSG_WAITALL = 0x100,

    MSG_FIN = 0x200,

    MSG_SYN = 0x400,

    MSG_CONFIRM = 0x800,

    MSG_RST = 0x1000,

    MSG_ERRQUEUE = 0x2000,

    MSG_NOSIGNAL = 0x4000,

    MSG_MORE = 0x8000

  };




struct msghdr
  {
    void *msg_name;
    socklen_t msg_namelen;

    struct iovec *msg_iov;
    int msg_iovlen;

    void *msg_control;
    socklen_t msg_controllen;

    int msg_flags;
  };


struct cmsghdr
  {
    size_t cmsg_len;

    int cmsg_level;
    int cmsg_type;
    __extension__ unsigned char __cmsg_data [];

  };
# 254 "/usr/include/bits/socket.h" 3
extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
                                      struct cmsghdr *__cmsg) throw ();




extern __inline struct cmsghdr *
__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) throw ()
{
  if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))

    return 0;

  __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
                               + (((__cmsg->cmsg_len) + sizeof (size_t) - 1) & (size_t) ~(sizeof (size_t) - 1)));
  if ((unsigned char *) (__cmsg + 1) >= ((unsigned char *) __mhdr->msg_control
                                         + __mhdr->msg_controllen)
      || ((unsigned char *) __cmsg + (((__cmsg->cmsg_len) + sizeof (size_t) - 1) & (size_t) ~(sizeof (size_t) - 1))
          > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))

    return 0;
  return __cmsg;
}




enum
  {
    SCM_RIGHTS = 0x01,


    SCM_CREDENTIALS = 0x02,


    __SCM_CONNECT = 0x03
  };



struct ucred
{
  pid_t pid;
  uid_t uid;
  gid_t gid;
};


# 1 "/usr/include/asm/socket.h" 1 3



# 1 "/usr/include/asm/sockios.h" 1 3
# 5 "/usr/include/asm/socket.h" 2 3
# 303 "/usr/include/bits/socket.h" 2 3



struct linger
  {
    int l_onoff;
    int l_linger;
  };
# 36 "/usr/include/sys/socket.h" 2 3




struct osockaddr
  {
    unsigned short int sa_family;
    unsigned char sa_data[14];
  };




enum
{
  SHUT_RD = 0,

  SHUT_WR,

  SHUT_RDWR

};
# 100 "/usr/include/sys/socket.h" 3
extern int socket (int __domain, int __type, int __protocol) throw ();





extern int socketpair (int __domain, int __type, int __protocol,
                       int __fds[2]) throw ();


extern int bind (int __fd, __const struct sockaddr * __addr, socklen_t __len)
     throw ();


extern int getsockname (int __fd, struct sockaddr *__restrict __addr,
                        socklen_t *__restrict __len) throw ();





extern int connect (int __fd, __const struct sockaddr * __addr, socklen_t __len)
     throw ();



extern int getpeername (int __fd, struct sockaddr *__restrict __addr,
                        socklen_t *__restrict __len) throw ();



extern ssize_t send (int __fd, __const void *__buf, size_t __n, int __flags)
     throw ();



extern ssize_t recv (int __fd, void *__buf, size_t __n, int __flags)
     throw ();



extern ssize_t sendto (int __fd, __const void *__buf, size_t __n,
                       int __flags, __const struct sockaddr * __addr,
                       socklen_t __addr_len) throw ();





extern ssize_t recvfrom (int __fd, void *__restrict __buf, size_t __n, int __flags,
                         struct sockaddr *__restrict __addr, socklen_t *__restrict __addr_len)
     throw ();




extern ssize_t sendmsg (int __fd, __const struct msghdr *__message, int __flags)
     throw ();



extern ssize_t recvmsg (int __fd, struct msghdr *__message, int __flags)
     throw ();





extern int getsockopt (int __fd, int __level, int __optname,
                       void *__restrict __optval,
                       socklen_t *__restrict __optlen) throw ();




extern int setsockopt (int __fd, int __level, int __optname,
                       __const void *__optval, socklen_t __optlen) throw ();





extern int listen (int __fd, int __n) throw ();






extern int accept (int __fd, struct sockaddr *__restrict __addr,
                   socklen_t *__restrict __addr_len)
     throw ();







extern int shutdown (int __fd, int __how) throw ();




extern int sockatmark (int __fd) throw ();







extern int isfdtype (int __fd, int __fdtype) throw ();


}
# 50 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prinet.h" 2
# 1 "/usr/include/netinet/in.h" 1 3
# 22 "/usr/include/netinet/in.h" 3
# 1 "/usr/include/features.h" 1 3
# 23 "/usr/include/netinet/in.h" 2 3
# 1 "/usr/include/stdint.h" 1 3
# 26 "/usr/include/stdint.h" 3
# 1 "/usr/include/features.h" 1 3
# 27 "/usr/include/stdint.h" 2 3

# 1 "/usr/lib/gcc-lib/i386-linux/3.0/include/stddef.h" 1 3
# 29 "/usr/include/stdint.h" 2 3
# 1 "/usr/include/bits/wchar.h" 1 3
# 30 "/usr/include/stdint.h" 2 3
# 1 "/usr/include/bits/wordsize.h" 1 3
# 31 "/usr/include/stdint.h" 2 3
# 51 "/usr/include/stdint.h" 3
typedef unsigned char uint8_t;
typedef unsigned short int uint16_t;

typedef unsigned int uint32_t;





__extension__
typedef unsigned long long int uint64_t;






typedef signed char int_least8_t;
typedef short int int_least16_t;
typedef int int_least32_t;



__extension__
typedef long long int int_least64_t;



typedef unsigned char uint_least8_t;
typedef unsigned short int uint_least16_t;
typedef unsigned int uint_least32_t;



__extension__
typedef unsigned long long int uint_least64_t;






typedef signed char int_fast8_t;





typedef int int_fast16_t;
typedef int int_fast32_t;
__extension__
typedef long long int int_fast64_t;



typedef unsigned char uint_fast8_t;





typedef unsigned int uint_fast16_t;
typedef unsigned int uint_fast32_t;
__extension__
typedef unsigned long long int uint_fast64_t;
# 128 "/usr/include/stdint.h" 3
typedef int intptr_t;


typedef unsigned int uintptr_t;
# 140 "/usr/include/stdint.h" 3
__extension__
typedef long long int intmax_t;
__extension__
typedef unsigned long long int uintmax_t;
# 24 "/usr/include/netinet/in.h" 2 3
# 1 "/usr/include/bits/types.h" 1 3
# 25 "/usr/include/netinet/in.h" 2 3


extern "C" {


enum
  {
    IPPROTO_IP = 0,

    IPPROTO_HOPOPTS = 0,

    IPPROTO_ICMP = 1,

    IPPROTO_IGMP = 2,

    IPPROTO_IPIP = 4,

    IPPROTO_TCP = 6,

    IPPROTO_EGP = 8,

    IPPROTO_PUP = 12,

    IPPROTO_UDP = 17,

    IPPROTO_IDP = 22,

    IPPROTO_TP = 29,

    IPPROTO_IPV6 = 41,

    IPPROTO_ROUTING = 43,

    IPPROTO_FRAGMENT = 44,

    IPPROTO_RSVP = 46,

    IPPROTO_GRE = 47,

    IPPROTO_ESP = 50,

    IPPROTO_AH = 51,

    IPPROTO_ICMPV6 = 58,

    IPPROTO_NONE = 59,

    IPPROTO_DSTOPTS = 60,

    IPPROTO_MTP = 92,

    IPPROTO_ENCAP = 98,

    IPPROTO_PIM = 103,

    IPPROTO_COMP = 108,

    IPPROTO_RAW = 255,

    IPPROTO_MAX
  };



typedef uint16_t in_port_t;


enum
  {
    IPPORT_ECHO = 7,
    IPPORT_DISCARD = 9,
    IPPORT_SYSTAT = 11,
    IPPORT_DAYTIME = 13,
    IPPORT_NETSTAT = 15,
    IPPORT_FTP = 21,
    IPPORT_TELNET = 23,
    IPPORT_SMTP = 25,
    IPPORT_TIMESERVER = 37,
    IPPORT_NAMESERVER = 42,
    IPPORT_WHOIS = 43,
    IPPORT_MTP = 57,

    IPPORT_TFTP = 69,
    IPPORT_RJE = 77,
    IPPORT_FINGER = 79,
    IPPORT_TTYLINK = 87,
    IPPORT_SUPDUP = 95,


    IPPORT_EXECSERVER = 512,
    IPPORT_LOGINSERVER = 513,
    IPPORT_CMDSERVER = 514,
    IPPORT_EFSSERVER = 520,


    IPPORT_BIFFUDP = 512,
    IPPORT_WHOSERVER = 513,
    IPPORT_ROUTESERVER = 520,


    IPPORT_RESERVED = 1024,


    IPPORT_USERRESERVED = 5000
  };



typedef uint32_t in_addr_t;
struct in_addr
  {
    in_addr_t s_addr;
  };
# 190 "/usr/include/netinet/in.h" 3
struct in6_addr
  {
    union
      {
        uint8_t u6_addr8[16];
        uint16_t u6_addr16[8];
        uint32_t u6_addr32[4];
      } in6_u;



  };

extern const struct in6_addr in6addr_any;
extern const struct in6_addr in6addr_loopback;







# 1 "/usr/include/bits/socket.h" 1 3
# 213 "/usr/include/netinet/in.h" 2 3



struct sockaddr_in
  {
    sa_family_t sin_family;
    in_port_t sin_port;
    struct in_addr sin_addr;


    unsigned char sin_zero[sizeof (struct sockaddr) -
                           (sizeof (unsigned short int)) -
                           sizeof (in_port_t) -
                           sizeof (struct in_addr)];
  };


struct sockaddr_in6
  {
    sa_family_t sin6_family;
    in_port_t sin6_port;
    uint32_t sin6_flowinfo;
    struct in6_addr sin6_addr;
    uint32_t sin6_scope_id;
  };


struct ipv6_mreq
  {

    struct in6_addr ipv6mr_multiaddr;


    unsigned int ipv6mr_interface;
  };


# 1 "/usr/include/bits/in.h" 1 3
# 66 "/usr/include/bits/in.h" 3
struct ip_opts
  {
    struct in_addr ip_dst;
    char ip_opts[40];
  };


struct ip_mreq
  {
    struct in_addr imr_multiaddr;
    struct in_addr imr_interface;
  };


struct ip_mreqn
  {
    struct in_addr imr_multiaddr;
    struct in_addr imr_address;
    int imr_ifindex;
  };


struct in_pktinfo
  {
    int ipi_ifindex;
    struct in_addr ipi_spec_dst;
    struct in_addr ipi_addr;
  };
# 251 "/usr/include/netinet/in.h" 2 3
# 259 "/usr/include/netinet/in.h" 3
extern uint32_t ntohl (uint32_t __netlong) throw () __attribute__ ((__const__));
extern uint16_t ntohs (uint16_t __netshort)
     throw () __attribute__ ((__const__));
extern uint32_t htonl (uint32_t __hostlong)
     throw () __attribute__ ((__const__));
extern uint16_t htons (uint16_t __hostshort)
     throw () __attribute__ ((__const__));

# 1 "/usr/include/endian.h" 1 3
# 268 "/usr/include/netinet/in.h" 2 3


# 1 "/usr/include/bits/byteswap.h" 1 3
# 271 "/usr/include/netinet/in.h" 2 3
# 333 "/usr/include/netinet/in.h" 3
extern int bindresvport (int __sockfd, struct sockaddr_in *__sock_in) throw ();


extern int bindresvport6 (int __sockfd, struct sockaddr_in6 *__sock_in)
     throw ();
# 361 "/usr/include/netinet/in.h" 3
struct in6_pktinfo
  {
    struct in6_addr ipi6_addr;
    unsigned int ipi6_ifindex;
  };

}
# 51 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prinet.h" 2
# 65 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prinet.h"
# 1 "/usr/include/arpa/inet.h" 1 3
# 22 "/usr/include/arpa/inet.h" 3
# 1 "/usr/include/features.h" 1 3
# 23 "/usr/include/arpa/inet.h" 2 3
# 1 "/usr/include/netinet/in.h" 1 3
# 24 "/usr/include/arpa/inet.h" 2 3







extern "C" {



extern in_addr_t inet_addr (__const char *__cp) throw ();


extern in_addr_t inet_lnaof (struct in_addr __in) throw ();



extern struct in_addr inet_makeaddr (in_addr_t __net, in_addr_t __host)
     throw ();


extern in_addr_t inet_netof (struct in_addr __in) throw ();



extern in_addr_t inet_network (__const char *__cp) throw ();



extern char *inet_ntoa (struct in_addr __in) throw ();




extern int inet_pton (int __af, __const char *__restrict __cp,
                      void *__restrict __buf) throw ();




extern __const char *inet_ntop (int __af, __const void *__restrict __cp,
                                char *__restrict __buf, socklen_t __len)
     throw ();






extern in_addr_t inet_aton (__const char *__cp, struct in_addr *__inp) throw ();



extern char *inet_neta (in_addr_t __net, char *__buf, size_t __len) throw ();




extern char *inet_net_ntop (int __af, __const void *__cp, int __bits,
                            char *__buf, size_t __len) throw ();




extern int inet_net_pton (int __af, __const char *__cp,
                          void *__buf, size_t __len) throw ();




extern unsigned int inet_nsap_addr (__const char *__cp,
                                    unsigned char *__buf, int __len) throw ();



extern char *inet_nsap_ntoa (int __len, __const unsigned char *__cp,
                             char *__buf) throw ();


}
# 66 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prinet.h" 2

# 1 "/usr/include/netdb.h" 1 3
# 26 "/usr/include/netdb.h" 3
# 1 "/usr/include/features.h" 1 3
# 27 "/usr/include/netdb.h" 2 3

# 1 "/usr/include/netinet/in.h" 1 3
# 29 "/usr/include/netdb.h" 2 3
# 1 "/usr/include/stdint.h" 1 3
# 30 "/usr/include/netdb.h" 2 3



# 1 "/usr/include/rpc/netdb.h" 1 3
# 39 "/usr/include/rpc/netdb.h" 3
# 1 "/usr/include/features.h" 1 3
# 40 "/usr/include/rpc/netdb.h" 2 3


# 1 "/usr/lib/gcc-lib/i386-linux/3.0/include/stddef.h" 1 3
# 43 "/usr/include/rpc/netdb.h" 2 3

extern "C" {

struct rpcent
{
  char *r_name;
  char **r_aliases;
  int r_number;
};

extern void setrpcent (int __stayopen) throw ();
extern void endrpcent (void) throw ();
extern struct rpcent *getrpcbyname (__const char *__name) throw ();
extern struct rpcent *getrpcbynumber (int __number) throw ();
extern struct rpcent *getrpcent (void) throw ();


extern int getrpcbyname_r (__const char *__name, struct rpcent *__result_buf,
                           char *__buffer, size_t __buflen,
                           struct rpcent **__result) throw ();

extern int getrpcbynumber_r (int __number, struct rpcent *__result_buf,
                             char *__buffer, size_t __buflen,
                             struct rpcent **__result) throw ();

extern int getrpcent_r (struct rpcent *__result_buf, char *__buffer,
                        size_t __buflen, struct rpcent **__result) throw ();


}
# 34 "/usr/include/netdb.h" 2 3




# 1 "/usr/include/bits/siginfo.h" 1 3
# 25 "/usr/include/bits/siginfo.h" 3
# 1 "/usr/include/bits/wordsize.h" 1 3
# 26 "/usr/include/bits/siginfo.h" 2 3







typedef union sigval
  {
    int sival_int;
    void *sival_ptr;
  } sigval_t;
# 271 "/usr/include/bits/siginfo.h" 3
struct __pthread_attr_s;

typedef struct sigevent
  {
    sigval_t sigev_value;
    int sigev_signo;
    int sigev_notify;

    union
      {
        int _pad[((64 / sizeof (int)) - 3)];

        struct
          {
            void (*_function) (sigval_t);
            struct __pthread_attr_s *_attribute;
          } _sigev_thread;
      } _sigev_un;
  } sigevent_t;






enum
{
  SIGEV_SIGNAL = 0,

  SIGEV_NONE,

  SIGEV_THREAD

};
# 39 "/usr/include/netdb.h" 2 3

# 1 "/usr/include/time.h" 1 3
# 41 "/usr/include/netdb.h" 2 3


# 1 "/usr/include/bits/netdb.h" 1 3
# 27 "/usr/include/bits/netdb.h" 3
struct netent
{
  char *n_name;
  char **n_aliases;
  int n_addrtype;
  uint32_t n_net;
};
# 44 "/usr/include/netdb.h" 2 3
# 54 "/usr/include/netdb.h" 3
extern "C" {


extern int h_errno;


extern int *__h_errno_location (void) throw () __attribute__ ((__const__));
# 105 "/usr/include/netdb.h" 3
extern void herror (__const char *__str) throw ();


extern __const char *hstrerror (int __err_num) throw ();




struct hostent
{
  char *h_name;
  char **h_aliases;
  int h_addrtype;
  int h_length;
  char **h_addr_list;

};



extern void sethostent (int __stay_open) throw ();


extern void endhostent (void) throw ();



extern struct hostent *gethostent (void) throw ();



extern struct hostent *gethostbyaddr (__const void *__addr, __socklen_t __len,
                                      int __type) throw ();


extern struct hostent *gethostbyname (__const char *__name) throw ();





extern struct hostent *gethostbyname2 (__const char *__name, int __af) throw ();






extern int gethostent_r (struct hostent *__restrict __result_buf,
                         char *__restrict __buf, size_t __buflen,
                         struct hostent **__restrict __result,
                         int *__restrict __h_errnop) throw ();

extern int gethostbyaddr_r (__const void *__restrict __addr, __socklen_t __len,
                            int __type,
                            struct hostent *__restrict __result_buf,
                            char *__restrict __buf, size_t __buflen,
                            struct hostent **__restrict __result,
                            int *__restrict __h_errnop) throw ();

extern int gethostbyname_r (__const char *__restrict __name,
                            struct hostent *__restrict __result_buf,
                            char *__restrict __buf, size_t __buflen,
                            struct hostent **__restrict __result,
                            int *__restrict __h_errnop) throw ();

extern int gethostbyname2_r (__const char *__restrict __name, int __af,
                             struct hostent *__restrict __result_buf,
                             char *__restrict __buf, size_t __buflen,
                             struct hostent **__restrict __result,
                             int *__restrict __h_errnop) throw ();





extern void setnetent (int __stay_open) throw ();


extern void endnetent (void) throw ();



extern struct netent *getnetent (void) throw ();



extern struct netent *getnetbyaddr (uint32_t __net, int __type)
     throw ();


extern struct netent *getnetbyname (__const char *__name) throw ();







extern int getnetent_r (struct netent *__restrict __result_buf,
                        char *__restrict __buf, size_t __buflen,
                        struct netent **__restrict __result,
                        int *__restrict __h_errnop) throw ();

extern int getnetbyaddr_r (uint32_t __net, int __type,
                           struct netent *__restrict __result_buf,
                           char *__restrict __buf, size_t __buflen,
                           struct netent **__restrict __result,
                           int *__restrict __h_errnop) throw ();

extern int getnetbyname_r (__const char *__restrict __name,
                           struct netent *__restrict __result_buf,
                           char *__restrict __buf, size_t __buflen,
                           struct netent **__restrict __result,
                           int *__restrict __h_errnop) throw ();




struct servent
{
  char *s_name;
  char **s_aliases;
  int s_port;
  char *s_proto;
};



extern void setservent (int __stay_open) throw ();


extern void endservent (void) throw ();



extern struct servent *getservent (void) throw ();



extern struct servent *getservbyname (__const char *__name,
                                      __const char *__proto) throw ();



extern struct servent *getservbyport (int __port, __const char *__proto)
     throw ();





extern int getservent_r (struct servent *__restrict __result_buf,
                         char *__restrict __buf, size_t __buflen,
                         struct servent **__restrict __result) throw ();

extern int getservbyname_r (__const char *__restrict __name,
                            __const char *__restrict __proto,
                            struct servent *__restrict __result_buf,
                            char *__restrict __buf, size_t __buflen,
                            struct servent **__restrict __result) throw ();

extern int getservbyport_r (int __port, __const char *__restrict __proto,
                            struct servent *__restrict __result_buf,
                            char *__restrict __buf, size_t __buflen,
                            struct servent **__restrict __result) throw ();




struct protoent
{
  char *p_name;
  char **p_aliases;
  int p_proto;
};



extern void setprotoent (int __stay_open) throw ();


extern void endprotoent (void) throw ();



extern struct protoent *getprotoent (void) throw ();


extern struct protoent *getprotobyname (__const char *__name) throw ();


extern struct protoent *getprotobynumber (int __proto) throw ();





extern int getprotoent_r (struct protoent *__restrict __result_buf,
                          char *__restrict __buf, size_t __buflen,
                          struct protoent **__restrict __result) throw ();

extern int getprotobyname_r (__const char *__restrict __name,
                             struct protoent *__restrict __result_buf,
                             char *__restrict __buf, size_t __buflen,
                             struct protoent **__restrict __result) throw ();

extern int getprotobynumber_r (int __proto,
                               struct protoent *__restrict __result_buf,
                               char *__restrict __buf, size_t __buflen,
                               struct protoent **__restrict __result) throw ();




extern int setnetgrent (__const char *__netgroup) throw ();


extern void endnetgrent (void) throw ();



extern int getnetgrent (char **__restrict __hostp,
                        char **__restrict __userp,
                        char **__restrict __domainp) throw ();



extern int innetgr (__const char *__netgroup, __const char *__host,
                    __const char *__user, __const char *domain) throw ();


extern int getnetgrent_r (char **__restrict __hostp,
                          char **__restrict __userp,
                          char **__restrict __domainp,
                          char *__restrict __buffer, size_t __buflen) throw ();
# 351 "/usr/include/netdb.h" 3
extern int rcmd (char **__restrict __ahost, unsigned short int __rport,
                 __const char *__restrict __locuser,
                 __const char *__restrict __remuser,
                 __const char *__restrict __cmd, int *__restrict __fd2p)
     throw ();



extern int rcmd_af (char **__restrict __ahost, unsigned short int __rport,
                    __const char *__restrict __locuser,
                    __const char *__restrict __remuser,
                    __const char *__restrict __cmd, int *__restrict __fd2p,
                    sa_family_t __af) throw ();






extern int rexec (char **__restrict __ahost, int __rport,
                  __const char *__restrict __name,
                  __const char *__restrict __pass,
                  __const char *__restrict __cmd, int *__restrict __fd2p)
     throw ();



extern int rexec_af (char **__restrict __ahost, int __rport,
                     __const char *__restrict __name,
                     __const char *__restrict __pass,
                     __const char *__restrict __cmd, int *__restrict __fd2p,
                     sa_family_t __af) throw ();




extern int ruserok (__const char *__rhost, int __suser,
                    __const char *__remuser, __const char *__locuser) throw ();



extern int ruserok_af (__const char *__rhost, int __suser,
                       __const char *__remuser, __const char *__locuser,
                       sa_family_t __af) throw ();




extern int rresvport (int *__alport) throw ();



extern int rresvport_af (int *__alport, sa_family_t __af) throw ();






struct addrinfo
{
  int ai_flags;
  int ai_family;
  int ai_socktype;
  int ai_protocol;
  socklen_t ai_addrlen;
  struct sockaddr *ai_addr;
  char *ai_canonname;
  struct addrinfo *ai_next;
};



struct gaicb
{
  const char *ar_name;
  const char *ar_service;
  const struct addrinfo *ar_request;
  struct addrinfo *ar_result;

  int __return;
  int __unused[5];
};
# 476 "/usr/include/netdb.h" 3
extern int getaddrinfo (__const char *__restrict __name,
                        __const char *__restrict __service,
                        __const struct addrinfo *__restrict __req,
                        struct addrinfo **__restrict __pai) throw ();


extern void freeaddrinfo (struct addrinfo *__ai) throw ();


extern __const char *gai_strerror (int __ecode) throw ();


extern int getnameinfo (__const struct sockaddr *__restrict __sa,
                        socklen_t __salen, char *__restrict __host,
                        socklen_t __hostlen, char *__restrict __serv,
                        socklen_t __servlen, unsigned int __flags) throw ();





extern int getaddrinfo_a (int __mode, struct gaicb *__list[],
                          int __ent, struct sigevent *__restrict __sig)
     throw ();




extern int gai_suspend (__const struct gaicb *__const __list[], int __ent,
                        __const struct timespec *__timeout) throw ();


extern int gai_error (struct gaicb *__req) throw ();


extern int gai_cancel (struct gaicb *__gaicbp) throw ();



}
# 68 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prinet.h" 2
# 33 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h" 2

extern "C" {


typedef struct PRDir PRDir;
typedef struct PRDirEntry PRDirEntry;
typedef struct PRFileDesc PRFileDesc;
typedef struct PRFileInfo PRFileInfo;
typedef struct PRFileInfo64 PRFileInfo64;
typedef union PRNetAddr PRNetAddr;
typedef struct PRIOMethods PRIOMethods;
typedef struct PRPollDesc PRPollDesc;
typedef struct PRFilePrivate PRFilePrivate;
typedef struct PRSendFileData PRSendFileData;
# 59 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
typedef PRIntn PRDescIdentity;

struct PRFileDesc {
    const PRIOMethods *methods;
    PRFilePrivate *secret;
    PRFileDesc *lower, *higher;
    void ( *dtor)(PRFileDesc *fd);

    PRDescIdentity identity;
};
# 79 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
typedef enum PRTransmitFileFlags {
    PR_TRANSMITFILE_KEEP_OPEN = 0,

    PR_TRANSMITFILE_CLOSE_SOCKET = 1

} PRTransmitFileFlags;
# 132 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
struct PRIPv6Addr {
        union {
                PRUint8 _S6_u8[16];
                PRUint16 _S6_u16[8];
                PRUint32 _S6_u32[4];
                PRUint64 _S6_u64[2];
        } _S6_un;
};





typedef struct PRIPv6Addr PRIPv6Addr;

union PRNetAddr {
    struct {
        PRUint16 family;



        char data[14];

    } raw;
    struct {
        PRUint16 family;
        PRUint16 port;
        PRUint32 ip;



        char pad[8];

    } inet;
    struct {
        PRUint16 family;
        PRUint16 port;
        PRUint32 flowinfo;
        PRIPv6Addr ip;
        PRUint32 scope_id;
    } ipv6;

    struct {
        PRUint16 family;
        char path[104];
    } local;

};
# 190 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
typedef enum PRSockOption
{
    PR_SockOpt_Nonblocking,
    PR_SockOpt_Linger,
    PR_SockOpt_Reuseaddr,
    PR_SockOpt_Keepalive,
    PR_SockOpt_RecvBufferSize,
    PR_SockOpt_SendBufferSize,

    PR_SockOpt_IpTimeToLive,
    PR_SockOpt_IpTypeOfService,

    PR_SockOpt_AddMember,
    PR_SockOpt_DropMember,
    PR_SockOpt_McastInterface,
    PR_SockOpt_McastTimeToLive,
    PR_SockOpt_McastLoopback,

    PR_SockOpt_NoDelay,
    PR_SockOpt_MaxSegment,
    PR_SockOpt_Broadcast,
    PR_SockOpt_Last
} PRSockOption;

typedef struct PRLinger {
        PRBool polarity;
        PRIntervalTime linger;
} PRLinger;

typedef struct PRMcastRequest {
        PRNetAddr mcaddr;
        PRNetAddr ifaddr;
} PRMcastRequest;

typedef struct PRSocketOptionData
{
    PRSockOption option;
    union
    {
        PRUintn ip_ttl;
        PRUintn mcast_ttl;
        PRUintn tos;
        PRBool non_blocking;
        PRBool reuse_addr;
        PRBool keep_alive;
        PRBool mcast_loopback;
        PRBool no_delay;
        PRBool broadcast;
        PRSize max_segment;
        PRSize recv_buffer_size;
        PRSize send_buffer_size;
        PRLinger linger;
        PRMcastRequest add_member;
        PRMcastRequest drop_member;
        PRNetAddr mcast_if;
    } value;
} PRSocketOptionData;
# 256 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
typedef struct PRIOVec {
    char *iov_base;
    int iov_len;
} PRIOVec;






typedef enum PRDescType
{
    PR_DESC_FILE = 1,
    PR_DESC_SOCKET_TCP = 2,
    PR_DESC_SOCKET_UDP = 3,
    PR_DESC_LAYERED = 4,
    PR_DESC_PIPE = 5
} PRDescType;

typedef enum PRSeekWhence {
    PR_SEEK_SET = 0,
    PR_SEEK_CUR = 1,
    PR_SEEK_END = 2
} PRSeekWhence;

extern PRDescType PR_GetDescType(PRFileDesc *file);
# 299 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
typedef PRStatus ( *PRCloseFN)(PRFileDesc *fd);
typedef PRInt32 ( *PRReadFN)(PRFileDesc *fd, void *buf, PRInt32 amount);
typedef PRInt32 ( *PRWriteFN)(PRFileDesc *fd, const void *buf, PRInt32 amount);
typedef PRInt32 ( *PRAvailableFN)(PRFileDesc *fd);
typedef PRInt64 ( *PRAvailable64FN)(PRFileDesc *fd);
typedef PRStatus ( *PRFsyncFN)(PRFileDesc *fd);
typedef PROffset32 ( *PRSeekFN)(PRFileDesc *fd, PROffset32 offset, PRSeekWhence how);
typedef PROffset64 ( *PRSeek64FN)(PRFileDesc *fd, PROffset64 offset, PRSeekWhence how);
typedef PRStatus ( *PRFileInfoFN)(PRFileDesc *fd, PRFileInfo *info);
typedef PRStatus ( *PRFileInfo64FN)(PRFileDesc *fd, PRFileInfo64 *info);
typedef PRInt32 ( *PRWritevFN)(
    PRFileDesc *fd, const PRIOVec *iov, PRInt32 iov_size,
    PRIntervalTime timeout);
typedef PRStatus ( *PRConnectFN)(
    PRFileDesc *fd, const PRNetAddr *addr, PRIntervalTime timeout);
typedef PRFileDesc* ( *PRAcceptFN) (
    PRFileDesc *fd, PRNetAddr *addr, PRIntervalTime timeout);
typedef PRStatus ( *PRBindFN)(PRFileDesc *fd, const PRNetAddr *addr);
typedef PRStatus ( *PRListenFN)(PRFileDesc *fd, PRIntn backlog);
typedef PRStatus ( *PRShutdownFN)(PRFileDesc *fd, PRIntn how);
typedef PRInt32 ( *PRRecvFN)(
    PRFileDesc *fd, void *buf, PRInt32 amount,
    PRIntn flags, PRIntervalTime timeout);
typedef PRInt32 ( *PRSendFN) (
    PRFileDesc *fd, const void *buf, PRInt32 amount,
    PRIntn flags, PRIntervalTime timeout);
typedef PRInt32 ( *PRRecvfromFN)(
    PRFileDesc *fd, void *buf, PRInt32 amount,
    PRIntn flags, PRNetAddr *addr, PRIntervalTime timeout);
typedef PRInt32 ( *PRSendtoFN)(
    PRFileDesc *fd, const void *buf, PRInt32 amount,
    PRIntn flags, const PRNetAddr *addr, PRIntervalTime timeout);
typedef PRInt16 ( *PRPollFN)(
    PRFileDesc *fd, PRInt16 in_flags, PRInt16 *out_flags);
typedef PRInt32 ( *PRAcceptreadFN)(
    PRFileDesc *sd, PRFileDesc **nd, PRNetAddr **raddr,
    void *buf, PRInt32 amount, PRIntervalTime t);
typedef PRInt32 ( *PRTransmitfileFN)(
     PRFileDesc *sd, PRFileDesc *fd, const void *headers,
     PRInt32 hlen, PRTransmitFileFlags flags, PRIntervalTime t);
typedef PRStatus ( *PRGetsocknameFN)(PRFileDesc *fd, PRNetAddr *addr);
typedef PRStatus ( *PRGetpeernameFN)(PRFileDesc *fd, PRNetAddr *addr);
typedef PRStatus ( *PRGetsocketoptionFN)(
    PRFileDesc *fd, PRSocketOptionData *data);
typedef PRStatus ( *PRSetsocketoptionFN)(
    PRFileDesc *fd, const PRSocketOptionData *data);
typedef PRInt32 ( *PRSendfileFN)(
        PRFileDesc *networkSocket, PRSendFileData *sendData,
        PRTransmitFileFlags flags, PRIntervalTime timeout);
typedef PRIntn ( *PRReservedFN)(PRFileDesc *fd);

struct PRIOMethods {
    PRDescType file_type;
    PRCloseFN close;
    PRReadFN read;
    PRWriteFN write;
    PRAvailableFN available;
    PRAvailable64FN available64;
    PRFsyncFN fsync;
    PRSeekFN seek;
    PRSeek64FN seek64;
    PRFileInfoFN fileInfo;
    PRFileInfo64FN fileInfo64;
    PRWritevFN writev;
    PRConnectFN connect;
    PRAcceptFN accept;
    PRBindFN bind;
    PRListenFN listen;
    PRShutdownFN shutdown;
    PRRecvFN recv;
    PRSendFN send;
    PRRecvfromFN recvfrom;
    PRSendtoFN sendto;
    PRPollFN poll;
    PRAcceptreadFN acceptread;
    PRTransmitfileFN transmitfile;
    PRGetsocknameFN getsockname;
    PRGetpeernameFN getpeername;
    PRReservedFN reserved_fn_6;
    PRReservedFN reserved_fn_5;
    PRGetsocketoptionFN getsocketoption;

    PRSetsocketoptionFN setsocketoption;

    PRSendfileFN sendfile;
    PRReservedFN reserved_fn_4;
    PRReservedFN reserved_fn_3;
    PRReservedFN reserved_fn_2;
    PRReservedFN reserved_fn_1;
    PRReservedFN reserved_fn_0;
};
# 410 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
typedef enum PRSpecialFD
{
    PR_StandardInput,
    PR_StandardOutput,
    PR_StandardError
} PRSpecialFD;

extern PRFileDesc* PR_GetSpecialFD(PRSpecialFD id);
# 456 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
extern PRDescIdentity PR_GetUniqueIdentity(const char *layer_name);
extern const char* PR_GetNameForIdentity(PRDescIdentity ident);
extern PRDescIdentity PR_GetLayersIdentity(PRFileDesc* fd);
extern PRFileDesc* PR_GetIdentitiesLayer(PRFileDesc* fd_stack, PRDescIdentity id);
# 469 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
extern const PRIOMethods * PR_GetDefaultIOMethods(void);
# 480 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
extern PRFileDesc* PR_CreateIOLayerStub(
    PRDescIdentity ident, const PRIOMethods *methods);
# 497 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
extern PRStatus PR_PushIOLayer(
    PRFileDesc *fd_stack, PRDescIdentity id, PRFileDesc *layer);
# 514 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
extern PRFileDesc* PR_PopIOLayer(PRFileDesc *fd_stack, PRDescIdentity id);
# 588 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
extern PRFileDesc* PR_Open(const char *name, PRIntn flags, PRIntn mode);
# 614 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
extern PRFileDesc* PR_OpenFile(
    const char *name, PRIntn flags, PRIntn mode);
# 637 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
extern PRStatus PR_Close(PRFileDesc *fd);
# 672 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
extern PRInt32 PR_Read(PRFileDesc *fd, void *buf, PRInt32 amount);
# 696 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
extern PRInt32 PR_Write(PRFileDesc *fd,const void *buf,PRInt32 amount);
# 730 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
extern PRInt32 PR_Writev(
    PRFileDesc *fd, const PRIOVec *iov, PRInt32 iov_size,
    PRIntervalTime timeout);
# 751 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
extern PRStatus PR_Delete(const char *name);



typedef enum PRFileType
{
    PR_FILE_FILE = 1,
    PR_FILE_DIRECTORY = 2,
    PR_FILE_OTHER = 3
} PRFileType;

struct PRFileInfo {
    PRFileType type;
    PROffset32 size;
    PRTime creationTime;
    PRTime modifyTime;
};

struct PRFileInfo64 {
    PRFileType type;
    PROffset64 size;
    PRTime creationTime;
    PRTime modifyTime;
};
# 794 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
extern PRStatus PR_GetFileInfo(const char *fn, PRFileInfo *info);
extern PRStatus PR_GetFileInfo64(const char *fn, PRFileInfo64 *info);
# 814 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
extern PRStatus PR_GetOpenFileInfo(PRFileDesc *fd, PRFileInfo *info);
extern PRStatus PR_GetOpenFileInfo64(PRFileDesc *fd, PRFileInfo64 *info);
# 833 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
extern PRStatus PR_Rename(const char *from, const char *to);
# 859 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
typedef enum PRAccessHow {
    PR_ACCESS_EXISTS = 1,
    PR_ACCESS_WRITE_OK = 2,
    PR_ACCESS_READ_OK = 3
} PRAccessHow;

extern PRStatus PR_Access(const char *name, PRAccessHow how);
# 900 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
extern PROffset32 PR_Seek(PRFileDesc *fd, PROffset32 offset, PRSeekWhence whence);
extern PROffset64 PR_Seek64(PRFileDesc *fd, PROffset64 offset, PRSeekWhence whence);
# 923 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
extern PRInt32 PR_Available(PRFileDesc *fd);
extern PRInt64 PR_Available64(PRFileDesc *fd);
# 943 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
extern PRStatus PR_Sync(PRFileDesc *fd);



struct PRDirEntry {
    const char *name;
};
# 975 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
extern PRDir* PR_OpenDir(const char *name);
# 1000 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
typedef enum PRDirFlags {
    PR_SKIP_NONE = 0x0,
    PR_SKIP_DOT = 0x1,
    PR_SKIP_DOT_DOT = 0x2,
    PR_SKIP_BOTH = 0x3,
    PR_SKIP_HIDDEN = 0x4
} PRDirFlags;

extern PRDirEntry* PR_ReadDir(PRDir *dir, PRDirFlags flags);
# 1027 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
extern PRStatus PR_CloseDir(PRDir *dir);
# 1049 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
extern PRStatus PR_MkDir(const char *name, PRIntn mode);
# 1061 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
extern PRStatus PR_MakeDir(const char *name, PRIntn mode);
# 1081 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
extern PRStatus PR_RmDir(const char *name);
# 1100 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
extern PRFileDesc* PR_NewUDPSocket(void);
# 1119 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
extern PRFileDesc* PR_NewTCPSocket(void);
# 1139 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
extern PRFileDesc* PR_OpenUDPSocket(PRIntn af);
# 1159 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
extern PRFileDesc* PR_OpenTCPSocket(PRIntn af);
# 1183 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
extern PRStatus PR_Connect(
    PRFileDesc *fd, const PRNetAddr *addr, PRIntervalTime timeout);
# 1212 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
extern PRStatus PR_GetConnectStatus(const PRPollDesc *pd);
# 1236 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
extern PRFileDesc* PR_Accept(
    PRFileDesc *fd, PRNetAddr *addr, PRIntervalTime timeout);
# 1258 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
extern PRStatus PR_Bind(PRFileDesc *fd, const PRNetAddr *addr);
# 1280 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
extern PRStatus PR_Listen(PRFileDesc *fd, PRIntn backlog);
# 1304 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
typedef enum PRShutdownHow
{
    PR_SHUTDOWN_RCV = 0,
    PR_SHUTDOWN_SEND = 1,
    PR_SHUTDOWN_BOTH = 2
} PRShutdownHow;

extern PRStatus PR_Shutdown(PRFileDesc *fd, PRShutdownHow how);
# 1342 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
extern PRInt32 PR_Recv(PRFileDesc *fd, void *buf, PRInt32 amount,
                PRIntn flags, PRIntervalTime timeout);
# 1373 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
extern PRInt32 PR_Send(PRFileDesc *fd, const void *buf, PRInt32 amount,
                                PRIntn flags, PRIntervalTime timeout);
# 1408 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
extern PRInt32 PR_RecvFrom(
    PRFileDesc *fd, void *buf, PRInt32 amount, PRIntn flags,
    PRNetAddr *addr, PRIntervalTime timeout);
# 1441 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
extern PRInt32 PR_SendTo(
    PRFileDesc *fd, const void *buf, PRInt32 amount, PRIntn flags,
    const PRNetAddr *addr, PRIntervalTime timeout);
# 1481 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
extern PRInt32 PR_TransmitFile(
    PRFileDesc *networkSocket, PRFileDesc *sourceFile,
    const void *headers, PRInt32 hlen, PRTransmitFileFlags flags,
    PRIntervalTime timeout);
# 1520 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
struct PRSendFileData {
        PRFileDesc *fd;
        PRUint32 file_offset;
        PRSize file_nbytes;


        const void *header;
        PRInt32 hlen;
        const void *trailer;
        PRInt32 tlen;
};


extern PRInt32 PR_SendFile(
    PRFileDesc *networkSocket, PRSendFileData *sendData,
        PRTransmitFileFlags flags, PRIntervalTime timeout);
# 1587 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
extern PRInt32 PR_AcceptRead(
    PRFileDesc *listenSock, PRFileDesc **acceptedSock,
    PRNetAddr **peerAddr, void *buf, PRInt32 amount, PRIntervalTime timeout);
# 1611 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
extern PRStatus PR_NewTCPSocketPair(PRFileDesc *fds[2]);
# 1631 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
extern PRStatus PR_GetSockName(PRFileDesc *fd, PRNetAddr *addr);
# 1653 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
extern PRStatus PR_GetPeerName(PRFileDesc *fd, PRNetAddr *addr);

extern PRStatus PR_GetSocketOption(
    PRFileDesc *fd, PRSocketOptionData *data);

extern PRStatus PR_SetSocketOption(
    PRFileDesc *fd, const PRSocketOptionData *data);
# 1688 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
extern PRStatus PR_SetFDInheritable(
    PRFileDesc *fd,
    PRBool inheritable);
# 1708 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
extern PRFileDesc * PR_GetInheritedFD(const char *name);
# 1718 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
typedef struct PRFileMap PRFileMap;




typedef enum PRFileMapProtect {
    PR_PROT_READONLY,
    PR_PROT_READWRITE,
    PR_PROT_WRITECOPY
} PRFileMapProtect;

extern PRFileMap * PR_CreateFileMap(
    PRFileDesc *fd,
    PRInt64 size,
    PRFileMapProtect prot);

extern void * PR_MemMap(
    PRFileMap *fmap,
    PROffset64 offset,
    PRUint32 len);

extern PRStatus PR_MemUnmap(void *addr, PRUint32 len);

extern PRStatus PR_CloseFileMap(PRFileMap *fmap);
# 1756 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
extern PRStatus PR_CreatePipe(
    PRFileDesc **readPipe,
    PRFileDesc **writePipe
);





struct PRPollDesc {
    PRFileDesc* fd;
    PRInt16 in_flags;
    PRInt16 out_flags;
};
# 1832 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
extern PRInt32 PR_Poll(
    PRPollDesc *pds, PRIntn npds, PRIntervalTime timeout);
# 1876 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prio.h"
extern PRFileDesc * PR_NewPollableEvent(void);

extern PRStatus PR_DestroyPollableEvent(PRFileDesc *event);

extern PRStatus PR_SetPollableEvent(PRFileDesc *event);

extern PRStatus PR_WaitForPollableEvent(PRFileDesc *event);

}
# 18 "../../../../dist/include/nsILocalFile.h" 2
# 1 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prlink.h" 1
# 25 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prlink.h"
# 1 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prtypes.h" 1
# 26 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prlink.h" 2

extern "C" {

typedef struct PRLibrary PRLibrary;

typedef struct PRStaticLinkTable {
    const char *name;
    void (*fp)();
} PRStaticLinkTable;
# 43 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prlink.h"
extern PRStatus PR_SetLibraryPath(const char *path);
# 53 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prlink.h"
extern char* PR_GetLibraryPath(void);
# 66 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prlink.h"
extern char* PR_GetLibraryName(const char *dir, const char *lib);





extern void PR_FreeLibraryName(char *mem);
# 86 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prlink.h"
extern PRLibrary* PR_LoadLibrary(const char *name);
# 107 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prlink.h"
typedef enum PRLibSpecType {
    PR_LibSpec_Pathname,
    PR_LibSpec_MacNamedFragment,
    PR_LibSpec_MacIndexedFragment
} PRLibSpecType;

struct FSSpec;

typedef struct PRLibSpec {
    PRLibSpecType type;
    union {

        const char *pathname;


        struct {
            const struct FSSpec *fsspec;
            const char *name;
        } mac_named_fragment;


        struct {
            const struct FSSpec *fsspec;
            PRUint32 index;
        } mac_indexed_fragment;
    } value;
} PRLibSpec;
# 150 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prlink.h"
extern PRLibrary *
PR_LoadLibraryWithFlags(
    PRLibSpec libSpec,
    PRIntn flags
);
# 165 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prlink.h"
extern PRStatus PR_UnloadLibrary(PRLibrary *lib);
# 175 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prlink.h"
extern void* PR_FindSymbol(PRLibrary *lib, const char *name);
# 187 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prlink.h"
extern void* PR_FindSymbolAndLibrary(const char *name,
                                                      PRLibrary* *lib);
# 201 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prlink.h"
extern PRLibrary* PR_LoadStaticLibrary(
    const char *name, const PRStaticLinkTable *table);

}
# 19 "../../../../dist/include/nsILocalFile.h" 2
# 1 "/usr/lib/gcc-lib/i386-linux/3.0/include/stdio.h" 1 3
# 20 "../../../../dist/include/nsILocalFile.h" 2
# 28 "../../../../dist/include/nsILocalFile.h"
class nsILocalFile : public nsIFile {
 public:

  static const nsIID& GetIID() {static const nsIID iid = {0xaa610f20, 0xa889, 0x11d3, { 0x8c, 0x81, 0x00, 0x00, 0x64, 0x65, 0x73, 0x74 }}; return iid;}
# 51 "../../../../dist/include/nsILocalFile.h"
  virtual nsresult InitWithPath(const char *filePath) = 0;


  virtual nsresult InitWithUnicodePath(const PRUnichar *filePath) = 0;
# 72 "../../../../dist/include/nsILocalFile.h"
  virtual nsresult GetFollowLinks(PRBool *aFollowLinks) = 0;
  virtual nsresult SetFollowLinks(PRBool aFollowLinks) = 0;


  virtual nsresult OpenNSPRFileDesc(PRInt32 flags, PRInt32 mode, PRFileDesc * *_retval) = 0;


  virtual nsresult OpenANSIFileDesc(const char *mode, FILE * *_retval) = 0;


  virtual nsresult Load(PRLibrary * *_retval) = 0;


  virtual nsresult GetDiskSpaceAvailable(PRInt64 *aDiskSpaceAvailable) = 0;
# 97 "../../../../dist/include/nsILocalFile.h"
  virtual nsresult AppendRelativePath(const char *relativeFilePath) = 0;


  virtual nsresult AppendRelativeUnicodePath(const PRUnichar *relativeFilePath) = 0;






  virtual nsresult GetPersistentDescriptor(char * *aPersistentDescriptor) = 0;
  virtual nsresult SetPersistentDescriptor(const char * aPersistentDescriptor) = 0;







  virtual nsresult Reveal(void) = 0;







  virtual nsresult Launch(void) = 0;

};
# 293 "../../../../dist/include/nsILocalFile.h"
extern "C" nsresult
NS_NewLocalFile(const char* path, PRBool followLinks, nsILocalFile* *result);
extern "C" nsresult
NS_NewUnicodeLocalFile(const PRUnichar* path, PRBool followLinks, nsILocalFile* *result);
# 161 "../../../../dist/include/nsFileSpec.h" 2
# 1 "../../../../dist/include/nsCOMPtr.h" 1
# 162 "../../../../dist/include/nsFileSpec.h" 2
# 176 "../../../../dist/include/nsFileSpec.h"
# 1 "/usr/include/dirent.h" 1 3
# 26 "/usr/include/dirent.h" 3
# 1 "/usr/include/features.h" 1 3
# 27 "/usr/include/dirent.h" 2 3

extern "C" {

# 1 "/usr/include/bits/types.h" 1 3
# 31 "/usr/include/dirent.h" 2 3
# 62 "/usr/include/dirent.h" 3
# 1 "/usr/include/bits/dirent.h" 1 3
# 23 "/usr/include/bits/dirent.h" 3
struct dirent
  {

    __ino_t d_ino;
    __off_t d_off;




    unsigned short int d_reclen;
    unsigned char d_type;
    char d_name[256];
  };


struct dirent64
  {
    __ino64_t d_ino;
    __off64_t d_off;
    unsigned short int d_reclen;
    unsigned char d_type;
    char d_name[256];
  };
# 63 "/usr/include/dirent.h" 2 3
# 98 "/usr/include/dirent.h" 3
enum
  {
    DT_UNKNOWN = 0,

    DT_FIFO = 1,

    DT_CHR = 2,

    DT_DIR = 4,

    DT_BLK = 6,

    DT_REG = 8,

    DT_LNK = 10,

    DT_SOCK = 12,

    DT_WHT = 14

  };
# 128 "/usr/include/dirent.h" 3
typedef struct __dirstream DIR;



extern DIR *opendir (__const char *__name) throw ();



extern int closedir (DIR *__dirp) throw ();
# 146 "/usr/include/dirent.h" 3
extern struct dirent *readdir (DIR *__dirp) throw ();
# 156 "/usr/include/dirent.h" 3
extern struct dirent64 *readdir64 (DIR *__dirp) throw ();






extern int readdir_r (DIR *__restrict __dirp,
                      struct dirent *__restrict __entry,
                      struct dirent **__restrict __result) throw ();
# 179 "/usr/include/dirent.h" 3
extern int readdir64_r (DIR *__restrict __dirp,
                        struct dirent64 *__restrict __entry,
                        struct dirent64 **__restrict __result) throw ();




extern void rewinddir (DIR *__dirp) throw ();


# 1 "/usr/include/bits/types.h" 1 3
# 190 "/usr/include/dirent.h" 2 3


extern void seekdir (DIR *__dirp, long int __pos) throw ();


extern long int telldir (DIR *__dirp) throw ();





extern int dirfd (DIR *__dirp) throw ();







# 1 "/usr/include/bits/posix1_lim.h" 1 3
# 210 "/usr/include/dirent.h" 2 3
# 220 "/usr/include/dirent.h" 3
# 1 "/usr/lib/gcc-lib/i386-linux/3.0/include/stddef.h" 1 3
# 221 "/usr/include/dirent.h" 2 3






extern int scandir (__const char *__restrict __dir,
                    struct dirent ***__restrict __namelist,
                    int (*__selector) (__const struct dirent *),
                    int (*__cmp) (__const void *, __const void *)) throw ();
# 247 "/usr/include/dirent.h" 3
extern int scandir64 (__const char *__restrict __dir,
                      struct dirent64 ***__restrict __namelist,
                      int (*__selector) (__const struct dirent64 *),
                      int (*__cmp) (__const void *, __const void *)) throw ();




extern int alphasort (__const void *__e1, __const void *__e2)
     throw () __attribute__ ((__pure__));
# 269 "/usr/include/dirent.h" 3
extern int alphasort64 (__const void *__e1, __const void *__e2)
     throw () __attribute__ ((__pure__));





extern int versionsort (__const void *__e1, __const void *__e2)
     throw () __attribute__ ((__pure__));
# 290 "/usr/include/dirent.h" 3
extern int versionsort64 (__const void *__e1, __const void *__e2)
     throw () __attribute__ ((__pure__));
# 300 "/usr/include/dirent.h" 3
extern __ssize_t getdirentries (int __fd, char *__restrict __buf,
                                size_t __nbytes,
                                __off_t *__restrict __basep) throw ();
# 316 "/usr/include/dirent.h" 3
extern __ssize_t getdirentries64 (int __fd, char *__restrict __buf,
                                  size_t __nbytes,
                                  __off64_t *__restrict __basep) throw ();




}
# 177 "../../../../dist/include/nsFileSpec.h" 2
# 195 "../../../../dist/include/nsFileSpec.h"
class nsFileSpec;
class nsFilePath;
class nsFileURL;
class nsNSPRPath;
class nsPersistentFileDescriptor;




class nsOutputStream;
class nsInputStream;
class nsIOutputStream;
class nsIInputStream;
class nsOutputFileStream;
class nsInputFileStream;
class nsOutputConsoleStream;

class nsString;

class nsIUnicodeEncoder;
class nsIUnicodeDecoder;
# 225 "../../../../dist/include/nsFileSpec.h"
nsresult ns_file_convert_result(PRInt32 nativeErr);



class nsAutoCString
# 245 "../../../../dist/include/nsFileSpec.h"
{
public:
                                 nsAutoCString(const nsString& other) : mCString(other.ToNewCString()) {}
    virtual ~nsAutoCString();
                                 operator const char*() const { return mCString; }




protected:
                                 const char* mCString;
};


class nsSimpleCharString



{
public:
                                 nsSimpleCharString();
                                 nsSimpleCharString(const char*);
                                 nsSimpleCharString(const nsString&);
                                 nsSimpleCharString(const nsSimpleCharString&);
                                 nsSimpleCharString(const char* inData, PRUint32 inLength);

                                 ~nsSimpleCharString();

    void operator = (const char*);
    void operator = (const nsString&);
    void operator = (const nsSimpleCharString&);

                                 operator const char*() const { return mData ? mData->mString : 0; }
                                 operator char* ()
                                 {
                                     ReallocData(Length());
                                     return mData ? mData->mString : 0;
                                 }
    PRBool operator == (const char*);
    PRBool operator == (const nsString&);
    PRBool operator == (const nsSimpleCharString&);

    void operator += (const char* inString);
    nsSimpleCharString operator + (const char* inString) const;

    char operator [](int i) const { return mData ? mData->mString[i] : '\0'; }
    char& operator [](int i)
                                 {
                                     if (i >= (int)Length())
                                         ReallocData((PRUint32)i + 1);
                                     return mData->mString[i];
                                 }
    char& operator [](unsigned int i) { return (*this)[(int)i]; }

    void Catenate(const char* inString1, const char* inString2);

    void SetToEmpty();
    PRBool IsEmpty() const { return Length() == 0; }

    PRUint32 Length() const { return mData ? mData->mLength : 0; }
    void SetLength(PRUint32 inLength) { ReallocData(inLength); }
    void CopyFrom(const char* inData, PRUint32 inLength);
    void LeafReplace(char inSeparator, const char* inLeafName);
    char* GetLeaf(char inSeparator) const;
    void Unescape();

protected:

    void AddRefData();
    void ReleaseData();
    void ReallocData(PRUint32 inLength);





protected:

    struct Data {
        int mRefCount;
        PRUint32 mLength;
        char mString[1];
        };
    Data* mData;
};


class nsFileSpec



{
    public:
                                nsFileSpec();


                                nsFileSpec(const char* inNativePath, PRBool inCreateDirs = 0);
                                nsFileSpec(const nsString& inNativePath, PRBool inCreateDirs = 0);


                                nsFileSpec(const nsFilePath& inPath);
                                nsFileSpec(const nsFileURL& inURL);
                                nsFileSpec(const nsPersistentFileDescriptor& inURL);
                                nsFileSpec(const nsFileSpec& inPath);
        virtual ~nsFileSpec();


        void operator = (const char* inNativePath);
        void operator = (const nsString& inNativePath);

        void operator = (const nsFilePath& inPath);
        void operator = (const nsFileURL& inURL);
        void operator = (const nsFileSpec& inOther);
        void operator = (const nsPersistentFileDescriptor& inOther);

        PRBool operator ==(const nsFileSpec& inOther) const;
        PRBool operator !=(const nsFileSpec& inOther) const;
# 372 "../../../../dist/include/nsFileSpec.h"
       const char* GetCString() const;



                                operator const char* () const { return GetCString(); }



       const char* GetNativePathCString() const { return GetCString(); }



       void GetNativePathString(nsString &nativePathString);

       PRBool IsChildOf(nsFileSpec &possibleParent);
# 421 "../../../../dist/include/nsFileSpec.h"
        PRBool Valid() const { return (!((Error()) & 0x80000000)); }
        nsresult Error() const
                                {

                                    if (mPath.IsEmpty() && (!((mError) & 0x80000000)))
                                        ((nsFileSpec*)this)->mError = (((nsresult) 0xC1F30000) + 1);

                                    return mError;
                                }
        PRBool Failed() const { return (PRBool)((Error()) & 0x80000000); }





        char* GetLeafName() const;


        void GetLeafName(nsString &nativePathString);
# 450 "../../../../dist/include/nsFileSpec.h"
        void SetLeafName(const char* inLeafName);
        void SetLeafName(const nsString& inLeafName);







        void GetParent(nsFileSpec& outSpec) const;
# 468 "../../../../dist/include/nsFileSpec.h"
        typedef PRUint32 TimeStamp;





        void GetModDate(TimeStamp& outStamp) const;

        PRBool ModDateChanged(const TimeStamp& oldStamp) const
                                {
                                    TimeStamp newStamp;
                                    GetModDate(newStamp);
                                    return newStamp != oldStamp;
                                }

        PRUint32 GetFileSize() const;
        PRInt64 GetDiskSpaceAvailable() const;

        nsFileSpec operator + (const char* inRelativeUnixPath) const;
        nsFileSpec operator + (const nsString& inRelativeUnixPath) const;
# 497 "../../../../dist/include/nsFileSpec.h"
        void operator += (const char* inRelativeUnixPath);

        void operator += (const nsString& inRelativeUnixPath);

        void MakeUnique();
        void MakeUnique(const char* inSuggestedLeafName);
        void MakeUnique(const nsString& inSuggestedLeafName);


        PRBool IsDirectory() const;
        PRBool IsFile() const;
        PRBool Exists() const;

        PRBool IsHidden() const;

        PRBool IsSymlink() const;







        nsresult ResolveSymlink(PRBool& wasSymlink);

        void CreateDirectory(int mode = 0775 );
        void CreateDir(int mode = 0775) { CreateDirectory(mode); }

        void Delete(PRBool inRecursive) const;
        nsresult Truncate(PRInt32 aNewLength) const;
        void RecursiveCopy(nsFileSpec newDir) const;

        nsresult Rename(const char* inNewName);
        nsresult Rename(const nsString& inNewName);
        nsresult CopyToDir(const nsFileSpec& inNewParentDirectory) const;
        nsresult MoveToDir(const nsFileSpec& inNewParentDirectory);
        nsresult Execute(const char* args) const;
        nsresult Execute(const nsString& args) const;





    protected:


       PRUnichar* ConvertFromFileSystemCharset(const char *inString);
       static void GetFileSystemCharset(nsString & fileSystemCharset);





    protected:



       void Clear();

                                friend class nsFilePath;
                                friend class nsFileURL;
                                friend class nsDirectoryIterator;



        nsSimpleCharString mPath;
        nsresult mError;

};



typedef nsFileSpec nsNativeFileSpec;


class nsFileURL




{
    public:
                                nsFileURL(const nsFileURL& inURL);
                                nsFileURL(const char* inURLString, PRBool inCreateDirs = 0);
                                nsFileURL(const nsString& inURLString, PRBool inCreateDirs = 0);
                                nsFileURL(const nsFilePath& inPath);
                                nsFileURL(const nsFileSpec& inPath);
        virtual ~nsFileURL();





        void operator = (const nsFileURL& inURL);
        void operator = (const char* inURLString);
        void operator = (const nsString& inURLString)
                                {
                                    const nsAutoCString string(inURLString);
                                    *this = string;
                                }
        void operator = (const nsFilePath& inOther);
        void operator = (const nsFileSpec& inOther);

        void operator +=(const char* inRelativeUnixPath);
        nsFileURL operator +(const char* inRelativeUnixPath) const;
                                operator const char* () const { return (const char*)mURL; }
        const char* GetURLString() const { return (const char*)mURL; }

        const char* GetAsString() const { return (const char*)mURL; }
# 617 "../../../../dist/include/nsFileSpec.h"
    protected:
                                friend class nsFilePath;
        nsSimpleCharString mURL;






};


class nsFilePath




{
    public:
                                nsFilePath(const nsFilePath& inPath);
                                nsFilePath(const char* inUnixPathString, PRBool inCreateDirs = 0);
                                nsFilePath(const nsString& inUnixPathString, PRBool inCreateDirs = 0);
                                nsFilePath(const nsFileURL& inURL);
                                nsFilePath(const nsFileSpec& inPath);
        virtual ~nsFilePath();


                                operator const char* () const { return mPath; }




        void operator = (const nsFilePath& inPath);
        void operator = (const char* inUnixPathString);
        void operator = (const nsString& inUnixPathString)
                                {
                                    const nsAutoCString string(inUnixPathString);
                                    *this = string;
                                }
        void operator = (const nsFileURL& inURL);
        void operator = (const nsFileSpec& inOther);

        void operator +=(const char* inRelativeUnixPath);
        nsFilePath operator +(const char* inRelativeUnixPath) const;
# 672 "../../../../dist/include/nsFileSpec.h"
    private:

        nsSimpleCharString mPath;





};


class nsPersistentFileDescriptor





{
    public:
                                nsPersistentFileDescriptor() {}

                                nsPersistentFileDescriptor(const nsPersistentFileDescriptor& inEncodedData);
        virtual ~nsPersistentFileDescriptor();
        void operator = (const nsPersistentFileDescriptor& inEncodedData);


                                nsPersistentFileDescriptor(const nsFileSpec& inSpec);
        void operator = (const nsFileSpec& inSpec);




        friend nsresult Read(nsIInputStream* aStream, nsPersistentFileDescriptor&);
        friend nsresult Write(nsIOutputStream* aStream, const nsPersistentFileDescriptor&);

        friend nsInputStream& operator >> (nsInputStream&, nsPersistentFileDescriptor&);

        friend nsOutputStream& operator << (nsOutputStream&, const nsPersistentFileDescriptor&);

        friend class nsFileSpec;

        void GetData(nsSimpleCharString& outData) const;
        void SetData(const nsSimpleCharString& inData);
        void GetData(nsSimpleCharString& outData, PRInt32& outSize) const;
        void SetData(const nsSimpleCharString& inData, PRInt32 inSize);
        void SetData(const char* inData, PRInt32 inSize);





    protected:

        nsSimpleCharString mDescriptorString;

};


class nsDirectoryIterator
# 747 "../../../../dist/include/nsFileSpec.h"
{
        public:
                                    nsDirectoryIterator( const nsFileSpec& parent,
                                                         PRBool resoveSymLinks);


            virtual ~nsDirectoryIterator();

            PRBool Exists() const { return mExists; }
            nsDirectoryIterator& operator ++();
            nsDirectoryIterator& operator ++(int) { return ++(*this); }
            nsDirectoryIterator& operator --();
            nsDirectoryIterator& operator --(int) { return --(*this); }
                                    operator nsFileSpec&() { return mCurrent; }

            nsFileSpec& Spec() { return mCurrent; }

        private:
# 774 "../../../../dist/include/nsFileSpec.h"
        private:

            nsFileSpec mCurrent;
            PRBool mExists;
        PRBool mResoveSymLinks;


            nsFileSpec mStarting;



            DIR* mDir;
# 794 "../../../../dist/include/nsFileSpec.h"
};


class nsNSPRPath




{
public:
                                 nsNSPRPath(const nsFileSpec& inSpec)
                                     : mFilePath(inSpec), modifiedNSPRPath(0) {}
                                 nsNSPRPath(const nsFileURL& inURL)
                                     : mFilePath(inURL), modifiedNSPRPath(0) {}
                                 nsNSPRPath(const nsFilePath& inUnixPath)
                                     : mFilePath(inUnixPath), modifiedNSPRPath(0) {}

    virtual ~nsNSPRPath();

                                 operator const char*() const;
# 823 "../../../../dist/include/nsFileSpec.h"
private:

    nsFilePath mFilePath;
    char* modifiedNSPRPath;
};


       nsresult NS_FileSpecToIFile(nsFileSpec* fileSpec, nsILocalFile* *result);
# 18 "../../../../dist/include/nsIFileSpec.h" 2
class nsIFileURL;

class nsIFilePath;

class nsIOutputStream;

class nsIInputStream;
# 42 "../../../../dist/include/nsIFileSpec.h"
class nsIFileSpec : public nsISupports {
 public:

  static const nsIID& GetIID() {static const nsIID iid = {0xd8c0a080, 0x0868, 0x11d3, { 0x91, 0x5f, 0xd9, 0xd8, 0x89, 0xd4, 0x8e, 0x3c }}; return iid;}


  virtual nsresult FromFileSpec(const nsIFileSpec *original) = 0;


  virtual nsresult GetURLString(char * *aURLString) = 0;
  virtual nsresult SetURLString(const char * aURLString) = 0;


  virtual nsresult GetUnixStyleFilePath(char * *aUnixStyleFilePath) = 0;
  virtual nsresult SetUnixStyleFilePath(const char * aUnixStyleFilePath) = 0;


  virtual nsresult GetPersistentDescriptorString(char * *aPersistentDescriptorString) = 0;
  virtual nsresult SetPersistentDescriptorString(const char * aPersistentDescriptorString) = 0;


  virtual nsresult GetNativePath(char * *aNativePath) = 0;
  virtual nsresult SetNativePath(const char * aNativePath) = 0;


  virtual nsresult GetNSPRPath(char * *aNSPRPath) = 0;


  virtual nsresult Error(void) = 0;


  virtual nsresult IsValid(PRBool *_retval) = 0;


  virtual nsresult Failed(PRBool *_retval) = 0;


  virtual nsresult GetLeafName(char * *aLeafName) = 0;
  virtual nsresult SetLeafName(const char * aLeafName) = 0;


  virtual nsresult GetParent(nsIFileSpec * *aParent) = 0;


  virtual nsresult GetInputStream(nsIInputStream * *aInputStream) = 0;


  virtual nsresult GetOutputStream(nsIOutputStream * *aOutputStream) = 0;


  virtual nsresult IsChildOf(nsIFileSpec *possibleParent, PRBool *_retval) = 0;


  virtual nsresult GetFileSpec(nsFileSpec *aFileSpec) = 0;


  virtual nsresult SetFromFileSpec(const nsFileSpec & spec) = 0;


  virtual nsresult GetFileContents(char * *aFileContents) = 0;
  virtual nsresult SetFileContents(const char * aFileContents) = 0;


  virtual nsresult MakeUnique(void) = 0;


  virtual nsresult MakeUniqueWithSuggestedName(const char *suggestedName) = 0;


  virtual nsresult GetModDate(PRUint32 *aModDate) = 0;


  virtual nsresult ModDateChanged(PRUint32 oldStamp, PRBool *_retval) = 0;


  virtual nsresult IsDirectory(PRBool *_retval) = 0;


  virtual nsresult IsFile(PRBool *_retval) = 0;


  virtual nsresult Exists(PRBool *_retval) = 0;


  virtual nsresult IsHidden(PRBool *_retval) = 0;


  virtual nsresult Equals(nsIFileSpec *spec, PRBool *_retval) = 0;


  virtual nsresult GetFileSize(PRUint32 *aFileSize) = 0;


  virtual nsresult GetDiskSpaceAvailable(PRInt64 *aDiskSpaceAvailable) = 0;


  virtual nsresult AppendRelativeUnixPath(const char *relativePath) = 0;


  virtual nsresult CreateDir(void) = 0;


  virtual nsresult Touch(void) = 0;


  virtual nsresult IsSymlink(PRBool *_retval) = 0;


  virtual nsresult ResolveSymlink(void) = 0;


  virtual nsresult Delete(PRBool recursive) = 0;


  virtual nsresult Truncate(PRInt32 aNewLength) = 0;


  virtual nsresult Rename(const char *newLeafName) = 0;


  virtual nsresult CopyToDir(const nsIFileSpec *newParentDir) = 0;


  virtual nsresult MoveToDir(const nsIFileSpec *newParentDir) = 0;


  virtual nsresult Execute(const char *args) = 0;


  virtual nsresult OpenStreamForReading(void) = 0;


  virtual nsresult OpenStreamForWriting(void) = 0;


  virtual nsresult OpenStreamForReadingAndWriting(void) = 0;


  virtual nsresult CloseStream(void) = 0;


  virtual nsresult IsStreamOpen(PRBool *_retval) = 0;


  virtual nsresult Eof(PRBool *_retval) = 0;


  virtual nsresult Read(char **buffer, PRInt32 requestedCount, PRInt32 *_retval) = 0;


  virtual nsresult ReadLine(char **line, PRInt32 bufferSize, PRBool *wasTruncated) = 0;






  virtual nsresult Write(const char *data, PRInt32 requestedCount, PRInt32 *_retval) = 0;


  virtual nsresult Flush(void) = 0;


  virtual nsresult Seek(PRInt32 offset) = 0;


  virtual nsresult Tell(PRInt32 *_retval) = 0;


  virtual nsresult EndLine(void) = 0;

};
# 779 "../../../../dist/include/nsIFileSpec.h"
class nsIDirectoryIterator : public nsISupports {
 public:

  static const nsIID& GetIID() {static const nsIID iid = {0xd8c0a083, 0x0868, 0x11d3, { 0x91, 0x5f, 0xd9, 0xd8, 0x89, 0xd4, 0x8e, 0x3c }}; return iid;}


  virtual nsresult Init(nsIFileSpec *parent, PRBool resolveSymlink) = 0;


  virtual nsresult Exists(PRBool *_retval) = 0;


  virtual nsresult Next(void) = 0;


  virtual nsresult GetCurrentSpec(nsIFileSpec * *aCurrentSpec) = 0;

};
# 876 "../../../../dist/include/nsIFileSpec.h"
       nsresult NS_NewFileSpecWithSpec(const nsFileSpec& aSrcFileSpec, nsIFileSpec **result);
       nsresult NS_NewFileSpec(nsIFileSpec** result);
       nsresult NS_NewDirectoryIterator(nsIDirectoryIterator** result);

inline PRBool Exists(nsIFileSpec* f) { PRBool yes; return (!((f->Exists(&yes)) & 0x80000000)) && yes; }
inline PRBool Exists(nsIDirectoryIterator* f) { PRBool yes; return (!((f->Exists(&yes)) & 0x80000000)) && yes; }
inline PRBool IsDirectory(nsIFileSpec* f) { PRBool yes; return (!((f->IsDirectory(&yes)) & 0x80000000)) && yes; }
# 29 "nsFormFrame.h" 2
# 1 "../../../../dist/include/nsIFormProcessor.h" 1
# 33 "../../../../dist/include/nsIFormProcessor.h"
# 1 "../../../../dist/include/nsISupports.h" 1
# 34 "../../../../dist/include/nsIFormProcessor.h" 2
# 1 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prtypes.h" 1
# 35 "../../../../dist/include/nsIFormProcessor.h" 2

# 1 "../../../../dist/include/nsIDOMHTMLInputElement.h" 1
# 10 "../../../../dist/include/nsIDOMHTMLInputElement.h"
# 1 "../../../../dist/include/nsIDOMHTMLElement.h" 1
# 10 "../../../../dist/include/nsIDOMHTMLElement.h"
# 1 "../../../../dist/include/nsIDOMElement.h" 1
# 10 "../../../../dist/include/nsIDOMElement.h"
# 1 "../../../../dist/include/nsIDOMNode.h" 1
# 25 "../../../../dist/include/nsIDOMNode.h"
class nsIDOMNode : public nsISupports {
 public:

  static const nsIID& GetIID() {static const nsIID iid = {0xa6cf907c, 0x15b3, 0x11d2, { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }}; return iid;}

  enum { ELEMENT_NODE = 1U };

  enum { ATTRIBUTE_NODE = 2U };

  enum { TEXT_NODE = 3U };

  enum { CDATA_SECTION_NODE = 4U };

  enum { ENTITY_REFERENCE_NODE = 5U };

  enum { ENTITY_NODE = 6U };

  enum { PROCESSING_INSTRUCTION_NODE = 7U };

  enum { COMMENT_NODE = 8U };

  enum { DOCUMENT_NODE = 9U };

  enum { DOCUMENT_TYPE_NODE = 10U };

  enum { DOCUMENT_FRAGMENT_NODE = 11U };

  enum { NOTATION_NODE = 12U };


  virtual nsresult GetNodeName(nsAWritableString & aNodeName) = 0;


  virtual nsresult GetNodeValue(nsAWritableString & aNodeValue) = 0;
  virtual nsresult SetNodeValue(const nsAReadableString & aNodeValue) = 0;


  virtual nsresult GetNodeType(PRUint16 *aNodeType) = 0;


  virtual nsresult GetParentNode(nsIDOMNode * *aParentNode) = 0;


  virtual nsresult GetChildNodes(nsIDOMNodeList * *aChildNodes) = 0;


  virtual nsresult GetFirstChild(nsIDOMNode * *aFirstChild) = 0;


  virtual nsresult GetLastChild(nsIDOMNode * *aLastChild) = 0;


  virtual nsresult GetPreviousSibling(nsIDOMNode * *aPreviousSibling) = 0;


  virtual nsresult GetNextSibling(nsIDOMNode * *aNextSibling) = 0;


  virtual nsresult GetAttributes(nsIDOMNamedNodeMap * *aAttributes) = 0;


  virtual nsresult GetOwnerDocument(nsIDOMDocument * *aOwnerDocument) = 0;


  virtual nsresult InsertBefore(nsIDOMNode *newChild, nsIDOMNode *refChild, nsIDOMNode **_retval) = 0;


  virtual nsresult ReplaceChild(nsIDOMNode *newChild, nsIDOMNode *oldChild, nsIDOMNode **_retval) = 0;


  virtual nsresult RemoveChild(nsIDOMNode *oldChild, nsIDOMNode **_retval) = 0;


  virtual nsresult AppendChild(nsIDOMNode *newChild, nsIDOMNode **_retval) = 0;


  virtual nsresult HasChildNodes(PRBool *_retval) = 0;


  virtual nsresult CloneNode(PRBool deep, nsIDOMNode **_retval) = 0;


  virtual nsresult Normalize(void) = 0;


  virtual nsresult IsSupported(const nsAReadableString & feature, const nsAReadableString & version, PRBool *_retval) = 0;


  virtual nsresult GetNamespaceURI(nsAWritableString & aNamespaceURI) = 0;


  virtual nsresult GetPrefix(nsAWritableString & aPrefix) = 0;
  virtual nsresult SetPrefix(const nsAReadableString & aPrefix) = 0;


  virtual nsresult GetLocalName(nsAWritableString & aLocalName) = 0;


  virtual nsresult HasAttributes(PRBool *_retval) = 0;

};
# 397 "../../../../dist/include/nsIDOMNode.h"
class nsIDOM3Node : public nsISupports {
 public:

  static const nsIID& GetIID() {static const nsIID iid = {0x29fb2a18, 0x1dd2, 0x11b2, { 0x8d, 0xd9, 0xa6, 0xfd, 0x5d, 0x5a, 0xd1, 0x2f }}; return iid;}


  virtual nsresult GetBaseURI(nsAWritableString & aBaseURI) = 0;

};
# 11 "../../../../dist/include/nsIDOMElement.h" 2
# 25 "../../../../dist/include/nsIDOMElement.h"
class nsIDOMElement : public nsIDOMNode {
 public:

  static const nsIID& GetIID() {static const nsIID iid = {0xa6cf9078, 0x15b3, 0x11d2, { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }}; return iid;}


  virtual nsresult GetTagName(nsAWritableString & aTagName) = 0;


  virtual nsresult GetAttribute(const nsAReadableString & name, nsAWritableString & _retval) = 0;


  virtual nsresult SetAttribute(const nsAReadableString & name, const nsAReadableString & value) = 0;


  virtual nsresult RemoveAttribute(const nsAReadableString & name) = 0;


  virtual nsresult GetAttributeNode(const nsAReadableString & name, nsIDOMAttr **_retval) = 0;


  virtual nsresult SetAttributeNode(nsIDOMAttr *newAttr, nsIDOMAttr **_retval) = 0;


  virtual nsresult RemoveAttributeNode(nsIDOMAttr *oldAttr, nsIDOMAttr **_retval) = 0;


  virtual nsresult GetElementsByTagName(const nsAReadableString & name, nsIDOMNodeList **_retval) = 0;


  virtual nsresult GetAttributeNS(const nsAReadableString & namespaceURI, const nsAReadableString & localName, nsAWritableString & _retval) = 0;


  virtual nsresult SetAttributeNS(const nsAReadableString & namespaceURI, const nsAReadableString & qualifiedName, const nsAReadableString & value) = 0;


  virtual nsresult RemoveAttributeNS(const nsAReadableString & namespaceURI, const nsAReadableString & localName) = 0;


  virtual nsresult GetAttributeNodeNS(const nsAReadableString & namespaceURI, const nsAReadableString & localName, nsIDOMAttr **_retval) = 0;


  virtual nsresult SetAttributeNodeNS(nsIDOMAttr *newAttr, nsIDOMAttr **_retval) = 0;


  virtual nsresult GetElementsByTagNameNS(const nsAReadableString & namespaceURI, const nsAReadableString & localName, nsIDOMNodeList **_retval) = 0;


  virtual nsresult HasAttribute(const nsAReadableString & name, PRBool *_retval) = 0;


  virtual nsresult HasAttributeNS(const nsAReadableString & namespaceURI, const nsAReadableString & localName, PRBool *_retval) = 0;

};
# 11 "../../../../dist/include/nsIDOMHTMLElement.h" 2
# 25 "../../../../dist/include/nsIDOMHTMLElement.h"
class nsIDOMHTMLElement : public nsIDOMElement {
 public:

  static const nsIID& GetIID() {static const nsIID iid = {0xa6cf9085, 0x15b3, 0x11d2, { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }}; return iid;}


  virtual nsresult GetId(nsAWritableString & aId) = 0;
  virtual nsresult SetId(const nsAReadableString & aId) = 0;


  virtual nsresult GetTitle(nsAWritableString & aTitle) = 0;
  virtual nsresult SetTitle(const nsAReadableString & aTitle) = 0;


  virtual nsresult GetLang(nsAWritableString & aLang) = 0;
  virtual nsresult SetLang(const nsAReadableString & aLang) = 0;


  virtual nsresult GetDir(nsAWritableString & aDir) = 0;
  virtual nsresult SetDir(const nsAReadableString & aDir) = 0;


  virtual nsresult GetClassName(nsAWritableString & aClassName) = 0;
  virtual nsresult SetClassName(const nsAReadableString & aClassName) = 0;

};
# 11 "../../../../dist/include/nsIDOMHTMLInputElement.h" 2
# 25 "../../../../dist/include/nsIDOMHTMLInputElement.h"
class nsIDOMHTMLInputElement : public nsIDOMHTMLElement {
 public:

  static const nsIID& GetIID() {static const nsIID iid = {0xa6cf9093, 0x15b3, 0x11d2, { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }}; return iid;}


  virtual nsresult GetDefaultValue(nsAWritableString & aDefaultValue) = 0;
  virtual nsresult SetDefaultValue(const nsAReadableString & aDefaultValue) = 0;


  virtual nsresult GetDefaultChecked(PRBool *aDefaultChecked) = 0;
  virtual nsresult SetDefaultChecked(PRBool aDefaultChecked) = 0;


  virtual nsresult GetForm(nsIDOMHTMLFormElement * *aForm) = 0;


  virtual nsresult GetAccept(nsAWritableString & aAccept) = 0;
  virtual nsresult SetAccept(const nsAReadableString & aAccept) = 0;


  virtual nsresult GetAccessKey(nsAWritableString & aAccessKey) = 0;
  virtual nsresult SetAccessKey(const nsAReadableString & aAccessKey) = 0;


  virtual nsresult GetAlign(nsAWritableString & aAlign) = 0;
  virtual nsresult SetAlign(const nsAReadableString & aAlign) = 0;


  virtual nsresult GetAlt(nsAWritableString & aAlt) = 0;
  virtual nsresult SetAlt(const nsAReadableString & aAlt) = 0;


  virtual nsresult GetChecked(PRBool *aChecked) = 0;
  virtual nsresult SetChecked(PRBool aChecked) = 0;


  virtual nsresult GetDisabled(PRBool *aDisabled) = 0;
  virtual nsresult SetDisabled(PRBool aDisabled) = 0;


  virtual nsresult GetMaxLength(PRInt32 *aMaxLength) = 0;
  virtual nsresult SetMaxLength(PRInt32 aMaxLength) = 0;


  virtual nsresult GetName(nsAWritableString & aName) = 0;
  virtual nsresult SetName(const nsAReadableString & aName) = 0;


  virtual nsresult GetReadOnly(PRBool *aReadOnly) = 0;
  virtual nsresult SetReadOnly(PRBool aReadOnly) = 0;


  virtual nsresult GetSize(nsAWritableString & aSize) = 0;
  virtual nsresult SetSize(const nsAReadableString & aSize) = 0;


  virtual nsresult GetSrc(nsAWritableString & aSrc) = 0;
  virtual nsresult SetSrc(const nsAReadableString & aSrc) = 0;


  virtual nsresult GetTabIndex(PRInt32 *aTabIndex) = 0;
  virtual nsresult SetTabIndex(PRInt32 aTabIndex) = 0;


  virtual nsresult GetType(nsAWritableString & aType) = 0;
  virtual nsresult SetType(const nsAReadableString & aType) = 0;


  virtual nsresult GetUseMap(nsAWritableString & aUseMap) = 0;
  virtual nsresult SetUseMap(const nsAReadableString & aUseMap) = 0;


  virtual nsresult GetValue(nsAWritableString & aValue) = 0;
  virtual nsresult SetValue(const nsAReadableString & aValue) = 0;


  virtual nsresult Blur(void) = 0;


  virtual nsresult Focus(void) = 0;


  virtual nsresult Select(void) = 0;


  virtual nsresult Click(void) = 0;

};
# 37 "../../../../dist/include/nsIFormProcessor.h" 2

class nsString;
class nsVoidArray;
# 58 "../../../../dist/include/nsIFormProcessor.h"
class nsIFormProcessor : public nsISupports {
public:
  static const nsIID& GetIID() {static const nsIID iid = { 0xf11c1e20, 0x873f, 0x11d3, { 0x96, 0x7f, 0x0, 0x10, 0x5a, 0x1b, 0x1b, 0x76 } }; return iid;}
# 74 "../../../../dist/include/nsIFormProcessor.h"
  virtual nsresult ProcessValue(nsIDOMHTMLElement *aElement,
                          const nsString& aName,
                          nsString& aValue) = 0;
# 87 "../../../../dist/include/nsIFormProcessor.h"
  virtual nsresult ProvideContent(const nsString& aFormType,
                            nsVoidArray& aContent,
                            nsString& aAttribute) = 0;

};
# 30 "nsFormFrame.h" 2

class nsString;
class nsIContent;
class nsIFrame;
class nsIPresContext;
struct nsHTMLReflowState;
class nsFormControlFrame;
class nsGfxRadioControlFrame;
class nsIFormControlFrame;
class nsIDOMHTMLFormElement;
class nsIDocument;
class nsIPresContext;
class nsFormFrame;
class nsIUnicodeEncoder;
class nsRadioControlGroup;

class nsFormFrame : public nsBlockFrame,
                    public nsIFormManager
{
public:
  nsFormFrame();
  virtual ~nsFormFrame();

  virtual nsresult QueryInterface(const nsIID& aIID, void** aInstancePtr);

  virtual nsresult RemoveFrame(nsIPresContext* aPresContext,
                         nsIPresShell& aPresShell,
                         nsIAtom* aListName,
                         nsIFrame* aOldFrame);



  virtual nsresult OnReset(nsIPresContext* aPresContext);

  virtual nsresult OnSubmit(nsIPresContext* aPresContext, nsIFrame* aFrame);







  nsresult OnRadioChecked(nsIPresContext* aPresContext, nsGfxRadioControlFrame& aRadio, PRBool aChecked = 1);

  void AddFormControlFrame(nsIPresContext* aPresContext, nsIFormControlFrame& aFrame);
  static void AddFormControlFrame(nsIPresContext* aPresContext, nsIFrame& aFrame);
  void RemoveFormControlFrame(nsIFormControlFrame& aFrame);
  void RemoveRadioControlFrame(nsIFormControlFrame * aFrame);
  nsresult GetRadioInfo(nsIFormControlFrame* aFrame, nsString& aName, nsRadioControlGroup *& aGroup);

  PRBool CanSubmit(nsIFormControlFrame *aFrame);

  virtual nsresult GetMethod(PRInt32* aMethod);
  virtual nsresult GetEnctype(PRInt32* aEnctype);
  virtual nsresult GetTarget(nsString* aTarget);
  virtual nsresult GetAction(nsString* aAction);



  static PRBool GetDisabled(nsIFrame* aChildFrame, nsIContent* aContent = 0);
  static PRBool GetReadonly(nsIFrame* aChildFrame, nsIContent* aContent = 0);
  static nsresult GetName(nsIFrame* aChildFrame, nsString& aName, nsIContent* aContent = 0);
  static nsresult GetValue(nsIFrame* aChildFrame, nsString& aValue, nsIContent* aContent = 0);
  static void StyleChangeReflow(nsIPresContext* aPresContext,
                                nsIFrame* aFrame);
  static nsresult GetRadioGroupSelectedContent(nsGfxRadioControlFrame* aControl,
                                               nsIContent ** aRadiobtn);
  void SetFlags(PRUint32 aFlags) {
    mState &= ~0xFFF00000;
    mState |= aFlags;
  }

protected:
  virtual nsrefcnt AddRef(void);
  virtual nsrefcnt Release(void);
  virtual nsresult DidSetStyleContext(nsIPresContext* aPresContext);
  void RemoveRadioGroups();

  void DoDefaultSelection(nsIPresContext* aPresContext,
                          nsRadioControlGroup * aGroup,
                          nsGfxRadioControlFrame * aRadioToIgnore = 0);

  nsresult ProcessValue(nsIFormProcessor& aFormProcessor, nsIFormControlFrame* aFrameControl, const nsString& aName, nsString& aNewValue);
  nsresult ProcessAsURLEncoded(nsIFormProcessor* aFormProcessor, PRBool aIsPost, nsString& aData, nsIFormControlFrame* aFrame);
  nsresult ProcessAsMultipart(nsIFormProcessor* aFormProcessor, nsIFileSpec*& aMultipartDataFile, nsIFormControlFrame* aFrame);
  static const char* GetFileNameWithinPath(char* aPathName);
  nsresult GetContentType(char* aPathName, char** aContentType);


  nsString* URLEncode(const nsString& aString, nsIUnicodeEncoder* encoder);
  char* UnicodeToNewBytes(const PRUnichar* aSrc, PRUint32 aLen, nsIUnicodeEncoder* encoder);

  virtual nsresult GetEncoder(nsIUnicodeEncoder** encoder);
  virtual nsresult GetPlatformEncoder(nsIUnicodeEncoder** encoder);
  void GetSubmitCharset(nsString& oCharset);
  void UpdateSubmitter(nsIFormControlFrame * aFrame);

  nsVoidArray mFormControls;
  nsVoidArray mRadioGroups;
  nsIFormControlFrame* mTextSubmitter;
  PRBool mTextSubmitterSet;


  nsAutoString mCharset;
  PRUint8 mTextDir;
  PRUint8 mCtrlsModAtSubmit;


};
# 52 "nsFormControlHelper.cpp" 2
# 1 "../../../../dist/include/nsIContent.h" 1
# 53 "nsFormControlHelper.cpp" 2
# 1 "../../../../dist/include/nsStyleUtil.h" 1
# 54 "nsFormControlHelper.cpp" 2
# 1 "../../../../dist/include/nsINameSpaceManager.h" 1
# 26 "../../../../dist/include/nsINameSpaceManager.h"
# 1 "../../../../dist/include/nsISupports.h" 1
# 27 "../../../../dist/include/nsINameSpaceManager.h" 2
# 1 "../../../../dist/include/nslayout.h" 1
# 28 "../../../../dist/include/nsINameSpaceManager.h" 2
# 1 "../../../../dist/include/nsAWritableString.h" 1
# 29 "../../../../dist/include/nsINameSpaceManager.h" 2

class nsIAtom;
class nsString;
class nsINameSpace;
# 68 "../../../../dist/include/nsINameSpaceManager.h"
class nsINameSpaceManager : public nsISupports {
public:
  static const nsIID& GetIID() { static nsIID iid = { 0xa6cf90d5, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}; return iid; }

  virtual nsresult CreateRootNameSpace(nsINameSpace*& aRootNameSpace) = 0;

  virtual nsresult RegisterNameSpace(const nsAReadableString& aURI,
                                                 PRInt32& aNameSpaceID) = 0;

  virtual nsresult GetNameSpaceURI(PRInt32 aNameSpaceID, nsAWritableString& aURI) = 0;
  virtual nsresult GetNameSpaceID(const nsAReadableString& aURI, PRInt32& aNameSpaceID) = 0;
};

extern nsresult
  NS_NewNameSpaceManager(nsINameSpaceManager** aInstancePtrResult);
# 55 "nsFormControlHelper.cpp" 2
# 1 "../../../../dist/include/nsIDOMHTMLInputElement.h" 1
# 56 "nsFormControlHelper.cpp" 2
# 1 "../../../../dist/include/nsNetCID.h" 1
# 57 "nsFormControlHelper.cpp" 2


# 1 "../../../../dist/include/nsIServiceManager.h" 1
# 60 "nsFormControlHelper.cpp" 2
# 1 "../../../../dist/include/nsIIOService.h" 1
# 17 "../../../../dist/include/nsIIOService.h"
class nsIProtocolHandler;

class nsIChannel;

class nsIURI;
# 31 "../../../../dist/include/nsIIOService.h"
class nsIIOService : public nsISupports {
 public:

  static const nsIID& GetIID() {static const nsIID iid = {0xab7c3a84, 0xd488, 0x11d3, { 0x8c, 0xda, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3 }}; return iid;}
# 43 "../../../../dist/include/nsIIOService.h"
  virtual nsresult GetProtocolHandler(const char *scheme, nsIProtocolHandler **_retval) = 0;
# 56 "../../../../dist/include/nsIIOService.h"
  virtual nsresult NewURI(const char *aSpec, nsIURI *aBaseURI, nsIURI **_retval) = 0;
# 74 "../../../../dist/include/nsIIOService.h"
  virtual nsresult NewChannelFromURI(nsIURI *aURI, nsIChannel **_retval) = 0;
# 92 "../../../../dist/include/nsIIOService.h"
  virtual nsresult NewChannel(const char *aSpec, nsIURI *aBaseURI, nsIChannel **_retval) = 0;
# 101 "../../../../dist/include/nsIIOService.h"
  virtual nsresult GetOffline(PRBool *aOffline) = 0;
  virtual nsresult SetOffline(PRBool aOffline) = 0;
# 112 "../../../../dist/include/nsIIOService.h"
  virtual nsresult AllowPort(PRInt32 port, const char *scheme, PRBool *_retval) = 0;
# 130 "../../../../dist/include/nsIIOService.h"
  virtual nsresult ExtractScheme(const char *urlString, PRUint32 *schemeStartPos, PRUint32 *schemeEndPos, char **scheme) = 0;




  enum { url_Scheme = 1 };

  enum { url_Username = 2 };

  enum { url_Password = 4 };

  enum { url_Host = 8 };

  enum { url_Directory = 16 };

  enum { url_FileBaseName = 32 };

  enum { url_FileExtension = 64 };

  enum { url_Param = 128 };

  enum { url_Query = 256 };

  enum { url_Ref = 512 };

  enum { url_Forced = 1024 };
# 165 "../../../../dist/include/nsIIOService.h"
  virtual nsresult Escape(const char *str, PRInt16 mask, char **_retval) = 0;
# 174 "../../../../dist/include/nsIIOService.h"
  virtual nsresult Unescape(const char *str, char **_retval) = 0;
# 183 "../../../../dist/include/nsIIOService.h"
  virtual nsresult ExtractPort(const char *str, PRInt32 *_retval) = 0;
# 198 "../../../../dist/include/nsIIOService.h"
  virtual nsresult ResolveRelativePath(const char *relativePath, const char *basePath, char **_retval) = 0;

};
# 61 "nsFormControlHelper.cpp" 2
# 1 "../../../../dist/include/nsIURI.h" 1
# 61 "../../../../dist/include/nsIURI.h"
class nsIURI : public nsISupports {
 public:

  static const nsIID& GetIID() {static const nsIID iid = {0x07a22cc0, 0x0ce5, 0x11d3, { 0x93, 0x31, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40 }}; return iid;}
# 73 "../../../../dist/include/nsIURI.h"
  virtual nsresult GetSpec(char * *aSpec) = 0;
  virtual nsresult SetSpec(const char * aSpec) = 0;







  virtual nsresult GetPrePath(char * *aPrePath) = 0;
  virtual nsresult SetPrePath(const char * aPrePath) = 0;
# 93 "../../../../dist/include/nsIURI.h"
  virtual nsresult GetScheme(char * *aScheme) = 0;
  virtual nsresult SetScheme(const char * aScheme) = 0;






  virtual nsresult GetPreHost(char * *aPreHost) = 0;
  virtual nsresult SetPreHost(const char * aPreHost) = 0;


  virtual nsresult GetUsername(char * *aUsername) = 0;
  virtual nsresult SetUsername(const char * aUsername) = 0;


  virtual nsresult GetPassword(char * *aPassword) = 0;
  virtual nsresult SetPassword(const char * aPassword) = 0;






  virtual nsresult GetHost(char * *aHost) = 0;
  virtual nsresult SetHost(const char * aHost) = 0;
# 130 "../../../../dist/include/nsIURI.h"
  virtual nsresult GetPort(PRInt32 *aPort) = 0;
  virtual nsresult SetPort(PRInt32 aPort) = 0;







  virtual nsresult GetPath(char * *aPath) = 0;
  virtual nsresult SetPath(const char * aPath) = 0;
# 151 "../../../../dist/include/nsIURI.h"
  virtual nsresult Equals(nsIURI *other, PRBool *_retval) = 0;
# 160 "../../../../dist/include/nsIURI.h"
  virtual nsresult SchemeIs(const char *scheme, PRBool *_retval) = 0;
# 169 "../../../../dist/include/nsIURI.h"
  virtual nsresult Clone(nsIURI **_retval) = 0;
# 178 "../../../../dist/include/nsIURI.h"
  virtual nsresult Resolve(const char *relativePath, char **_retval) = 0;

};
# 62 "nsFormControlHelper.cpp" 2
# 1 "../../../../dist/include/nsIStringBundle.h" 1
# 39 "../../../../dist/include/nsIStringBundle.h"
class nsIStringBundle : public nsISupports {
 public:

  static const nsIID& GetIID() {static const nsIID iid = {0xd85a17c2, 0xaa7c, 0x11d2, { 0x9b, 0x8c, 0x00, 0x80, 0x5f, 0x8a, 0x16, 0xd9 }}; return iid;}


  virtual nsresult GetStringFromID(PRInt32 aID, PRUnichar **_retval) = 0;


  virtual nsresult GetStringFromName(const PRUnichar *aName, PRUnichar **_retval) = 0;


  virtual nsresult FormatStringFromID(PRInt32 aID, const PRUnichar **params, PRUint32 length, PRUnichar **_retval) = 0;


  virtual nsresult FormatStringFromName(const PRUnichar *aName, const PRUnichar **params, PRUint32 length, PRUnichar **_retval) = 0;


  virtual nsresult GetEnumeration(nsIBidirectionalEnumerator **_retval) = 0;


  virtual nsresult GetSimpleEnumeration(nsISimpleEnumerator **_retval) = 0;


  virtual nsresult GetLoaded(PRBool *aLoaded) = 0;
  virtual nsresult SetLoaded(PRBool aLoaded) = 0;

};
# 187 "../../../../dist/include/nsIStringBundle.h"
class nsIStringBundleService : public nsISupports {
 public:

  static const nsIID& GetIID() {static const nsIID iid = {0xd85a17c0, 0xaa7c, 0x11d2, { 0x9b, 0x8c, 0x00, 0x80, 0x5f, 0x8a, 0x16, 0xd9 }}; return iid;}


  virtual nsresult CreateBundle(const char *aURLSpec, nsIStringBundle **_retval) = 0;


  virtual nsresult CreateAsyncBundle(const char *aURLSpec, nsIStringBundle **_retval) = 0;


  virtual nsresult CreateExtensibleBundle(const char *aRegistryKey, nsIStringBundle **_retval) = 0;
# 210 "../../../../dist/include/nsIStringBundle.h"
  virtual nsresult FormatStatusMessage(nsresult aStatus, const PRUnichar *aStatusArg, PRUnichar **_retval) = 0;
# 222 "../../../../dist/include/nsIStringBundle.h"
  virtual nsresult FlushBundles(void) = 0;

};
# 63 "nsFormControlHelper.cpp" 2
# 1 "../../../../dist/include/nsITextContent.h" 1
# 25 "../../../../dist/include/nsITextContent.h"
# 1 "../../../../dist/include/nslayout.h" 1
# 26 "../../../../dist/include/nsITextContent.h" 2
# 1 "../../../../dist/include/nsIContent.h" 1
# 27 "../../../../dist/include/nsITextContent.h" 2
class nsString;
class nsTextFragment;
# 38 "../../../../dist/include/nsITextContent.h"
class nsITextContent : public nsIContent {
public:
  static const nsIID& GetIID() { static nsIID iid = {0xa6cf9065, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}; return iid; }




  virtual nsresult GetText(const nsTextFragment** aFragmentsResult) = 0;




  virtual nsresult GetTextLength(PRInt32* aLengthResult) = 0;




  virtual nsresult CopyText(nsAWritableString& aResult) = 0;





  virtual nsresult SetText(const PRUnichar* aBuffer,
                     PRInt32 aLength,
                     PRBool aNotify) = 0;





  virtual nsresult SetText(const nsAReadableString& aStr,
                     PRBool aNotify) = 0;





  virtual nsresult SetText(const char* aBuffer,
                     PRInt32 aLength,
                     PRBool aNotify) = 0;




  virtual nsresult IsOnlyWhitespace(PRBool* aResult) = 0;





  virtual nsresult CloneContent(PRBool aCloneText, nsITextContent** aClone) = 0;
};
# 100 "../../../../dist/include/nsITextContent.h"
class nsITextContentChangeData : public nsISupports {
public:
  static const nsIID& GetIID() {static const nsIID iid = {0xa6cf905e, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}; return iid;};

  enum ChangeType {
    Insert,
    Append,
    Replace
  };





  virtual nsresult GetChangeType(ChangeType* aResult) = 0;

  virtual nsresult GetInsertData(PRInt32* aOffset,
                           PRInt32* aInsertLength) = 0;

  virtual nsresult GetAppendData(PRInt32* aOffset,
                           PRInt32* aAppendLength) = 0;

  virtual nsresult GetReplaceData(PRInt32* aOffset,
                            PRInt32* aSourceLength,
                            PRInt32* aReplaceLength) = 0;
};


extern nsresult
NS_NewTextNode(nsIContent** aResult);

extern nsresult
NS_NewCommentNode(nsIContent** aResult);
# 64 "nsFormControlHelper.cpp" 2
# 1 "../../../../dist/include/nsISupportsArray.h" 1
# 14 "../../../../dist/include/nsISupportsArray.h"
# 1 "../../../../dist/include/nsICollection.h" 1
# 29 "../../../../dist/include/nsICollection.h"
class nsICollection : public nsISupports {
 public:

  static const nsIID& GetIID() {static const nsIID iid = {0x83b6019c, 0xcbc4, 0x11d2, { 0x8c, 0xca, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3 }}; return iid;}


  virtual nsresult Count(PRUint32 *_retval) = 0;


  virtual nsresult GetElementAt(PRUint32 index, nsISupports **_retval) = 0;


  virtual nsresult QueryElementAt(PRUint32 index, const nsIID & uuid, void * *result) = 0;


  virtual nsresult SetElementAt(PRUint32 index, nsISupports *item) = 0;


  virtual nsresult AppendElement(nsISupports *item) = 0;


  virtual nsresult RemoveElement(nsISupports *item) = 0;


  virtual nsresult Enumerate(nsIEnumerator **_retval) = 0;


  virtual nsresult Clear(void) = 0;

};
# 15 "../../../../dist/include/nsISupportsArray.h" 2






class nsIBidirectionalEnumerator;
# 34 "../../../../dist/include/nsISupportsArray.h"
typedef PRBool (*nsISupportsArrayEnumFunc)(nsISupports* aElement, void *aData);
# 44 "../../../../dist/include/nsISupportsArray.h"
class nsISupportsArray : public nsICollection {
 public:

  static const nsIID& GetIID() {static const nsIID iid = {0x791eafa0, 0xb9e6, 0x11d1, { 0x80, 0x31, 0x00, 0x60, 0x08, 0x15, 0x9b, 0x5a }}; return iid;}


  virtual PRBool Equals(const nsISupportsArray *other) = 0;


  virtual nsISupports * ElementAt(PRUint32 aIndex) = 0;


  virtual PRInt32 IndexOf(const nsISupports *aPossibleElement) = 0;


  virtual PRInt32 IndexOfStartingAt(const nsISupports *aPossibleElement, PRUint32 aStartIndex) = 0;


  virtual PRInt32 LastIndexOf(const nsISupports *aPossibleElement) = 0;


  virtual nsresult GetIndexOf(nsISupports *aPossibleElement, PRInt32 *_retval) = 0;


  virtual nsresult GetIndexOfStartingAt(nsISupports *aPossibleElement, PRUint32 aStartIndex, PRInt32 *_retval) = 0;


  virtual nsresult GetLastIndexOf(nsISupports *aPossibleElement, PRInt32 *_retval) = 0;


  virtual PRBool InsertElementAt(nsISupports *aElement, PRUint32 aIndex) = 0;


  virtual PRBool ReplaceElementAt(nsISupports *aElement, PRUint32 aIndex) = 0;


  virtual PRBool RemoveElementAt(PRUint32 aIndex) = 0;


  virtual PRBool RemoveLastElement(const nsISupports *aElement) = 0;


  virtual nsresult DeleteLastElement(nsISupports *aElement) = 0;


  virtual nsresult DeleteElementAt(PRUint32 aIndex) = 0;


  virtual PRBool AppendElements(nsISupportsArray *aElements) = 0;


  virtual nsresult Compact(void) = 0;


  virtual PRBool EnumerateForwards(nsISupportsArrayEnumFunc aFunc, void * aData) = 0;


  virtual PRBool EnumerateBackwards(nsISupportsArrayEnumFunc aFunc, void * aData) = 0;


  virtual nsresult Clone(nsISupportsArray **_retval) = 0;

private:

  virtual PRBool operator==(const nsISupportsArray& other) = 0;
  virtual nsISupports* operator[](PRUint32 aIndex) = 0;
};
# 325 "../../../../dist/include/nsISupportsArray.h"
extern nsresult
NS_NewISupportsArray(nsISupportsArray** aInstancePtrResult);

extern nsresult
NS_NewISupportsArrayEnumerator(nsISupportsArray* array,
                               nsIBidirectionalEnumerator* *aInstancePtrResult);
# 65 "nsFormControlHelper.cpp" 2
# 1 "../../../../dist/include/nsXPIDLString.h" 1
# 90 "../../../../dist/include/nsXPIDLString.h"
# 1 "../../../../dist/include/nscore.h" 1
# 91 "../../../../dist/include/nsXPIDLString.h" 2
# 1 "../../../../dist/include/nsCom.h" 1
# 92 "../../../../dist/include/nsXPIDLString.h" 2
# 1 "/tmp/LB/mozilla-0.9.1/dist/include/nspr/prtypes.h" 1
# 93 "../../../../dist/include/nsXPIDLString.h" 2
# 108 "../../../../dist/include/nsXPIDLString.h"
class nsXPIDLString {
private:
    PRUnichar* mBuf;
    PRBool mBufOwner;

    PRUnichar** StartAssignmentByValue();
    const PRUnichar** StartAssignmentByReference();

public:



    nsXPIDLString() : mBuf(0), mBufOwner(0) {}

    ~nsXPIDLString();




    operator const PRUnichar*() const { return get(); }




    const PRUnichar* get() const { return mBuf; }





    static PRUnichar* Copy(const PRUnichar* aString);




    class GetterCopies {
    private:
        nsXPIDLString& mXPIDLString;

    public:
        GetterCopies(nsXPIDLString& aXPIDLString)
            : mXPIDLString(aXPIDLString) {}

        operator PRUnichar**() {
            return mXPIDLString.StartAssignmentByValue();
        }

        friend GetterCopies getter_Copies(nsXPIDLString& aXPIDLString);
    };

    friend class GetterCopies;




    class GetterShares {
    private:
        nsXPIDLString& mXPIDLString;

    public:
        GetterShares(nsXPIDLString& aXPIDLString)
            : mXPIDLString(aXPIDLString) {}

        operator const PRUnichar**() {
            return mXPIDLString.StartAssignmentByReference();
        }

        friend GetterShares getter_Shares(nsXPIDLString& aXPIDLString);
    };

    friend class GetterShares;

private:

    nsXPIDLString(nsXPIDLString& ) {}
    void operator=(nsXPIDLString& ) {}
};






inline nsXPIDLString::GetterCopies
getter_Copies(nsXPIDLString& aXPIDLString)
{
    return nsXPIDLString::GetterCopies(aXPIDLString);
}





inline nsXPIDLString::GetterShares
getter_Shares(nsXPIDLString& aXPIDLString)
{
    return nsXPIDLString::GetterShares(aXPIDLString);
}



inline
PRBool
operator==(const PRUnichar* lhs, const nsXPIDLString& rhs)
{
    return lhs == static_cast< const PRUnichar* >(rhs);
}

inline
PRBool
operator==(const nsXPIDLString& lhs, const PRUnichar* rhs)
{
    return static_cast< const PRUnichar* >(lhs) == rhs;
}
# 251 "../../../../dist/include/nsXPIDLString.h"
class nsXPIDLCString {
private:
    char* mBuf;
    PRBool mBufOwner;

    char** StartAssignmentByValue();
    const char** StartAssignmentByReference();

public:



    nsXPIDLCString() : mBuf(0), mBufOwner(0) {}

    ~nsXPIDLCString();





    nsXPIDLCString& operator=(const char* aString);




    operator const char*() const { return get(); }




    const char* get() const { return mBuf; }





    static char* Copy(const char* aString);




    class GetterCopies {
    private:
        nsXPIDLCString& mXPIDLString;

    public:
        GetterCopies(nsXPIDLCString& aXPIDLString)
            : mXPIDLString(aXPIDLString) {}

        operator char**() {
            return mXPIDLString.StartAssignmentByValue();
        }

        friend GetterCopies getter_Copies(nsXPIDLCString& aXPIDLString);
    };

    friend class GetterCopies;




    class GetterShares {
    private:
        nsXPIDLCString& mXPIDLString;

    public:
        GetterShares(nsXPIDLCString& aXPIDLString)
            : mXPIDLString(aXPIDLString) {}

        operator const char**() {
            return mXPIDLString.StartAssignmentByReference();
        }

        friend GetterShares getter_Shares(nsXPIDLCString& aXPIDLString);
    };

    friend class GetterShares;

private:

    nsXPIDLCString(nsXPIDLCString& ) {}
    void operator=(nsXPIDLCString& ) {}
};





inline nsXPIDLCString::GetterCopies
getter_Copies(nsXPIDLCString& aXPIDLString)
{
    return nsXPIDLCString::GetterCopies(aXPIDLString);
}






inline nsXPIDLCString::GetterShares
getter_Shares(nsXPIDLCString& aXPIDLString)
{
    return nsXPIDLCString::GetterShares(aXPIDLString);
}


inline
PRBool
operator==(const char* lhs, const nsXPIDLCString& rhs)
{
    return lhs == static_cast< const char* >(rhs);
}

inline
PRBool
operator==(const nsXPIDLCString& lhs, const char* rhs)
{
    return static_cast< const char* >(lhs) == rhs;
}
# 66 "nsFormControlHelper.cpp" 2

static const nsCID kIOServiceCID = { 0x9ac9e770, 0x18bc, 0x11d3, {0x93, 0x37, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40} };
static const nsCID kStringBundleServiceCID = { 0xd85a17c1, 0xaa7c, 0x11d2, { 0x9b, 0x8c, 0x0, 0x80, 0x5f, 0x8a, 0x16, 0xd9 } };



static const nsIID kISupportsIID = { 0x00000000, 0x0000, 0x0000, {0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46} };
static const nsIID kViewCID = { 0xc95f1832, 0xc376, 0x11d1, {0xb7, 0x21, 0x0, 0x60, 0x8, 0x91, 0xd8, 0xc9}};
# 86 "nsFormControlHelper.cpp"
nsFormControlHelper::nsFormControlHelper()
{
                                     ;
}

nsFormControlHelper::~nsFormControlHelper()
{
                                     ;
}

void nsFormControlHelper::ForceDrawFrame(nsIPresContext* aPresContext, nsIFrame * aFrame)
{

  if (aFrame == 0) {
    return;
  }
  nsRect rect;
  nsIView * view;
  nsPoint pnt;
  aFrame->GetOffsetFromView(aPresContext, pnt, &view);
  aFrame->GetRect(rect);
  rect.x = pnt.x;
  rect.y = pnt.y;
  if (view != 0) {
    nsIViewManager * viewMgr;
    view->GetViewManager(viewMgr);
    if (viewMgr != 0) {
      viewMgr->UpdateView(view, rect, 0x0004);
      do { (viewMgr)->Release(); (viewMgr) = 0; } while (0);
    }
  }

}

void nsFormControlHelper::PlatformToDOMLineBreaks(nsString &aString)
{

  aString.ReplaceSubstring(NS_ConvertASCIItoUCS2("\r\n"), NS_ConvertASCIItoUCS2("\n"));


  aString.ReplaceSubstring(NS_ConvertASCIItoUCS2("\r"), NS_ConvertASCIItoUCS2("\n"));
}

PRBool nsFormControlHelper::GetBool(const nsAReadableString& aValue)
{
  return aValue.Equals(static_cast< const nsAFlatString& >(nsDependentString(reinterpret_cast< const PRUnichar* >(L"1"), PRUint32((sizeof(L"1")/sizeof(wchar_t))-1))));
}

void nsFormControlHelper::GetBoolString(const PRBool aValue,
                                        nsAWritableString& aResult)
{
  if (aValue)
    aResult.Assign(static_cast< const nsAFlatString& >(nsDependentString(reinterpret_cast< const PRUnichar* >(L"1"), PRUint32((sizeof(L"1")/sizeof(wchar_t))-1))));
  else
    aResult.Assign(static_cast< const nsAFlatString& >(nsDependentString(reinterpret_cast< const PRUnichar* >(L"0"), PRUint32((sizeof(L"0")/sizeof(wchar_t))-1))));
}


nsCompatibility
nsFormControlHelper::GetRepChars(nsIPresContext* aPresContext, char& char1, char& char2)
{
  nsCompatibility mode;
  aPresContext->GetCompatibilityMode(&mode);
  if (eCompatibility_Standard == mode) {
    char1 = 'W';
    char2 = 'w';
    return eCompatibility_Standard;
  } else {
    char1 = 'W';
    char2 = 'w';
    return eCompatibility_NavQuirks;
  }
}

nsresult nsFormControlHelper::GetFrameFontFM(nsIPresContext* aPresContext,
                                         nsIFormControlFrame * aFrame,
                                         nsIFontMetrics** aFontMet)
{

  const nsFont * font = 0;

  if ((!((aFrame->GetFont(aPresContext, font)) & 0x80000000))) {
    nsCOMPtr<nsIDeviceContext> deviceContext;
    aPresContext->GetDeviceContext(getter_AddRefs(deviceContext));
    {};
    if (font != 0) {
      return deviceContext->GetMetricsFor(*font, *aFontMet);
    }
  }
  return ((nsresult) 0x80004005L);
}

nsresult
nsFormControlHelper::GetWrapProperty(nsIContent * aContent, nsString &aOutValue)
{
  aOutValue.SetLength(0);
  nsresult result = ((nsresult) (((PRUint32)(0)<<31) | ((PRUint32)(8 +0x45)<<16) | ((PRUint32)(1))) );
  nsIHTMLContent* content = 0;
  aContent->QueryInterface(kIHTMLContentIID, (void**) &content);
  if (0 != content) {
    nsHTMLValue value;
    result = content->GetHTMLAttribute(nsHTMLAtoms::wrap, value);
    if (eHTMLUnit_String == value.GetUnit()) {
      value.GetStringValue(aOutValue);
    }
    do { (content)->Release(); (content) = 0; } while (0);
  }
  return result;
}


nsresult
nsFormControlHelper::GetWrapPropertyEnum(nsIContent * aContent, nsHTMLTextWrap& aWrapProp)
{
  nsString wrap;
  aWrapProp = eHTMLTextWrap_Off;

  nsresult result = GetWrapProperty(aContent, wrap);

  if (((nsresult) (((PRUint32)(0)<<31) | ((PRUint32)(8 +0x45)<<16) | ((PRUint32)(1))) ) != result) {

    nsAutoString wrapHard; wrapHard.AssignWithConversion("HARD");
    nsAutoString wrapPhysical; wrapPhysical.AssignWithConversion("PHYSICAL");
    if (wrap.EqualsIgnoreCase(wrapHard) ||
        wrap.EqualsIgnoreCase(wrapPhysical)) {
      aWrapProp = eHTMLTextWrap_Hard;
      return result;
    }

    nsAutoString wrapSoft; wrapSoft.AssignWithConversion("SOFT");
    nsAutoString wrapVirtual; wrapVirtual.AssignWithConversion("VIRTUAL");
    if (wrap.EqualsIgnoreCase(wrapSoft) ||
        wrap.EqualsIgnoreCase(wrapVirtual)) {
      aWrapProp = eHTMLTextWrap_Soft;
      return result;
    }
  }
  return result;
}

nscoord
nsFormControlHelper::CalcNavQuirkSizing(nsIPresContext* aPresContext,
                                        nsIRenderingContext* aRendContext,
                                        nsIFontMetrics* aFontMet,
                                        nsIFormControlFrame* aFrame,
                                        nsInputDimensionSpec& aSpec,
                                        nsSize& aSize)
{
  float p2t;
  float t2p;
  aPresContext->GetPixelsToTwips(&p2t);
  aPresContext->GetTwipsToPixels(&t2p);

  nscoord ascent;
  nscoord descent;
  nscoord maxCharWidth;
  aFontMet->GetMaxAscent(ascent);
  aFontMet->GetMaxDescent(descent);
  aFontMet->GetMaxAdvance(maxCharWidth);

  ascent = NSToCoordRound(ascent * t2p);
  descent = NSToCoordRound(descent * t2p);
  maxCharWidth = NSToCoordRound(maxCharWidth * t2p);

  char char1, char2;
  GetRepChars(aPresContext, char1, char2);

  nscoord char1Width, char2Width;
  aRendContext->GetWidth(char1, char1Width);
  aRendContext->GetWidth(char2, char2Width);
  char1Width = NSToCoordRound(char1Width * t2p);
  char2Width = NSToCoordRound(char2Width * t2p);


  PRInt32 type;
  aFrame->GetType(&type);
  nscoord width;
  nscoord hgt;
  nscoord height;
  nscoord average = 0;
  if ((14 == type) || (11 == type)) {
    average = (char1Width + char2Width) / 2;
    width = maxCharWidth;
    hgt = ascent + descent;
    height = hgt + (hgt / 2);
    width += aSpec.mColDefaultSize * average;
  } else if (20 == type) {
    nscoord lines = 1;
    nscoord scrollbarWidth = 0;
    nscoord scrollbarHeight = 0;
    float scale;
    nsCOMPtr<nsIDeviceContext> dx;
    aPresContext->GetDeviceContext(getter_AddRefs(dx));
    if (dx) {
      float sbWidth;
      float sbHeight;
      dx->GetCanonicalPixelScale(scale);
      dx->GetScrollBarDimensions(sbWidth, sbHeight);
      scrollbarWidth = PRInt32(sbWidth * scale);
      scrollbarHeight = PRInt32(sbHeight * scale);
      scrollbarWidth = NSToCoordRound(scrollbarWidth * t2p);
      scrollbarHeight = NSToCoordRound(scrollbarHeight * t2p);
    } else {
      {};
      scrollbarWidth = 16;
      scrollbarHeight = 16;
    }
    nsIContent * content;
    aFrame->GetFormContent(content);
    nsCOMPtr<nsIHTMLContent> hContent(do_QueryInterface(content));


    nsHTMLValue rowAttr;
    nsresult rowStatus = ((nsresult) (((PRUint32)(0)<<31) | ((PRUint32)(8 +0x45)<<16) | ((PRUint32)(1))) );
    if (0 != aSpec.mRowSizeAttr) {
      rowStatus = hContent->GetHTMLAttribute(aSpec.mRowSizeAttr, rowAttr);
    }
    if (0 == rowStatus) {
      PRInt32 rowAttrInt = ((rowAttr.GetUnit() == eHTMLUnit_Pixel)
                              ? rowAttr.GetPixelValue() : rowAttr.GetIntValue());
      lines = (rowAttrInt > 0) ? rowAttrInt : 1;
    } else {
      lines = aSpec.mRowDefaultSize;
    }

    average = (char1Width + char2Width) / 2;
    width = ((aSpec.mColDefaultSize + 1) * average) + scrollbarWidth;
    hgt = ascent + descent;
    height = (lines + 1) * hgt;


    nsHTMLTextWrap wrapProp;
    nsFormControlHelper::GetWrapPropertyEnum(content, wrapProp);
    if (wrapProp == eHTMLTextWrap_Off) {
      height += scrollbarHeight;
    }
    do { (content)->Release(); (content) = 0; } while (0);
  } else if (5 == type ||
             13 == type ||
             9 == type) {
    GetTextSize(aPresContext, aFrame, *aSpec.mColDefaultValue, aSize, aRendContext);
    aSize.width = NSToCoordRound(aSize.width * t2p);
    aSize.height = NSToCoordRound(aSize.height * t2p);
    width = 3 * aSize.width / 2;
    height = 3 * aSize.height / 2;
  } else if (8 == type) {
    width = 0;
    height = 0;
  } else {
    width = 0;
    height = 0;
  }






  aSize.width = NSIntPixelsToTwips(width, p2t);
  aSize.height = NSIntPixelsToTwips(height, p2t);
  average = NSIntPixelsToTwips(average, p2t);

  return average;

}

nscoord
nsFormControlHelper::GetTextSize(nsIPresContext* aPresContext, nsIFormControlFrame* aFrame,
                                const nsString& aString, nsSize& aSize,
                                nsIRenderingContext *aRendContext)
{
  nsCOMPtr<nsIFontMetrics> fontMet;
  nsresult res = GetFrameFontFM(aPresContext, aFrame, getter_AddRefs(fontMet));
  if ((!((res) & 0x80000000)) && fontMet) {
    aRendContext->SetFont(fontMet);


    aRendContext->GetWidth(aString, aSize.width);
    fontMet->GetHeight(aSize.height);
  } else {
    {};
    aSize.width = 0;
  }

  char char1, char2;
  nsCompatibility mode = GetRepChars(aPresContext, char1, char2);
  nscoord char1Width, char2Width;
  aRendContext->GetWidth(char1, char1Width);
  aRendContext->GetWidth(char2, char2Width);

  if (eCompatibility_Standard == mode) {
    return ((char1Width + char2Width) / 2) + 1;
  } else {
    return (char1Width + char2Width) / 2;
  }
}

nscoord
nsFormControlHelper::GetTextSize(nsIPresContext* aPresContext, nsIFormControlFrame* aFrame,
                                PRInt32 aNumChars, nsSize& aSize,
                                nsIRenderingContext *aRendContext)
{
  nsAutoString val;
  char char1, char2;
  GetRepChars(aPresContext, char1, char2);
  int i;
  for (i = 0; i < aNumChars; i+=2) {
    val.AppendWithConversion(char1);
  }
  for (i = 1; i < aNumChars; i+=2) {
    val.AppendWithConversion(char2);
  }
  return GetTextSize(aPresContext, aFrame, val, aSize, aRendContext);
}

PRInt32
nsFormControlHelper::CalculateSize (nsIPresContext* aPresContext,
                                    nsIRenderingContext* aRendContext,
                                    nsIFormControlFrame* aFrame,
                                    const nsSize& aCSSSize,
                                    nsInputDimensionSpec& aSpec,
                                    nsSize& aDesiredSize,
                                    nsSize& aMinSize,
                                    PRBool& aWidthExplicit,
                                    PRBool& aHeightExplicit,
                                    nscoord& aRowHeight)
{
  nscoord charWidth = 0;
  PRInt32 numRows = -1;
  aWidthExplicit = 0;
  aHeightExplicit = 0;

  aDesiredSize.width = -1;
  aDesiredSize.height = -1;

  nsIContent* iContent = 0;
  aFrame->GetFormContent((nsIContent*&) iContent);
  if (!iContent) {
    return 0;
  }
  nsIHTMLContent* hContent = 0;
  nsresult result = iContent->QueryInterface(kIHTMLContentIID, (void**)&hContent);
  if ((0 != result) || !hContent) {
    do { (iContent)->Release(); (iContent) = 0; } while (0);
    return 0;
  }
  nsAutoString valAttr;
  nsresult valStatus = ((nsresult) (((PRUint32)(0)<<31) | ((PRUint32)(8 +0x45)<<16) | ((PRUint32)(1))) );
  if (0 != aSpec.mColValueAttr) {
    valStatus = hContent->GetAttribute(3, aSpec.mColValueAttr, valAttr);
  }
  nsHTMLValue colAttr;
  nsresult colStatus = ((nsresult) (((PRUint32)(0)<<31) | ((PRUint32)(8 +0x45)<<16) | ((PRUint32)(1))) );
  if (0 != aSpec.mColSizeAttr) {
    colStatus = hContent->GetHTMLAttribute(aSpec.mColSizeAttr, colAttr);
  }
  float p2t;
  aPresContext->GetScaledPixelsToTwips(&p2t);
# 464 "nsFormControlHelper.cpp"
  nsCompatibility qMode;
  aPresContext->GetCompatibilityMode(&qMode);


  if (0 == colStatus) {
    PRInt32 col = ((colAttr.GetUnit() == eHTMLUnit_Pixel) ? colAttr.GetPixelValue() : colAttr.GetIntValue());
    if (aSpec.mColSizeAttrInPixels) {

      charWidth = GetTextSize(aPresContext, aFrame, 1, aDesiredSize, aRendContext);
      col = (col <= 0) ? 15 : col;

      aDesiredSize.width = NSIntPixelsToTwips(col, p2t);
    } else {
      col = (col <= 0) ? 1 : col;
      if (eCompatibility_NavQuirks == qMode) {
        nsCOMPtr<nsIFontMetrics> fontMet;
        nsresult res = GetFrameFontFM(aPresContext, aFrame, getter_AddRefs(fontMet));
        if ((!((res) & 0x80000000)) && fontMet) {
          aRendContext->SetFont(fontMet);
          aSpec.mColDefaultSize = col;
          charWidth = CalcNavQuirkSizing(aPresContext, aRendContext, fontMet,
                                         aFrame, aSpec, aDesiredSize);
        } else {
          charWidth = GetTextSize(aPresContext, aFrame, col, aDesiredSize, aRendContext);
        }
      }
    }
    if (eCompatibility_Standard == qMode) {
      if (aSpec.mColSizeAttrInPixels) {
        aWidthExplicit = 1;
      }
    }
    aMinSize.width = aDesiredSize.width;
  } else {

    if (0 == valStatus) {
      charWidth = GetTextSize(aPresContext, aFrame, valAttr, aDesiredSize, aRendContext);
    } else if (aSpec.mColDefaultValue) {
      charWidth = GetTextSize(aPresContext, aFrame, *aSpec.mColDefaultValue, aDesiredSize, aRendContext);
    } else if (aSpec.mColDefaultSizeInPixels) {
      charWidth = GetTextSize(aPresContext, aFrame, 1, aDesiredSize, aRendContext);
      aDesiredSize.width = aSpec.mColDefaultSize;
    } else {
      if (eCompatibility_NavQuirks == qMode) {
        nsCOMPtr<nsIFontMetrics> fontMet;
        nsresult res = GetFrameFontFM(aPresContext, aFrame, getter_AddRefs(fontMet));
        if ((!((res) & 0x80000000)) && fontMet) {
          aRendContext->SetFont(fontMet);

          charWidth = CalcNavQuirkSizing(aPresContext, aRendContext, fontMet,
                                         aFrame, aSpec, aDesiredSize);
        } else {
          {};
          aDesiredSize.width = 300;
          aDesiredSize.width = 1500;
        }
      } else {
        charWidth = GetTextSize(aPresContext, aFrame, aSpec.mColDefaultSize, aDesiredSize, aRendContext);
      }
    }
    aMinSize.width = aDesiredSize.width;
    if (-1 != aCSSSize.width) {
      {};
      if (nscoord(1 << 30) != aCSSSize.width) {
        aDesiredSize.width = ((aDesiredSize.width)>(aCSSSize.width)?(aDesiredSize.width):(aCSSSize.width));
        aWidthExplicit = 1;
      }
    }
  }
  aRowHeight = aDesiredSize.height;
  aMinSize.height = aDesiredSize.height;


  if (eCompatibility_Standard == qMode) {
    nsHTMLValue rowAttr;
    nsresult rowStatus = ((nsresult) (((PRUint32)(0)<<31) | ((PRUint32)(8 +0x45)<<16) | ((PRUint32)(1))) );
    if (0 != aSpec.mRowSizeAttr) {
      rowStatus = hContent->GetHTMLAttribute(aSpec.mRowSizeAttr, rowAttr);
    }
    if (0 == rowStatus) {
      PRInt32 rowAttrInt = ((rowAttr.GetUnit() == eHTMLUnit_Pixel)
                              ? rowAttr.GetPixelValue() : rowAttr.GetIntValue());
      numRows = (rowAttrInt > 0) ? rowAttrInt : 1;
      aDesiredSize.height = aDesiredSize.height * numRows;
    } else {
      aDesiredSize.height = aDesiredSize.height * aSpec.mRowDefaultSize;
      if (-1 != aCSSSize.height) {
        {};
        if (nscoord(1 << 30) != aCSSSize.height) {
          aDesiredSize.height = ((aDesiredSize.height)>(aCSSSize.height)?(aDesiredSize.height):(aCSSSize.height));
          aHeightExplicit = 1;
        }
      }
    }
  }

  do { (hContent)->Release(); (hContent) = 0; } while (0);
  if (-1 == numRows) {
    numRows = (aRowHeight > 0) ? (aDesiredSize.height / aRowHeight) : 0;
  }

  do { (iContent)->Release(); (iContent) = 0; } while (0);

  return numRows;
}



nsresult
nsFormControlHelper::GetFont(nsIFormControlFrame * aFormFrame,
                             nsIPresContext* aPresContext,
                             nsIStyleContext * aStyleContext,
                             const nsFont*& aFont)
{
  const nsStyleFont* styleFont = (const nsStyleFont*)aStyleContext->GetStyleData(eStyleStruct_Font);

  nsWidgetRendering m;
  aPresContext->GetWidgetRenderingMode(&m);


  PRBool requiresWidget = 0;
  aFormFrame->RequiresWidget(requiresWidget);

  PRInt32 type;
  aFormFrame->GetType(&type);

  if (type!=14 &&
      type!=20 &&
      type!=11) {
    if (1 != requiresWidget && eWidgetRendering_Gfx == m) {
      aFont = &styleFont->mFont;
      return 0;
    }
  }

  nsCompatibility mode;
  aPresContext->GetCompatibilityMode(&mode);

  if (eCompatibility_Standard == mode) {
    aFont = &styleFont->mFont;
    return 0;
  }

  switch (type) {
    case 14:
    case 20:
    case 11:
      aFont = &styleFont->mFont;
      break;
    case 5:
    case 13:
    case 9:
    case 19:
      {};
# 641 "nsFormControlHelper.cpp"
      break;
  }
  return 0;
}
# 653 "nsFormControlHelper.cpp"
void
nsFormControlHelper::PaintLine(nsIRenderingContext& aRenderingContext,
                              nscoord aSX, nscoord aSY, nscoord aEX, nscoord aEY,
                              PRBool aHorz, nscoord aWidth, nscoord aOnePixel)
{

  nsPoint p[5];
  if (aHorz) {
    aEX++;
    p[0].x = nscoord(float(aSX)*aOnePixel);
    p[0].y = nscoord(float(aSY)*aOnePixel);
    p[1].x = nscoord(float(aEX)*aOnePixel);
    p[1].y = nscoord(float(aEY)*aOnePixel);
    p[2].x = nscoord(float(aEX)*aOnePixel);
    p[2].y = nscoord(float(aEY+1)*aOnePixel);
    p[3].x = nscoord(float(aSX)*aOnePixel);
    p[3].y = nscoord(float(aSY+1)*aOnePixel);
    p[4].x = nscoord(float(aSX)*aOnePixel);
    p[4].y = nscoord(float(aSY)*aOnePixel);
  } else {
    aEY++;
    p[0].x = nscoord(float(aSX)*aOnePixel);
    p[0].y = nscoord(float(aSY)*aOnePixel);
    p[1].x = nscoord(float(aEX)*aOnePixel);
    p[1].y = nscoord(float(aEY)*aOnePixel);
    p[2].x = nscoord(float(aEX+1)*aOnePixel);
    p[2].y = nscoord(float(aEY)*aOnePixel);
    p[3].x = nscoord(float(aSX+1)*aOnePixel);
    p[3].y = nscoord(float(aSY)*aOnePixel);
    p[4].x = nscoord(float(aSX)*aOnePixel);
    p[4].y = nscoord(float(aSY)*aOnePixel);
  }
  aRenderingContext.FillPolygon(p, 5);

}


void
nsFormControlHelper::SetupPoints(PRUint32 aNumberOfPoints, nscoord* aPoints, nsPoint* aPolygon, nscoord aScaleFactor, nscoord aX, nscoord aY,
                                nscoord aCenterX, nscoord aCenterY)
{
  const nscoord offsetX = aCenterX * aScaleFactor;
  const nscoord offsetY = aCenterY * aScaleFactor;

  PRUint32 i = 0;
  PRUint32 count = 0;
  for (i = 0; i < aNumberOfPoints; i++) {
    aPolygon[i].x = (aPoints[count] * aScaleFactor) + aX - offsetX;
    count++;
    aPolygon[i].y = (aPoints[count] * aScaleFactor) + aY - offsetY;
    count++;
  }
}


void
nsFormControlHelper::PaintFixedSizeCheckMark(nsIRenderingContext& aRenderingContext,
                         float aPixelsToTwips)
{



  const PRUint32 ox = 3;
  const PRUint32 oy = 3;

  nscoord onePixel = NSIntPixelsToTwips(1, aPixelsToTwips);





  PaintLine(aRenderingContext, 0 + ox, 2 + oy, 0 + ox, 4 + oy, 0, 1, onePixel);
  PaintLine(aRenderingContext, 1 + ox, 3 + oy, 1 + ox, 5 + oy, 0, 1, onePixel);
  PaintLine(aRenderingContext, 2 + ox, 4 + oy, 2 + ox, 6 + oy, 0, 1, onePixel);
  PaintLine(aRenderingContext, 3 + ox, 3 + oy, 3 + ox, 5 + oy, 0, 1, onePixel);
  PaintLine(aRenderingContext, 4 + ox, 2 + oy, 4 + ox, 4 + oy, 0, 1, onePixel);
  PaintLine(aRenderingContext, 5 + ox, 1 + oy, 5 + ox, 3 + oy, 0, 1, onePixel);
  PaintLine(aRenderingContext, 6 + ox, 0 + oy, 6 + ox, 2 + oy, 0, 1, onePixel);
}

void
nsFormControlHelper::PaintFixedSizeCheckMarkBorder(nsIRenderingContext& aRenderingContext,
                         float aPixelsToTwips, const nsStyleColor& aBackgroundColor)
{

  PRUint32 ox = 0;
  PRUint32 oy = 0;

  nscoord onePixel = NSIntPixelsToTwips(1, aPixelsToTwips);
  nscoord twelvePixels = NSIntPixelsToTwips(12, aPixelsToTwips);


  aRenderingContext.SetColor(aBackgroundColor.mColor);
  nsRect rect(0, 0, twelvePixels, twelvePixels);
  aRenderingContext.FillRect(rect);


  aRenderingContext.SetColor(((nscolor) ((255 << 24) | ((128)<<16) | ((128)<<8) | (128))));
  PaintLine(aRenderingContext, 0 + ox, 0 + oy, 11 + ox, 0 + oy, 1, 1, onePixel);
  PaintLine(aRenderingContext, 0 + ox, 0 + oy, 0 + ox, 11 + oy, 0, 1, onePixel);

  aRenderingContext.SetColor(((nscolor) ((255 << 24) | ((192)<<16) | ((192)<<8) | (192))));
  PaintLine(aRenderingContext, 1 + ox, 11 + oy, 11 + ox, 11 + oy, 1, 1, onePixel);
  PaintLine(aRenderingContext, 11 + ox, 1 + oy, 11 + ox, 11 + oy, 0, 1, onePixel);

  aRenderingContext.SetColor(((nscolor) ((255 << 24) | ((0)<<16) | ((0)<<8) | (0))));
  PaintLine(aRenderingContext, 1 + ox, 1 + oy, 10 + ox, 1 + oy, 1, 1, onePixel);
  PaintLine(aRenderingContext, 1 + ox, 1 + oy, 1 + ox, 10 + oy, 0, 1, onePixel);

}


void
nsFormControlHelper::PaintCheckMark(nsIRenderingContext& aRenderingContext,
                                    float aPixelsToTwips, const nsRect & aRect)
{

  const PRInt32 fixedSizeCheckmarkWidth = 165;
  const PRInt32 fixedSizeCheckmarkHeight = 165;

  if ((fixedSizeCheckmarkWidth == aRect.width) &&
      (fixedSizeCheckmarkHeight == aRect.height)) {

      PaintFixedSizeCheckMark(aRenderingContext, aPixelsToTwips);
    return;
  }

  const PRUint32 checkpoints = 7;
  const PRUint32 checksize = 9;





  nscoord checkedPolygonDef[] = {0,2, 2,4, 6,0 , 6,2, 2,6, 0,4, 0,2 };

  const PRUint32 centerx = 3;
  const PRUint32 centery = 3;

  nsPoint checkedPolygon[checkpoints];
  PRUint32 defIndex = 0;
  PRUint32 polyIndex = 0;


  PRUint32 size = aRect.width / checksize;
  if (aRect.height < aRect.width) {
   size = aRect.height / checksize;
  }


  for (defIndex = 0; defIndex < (checkpoints * 2); defIndex++) {
    checkedPolygon[polyIndex].x = nscoord((((checkedPolygonDef[defIndex]) - centerx) * (size)) + (aRect.width / 2) + aRect.x);
    defIndex++;
    checkedPolygon[polyIndex].y = nscoord((((checkedPolygonDef[defIndex]) - centery) * (size)) + (aRect.height / 2) + aRect.y);
    polyIndex++;
  }

  aRenderingContext.FillPolygon(checkedPolygon, checkpoints);
}

nsresult
nsFormControlHelper::GetName(nsIContent* aContent,nsString* aResult)
{
  nsresult result = 0xFFFFFFF7;
  if (0 != aContent) {
    nsIHTMLContent* formControl = 0;
    result = aContent->QueryInterface(kIHTMLContentIID, (void**)&formControl);
    if ((0 == result) && formControl) {
      nsHTMLValue value;
      result = formControl->GetHTMLAttribute(nsHTMLAtoms::name, value);
      if (0 == result) {
        if (eHTMLUnit_String == value.GetUnit()) {
          value.GetStringValue(*aResult);
        }
      }
      do { (formControl)->Release(); (formControl) = 0; } while (0);
    }
  }
  return result;
}


nsresult
nsFormControlHelper::GetValue(nsIContent* aContent, nsString* aResult)
{
  nsresult result = 0xFFFFFFF7;
  if (0 != aContent) {
    nsIHTMLContent* formControl = 0;
    result = aContent->QueryInterface(kIHTMLContentIID, (void**)&formControl);
    if ((0 == result) && formControl) {
      nsHTMLValue value;
      result = formControl->GetHTMLAttribute(nsHTMLAtoms::value, value);
      if (0 == result) {
        if (eHTMLUnit_String == value.GetUnit()) {
          value.GetStringValue(*aResult);
        }
      }
      do { (formControl)->Release(); (formControl) = 0; } while (0);
    }
  }
  return result;
}

nsresult
nsFormControlHelper::GetInputElementValue(nsIContent* aContent, nsString* aText, PRBool aInitialValue)
{
  nsresult result = 0;
  nsIDOMHTMLInputElement* inputElem = 0;
  result = aContent->QueryInterface(nsCOMTypeInfo<nsIDOMHTMLInputElement>::GetIID(), (void**)&inputElem);
  if ((0 == result) && inputElem) {
    if (1 == aInitialValue) {
      result = inputElem->GetDefaultValue(*aText);
    }
    else {
      result = inputElem->GetValue(*aText);
    }

    do { (inputElem)->Release(); (inputElem) = 0; } while (0);
  }
  return result;
}




nsresult
nsFormControlHelper::GetLocalizedString(const char * aPropFileName, const char* aKey, nsString& oVal)
{
  nsresult rv;
  nsCOMPtr<nsIStringBundle> bundle;



  nsCOMPtr<nsIIOService> pNetService = do_GetService(kIOServiceCID, &rv);;
  if ((!((rv) & 0x80000000)) && pNetService) {
    nsCOMPtr<nsIURI> uri;
    rv = pNetService->NewURI(aPropFileName, 0, getter_AddRefs(uri));
    if ((!((rv) & 0x80000000)) && uri) {


      nsCOMPtr<nsIStringBundleService> stringService = do_GetService(kStringBundleServiceCID, &rv);;
      if ((!((rv) & 0x80000000)) && stringService) {
        nsXPIDLCString spec;
        rv = uri->GetSpec(getter_Copies(spec));
        if ((!((rv) & 0x80000000)) && spec) {
          rv = stringService->CreateBundle(spec, getter_AddRefs(bundle));
        }
      }
    }
  }


  if ((!((rv) & 0x80000000)) && bundle && aKey) {
    nsXPIDLString valUni;
    nsAutoString key; key.AssignWithConversion(aKey);
    rv = bundle->GetStringFromName(key.GetUnicode(), getter_Copies(valUni));
    if ((!((rv) & 0x80000000)) && valUni) {
      oVal.Assign(valUni);
    } else {
      oVal.Truncate();
    }
  }
  return rv;
}


nsresult
nsFormControlHelper::GetDisabled(nsIContent* aContent, PRBool* oIsDisabled)
{
  nsCOMPtr<nsIHTMLContent> formControl = do_QueryInterface(aContent);
  nsHTMLValue value;
  nsresult result = formControl->GetHTMLAttribute(nsHTMLAtoms::disabled, value);
  if (0 == result) {
    if (eHTMLUnit_Empty == value.GetUnit()) {
      *oIsDisabled = 1;
    } else {
      *oIsDisabled = 0;
    }
  } else {
    *oIsDisabled = 0;
  }
  return 0;
}
# 945 "nsFormControlHelper.cpp"
nsresult
nsFormControlHelper::DoManualSubmitOrReset(nsIPresContext* aPresContext,
                                           nsIPresShell* aPresShell,
                                           nsIFrame* aFormFrame,
                                           nsIFrame* aFormControlFrame,
                                           PRBool aDoSubmit,
                                           PRBool aDoDOMEvent)
{
  do { if((!(aPresContext) ? 1 : 0)) return ((nsresult) 0x80004003L); } while (0);
  do { if((!(aFormFrame) ? 1 : 0)) return ((nsresult) 0x80004003L); } while (0);

  nsresult result = 0;

  nsCOMPtr<nsIContent> formContent;
  aFormFrame->GetContent(getter_AddRefs(formContent));
# 968 "nsFormControlHelper.cpp"
  nsCOMPtr<nsIContent> controlContent;
  if (aDoSubmit && aFormControlFrame != 0) {
    aFormControlFrame->GetContent(getter_AddRefs(controlContent));
  }

  if (formContent) {

    nsCOMPtr<nsIPresShell> shell;
    if (aPresShell == 0) {
      result = aPresContext->GetShell(getter_AddRefs(shell));
      aPresShell = shell.get();
    }


    if ((!((result) & 0x80000000)) && 0 != aPresShell) {


      nsCOMPtr<nsIContent> formControl;
      aFormControlFrame->GetContent(getter_AddRefs(formControl));

      nsFormEvent event;
      event.eventStructType = 21;
      event.message = aDoSubmit?(1200):(1200 + 1);
      event.originator = formControl;
      nsEventStatus status = nsEventStatus_eIgnore;
      if (aDoDOMEvent) {
        aPresShell->HandleDOMEventWithTarget(formContent, &event, &status);
      } else {
        aPresShell->HandleEventWithTarget(&event, 0, formContent, 0x0001, &status);
      }
    }
  }
  return result;
}
>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-06-21  1:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-21  1:46 optimization/3315: g++ 3.0 ICE compiling mozilla Laurent.Bonnaud

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).