Compare commits

..

15 Commits

Author SHA1 Message Date
alecf%netscape.com
8df220c8fd update mac build for this branch
git-svn-id: svn://10.0.0.236/branches/domviewer_observers_branch@51101 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 02:42:45 +00:00
alecf%netscape.com
a5e40744ba fix support for HTML content broken by adding frame support
git-svn-id: svn://10.0.0.236/branches/domviewer_observers_branch@50091 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 07:56:15 +00:00
alecf%netscape.com
2bd9b7253c tweaks to get it to build on windows
git-svn-id: svn://10.0.0.236/branches/domviewer_observers_branch@49232 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-28 19:47:10 +00:00
alecf%netscape.com
40ce189f8d add frame mode support
git-svn-id: svn://10.0.0.236/branches/domviewer_observers_branch@49218 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-28 18:22:30 +00:00
alecf%netscape.com
20fb9d7520 add support for IFrames
git-svn-id: svn://10.0.0.236/branches/domviewer_observers_branch@49204 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-28 07:57:35 +00:00
alecf%netscape.com
fc0694a7bf fix up style support.
git-svn-id: svn://10.0.0.236/branches/domviewer_observers_branch@49124 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-27 07:39:00 +00:00
alecf%netscape.com
43a8b98cf8 add massive support for all 5 style classes
git-svn-id: svn://10.0.0.236/branches/domviewer_observers_branch@49121 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-27 06:58:55 +00:00
alecf%netscape.com
20470d610f add more support for styles, etc
git-svn-id: svn://10.0.0.236/branches/domviewer_observers_branch@49120 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-27 06:12:05 +00:00
alecf%netscape.com
e2f51a9da1 add support for content and leaf activation through checkboxes
git-svn-id: svn://10.0.0.236/branches/domviewer_observers_branch@49119 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-27 06:11:43 +00:00
alecf%netscape.com
e3c644972b add support for nsIContent nodes and attributes
git-svn-id: svn://10.0.0.236/branches/domviewer_observers_branch@49045 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-25 09:54:43 +00:00
alecf%netscape.com
38030e146b abstract object creation so that the resource nodes only contain nsISupports objects, and add a hashtable so we can map objects back to resources
git-svn-id: svn://10.0.0.236/branches/domviewer_observers_branch@49039 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-25 07:54:46 +00:00
alecf%netscape.com
9fd9ce1ffd move tree into main view
git-svn-id: svn://10.0.0.236/branches/domviewer_observers_branch@49036 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-25 06:47:37 +00:00
alecf%netscape.com
4e20235e47 factor out dom nodes, attributes, and children
git-svn-id: svn://10.0.0.236/branches/domviewer_observers_branch@49035 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-25 06:47:05 +00:00
alecf%netscape.com
88a9d48667 first cleanup of DOMDatasource in prep for adding document observers
git-svn-id: svn://10.0.0.236/branches/domviewer_observers_branch@49033 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-25 06:23:00 +00:00
(no author)
322c8626f1 This commit was manufactured by cvs2svn to create branch
'domviewer_observers_branch'.

git-svn-id: svn://10.0.0.236/branches/domviewer_observers_branch@48236 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-19 01:17:40 +00:00
27 changed files with 2298 additions and 498 deletions

View File

@@ -0,0 +1,2 @@
nsIDOMDataSource.idl
nsIDOMViewerElement.idl

View File

@@ -0,0 +1,53 @@
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
#
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = rdfdomds
LIBRARY_NAME = rdfdomds
IS_COMPONENT = 1
DIRS = resources
CPPSRCS = \
nsRDFDOMDataSource.cpp \
nsRDFDOMDataSourceFactory.cpp \
nsRDFDOMResourceFactory.cpp \
nsRDFDOMViewerUtils.cpp \
$(NULL)
XPIDLSRCS = \
nsIDOMDataSource.idl \
nsIDOMViewerElement.idl \
nsIRDFDOMViewerObject.idl \
$(NULL)
EXTRA_DSO_LDOPTS = \
-L$(DIST)/bin \
-L$(DIST)/lib \
-lxpcom \
-lrdfutil_s \
$(NSPR_LIBS) \
$(NULL)
include $(topsrcdir)/config/rules.mk

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1 @@
#include "MacPrefix.h"

View File

@@ -0,0 +1,2 @@
#define DEBUG 1
#include "MacPrefix_debug.h"

View File

@@ -0,0 +1,50 @@
#!nmake
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
DEPTH = ..\..\..
include <$(DEPTH)/config/config.mak>
MODULE=rdfdomds
LIBNAME=.\$(OBJDIR)\$(MODULE)
DLL=$(LIBNAME).dll
XPIDLSRCS= .\nsIDOMViewerElement.idl \
.\nsIDOMDataSource.idl \
.\nsIRDFDOMViewerObject.idl \
$(NULL)
DIRS=resources
OBJS= .\$(OBJDIR)\nsRDFDOMDataSource.obj \
.\$(OBJDIR)\nsRDFDOMDataSourceFactory.obj \
.\$(OBJDIR)\nsRDFDOMResourceFactory.obj \
.\$(OBJDIR)\nsRDFDOMViewerUtils.obj \
$(NULL)
LLIBS= \
$(DIST)\lib\rdfutil_s.lib \
$(DIST)\lib\xpcom.lib \
$(LIBNSPR)
include <$(DEPTH)\config\rules.mak>
install:: $(DLL)
$(MAKE_INSTALL) $(LIBNAME).$(DLL_SUFFIX) $(DIST)\bin\components
$(MAKE_INSTALL) $(LIBNAME).$(LIB_SUFFIX) $(DIST)\lib
clobber::
rm -rf $(DIST)\bin\components\$(LIBNAME).$(DLL_SUFFIX)
rm -rf $(DIST)\lib\$(LIBNAME).$(LIB_SUFFIX)

View File

@@ -0,0 +1,37 @@
/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Mozilla Communicator client code, released
* March 31, 1998.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998-1999 Netscape Communications Corporation. All
* Rights Reserved.
*/
#include "nsISupports.idl"
#include "domstubs.idl"
%{C++
#include "nsIDOMWindow.h"
#include "nsIDOMNode.h"
%}
[scriptable, uuid(0b96297e-2459-11d3-8aad-006008948010)]
interface nsIDOMDataSource : nsISupports {
void setMode(in string mode, in boolean active);
boolean getMode(in string mode);
void setWindow(in nsIDOMWindow window);
};

