Bug 398810 - "Remove MOZILLA_1_8_BRANCH ifdefs from core on trunk" [r=sicking r=brendan r=bsmedberg]

This commit is contained in:
Mike Hommey 2008-07-12 17:26:52 -05:00
parent 44aaafe89c
commit b37dfdda9a
5 changed files with 0 additions and 73 deletions

View File

@ -1162,30 +1162,15 @@ nsHTMLParanoidFragmentSink::AddLeaf(const nsIParserNode& aNode)
nsresult rv = NS_OK;
#ifndef MOZILLA_1_8_BRANCH
if (mSkip) {
return rv;
}
#endif
if (aNode.GetTokenType() == eToken_start) {
nsCOMPtr<nsIAtom> name;
rv = NameFromNode(aNode, getter_AddRefs(name));
NS_ENSURE_SUCCESS(rv, rv);
#ifdef MOZILLA_1_8_BRANCH
// we have to do this on the branch for some late 90s reason
if (name == nsGkAtoms::script || name == nsGkAtoms::style) {
nsCOMPtr<nsIDTD> dtd;
mParser->GetDTD(getter_AddRefs(dtd));
NS_ENSURE_TRUE(dtd, NS_ERROR_FAILURE);
nsAutoString skippedContent;
PRInt32 lineNo = 0;
dtd->CollectSkippedContent(nodeType, skippedContent, lineNo);
}
#endif
// We will process base tags, but we won't include them
// in the output
if (name == nsGkAtoms::base) {

View File

@ -167,11 +167,7 @@ EmbedContextMenuInfo::GetFormControlType(nsIDOMEvent* aEvent)
nsCOMPtr<nsIContent> tgContent = do_QueryInterface(mEventTarget);
nsIFrame* frame = nsnull;
#if defined(FIXED_BUG347731) || !defined(MOZ_ENABLE_LIBXUL)
#ifdef MOZILLA_1_8_BRANCH
presShell->GetPrimaryFrameFor(tgContent, &frame);
#else
frame = presShell->GetPrimaryFrameFor(tgContent);
#endif
if (frame)
mFormRect = frame->GetScreenRectExternal();
#endif
@ -186,11 +182,7 @@ EmbedContextMenuInfo::SetFormControlType(nsIDOMEventTarget *originalTarget)
nsresult rv = NS_ERROR_FAILURE;
nsCOMPtr<nsIContent> targetContent = do_QueryInterface(originalTarget);
mCtxFormType = 0;
#ifdef MOZILLA_1_8_BRANCH
if (targetContent && targetContent->IsContentOfType(nsIContent::eHTML_FORM_CONTROL)) {
#else
if (targetContent && targetContent->IsNodeOfType(nsIContent::eHTML_FORM_CONTROL)) {
#endif
nsCOMPtr<nsIFormControl> formControl(do_QueryInterface(targetContent));
if (formControl) {
mCtxFormType = formControl->GetType();
@ -604,12 +596,7 @@ EmbedContextMenuInfo::UpdateContextData(nsIDOMEvent *aDOMEvent)
if (mEmbedCtxType & GTK_MOZ_EMBED_CTX_RICHEDIT)
frame = presShell->GetRootFrame();
else {
#ifdef MOZILLA_1_8_BRANCH
frame = nsnull;
presShell->GetPrimaryFrameFor(tgContent, &frame);
#else
frame = presShell->GetPrimaryFrameFor(tgContent);
#endif
}
if (frame) {
mFormRect = frame->GetScreenRectExternal();

View File

@ -50,12 +50,7 @@
#include "nsIPrefBranch2.h"
#include "prmem.h"
#include "nsIStringBundle.h"
#ifdef MOZILLA_1_8_BRANCH
#include "nsIArray.h"
#include "nsObserverService.h"
#else
#include "nsIMutableArray.h"
#endif
#include "nsICategoryManager.h"
#include "nsIObserverService.h"
#include "nsIWebProgress.h"

View File

@ -141,34 +141,6 @@ JS_BEGIN_EXTERN_C
#define JSFUN_DISJOINT_FLAGS(f) ((f) & 0x0f)
#define JSFUN_GSFLAGS(f) ((f) & (JSFUN_GETTER | JSFUN_SETTER))
#ifdef MOZILLA_1_8_BRANCH
/*
* Squeeze three more bits into existing 8-bit flags by taking advantage of
* the invalid combination (JSFUN_GETTER | JSFUN_SETTER).
*/
#define JSFUN_GETTER_TEST(f) (JSFUN_GSFLAGS(f) == JSFUN_GETTER)
#define JSFUN_SETTER_TEST(f) (JSFUN_GSFLAGS(f) == JSFUN_SETTER)
#define JSFUN_FLAGS_TEST(f,t) (JSFUN_GSFLAGS(~(f)) ? (f) & (t) : 0)
#define JSFUN_BOUND_METHOD_TEST(f) JSFUN_FLAGS_TEST(f, JSFUN_BOUND_METHOD)
#define JSFUN_HEAVYWEIGHT_TEST(f) JSFUN_FLAGS_TEST(f, JSFUN_HEAVYWEIGHT)
#define JSFUN_GSFLAG2ATTR(f) (JSFUN_GETTER_TEST(f) ? JSPROP_GETTER : \
JSFUN_SETTER_TEST(f) ? JSPROP_SETTER : 0)
#define JSFUN_THISP_FLAGS(f) (JSFUN_GSFLAGS(~(f)) ? 0 : \
(f) & JSFUN_THISP_PRIMITIVE)
#define JSFUN_THISP_TEST(f,t) ((f) == (t) || (f) == JSFUN_THISP_PRIMITIVE)
#define JSFUN_THISP_STRING 0x30 /* |this| may be a primitive string */
#define JSFUN_THISP_NUMBER 0x70 /* |this| may be a primitive number */
#define JSFUN_THISP_BOOLEAN 0xb0 /* |this| may be a primitive boolean */
#define JSFUN_THISP_PRIMITIVE 0xf0 /* |this| may be any primitive value */
#define JSFUN_FLAGS_MASK 0xf8 /* overlay JSFUN_* attributes */
#else
#define JSFUN_GETTER_TEST(f) ((f) & JSFUN_GETTER)
#define JSFUN_SETTER_TEST(f) ((f) & JSFUN_SETTER)
#define JSFUN_BOUND_METHOD_TEST(f) ((f) & JSFUN_BOUND_METHOD)
@ -194,8 +166,6 @@ JS_BEGIN_EXTERN_C
instead of defaulting to class gsops
for property holding function */
#endif
/*
* Re-use JSFUN_LAMBDA, which applies only to scripted functions, for use in
* JSFunctionSpec arrays that specify generic native prototype methods, i.e.,
@ -1436,11 +1406,6 @@ struct JSPropertySpec {
struct JSFunctionSpec {
const char *name;
JSNative call;
#ifdef MOZILLA_1_8_BRANCH
uint8 nargs;
uint8 flags;
uint16 extra;
#else
uint16 nargs;
uint16 flags;
@ -1451,7 +1416,6 @@ struct JSFunctionSpec {
* If fast native, minimum required argc.
*/
uint32 extra;
#endif
};
/*

View File

@ -627,11 +627,7 @@ nsSAXXMLReader::InitParser(nsIRequestObserver *aObserver, nsIChannel *aChannel)
TryChannelCharset(aChannel, charsetSource, charset);
parser->SetDocumentCharset(charset, charsetSource);
#ifdef MOZILLA_1_8_BRANCH
rv = parser->Parse(mBaseURI, aObserver, PR_FALSE);
#else
rv = parser->Parse(mBaseURI, aObserver);
#endif
NS_ENSURE_SUCCESS(rv, rv);
mListener = do_QueryInterface(parser, &rv);