Adding new files needed for splitting layout into two separate libraries (some of these files have been moved from mozilla/layout). r=jst@netscape.com, sr=waterson@netscape.com. Not part of the default build yet.

This commit is contained in:
heikki%netscape.com 2001-02-19 12:10:13 +00:00
Родитель bedbb98134
Коммит d59b45ca9f
27 изменённых файлов: 2298 добавлений и 0 удалений

32
content/base/Makefile.in Normal file
Просмотреть файл

@ -0,0 +1,32 @@
#
# 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.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = public src
include $(topsrcdir)/config/rules.mk

27
content/base/makefile.win Normal file
Просмотреть файл

@ -0,0 +1,27 @@
#!nmake
#
# 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.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
DEPTH=..\..
DIRS=public src \
$(NULL)
include <$(DEPTH)\config\rules.mak>

Просмотреть файл

@ -0,0 +1 @@
Makefile

Просмотреть файл

@ -0,0 +1,32 @@
#
# 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.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = public src
include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -0,0 +1,26 @@
#!nmake
#
# 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.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
DEPTH=..\..\..
DIRS=public src
include <$(DEPTH)\config\rules.mak>

Просмотреть файл

@ -0,0 +1 @@
Makefile

Просмотреть файл

@ -0,0 +1,13 @@
#
# This is a list of local files which get copied to the mozilla:dist:layout directory
#
nsCSSAtoms.h
nsCSSAtomList.h
nsICSSLoader.h
nsICSSParser.h
nsICSSPseudoComparator.h
nsICSSStyleSheet.h
nsStyleUtil.h
nsICSSLoaderObserver.h
nsIComputedDOMStyle.h

Просмотреть файл

@ -0,0 +1,46 @@
#
# 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.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = layout
EXPORTS = \
nsCSSAtoms.h \
nsCSSAtomList.h \
nsICSSLoader.h \
nsICSSParser.h \
nsICSSPseudoComparator.h \
nsICSSStyleSheet.h \
nsStyleUtil.h \
nsICSSLoaderObserver.h \
nsIComputedDOMStyle.h \
$(NULL)
EXPORTS := $(addprefix $(srcdir)/, $(EXPORTS))
include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -0,0 +1,28 @@
#!nmake
#
# 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.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
DEPTH=..\..\..\..
EXPORTS=nsCSSAtoms.h nsCSSAtomList.h nsICSSLoader.h nsICSSParser.h nsICSSPseudoComparator.h nsICSSStyleSheet.h nsStyleUtil.h nsICSSLoaderObserver.h nsIComputedDOMStyle.h
MODULE=raptor
include <$(DEPTH)\config\rules.mak>

Просмотреть файл

@ -0,0 +1,68 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* 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.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#ifndef nsStyleUtil_h___
#define nsStyleUtil_h___
#include "nslayout.h"
#include "nsCoord.h"
#include "nsIPresContext.h"
#include "nsILinkHandler.h" // for nsLinkState
class nsIStyleContext;
struct nsStyleColor;
enum nsFontSizeType {
eFontSize_HTML = 1,
eFontSize_CSS = 2
};
// Style utility functions
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 = PR_FALSE);
static PRBool IsHTMLLink(nsIContent *aContent, nsIAtom *aTag, nsIPresContext *aPresContext, nsLinkState *aState);
static PRBool IsSimpleXlink(nsIContent *aContent, nsIPresContext *aPresContext, nsLinkState *aState);
};
#endif /* nsStyleUtil_h___ */

Просмотреть файл

@ -0,0 +1 @@
Makefile

Просмотреть файл