View File

@@ -0,0 +1,13 @@
#include "nsISupports.idl"
#include "domstubs.idl"
%{C++
#include "nsIDOMNode.h"
%}
[scriptable, uuid(2842a0ba-4bd8-11d3-ac84-00a0c900d445)]
interface nsIDOMViewerElement : nsISupports {
attribute nsISupports object;
};

View File

@@ -0,0 +1,35 @@
/* -*- Mode: idl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "nsISupports.idl"
#include "nsIRDFResource.idl"
%{C++
#include "nsString.h"
%}
[ref] native nsStringRef(nsString);
[scriptable, uuid(1ff615aa-7328-11d3-90a0-00a0c900d445)]
interface nsIRDFDOMViewerObject : nsISupports {
void setTarget(in nsIRDFResource property, in nsIRDFNode value);
[noscript] void setTargetLiteral(in nsIRDFResource property,
in nsStringRef str);
nsIRDFNode getTarget(in nsIRDFResource property);
};

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,198 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Mozilla Communicator client code, released
* March 31, 1998.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998-1999 Netscape Communications Corporation. All
* Rights Reserved.
*/
#ifndef __nsRDFDOMDataSource_h
#define __nsRDFDOMDataSource_h
#include "nsIRDFDataSource.h"
#include "nsIDOMDataSource.h"
#include "nsIRDFService.h"
#include "nsVoidArray.h"
#include "nsCOMPtr.h"
#include "nsHashtable.h"
#include "nsIDOMDocument.h"
//
#include "nsIDOMNode.h"
#include "nsIContent.h"
#include "nsIStyledContent.h"
#include "nsIDOMCSSRule.h"
#include "nsIDOMCSSStyleRule.h"
#include "nsIDOMHTMLElement.h"
#include "nsICSSStyleRule.h"
#include "nsIStyleRule.h"
#include "nsIFrame.h"
/* {c7cf77e8-245a-11d3-80f0-006008948010} */
#define NS_RDF_DOMDATASOURCE_CID \
{0xc7cf77e8, 0x245a, 0x11d3, \
{0x80, 0xf0, 0x00, 0x60, 0x08, 0x94, 0x80, 0x10}}
class nsRDFDOMDataSource : public nsIRDFDataSource,
public nsIDOMDataSource
{
public:
nsRDFDOMDataSource();
virtual ~nsRDFDOMDataSource();
NS_DECL_ISUPPORTS
NS_DECL_NSIRDFDATASOURCE
NS_DECL_NSIDOMDATASOURCE
static NS_METHOD Create(nsISupports* aOuter,
const nsIID& iid,
void **result);
protected:
char *mURI;
nsIRDFService *getRDFService();
static PRBool assertEnumFunc(void *aElement, void *aData);
static PRBool unassertEnumFunc(void *aElement, void *aData);
nsresult NotifyObservers(nsIRDFResource *subject, nsIRDFResource *property,
nsIRDFNode *object, PRBool assert);
private:
// HTML stuff
nsresult createHTMLElementArcs(nsIDOMHTMLElement *element,
nsISupportsArray *arcs);
nsresult createFrameArcs(nsIFrame *frame,
nsISupportsArray *arcs);
// DOM stuff
nsresult createDOMNodeArcs(nsIDOMNode *node,
nsISupportsArray *arcs);
nsresult createDOMAttributeArcs(nsIDOMNode *node,
nsISupportsArray *arcs);
nsresult createDOMChildArcs(nsIDOMNode *node,
nsISupportsArray *arcs);
nsresult createDOMNodeListArcs(nsIDOMNodeList *nodelist,
nsISupportsArray *arcs);
nsresult createDOMNamedNodeMapArcs(nsIDOMNamedNodeMap *nodelist,
nsISupportsArray *arcs);
nsresult createFrameTarget(nsIFrame *frame,
nsIRDFResource *property,
nsIRDFNode **aResult);
nsresult createDOMNodeTarget(nsIDOMNode *node,
nsIRDFResource *property,
nsIRDFNode **aResult);
// nsIContent stuff
nsresult createContentArcs(nsIContent *content,
nsISupportsArray *arcs);
nsresult createContentChildArcs(nsIContent *content,
nsISupportsArray *arcs);
nsresult createContentAttributeArcs(nsIContent *content,
nsISupportsArray *arcs);
nsresult createContentMiscArcs(nsIContent* content,
nsISupportsArray *arcs);
nsresult createContentTarget(nsIContent *content,
nsIRDFResource *property,
nsIRDFNode **aResult);
// nsIStyledContent stuff
nsresult createStyledContentArcs(nsIStyledContent *content,
nsISupportsArray *arcs);
nsresult createStyledContentClassArcs(nsIStyledContent *content,
nsISupportsArray *arcs);
nsresult createStyledContentTarget(nsIStyledContent *content,
nsIRDFResource *property,
nsIRDFNode **aResult);
// nsIDOMCSSStyleDeclaration
nsresult getDOMCSSStyleDeclTarget(nsIDOMCSSStyleDeclaration *decl,
nsIRDFResource *property,
nsIRDFNode **aResult);
// nsIDOMCSSStyleRule
// nsIDOMCSSRule
nsresult getDOMCSSStyleRuleTarget(nsIDOMCSSStyleRule *rule,
nsIRDFResource *property,
nsIRDFNode **result);
nsresult getDOMCSSRuleTarget(nsIDOMCSSRule *rule,
nsIRDFResource *property,
nsIRDFNode **result);
// nsICSSStyleRule
// nsICSSRule
// nsIStyleRule
nsresult getCSSStyleRuleTarget(nsICSSStyleRule *rule,
nsIRDFResource *property,
nsIRDFNode **result);
nsresult getCSSRuleTarget(nsICSSRule *rule,
nsIRDFResource *property,
nsIRDFNode **result);
nsresult getStyleRuleTarget(nsIStyleRule *rule,
nsIRDFResource *property,
nsIRDFNode **result);
// helper routines
nsresult createArcsFromSupportsArray(nsISupportsArray *rules,
nsISupportsArray *arcs);
nsresult getResourceForObject(nsISupports *object,
nsIRDFResource **resource);
nsresult appendLeafObject(nsString& name,
nsString& value,
nsISupportsArray *arcs);
nsresult getTargetForKnownObject(nsISupports *object,
nsIRDFResource* aProperty,
nsIRDFNode **result);
nsresult getTargetsForKnownObject(nsISupports *object,
nsIRDFResource *aProperty,
PRBool useDOM,
nsISupportsArray *arcs);
nsresult createLiteral(nsString& str, nsIRDFNode **result);
// member variables
PRBool init;
nsIRDFService *mRDFService;
PRInt32 mMode;
nsVoidArray *mObservers;
nsSupportsHashtable objectTable;
nsHashtable mModeTable;
nsCOMPtr<nsIDOMDocument> mDocument;
nsIFrame *mRootFrame;
nsIRDFResource* kNC_Name;
nsIRDFResource* kNC_Value;
nsIRDFResource* kNC_Type;
nsIRDFResource* kNC_Child;
nsIRDFResource* kNC_DOMRoot;
};
#endif