@ -0,0 +1,110 @@
#
# 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.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = layout
LIBRARY_NAME = gkconhtmlstyle_s
REQUIRES = xpcom dom widget timer caps editor locale js view necko webshell pref rdf htmlparser txmgr docshell uriloader unicharutil uconv
CPPSRCS = \
nsCSSAtoms.cpp \
nsCSSKeywords.cpp \
nsCSSDeclaration.cpp \
nsCSSLoader.cpp \
nsCSSParser.cpp \
nsCSSProps.cpp \
nsCSSScanner.cpp \
nsCSSRule.cpp \
nsCSSStyleRule.cpp \
nsCSSRules.cpp \
nsCSSStyleSheet.cpp \
nsCSSValue.cpp \
nsDOMCSSDeclaration.cpp \
nsHTMLAttributes.cpp \
nsHTMLStyleSheet.cpp \
nsHTMLCSSStyleSheet.cpp \
nsHTMLValue.cpp \
nsStyleUtil.cpp \
nsComputedDOMStyle.cpp \
nsROCSSPrimitiveValue.cpp \
$(NULL)
EXPORTS = \
nsDOMCSSDeclaration.h \
nsCSSKeywords.h \
nsCSSKeywordList.h \
nsCSSProps.h \
nsCSSPropList.h \
nsCSSValue.h \
nsICSSStyleRuleProcessor.h \
nsICSSRule.h \
nsICSSGroupRule.h \
nsICSSStyleRule.h \
nsICSSCharsetRule.h \
nsICSSImportRule.h \
nsICSSMediaRule.h \
nsICSSNameSpaceRule.h \
nsICSSDeclaration.h \
nsHTMLValue.h \
nsIHTMLCSSStyleSheet.h \
nsIHTMLAttributes.h \
$(NULL)
EXPORTS := $(addprefix $(srcdir)/, $(EXPORTS))
# we don't want the shared lib, but we want to force the creation of a static lib.
override NO_SHARED_LIB=1
override NO_STATIC_LIB=
include $(topsrcdir)/config/rules.mk
DEFINES += -D_IMPL_NS_HTML
ifdef MOZ_ENDER_LITE
DEFINES += -DENDER_LITE
endif
INCLUDES += \
-I$(srcdir)/../../base/src \
-I$(srcdir)/../../../base/src \
-I$(srcdir)/../../content/src \
-I$(srcdir)/../../../xul/content/src \
-I$(srcdir)/. \
-I$(srcdir)/../../../xul/base/src \
$(NULL)
ifdef MOZ_MATHML
INCLUDES += \
-I$(srcdir)/../../../mathml/content/src \
-I$(srcdir)/../../../mathml/base/src
endif
ifdef MOZ_SVG
INCLUDES += \
-I$(srcdir)/../../../svg/content/src \
-I$(srcdir)/../../../svg/base/src
endif

Просмотреть файл

@ -0,0 +1,113 @@
#!nmake
#
# 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.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
DEPTH=..\..\..\..
LIBRARY_NAME=contenthtmlstyle_s
MODULE=raptor
DEFINES=-D_IMPL_NS_HTML -DWIN32_LEAN_AND_MEAN
EXPORTS = \
nsCSSKeywords.h \
nsCSSKeywordList.h \
nsCSSProps.h \
nsCSSPropList.h \
nsCSSValue.h \
nsICSSStyleRuleProcessor.h \
nsICSSRule.h \
nsICSSGroupRule.h \
nsICSSStyleRule.h \
nsICSSCharsetRule.h \
nsICSSImportRule.h \
nsICSSMediaRule.h \
nsICSSNameSpaceRule.h \
nsICSSDeclaration.h \
nsIHTMLCSSStyleSheet.h \
nsHTMLValue.h \
nsDOMCSSDeclaration.h \
nsIHTMLAttributes.h \
$(NULL)
CPPSRCS= \
nsHTMLStyleSheet.cpp \
nsCSSAtoms.cpp \
nsCSSKeywords.cpp \
nsCSSDeclaration.cpp \
nsCSSLoader.cpp \
nsCSSParser.cpp \
nsCSSProps.cpp \
nsCSSScanner.cpp \
nsCSSRule.cpp \
nsCSSStyleRule.cpp \
nsCSSRules.cpp \
nsCSSStyleSheet.cpp \
nsCSSValue.cpp \
nsHTMLAttributes.cpp \
nsHTMLCSSStyleSheet.cpp \
nsHTMLValue.cpp \
nsStyleUtil.cpp \
nsDOMCSSDeclaration.cpp \
nsComputedDOMStyle.cpp \
nsROCSSPrimitiveValue.cpp \
$(NULL)
CPP_OBJS = \
.\$(OBJDIR)\nsHTMLStyleSheet.obj \
.\$(OBJDIR)\nsCSSAtoms.obj \
.\$(OBJDIR)\nsCSSKeywords.obj \
.\$(OBJDIR)\nsCSSDeclaration.obj \
.\$(OBJDIR)\nsCSSLoader.obj \
.\$(OBJDIR)\nsCSSParser.obj \
.\$(OBJDIR)\nsCSSProps.obj \
.\$(OBJDIR)\nsCSSScanner.obj \
.\$(OBJDIR)\nsCSSRule.obj \
.\$(OBJDIR)\nsCSSStyleRule.obj \
.\$(OBJDIR)\nsCSSRules.obj \
.\$(OBJDIR)\nsCSSStyleSheet.obj \
.\$(OBJDIR)\nsCSSValue.obj \
.\$(OBJDIR)\nsHTMLAttributes.obj \
.\$(OBJDIR)\nsHTMLCSSStyleSheet.obj \
.\$(OBJDIR)\nsHTMLValue.obj \
.\$(OBJDIR)\nsStyleUtil.obj \
.\$(OBJDIR)\nsDOMCSSDeclaration.obj \
.\$(OBJDIR)\nsComputedDOMStyle.obj \
.\$(OBJDIR)\nsROCSSPrimitiveValue.obj \
$(NULL)
LINCS= -I..\..\..\base\src \
-I..\..\..\xul\content\src \
-I..\..\..\xul\base\src \
-I..\..\base\src -I..\..\content\src
LCFLAGS = \
-DENDER_LITE \
$(LCFLAGS) \
$(DEFINES) \
$(NULL)
include <$(DEPTH)\config\rules.mak>
install:: $(LIBRARY)
$(MAKE_INSTALL) $(LIBRARY) $(DIST)\lib
clobber::
rm -f $(DIST)\lib\$(LIBRARY_NAME).lib

Просмотреть файл

@ -0,0 +1,52 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* 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.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#include "nsCSSAtoms.h"
// define storage for all atoms
#define CSS_ATOM(_name, _value) nsIAtom* nsCSSAtoms::_name;
#include "nsCSSAtomList.h"
#undef CSS_ATOM
static nsrefcnt gRefCnt;
void nsCSSAtoms::AddRefAtoms()
{
if (0 == gRefCnt++) {
// create atoms
#define CSS_ATOM(_name, _value) _name = NS_NewAtom(_value);
#include "nsCSSAtomList.h"
#undef CSS_ATOM
}
}
void nsCSSAtoms::ReleaseAtoms()
{
NS_PRECONDITION(gRefCnt != 0, "bad release atoms");
if (--gRefCnt == 0) {
// release atoms
#define CSS_ATOM(_name, _value) NS_RELEASE(_name);
#include "nsCSSAtomList.h"
#undef CSS_ATOM
}
}

Просмотреть файл