View File

@@ -0,0 +1,101 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "nsIGenericFactory.h"
#include "nsRDFDOMDataSource.h"
#include "nsRDFDOMResourceFactory.h"
#include "nsIComponentManager.h"
#include "nsIServiceManager.h"
#include "rdf.h"
#ifdef NS_DEBUG
#include <stdio.h>
#endif
static NS_DEFINE_CID(kRDFDOMDataSourceCID, NS_RDF_DOMDATASOURCE_CID);
static NS_DEFINE_CID(kRDFDOMResourceFactoryCID, NS_RDF_DOMRESOURCEFACTORY_CID);
static NS_DEFINE_CID(kComponentManagerCID, NS_COMPONENTMANAGER_CID);
// return the proper factory to the caller
extern "C" PR_IMPLEMENT(nsresult)
NSGetFactory(nsISupports* aServMgr,
const nsCID &aClass,
const char* aClassName,
const char* aProgID,
nsIFactory **aFactory)
{
nsresult rv=NS_OK;
nsIGenericFactory* fact;
if (aClass.Equals(kRDFDOMDataSourceCID)) {
rv = NS_NewGenericFactory(&fact, nsRDFDOMDataSource::Create);
printf("Creating datasource: %s\n", NS_SUCCEEDED(rv) ? "succeed" : "failed");
} else
if (aClass.Equals(kRDFDOMResourceFactoryCID)) {
rv = NS_NewGenericFactory(&fact, nsRDFDOMViewerElement::Create);
printf("Creating resource: %s\n", NS_SUCCEEDED(rv) ? "succeed" : "failed");
}
else
rv = NS_ERROR_FAILURE;
if (NS_SUCCEEDED(rv))
*aFactory = fact;
#ifdef DEBUG_alecf
printf("nsRDFDOMDataSource's NSGetFactory!\n");
#endif
return rv;
}
extern "C" PR_IMPLEMENT(nsresult)
NSRegisterSelf(nsISupports* aServMgr, const char* aPath)
{
nsresult rv;
NS_WITH_SERVICE1(nsIComponentManager,
compMgr,
aServMgr,
kComponentManagerCID,
&rv);
if (NS_FAILED(rv)) return rv;
printf("Registering DOM Viewer\n");
rv = compMgr->RegisterComponent(kRDFDOMDataSourceCID,
"Generic DataSource DataSource",
NS_RDF_DATASOURCE_PROGID_PREFIX "domds",
aPath, PR_TRUE, PR_TRUE);
rv = compMgr->RegisterComponent(kRDFDOMResourceFactoryCID,
"DOM element resource factory",
NS_RDF_RESOURCE_FACTORY_PROGID_PREFIX "object",
aPath, PR_TRUE, PR_TRUE);
return rv;
}
extern "C" PR_IMPLEMENT(nsresult)
NSUnregisterSelf(nsISupports* aServMgr, const char* aPath)
{
nsresult rv;
NS_WITH_SERVICE1(nsIComponentManager, compMgr,
aServMgr, kComponentManagerCID, &rv);
if (NS_FAILED(rv)) return rv;
rv = compMgr->UnregisterComponent(kRDFDOMDataSourceCID, aPath);
rv = compMgr->UnregisterComponent(kRDFDOMResourceFactoryCID, aPath);
return rv;
}

View File

@@ -0,0 +1,63 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Mozilla Communicator client code, released
* March 31, 1998.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998-1999 Netscape Communications Corporation. All
* Rights Reserved.
*/
#include "nsRDFDOMResourceFactory.h"
nsRDFDOMViewerElement::nsRDFDOMViewerElement()
{
}
nsRDFDOMViewerElement::~nsRDFDOMViewerElement()
{
}
NS_IMPL_ISUPPORTS_INHERITED(nsRDFDOMViewerElement, nsRDFResource, nsIDOMViewerElement)
NS_IMETHODIMP
nsRDFDOMViewerElement::SetObject(nsISupports* object)
{
mObject = do_QueryInterface(object);
return NS_OK;
}
NS_IMETHODIMP
nsRDFDOMViewerElement::GetObject(nsISupports** object)
{
if (!object) return NS_ERROR_NULL_POINTER;
*object = mObject;
NS_IF_ADDREF(*object);
return NS_OK;
}
NS_METHOD
nsRDFDOMViewerElement::Create(nsISupports* aOuter,
const nsIID& iid,
void **result) {
nsRDFDOMViewerElement* ve = new nsRDFDOMViewerElement();
if (!ve) return NS_ERROR_NULL_POINTER;
NS_ADDREF(ve);
nsresult rv = ve->QueryInterface(iid, result);
NS_RELEASE(ve);
return rv;
}

View File

@@ -0,0 +1,57 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Mozilla Communicator client code, released
* March 31, 1998.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998-1999 Netscape Communications Corporation. All
* Rights Reserved.
*/
#ifndef __nsRDFDOMResourceFactory_h
#define __nsRDFDOMResourceFactory_h
#include "nsIRDFService.h"
#include "nscore.h"
#include "nsCOMPtr.h"
#include "nsWeakPtr.h"
#include "rdf.h"
#include "nsRDFResource.h"
#include "nsIDOMViewerElement.h"
class nsRDFDOMViewerElement : nsRDFResource,
nsIDOMViewerElement
{
public:
nsRDFDOMViewerElement();
virtual ~nsRDFDOMViewerElement();
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIDOMVIEWERELEMENT
static NS_METHOD
Create(nsISupports* aOuter,const nsIID& iid, void **result);
private:
//nsWeakPtr mObject;
nsCOMPtr<nsISupports> mObject;
};
/* {84a87046-57f4-11d3-9061-00a0c900d445} */
#define NS_RDF_DOMRESOURCEFACTORY_CID \
{0x84a87046, 0x57f4, 0x11d3, \
{ 0x90, 0x61, 0x0, 0xa0, 0xc9, 0x0, 0xd4, 0x45 }}
#endif