@ -0,0 +1,103 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* 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.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#include "nsCSSKeywords.h"
#include "nsString.h"
#include "nsStaticNameTable.h"
// define an array of all CSS keywords
#define CSS_KEY(_name,_id) #_name,
const char* kCSSRawKeywords[] = {
#include "nsCSSKeywordList.h"
};
#undef CSS_KEY
static PRInt32 gTableRefCount;
static nsStaticCaseInsensitiveNameTable* gKeywordTable;
void
nsCSSKeywords::AddRefTable(void)
{
if (0 == gTableRefCount++) {
NS_ASSERTION(!gKeywordTable, "pre existing array!");
gKeywordTable = new nsStaticCaseInsensitiveNameTable();
if (gKeywordTable) {
#ifdef DEBUG
{
// let's verify the table...
for (PRInt32 index = 0; index < eCSSKeyword_COUNT; ++index) {
nsCAutoString temp1(kCSSRawKeywords[index]);
nsCAutoString temp2(kCSSRawKeywords[index]);
temp1.ToLowerCase();
NS_ASSERTION(temp1.Equals(temp2), "upper case char in table");
NS_ASSERTION(-1 == temp1.FindChar('_'), "underscore char in table");
}
}
#endif
gKeywordTable->Init(kCSSRawKeywords, eCSSKeyword_COUNT);
}
}
}
void
nsCSSKeywords::ReleaseTable(void)
{
if (0 == --gTableRefCount) {
if (gKeywordTable) {
delete gKeywordTable;
gKeywordTable = nsnull;
}
}
}
nsCSSKeyword
nsCSSKeywords::LookupKeyword(const nsCString& aKeyword)
{
NS_ASSERTION(gKeywordTable, "no lookup table, needs addref");
if (gKeywordTable) {
return nsCSSKeyword(gKeywordTable->Lookup(aKeyword));
}
return eCSSKeyword_UNKNOWN;
}
nsCSSKeyword
nsCSSKeywords::LookupKeyword(const nsString& aKeyword)
{
NS_ASSERTION(gKeywordTable, "no lookup table, needs addref");
if (gKeywordTable) {
return nsCSSKeyword(gKeywordTable->Lookup(aKeyword));
}
return eCSSKeyword_UNKNOWN;
}
const nsCString&
nsCSSKeywords::GetStringValue(nsCSSKeyword aKeyword)
{
NS_ASSERTION(gKeywordTable, "no lookup table, needs addref");
if (gKeywordTable) {
return gKeywordTable->GetStringValue(PRInt32(aKeyword));
} else {
static nsCString kNullStr;
return kNullStr;
}
}

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -0,0 +1,68 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* 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.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#ifndef nsStyleUtil_h___
#define nsStyleUtil_h___
#include "nslayout.h"
#include "nsCoord.h"
#include "nsIPresContext.h"
#include "nsILinkHandler.h" // for nsLinkState
class nsIStyleContext;
struct nsStyleColor;
enum nsFontSizeType {
eFontSize_HTML = 1,
eFontSize_CSS = 2
};
// Style utility functions
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 = PR_FALSE);
static PRBool IsHTMLLink(nsIContent *aContent, nsIAtom *aTag, nsIPresContext *aPresContext, nsLinkState *aState);
static PRBool IsSimpleXlink(nsIContent *aContent, nsIPresContext *aPresContext, nsLinkState *aState);
};
#endif /* nsStyleUtil_h___ */

1
content/xul/.cvsignore Normal file
Просмотреть файл

@ -0,0 +1 @@
Makefile

32
content/xul/Makefile.in Normal file
Просмотреть файл

@ -0,0 +1,32 @@
#
# 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.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = content
include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -0,0 +1,32 @@
#
# 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.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = src
include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -0,0 +1,26 @@
#!nmake
#
# 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.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
DEPTH=..\..\..
DIRS=src
include <$(DEPTH)\config\rules.mak>

Просмотреть файл

@ -0,0 +1 @@
Makefile

Просмотреть файл

@ -0,0 +1,47 @@
#
# 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.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = layout
LIBRARY_NAME = gkconxulcon_s
REQUIRES = xpcom
CPPSRCS = nsXULAtoms.cpp nsAnonymousElement.cpp
# we don't want the shared lib, but we want to force the creation of a static lib.
override NO_SHARED_LIB=1
override NO_STATIC_LIB=
include $(topsrcdir)/config/rules.mk
DEFINES += -D_IMPL_NS_HTML
INCLUDES += \
-I../../../xml/content/src \
-I../../../base/src \
$(NULL)

Просмотреть файл

@ -0,0 +1,59 @@
#!nmake
#
# 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.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
DEPTH=..\..\..\..
LIBRARY_NAME=contentxulcontent_s
MODULE=raptor
DEFINES=-D_IMPL_NS_HTML -DWIN32_LEAN_AND_MEAN
CPPSRCS= \
nsXULAtoms.cpp \
nsAnonymousElement.cpp \
$(NULL)
CPP_OBJS= \
.\$(OBJDIR)\nsXULAtoms.obj \
.\$(OBJDIR)\nsAnonymousElement.obj \
$(NULL)
EXPORTS = \
$(NULL)
LINCS=-I$(PUBLIC)\xpcom -I$(PUBLIC)\raptor -I$(PUBLIC)\js \
-I..\..\..\xml\content\src \
-I..\..\..\base\src \
-I..\..\..\base\public \
-I$(PUBLIC)\dom -I$(PUBLIC)\netlib -I$(PUBLIC)\pref
LCFLAGS = \
$(LCFLAGS) \
$(DEFINES) \
$(NULL)
include <$(DEPTH)\config\rules.mak>
install:: $(LIBRARY)
$(MAKE_INSTALL) $(LIBRARY) $(DIST)\lib
clobber::
rm -f $(DIST)\lib\$(LIBRARY_NAME).lib

Просмотреть файл