View File

@@ -0,0 +1,83 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "rdf.h"
#include "nsIRDFService.h"
#include "nsRDFDOMViewerUtils.h"
#include "nsIServiceManager.h"
#include "nsCOMPtr.h"
nsDOMViewerObject::nsDOMViewerObject() {}
nsDOMViewerObject::~nsDOMViewerObject()
{
targets.Reset();
}
NS_IMPL_ISUPPORTS1(nsDOMViewerObject,
nsIRDFDOMViewerObject)
NS_IMETHODIMP
nsDOMViewerObject::SetTarget(nsIRDFResource *aProperty,
nsIRDFNode *aValue)
{
nsISupportsKey propKey(aProperty);
targets.Put(&propKey, (void *)aValue);
return NS_OK;
}
NS_IMETHODIMP
nsDOMViewerObject::SetTargetLiteral(nsIRDFResource *aProperty,
nsString& str)
{
nsresult rv;
NS_WITH_SERVICE(nsIRDFService, rdf, NS_RDF_PROGID "/rdf-service", &rv);
PRUnichar* uniStr = str.ToNewUnicode();
nsCOMPtr<nsIRDFLiteral> literal;
rv = rdf->GetLiteral(uniStr, getter_AddRefs(literal));
nsAllocator::Free(uniStr);
SetTarget(aProperty, literal);
return NS_OK;
}
nsresult
nsDOMViewerObject::GetTarget(nsIRDFResource *aProperty,
nsIRDFNode **aValue)
{
nsISupportsKey propKey(aProperty);
*aValue = (nsIRDFResource*)targets.Get(&propKey);
return NS_OK;
}
nsresult
NS_NewDOMViewerObject(const nsIID& iid, void ** aResult) {
nsresult rv;
nsDOMViewerObject* obj = new nsDOMViewerObject;
NS_ADDREF(obj);
rv = obj->QueryInterface(iid, aResult);
NS_RELEASE(obj);
return rv;
}

View File

@@ -0,0 +1,39 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
/* a really lame-ass last resort for putting objects in the tree
* use only if there really is no object */
#include "nsIRDFDOMViewerObject.h"
#include "nsHashtable.h"
class nsDOMViewerObject : nsIRDFDOMViewerObject {
public:
nsDOMViewerObject();
virtual ~nsDOMViewerObject();
NS_DECL_ISUPPORTS
NS_DECL_NSIRDFDOMVIEWEROBJECT
private:
nsSupportsHashtable targets;
};
nsresult
NS_NewDOMViewerObject(const nsIID& iid, void ** result);

View File

@@ -0,0 +1,42 @@
treeitem[Type="1"] {
color: green;
}
treeitem[Type="2"] {
color: red;
}
treeitem[Type="3"] {
color: blue;
}
treeitem[Type="leaf"] {
color: black;
}
treeitem[Type~="content"] {
color: green;
font-style: italic;
}
treeitem[Type="contentAttribute"] {
color: red;
font-style: italic;
}
treeitem[Type="contentStyleRule"] {
color: orange;
font-style: italic;
}
treeitem[Type="style"] {
color: brown;
font-style: italic;
}
treeitem[Type="contentMisc"] {
color:black;
font-style: italic;
}

View File

@@ -0,0 +1,61 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Mozilla Communicator client code, released
* March 31, 1998.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998-1999 Netscape Communications Corporation. All
* Rights Reserved.
*/
var RDF = Components.classes['component://netscape/rdf/rdf-service'].getService();
RDF = RDF.QueryInterface(Components.interfaces.nsIRDFService);
var domds;
function loadUrl() {
var urlwidget = document.getElementById("url");
if (!urlwidget)
url = "resource:/res/samples/rdf/domviewer.html";
else
url = urlwidget.value;
dump("Loading " + url + " into " + parent.window.frames["srcdoc"] +"\n");
var win = window.frames["srcdoc"];
win.location=url;
}
function setMode(mode, active) {
domds.setMode(mode, active);
}
function refreshTree() {
dump("refresh..\n");
var win = window.frames["srcdoc"];
domds.setWindow(win);
var tree = document.getElementById("dataSourceTree");
tree.clearItemSelection();
tree.setAttribute("ref","NC:DOMRoot");
}
function onSrcLoaded() {
var ds = RDF.GetDataSource("rdf:domds");
domds = ds.QueryInterface(Components.interfaces.nsIDOMDataSource);
}

View File

@@ -0,0 +1,67 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="DOMDataSourceViewer.css" type="text/css"?>
<window
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="onSrcLoaded();"
alignment="horizontal"
title="DOM Viewer">
<html:script language="JavaScript" src="DOMDataSourceViewer.js"/>
<box align="vertical" flex="30%">
<html:input value="resource:/res/samples/rdf/domviewer.html" type="text" name="url" id="url" onkeyup="if (event.which == 13) loadUrl();"/>
<html:div>
Show:
<html:input type="checkbox" onclick="setMode('content', !event.target.checked);"/>
Content
<html:input type="checkbox" onclick="setMode('dom', !event.target.checked);"/>
DOM
<html:input type="checkbox" onclick="setMode('frame', !event.target.checked);"/> Frames
<html:input type="checkbox" onclick="setMode('leaf', !event.target.checked);"/>
OOB data
</html:div>
<box align="horizontal">
<titledbutton onclick="loadUrl();" value="Load"/>
<titledbutton onclick="refreshTree();" value="Refresh"/>
</box>
<html:div flex="100%">
<tree style="height:100%"
rdf:datasources="rdf:domds"
id="dataSourceTree">
<template>
<rule>
<treechildren>
<treeitem uri="..."
Type="rdf:http://home.netscape.com/NC-rdf#Type">
<treerow>
<treecell indent="true" value="rdf:http://home.netscape.com/NC-rdf#Name"/>
<treecell value="rdf:http://home.netscape.com/NC-rdf#Value"/>
</treerow>
</treeitem>
</treechildren>
</rule>
<treechildren>
<treeitem id="NC:DOMRoot"/>
</treechildren>
</template>
<treecol style="width: 50%" id="NameColumn" rdf:resource="http://home.netscape.com/NC-rdf#Name"/>
<treecol style="width: 50%" id="ValueColumn" rdf:resource="http://home.netscape.com/NC-rdf#Value"/>
<treehead>
<treerow>
<treecell value="Name"/>
<treecell value="Value"/>
</treerow>
</treehead>
</tree>
</html:div>
</box>
<splitter collapse="before" persist="state hidden" chromeclass="extrachrome"/>
<html:iframe onload="onSrcLoaded();" name="srcdoc" src="resource:/res/samples/rdf/domviewer.html" flex="73%"/>
</window>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="DOMDataSourceViewer.css" type="text/css"?>
<!DOCTYPE window>
<window
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
</window>