@ -0,0 +1,207 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* 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.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Original Author: David W. Hyatt (hyatt@netscape.com)
*
* Contributor(s):
*/
/******
This file contains the list of all XUL nsIAtoms and their values
It is designed to be used as inline input to nsXULAtoms.cpp *only*
through the magic of C preprocessing.
All entires must be enclosed in the macro XUL_ATOM which will have cruel
and unusual things done to it
It is recommended (but not strictly necessary) to keep all entries
in alphabetical order
The first argument to XUL_ATOM is the C++ identifier of the atom
The second argument is the string value of the atom
******/
XUL_ATOM(button, "button")
XUL_ATOM(spinner, "spinner")
XUL_ATOM(scrollbar, "scrollbar")
XUL_ATOM(slider, "slider")
XUL_ATOM(palettename, "palettename")
XUL_ATOM(fontpicker, "fontpicker")
XUL_ATOM(text, "text")
XUL_ATOM(toolbar, "toolbar")
XUL_ATOM(toolbaritem, "toolbaritem")
XUL_ATOM(toolbox, "toolbox")
XUL_ATOM(image, "image")
// The tree atoms
XUL_ATOM(tree, "tree") // The start of a tree view
XUL_ATOM(treecaption, "treecaption") // The caption of a tree view
XUL_ATOM(treehead, "treehead") // The header of the tree view
XUL_ATOM(treerow, "treerow") // A row in the tree view
XUL_ATOM(treerows, "treerows") // A row in the tree view
XUL_ATOM(treecell, "treecell") // An item in the tree view
XUL_ATOM(treeitem, "treeitem") // A cell in the tree view
XUL_ATOM(treechildren, "treechildren") // The children of an item in the tree view
XUL_ATOM(treeindentation, "treeindentation") // Specifies that the indentation for the level should occur here.
XUL_ATOM(allowevents, "allowevents") // Lets events be handled on the cell contents or in menus.
XUL_ATOM(treecol, "treecol") // A column in the tree view
XUL_ATOM(treecolgroup, "treecolgroup") // A column group in the tree view
XUL_ATOM(treecols, "treecols") // A column group in the tree view
XUL_ATOM(treefoot, "treefoot") // The footer of the tree view
XUL_ATOM(scrollbarlist, "scrollbarlist") // An atom for internal use by the tree view
XUL_ATOM(indent, "indent") // indicates that a cell should be indented
XUL_ATOM(outer, "outer") // indicates that a treechildren is the outermost rowgroup
XUL_ATOM(sizemode, "sizemode") // when set, measure strings to determine preferred width
XUL_ATOM(open, "open") // Whether or not a menu, tree, etc. is open
XUL_ATOM(outliner, "outliner")
XUL_ATOM(outlinerbody, "outlinerbody")
XUL_ATOM(outlinercol, "outlinercol")
XUL_ATOM(cycler, "cycler")
XUL_ATOM(primary, "primary")
XUL_ATOM(current, "current")
XUL_ATOM(mozoutlinerrow, ":-moz-outliner-row")
XUL_ATOM(mozoutlinercell, ":-moz-outliner-cell")
XUL_ATOM(mozoutlinercolumn, ":-moz-outliner-column")
XUL_ATOM(mozoutlinercelltext, ":-moz-outliner-cell-text")
XUL_ATOM(mozoutlinertwisty, ":-moz-outliner-twisty")
XUL_ATOM(mozoutlinerindentation, ":-moz-outliner-indentation")
XUL_ATOM(menubar, "menubar") // An XP menu bar.
XUL_ATOM(menu, "menu") // Represents an XP menu
XUL_ATOM(menuitem, "menuitem") // Represents an XP menu item
XUL_ATOM(menupopup, "menupopup") // The XP menu's children.
XUL_ATOM(menutobedisplayed, "menutobedisplayed") // The menu is about to be displayed at the next sync w/ frame
XUL_ATOM(menuactive, "menuactive") // Whether or not a menu is active (without necessarily being open)
XUL_ATOM(accesskey, "accesskey") // The shortcut key for a menu or menu item
XUL_ATOM(acceltext, "acceltext") // Text to use for the accelerator
XUL_ATOM(popupset, "popupset") // Contains popup menus, context menus, and tooltips
XUL_ATOM(popup, "popup") // The popup for a context menu, popup menu, or tooltip
XUL_ATOM(menugenerated, "menugenerated") // Internal
XUL_ATOM(popupanchor, "popupanchor") // Anchor for popups
XUL_ATOM(popupalign, "popupalign") // Alignment for popups
XUL_ATOM(ignorekeys, "ignorekeys") // Alignment for popups
XUL_ATOM(sizetopopup, "sizetopopup") // Whether or not menus size to their popup children (used by menulists)
XUL_ATOM(key, "key") // The key element / attribute
XUL_ATOM(keycode, "keycode") // The keycode attribute
XUL_ATOM(keytext, "keytext") // The keytext attribute
XUL_ATOM(modifiers, "modifiers") // The modifiers attribute
XUL_ATOM(broadcaster, "broadcaster") // A broadcaster
XUL_ATOM(observes, "observes") // The observes element
XUL_ATOM(templateAtom, "template") // A XUL template
XUL_ATOM(progressbar, "progressbar")
XUL_ATOM(crop, "crop")
XUL_ATOM(mode, "mode")
XUL_ATOM(equalsize, "equalsize")
XUL_ATOM(box, "box")
XUL_ATOM(hbox, "hbox")
XUL_ATOM(vbox, "vbox")
XUL_ATOM(scrollbox, "scrollbox")
XUL_ATOM(mousethrough, "mousethrough")
XUL_ATOM(flex, "flex")
XUL_ATOM(spring, "spring")
XUL_ATOM(orient, "orient")
XUL_ATOM(autostretch, "autostretch")
XUL_ATOM(minwidth, "min-width")
XUL_ATOM(minheight, "min-height")
XUL_ATOM(autorepeatbutton, "autorepeatbutton")
XUL_ATOM(bulletinboard, "bulletinboard")
XUL_ATOM(titledbox, "titledbox")
XUL_ATOM(title, "title")
XUL_ATOM(titledboxContentPseudo, ":titledbox-content")
XUL_ATOM(stack, "stack")
XUL_ATOM(deck, "deck")
XUL_ATOM(tabcontrol, "tabcontrol")
XUL_ATOM(tab, "tab")
XUL_ATOM(tabpanel, "tabpanel")
XUL_ATOM(tabpage, "tabpage")
XUL_ATOM(tabbox, "tabbox")
XUL_ATOM(index, "index")
XUL_ATOM(maxpos, "maxpos")
XUL_ATOM(curpos, "curpos")
XUL_ATOM(scrollbarbutton, "scrollbarbutton")
XUL_ATOM(increment, "increment")
XUL_ATOM(pageincrement, "pageincrement")
XUL_ATOM(thumb, "thumb")
XUL_ATOM(toggled, "toggled")
XUL_ATOM(grippy, "grippy")
XUL_ATOM(splitter, "splitter")
XUL_ATOM(collapse, "collapse")
XUL_ATOM(collapsed, "collapsed")
XUL_ATOM(resizebefore, "resizebefore")
XUL_ATOM(resizeafter, "resizeafter")
XUL_ATOM(state, "state")
XUL_ATOM(debug, "debug")
XUL_ATOM(fixed, "fixed")
// grid
XUL_ATOM(grid, "grid")
XUL_ATOM(rows, "rows")
XUL_ATOM(columns, "columns")
XUL_ATOM(row, "row")
XUL_ATOM(column, "column")
// toolbar & toolbar d&d atoms
XUL_ATOM(ddDropLocation, "dd-droplocation")
XUL_ATOM(ddDropLocationCoord, "dd-droplocationcoord")
XUL_ATOM(ddDropOn, "dd-dropon")
XUL_ATOM(ddTriggerRepaintSorted, "dd-triggerrepaintsorted")
XUL_ATOM(ddTriggerRepaintRestore, "dd-triggerrepaintrestore")
XUL_ATOM(ddTriggerRepaint, "dd-triggerrepaint")
XUL_ATOM(ddNoDropBetweenRows, "dd-nodropbetweenrows")
XUL_ATOM(container, "container")
XUL_ATOM(ddDragDropArea, "dragdroparea")
XUL_ATOM(ddDropMarker, ":-moz-drop-marker")
XUL_ATOM(widget, "widget")
XUL_ATOM(window, "window")
XUL_ATOM(iframe, "iframe")
XUL_ATOM(browser, "browser")
XUL_ATOM(editor, "editor")
//
XUL_ATOM(checkbox, "checkbox")
XUL_ATOM(radio, "radio")
XUL_ATOM(radiogroup, "radiogroup")
XUL_ATOM(menulist, "menulist")
XUL_ATOM(menubutton, "menubutton")
XUL_ATOM(textfield, "textfield")
XUL_ATOM(textarea, "textarea")
XUL_ATOM(listbox, "listbox")
XUL_ATOM(blankrow, "blankrow")
XUL_ATOM(titlebar, "titlebar")
XUL_ATOM(resizer, "resizer")
XUL_ATOM(dir, "dir")

26
content/xul/makefile.win Normal file
Просмотреть файл

@ -0,0 +1,26 @@
#!nmake
#
# 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.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
DEPTH=..\..
DIRS = content
include <$(DEPTH)\config\rules.mak>

Просмотреть файл

@ -0,0 +1,68 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* 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.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#ifndef nsStyleUtil_h___
#define nsStyleUtil_h___
#include "nslayout.h"
#include "nsCoord.h"
#include "nsIPresContext.h"
#include "nsILinkHandler.h" // for nsLinkState
class nsIStyleContext;
struct nsStyleColor;
enum nsFontSizeType {
eFontSize_HTML = 1,
eFontSize_CSS = 2
};
// Style utility functions
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 = PR_FALSE);
static PRBool IsHTMLLink(nsIContent *aContent, nsIAtom *aTag, nsIPresContext *aPresContext, nsLinkState *aState);
static PRBool IsSimpleXlink(nsIContent *aContent, nsIPresContext *aPresContext, nsLinkState *aState);
};
#endif /* nsStyleUtil_h___ */