View File

@@ -0,0 +1,5 @@
DOMDataSourceViewer.xul
DOMDataSourceViewer.css
DOMTree.xul
domviewer.html
DOMDataSourceViewer.js

View File

@@ -0,0 +1,43 @@
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
#
DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = rdfdomds
SAMPLES_DIR = $(DIST)/bin/res/samples/rdf
RESOURCE_SAMPLES = \
DOMDataSourceViewer.xul \
DOMDataSourceViewer.css \
DOMDataSourceViewer.js \
DOMTree.xul \
domviewer.html \
$(NULL)
include $(topsrcdir)/config/rules.mk
GARBAGE += $(addprefix $(SAMPLES_DIR)/, $(RESOURCE_SAMPLES))
install::
$(INSTALL) $(addprefix $(srcdir)/,$(RESOURCE_SAMPLES)) $(SAMPLES_DIR)

View File

@@ -0,0 +1,21 @@
<html>
<title>How to use the DOM Viewer</title>
<body>
<h2>
How to use the DOM Viewer
</h2>
<hr>
<p>
click the <b>Refresh</b> button to view the dom for the page loaded in this frame.
</p>
<b>(try it now on this page!)</b></p>
<p>
to load a new page, enter it in the text area. hit enter or click the <b>Load</b> button.</p>
<p>
Then browse the DOM!</p>
<p>questions / comments to <a href=mailto:alecf@netscape.com>alecf</a><p>
</body>
</html>

View File

@@ -0,0 +1,37 @@
#!nmake
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
DEPTH=..\..\..\..
MODULE=rdfdomds
SAMPLES_DIR = $(DIST)/bin/res/samples/rdf
include <$(DEPTH)\config\rules.mak>
install::
$(MAKE_INSTALL) DOMDataSourceViewer.css $(SAMPLES_DIR)
$(MAKE_INSTALL) DOMDataSourceViewer.js $(SAMPLES_DIR)
$(MAKE_INSTALL) DOMDataSourceViewer.xul $(SAMPLES_DIR)
$(MAKE_INSTALL) DOMTree.xul $(SAMPLES_DIR)
$(MAKE_INSTALL) domviewer.html $(SAMPLES_DIR)
clobber::
rm -f $(SAMPLES_DIR)\DOMDataSourceViewer.css
rm -f $(SAMPLES_DIR)\DOMDataSourceViewer.js
rm -f $(SAMPLES_DIR)\DOMDataSourceViewer.xul
rm -f $(SAMPLES_DIR)\DOMTree.xul
rm -f $(SAMPLES_DIR)\domviewer.html

View File

@@ -1,248 +0,0 @@
#
### hostname: bl-bldlnx03.office.mozilla.org
### uname: Linux bl-bldlnx03.office.mozilla.org 2.6.18-1.2798.fc6 #1 SMP Mon Oct 16 14:54:20 EDT 2006 i686 i686 i386 GNU/Linux
##
#
#- tinder-config.pl - Tinderbox configuration file.
#- Uncomment the variables you need to set.
#- The default values are the same as the commented variables.
# $ENV{XPCOM_CC_DO_NOTHING}
#-----------------------------------------------------------------------------
# Default: 0
# Values: 0 | 1
# Purpose: Turn graydon's cycle collector on/off
#$ENV{XPCOM_CC_DO_NOTHING} = 0;
# $ENV{MOZ_PACKAGE_MSI}
#-----------------------------------------------------------------------------
# Default: 0
# Values: 0 | 1
# Purpose: Controls whether a MSI package is made.
# Requires: Windows and a local MakeMSI installation.
#$ENV{MOZ_PACKAGE_MSI} = 0;
# $ENV{MOZ_SYMBOLS_TRANSFER_TYPE}
#-----------------------------------------------------------------------------
# Default: scp
# Values: scp | rsync
# Purpose: Use scp or rsync to transfer symbols to the Talkback server.
# Requires: The selected type requires the command be available both locally
# and on the Talkback server.
#$ENV{MOZ_SYMBOLS_TRANSFER_TYPE} = "scp";
#- PLEASE FILL THIS IN WITH YOUR PROPER EMAIL ADDRESS
#$BuildAdministrator = "$ENV{USER}\@$ENV{HOST}";
#$BuildAdministrator = ($ENV{USER} || "cltbld") . "\@" . ($ENV{HOST} || "dhcp");
#- You'll need to change these to suit your machine's needs
#$DisplayServer = ':0.0';
#- Default values of command-line opts
#-
#$BuildDepend = 1; # Depend or Clobber
#$BuildDebug = 0; # Debug or Opt (Darwin)
#$ReportStatus = 1; # Send results to server, or not
#$ReportFinalStatus = 1; # Finer control over $ReportStatus.
#$UseTimeStamp = 1; # Use the CVS 'pull-by-timestamp' option, or not
#$BuildOnce = 0; # Build once, don't send results to server
$TestOnly = 1; # Only run tests, don't pull/build
#$BuildEmbed = 0; # After building seamonkey, go build embed app.
#$SkipMozilla = 0; # Use to debug post-mozilla.pl scripts.
#$SkipCheckout = 0; # Use to debug build process without checking out new source.
#$BuildLocales = 0; # Do l10n packaging?
# Tests
$CleanProfile = 1;
#$ResetHomeDirForTests = 1;
#$ProductName = "Mozilla";
$VendorName = 'mozilla';
#$RunMozillaTests = 1; # Allow turning off of all tests if needed.
$RegxpcomTest = 1;
$AliveTest = 1;
#$JavaTest = 0;
#$ViewerTest = 0;
#$BloatTest = 0; # warren memory bloat test
#$BloatTest2 = 0; # dbaron memory bloat test, require tracemalloc
#$DomToTextConversionTest = 0;
#$XpcomGlueTest = 0;
$CodesizeTest = 0; # Z, require mozilla/tools/codesighs
$EmbedCodesizeTest = 0; # mZ, require mozilla/tools/codesigns
#$MailBloatTest = 0;
#$EmbedTest = 0; # Assumes you wanted $BuildEmbed=1
$LayoutPerformanceTest = 1; # Tp
$LayoutPerformanceLocalTest = 1; # Tp
$DHTMLPerformanceTest = 1; # Tdhtml
#$QATest = 0;
$XULWindowOpenTest = 1; # Txul
$StartupPerformanceTest = 1; # Ts
$TestsPhoneHome = 1; # Should test report back to server?
$TestOnlyTinderbox = 1;
$DownloadBuildFile = 'firefox-3.0a7pre.en-US.linux-i686.tar.bz2';
$DownloadBuildURL = 'http://stage.mozilla.org/pub/mozilla.org/firefox/tinderbox-builds/fx-linux-tbox-trunk';
$DownloadBuildDir = 'firefox';
# If TestOnlyTinderbox is enabled, fetch the latest build info from tinderbox in a
# parseable format
$TinderboxServerURL = 'http://tinderbox.mozilla.org/showbuilds.cgi?tree=Firefox&quickparse=1';
$MatchBuildname = 'Linux fx-linux-tbox Depend Nightly';
$GraphNameOverride = "bl-bldlnx03_fx-linux-tbox-HEAD"; # Override name built from ::hostname() and $BuildTag
# $results_server
#----------------------------------------------------------------------------
# Server on which test results will be accessible. This was originally tegu,
# then became axolotl. Once we moved services from axolotl, it was time
# to give this service its own hostname to make future transitions easier.
# - cmp@mozilla.org
#$results_server = "build-graphs.mozilla.org";
$pageload_server = "spider.office.mozilla.org";
#
# Timeouts, values are in seconds.
#
#$CVSCheckoutTimeout = 3600;
#$CreateProfileTimeout = 45;
#$RegxpcomTestTimeout = 120;
$AliveTestTimeout = 5;
#$ViewerTestTimeout = 45;
#$EmbedTestTimeout = 45;
#$BloatTestTimeout = 120; # seconds
#$MailBloatTestTimeout = 120; # seconds
#$JavaTestTimeout = 45;
#$DomTestTimeout = 45; # seconds
#$XpcomGlueTestTimeout = 15;
#$CodesizeTestTimeout = 900; # seconds
#$CodesizeTestType = "auto"; # {"auto"|"base"}
#$LayoutPerformanceTestTimeout = 1200; # entire test, seconds
#$LayoutPerformanceLocalTestTimeout = 1200; # entire test, seconds
#$DHTMLPerformanceTestTimeout = 1200; # entire test, seconds
#$QATestTimeout = 1200; # entire test, seconds
#$LayoutPerformanceTestPageTimeout = 30000; # each page, ms
#$StartupPerformanceTestTimeout = 15; # seconds
#$XULWindowOpenTestTimeout = 150; # seconds
#$MozConfigFileName = 'mozconfig';
#$UseMozillaProfile = 1;
#$MozProfileName = 'default';
#- Set these to what makes sense for your system
#$Make = 'gmake'; # Must be GNU make
#$MakeOverrides = '';
#$mail = '/bin/mail';
#$CVS = 'cvs -q';
#$CVSCO = 'checkout -P';
# win32 usually doesn't have /bin/mail
#$blat = 'c:/nstools/bin/blat';
#$use_blat = 0;
# Set moz_cvsroot to something like:
# :pserver:$ENV{USER}%netscape.com\@cvs.mozilla.org:/cvsroot
# :pserver:anonymous\@cvs-mirror.mozilla.org:/cvsroot
#
# Note that win32 may not need \@, depends on ' or ".
# :pserver:$ENV{USER}%netscape.com@cvs.mozilla.org:/cvsroot
#$moz_cvsroot = $ENV{CVSROOT};
#- Set these proper values for your tinderbox server
#$Tinderbox_server = 'tinderbox-daemon@tinderbox.mozilla.org';
# Allow for non-client builds, e.g. camino.
#$moz_client_mk = 'client.mk';
#- Set if you want to build in a separate object tree
#$ObjDir = '';
# Extra build name, if needed.
$BuildNameExtra = "fx-linux-tbox perf test";
# User comment, eg. ip address for dhcp builds.
# ex: $UserComment = "ip = 208.12.36.108";
#$UserComment = 0;
#-
#- The rest should not need to be changed
#-
#- Minimum wait period from start of build to start of next build in minutes.
$BuildSleep = 1;
#- Until you get the script working. When it works,
#- change to the tree you're actually building
$BuildTree = 'MozillaExperimental';
$BuildTag = 'HEAD';
#$BuildConfigDir = 'mozilla/config';
#$Topsrcdir = 'mozilla';
$BinaryName = 'firefox-bin';
#
# For embedding app, use:
#$EmbedBinaryName = 'TestGtkEmbed';
#$EmbedDistDir = 'dist/bin'
#$ShellOverride = ''; # Only used if the default shell is too stupid
#$ConfigureArgs = '';
#$ConfigureEnvArgs = '';
#$Compiler = 'gcc';
#$NSPRArgs = '';
#$ShellOverride = '';
# Release build options
#$ReleaseBuild = 1;
#$clean_objdir = 1; # remove objdir when starting release cycle?
#$clean_srcdir = 1; # remove srcdir when starting release cycle?
#$shiptalkback = 1;
#$ReleaseToLatest = 1; # Push the release to latest-<milestone>?
#$ReleaseToDated = 1; # Push the release to YYYY-MM-DD-HH-<milestone>?
#$ReleaseGroup = ''; # group to set uploaded files to
#$build_hour = "8";
#$package_creation_path = "/xpinstall/packager";
# needs setting for mac + talkback: $mac_bundle_path = "/browser/app";
#$ssh_version = "2";
#$ssh_user = "cltbld";
#$ssh_server = "stage.mozilla.org";
#$ftp_path = "/home/ftp/pub/mozilla/nightly/experimental";
#$url_path = "http://ftp.mozilla.org/pub/mozilla.org/mozilla/nightly/experimental";
#$tbox_ftp_path = $ftp_path;
#$tbox_url_path = $url_path;
#$milestone = "trunk";
#$notify_list = "cmp\@mozilla.org";
#$stub_installer = 1;
#$sea_installer = 1;
#$archive = 0;
#$push_raw_xpis = 1;
# Reboot the OS at the end of build-and-test cycle. This is primarily
# intended for Win9x, which can't last more than a few cycles before
# locking up (and testing would be suspect even after a couple of cycles).
# Right now, there is only code to force the reboot for Win9x, so even
# setting this to 1, will not have an effect on other platforms. Setting
# up win9x to automatically logon and begin running tinderbox is left
# as an exercise to the reader.
#$RebootSystem = 0;
# LogCompression specifies the type of compression used on the log file.
# Valid options are 'gzip', and 'bzip2'. Please make sure the binaries
# for 'gzip' or 'bzip2' are in the user's path before setting this
# option.
#$LogCompression = '';
# LogEncoding specifies the encoding format used for the logs. Valid
# options are 'base64', and 'uuencode'. If $LogCompression is set above,
# this needs to be set to 'base64' or 'uuencode' to ensure that the
# binary data is transferred properly.
#$LogEncoding = '';
# Prevent Extension Manager from spawning child processes during tests
# - processes that tbox scripts cannot kill.
#$ENV{NO_EM_RESTART} = '1';

View File

@@ -1,250 +0,0 @@
#
#### hostname: bl-bldxp01.office.mozilla.org
#### uname: CYGWIN_NT-5.1 bl-bldxp01 1.5.19(0.150/4/2) 2006-01-20 13:28 i686 Cygwin
###
#
#- tinder-config.pl - Tinderbox configuration file.
#- Uncomment the variables you need to set.
#- The default values are the same as the commented variables.
# $ENV{XPCOM_CC_DO_NOTHING}
#-----------------------------------------------------------------------------
# Default: 0
# Values: 0 | 1
# Purpose: Turn graydon's cycle collector on/off
#$ENV{XPCOM_CC_DO_NOTHING} = 0;
# $ENV{MOZ_PACKAGE_MSI}
#-----------------------------------------------------------------------------
# Default: 0
# Values: 0 | 1
# Purpose: Controls whether a MSI package is made.
# Requires: Windows and a local MakeMSI installation.
#$ENV{MOZ_PACKAGE_MSI} = 0;
# $ENV{MOZ_SYMBOLS_TRANSFER_TYPE}
#-----------------------------------------------------------------------------
# Default: scp
# Values: scp | rsync
# Purpose: Use scp or rsync to transfer symbols to the Talkback server.
# Requires: The selected type requires the command be available both locally
# and on the Talkback server.
#$ENV{MOZ_SYMBOLS_TRANSFER_TYPE} = "scp";
#- PLEASE FILL THIS IN WITH YOUR PROPER EMAIL ADDRESS
#$BuildAdministrator = "$ENV{USER}\@$ENV{HOST}";
#$BuildAdministrator = ($ENV{USER} || "cltbld") . "\@" . ($ENV{HOST} || "dhcp");
#- You'll need to change these to suit your machine's needs
#$DisplayServer = ':0.0';
#- Default values of command-line opts
#-
#$BuildDepend = 1; # Depend or Clobber
#$BuildDebug = 0; # Debug or Opt (Darwin)
#$ReportStatus = 1; # Send results to server, or not
#$ReportFinalStatus = 1; # Finer control over $ReportStatus.
#$UseTimeStamp = 1; # Use the CVS 'pull-by-timestamp' option, or not
#$BuildOnce = 0; # Build once, don't send results to server
$TestOnly = 1; # Only run tests, don't pull/build
#$BuildEmbed = 0; # After building seamonkey, go build embed app.
#$SkipMozilla = 0; # Use to debug post-mozilla.pl scripts.
#$SkipCheckout = 0; # Use to debug build process without checking out new source.
#$BuildLocales = 0; # Do l10n packaging?
# Tests
$CleanProfile = 1;
#$ResetHomeDirForTests = 1;
#$ProductName = "Mozilla";
$VendorName = 'mozilla';
#$RunMozillaTests = 1; # Allow turning off of all tests if needed.
$RegxpcomTest = 0;
$AliveTest = 1;
#$JavaTest = 0;
#$ViewerTest = 0;
#$BloatTest = 0; # warren memory bloat test
#$BloatTest2 = 0; # dbaron memory bloat test, require tracemalloc
#$DomToTextConversionTest = 0;
#$XpcomGlueTest = 0;
$CodesizeTest = 0; # Z, require mozilla/tools/codesighs
$EmbedCodesizeTest = 0; # mZ, require mozilla/tools/codesigns
#$MailBloatTest = 0;
#$EmbedTest = 0; # Assumes you wanted $BuildEmbed=1
$LayoutPerformanceTest = 1; # Tp
$LayoutPerformanceLocalTest = 1; # Tp2
$DHTMLPerformanceTest = 1; # Tdhtml
#$QATest = 0;
$XULWindowOpenTest = 1; # Txul
$StartupPerformanceTest = 1; # Ts
$TestsPhoneHome = 1; # Should test report back to server?
# If TestOnlyTinderbox is enabled, fetch the latest build info from tinderbox in a
# parseable format
$TinderboxServerURL = 'http://tinderbox.mozilla.org/showbuilds.cgi?tree=MozillaExperimental&quickparse=1';
$MatchBuildname = 'WINNT 5.2 fxnewref-win32- Depend Fx-Newref';
#$GraphNameOverride = 'Fx-Trunk-win32-test1'; # Override name built from ::hostname() and $BuildTag
# $results_server
#----------------------------------------------------------------------------
# Server on which test results will be accessible. This was originally tegu,
# then became axolotl. Once we moved services from axolotl, it was time
# to give this service its own hostname to make future transitions easier.
# - cmp@mozilla.org
#$results_server = "build-graphs.mozilla.org";
$pageload_server = "spider.office.mozilla.org";
#
# Timeouts, values are in seconds.
#
#$CVSCheckoutTimeout = 3600;
#$CreateProfileTimeout = 45;
#$RegxpcomTestTimeout = 120;
$AliveTestTimeout = 45;
#$ViewerTestTimeout = 45;
#$EmbedTestTimeout = 45;
#$BloatTestTimeout = 120; # seconds
#$MailBloatTestTimeout = 120; # seconds
#$JavaTestTimeout = 45;
#$DomTestTimeout = 45; # seconds
#$XpcomGlueTestTimeout = 15;
#$CodesizeTestTimeout = 900; # seconds
#$CodesizeTestType = "auto"; # {"auto"|"base"}
#$LayoutPerformanceTestTimeout = 1200; # entire test, seconds
#$LayoutPerformanceLocalTestTimeout = 1200; # entire test, seconds
#$DHTMLPerformanceTestTimeout = 1200; # entire test, seconds
#$QATestTimeout = 1200; # entire test, seconds
#$LayoutPerformanceTestPageTimeout = 30000; # each page, ms
#$StartupPerformanceTestTimeout = 15; # seconds
#$XULWindowOpenTestTimeout = 150; # seconds
#$MozConfigFileName = 'mozconfig';
#$UseMozillaProfile = 1;
#$MozProfileName = 'default';
#- Set these to what makes sense for your system
#$Make = 'gmake'; # Must be GNU make
#$MakeOverrides = '';
#$mail = '/bin/mail';
#$CVS = 'cvs -q';
#$CVSCO = 'checkout -P';
# win32 usually doesn't have /bin/mail
#$blat = 'c:/nstools/bin/blat';
#$use_blat = 0;
# Set moz_cvsroot to something like:
# :pserver:$ENV{USER}%netscape.com\@cvs.mozilla.org:/cvsroot
# :pserver:anonymous\@cvs-mirror.mozilla.org:/cvsroot
#
# Note that win32 may not need \@, depends on ' or ".
# :pserver:$ENV{USER}%netscape.com@cvs.mozilla.org:/cvsroot
#$moz_cvsroot = $ENV{CVSROOT};
#- Set these proper values for your tinderbox server
#$Tinderbox_server = 'tinderbox-daemon@tinderbox.mozilla.org';
# Allow for non-client builds, e.g. camino.
#$moz_client_mk = 'client.mk';
#- Set if you want to build in a separate object tree
#$ObjDir = '';
# Extra build name, if needed.
$BuildNameExtra = 'fxnewref-win32-tbox perf test';
# User comment, eg. ip address for dhcp builds.
# ex: $UserComment = "ip = 208.12.36.108";
#$UserComment = 0;
#-
#- The rest should not need to be changed
#-
#- Minimum wait period from start of build to start of next build in minutes.
#$BuildSleep = 10;
#- Until you get the script working. When it works,
#- change to the tree you're actually building
$BuildTree = 'Firefox';
$BuildTag = 'HEAD';
#$BuildConfigDir = 'mozilla/config';
#$Topsrcdir = 'mozilla';
$BinaryName = 'firefox.exe';
#
# For embedding app, use:
#$EmbedBinaryName = 'TestGtkEmbed';
#$EmbedDistDir = 'dist/bin'
#$ShellOverride = ''; # Only used if the default shell is too stupid
#$ConfigureArgs = '';
#$ConfigureEnvArgs = '';
#$Compiler = 'gcc';
#$NSPRArgs = '';
#$ShellOverride = '';
# Release build options
#$ReleaseBuild = 1;
#$clean_objdir = 1; # remove objdir when starting release cycle?
#$clean_srcdir = 1; # remove srcdir when starting release cycle?
#$shiptalkback = 1;
#$ReleaseToLatest = 1; # Push the release to latest-<milestone>?
#$ReleaseToDated = 1; # Push the release to YYYY-MM-DD-HH-<milestone>?
#$ReleaseGroup = ''; # group to set uploaded files to
#$build_hour = "8";
#$package_creation_path = "/xpinstall/packager";
# needs setting for mac + talkback: $mac_bundle_path = "/browser/app";
#$ssh_version = "2";
#$ssh_user = "cltbld";
#$ssh_server = "stage.mozilla.org";
#$ftp_path = "/home/ftp/pub/mozilla/nightly/experimental";
#$url_path = "http://ftp.mozilla.org/pub/mozilla.org/mozilla/nightly/experimental";
#$tbox_ftp_path = $ftp_path;
#$tbox_url_path = $url_path;
#$milestone = "trunk";
#$notify_list = "cmp\@mozilla.org";
#$stub_installer = 1;
#$sea_installer = 1;
#$archive = 0;
#$push_raw_xpis = 1;
# Reboot the OS at the end of build-and-test cycle. This is primarily
# intended for Win9x, which can't last more than a few cycles before
# locking up (and testing would be suspect even after a couple of cycles).
# Right now, there is only code to force the reboot for Win9x, so even
# setting this to 1, will not have an effect on other platforms. Setting
# up win9x to automatically logon and begin running tinderbox is left
# as an exercise to the reader.
#$RebootSystem = 0;
# LogCompression specifies the type of compression used on the log file.
# Valid options are 'gzip', and 'bzip2'. Please make sure the binaries
# for 'gzip' or 'bzip2' are in the user's path before setting this
# option.
#$LogCompression = '';
# LogEncoding specifies the encoding format used for the logs. Valid
# options are 'base64', and 'uuencode'. If $LogCompression is set above,
# this needs to be set to 'base64' or 'uuencode' to ensure that the
# binary data is transferred properly.
#$LogEncoding = '';
# Prevent Extension Manager from spawning child processes during tests
# - processes that tbox scripts cannot kill.
#$ENV{NO_EM_RESTART} = '1';
# If tinderbox is running in a test-only mode, it needs to be able to download
# the latest build and unpack it rather than building it.
$TestOnlyTinderbox = 1;
$DownloadBuildFile = 'firefox-3.0a8pre.en-US.win32.zip';
$DownloadBuildURL = 'http://stage.mozilla.org/pub/mozilla.org/firefox/nightly/experimental/win32-newref/hourly-builds/latest-trunk';
$DownloadBuildDir = 'firefox';