mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-28 21:28:55 +00:00
Restores INCLUDE_XUL #define. b=54248. r/a=hyatt@netscape.com
This commit is contained in:
parent
bc7b66ba1f
commit
4de121dc63
@ -1192,7 +1192,7 @@ DocumentViewerImpl::CreateStyleSet(nsIDocument* aDocument,
|
||||
(*aStyleSet)->AppendBackstopStyleSheet(mUAStyleSheet);
|
||||
}
|
||||
}
|
||||
return rv;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
@ -804,7 +804,7 @@ nsHTMLDocument::StartDocumentLoad(const char* aCommand,
|
||||
if (scheme && nsCRT::strcasecmp("about", scheme) && (kCharsetFromBookmarks > charsetSource))
|
||||
{
|
||||
nsCOMPtr<nsIRDFDataSource> datasource;
|
||||
if (NS_SUCCEEDED(rv_detect = gRDF->GetDataSource("rdf:bookmarks", getter_AddRefs(datasource))))
|
||||
if (gRDF && NS_SUCCEEDED(rv_detect = gRDF->GetDataSource("rdf:bookmarks", getter_AddRefs(datasource))))
|
||||
{
|
||||
nsCOMPtr<nsIBookmarksService> bookmarks = do_QueryInterface(datasource);
|
||||
if (bookmarks)
|
||||
|
@ -784,7 +784,7 @@ NS_IMETHODIMP
|
||||
nsXBLService::GetXBLDocumentInfo(const nsCString& aURLStr, nsIContent* aBoundElement, nsIXBLDocumentInfo** aResult)
|
||||
{
|
||||
*aResult = nsnull;
|
||||
if (gXULUtils->UseXULCache()) {
|
||||
if (gXULUtils && gXULUtils->UseXULCache()) {
|
||||
// The first line of defense is the chrome cache.
|
||||
// This cache crosses the entire product, so any XBL bindings that are
|
||||
// part of chrome will be reused across all XUL documents.
|
||||
@ -1032,7 +1032,7 @@ nsXBLService::LoadBindingDocumentInfo(nsIContent* aBoundElement, nsIDocument* aB
|
||||
|
||||
// We've got a file. Check our XBL document cache.
|
||||
nsCOMPtr<nsIXBLDocumentInfo> info;
|
||||
if (gXULUtils->UseXULCache()) {
|
||||
if (gXULUtils && gXULUtils->UseXULCache()) {
|
||||
// The first line of defense is the chrome cache.
|
||||
// This cache crosses the entire product, so that any XBL bindings that are
|
||||
// part of chrome will be reused across all XUL documents.
|
||||
@ -1092,7 +1092,7 @@ nsXBLService::LoadBindingDocumentInfo(nsIContent* aBoundElement, nsIDocument* aB
|
||||
|
||||
// If the doc is a chrome URI, then we put it into the XUL cache.
|
||||
PRBool cached = PR_FALSE;
|
||||
if (IsChromeURI(uri) && gXULUtils->UseXULCache()) {
|
||||
if (IsChromeURI(uri) && gXULUtils && gXULUtils->UseXULCache()) {
|
||||
cached = PR_TRUE;
|
||||
gXULCache->PutXBLDocumentInfo(info);
|
||||
|
||||
|
@ -82,10 +82,13 @@
|
||||
|
||||
#include "nsIDOMWindowInternal.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
#include "nsIMenuFrame.h"
|
||||
|
||||
#include "nsBox.h"
|
||||
|
||||
#ifdef INCLUDE_XUL
|
||||
#include "nsIDOMXULCommandDispatcher.h"
|
||||
#include "nsIDOMXULDocument.h"
|
||||
#include "nsIMenuFrame.h"
|
||||
#endif
|
||||
|
||||
// XXX - temporary, this is for GfxList View
|
||||
@ -132,13 +135,9 @@ nsresult
|
||||
NS_NewPolylineFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame);
|
||||
#endif
|
||||
|
||||
#ifdef INCLUDE_XUL
|
||||
#include "nsXULAtoms.h"
|
||||
#include "nsTreeIndentationFrame.h"
|
||||
#include "nsDocument.h"
|
||||
#include "nsIDOMElement.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsDocument.h"
|
||||
#include "nsToolbarItemFrame.h"
|
||||
#include "nsIScrollable.h"
|
||||
|
||||
#ifdef DEBUG
|
||||
@ -147,6 +146,12 @@ static PRBool gReallyNoisyContentUpdates = PR_FALSE;
|
||||
static PRBool gNoisyInlineConstruction = PR_FALSE;
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef INCLUDE_XUL
|
||||
#include "nsXULAtoms.h"
|
||||
#include "nsTreeIndentationFrame.h"
|
||||
#include "nsToolbarItemFrame.h"
|
||||
|
||||
#include "nsXULTreeFrame.h"
|
||||
#include "nsXULTreeOuterGroupFrame.h"
|
||||
#include "nsXULTreeSliceFrame.h"
|
||||
@ -3346,12 +3351,15 @@ nsCSSFrameConstructor::ConstructDocElementFrame(nsIPresShell* aPresShell,
|
||||
contentFrame->GetStyleContext(getter_AddRefs(styleContext));
|
||||
} else {
|
||||
// otherwise build a box or a block
|
||||
#ifdef INCLUDE_XUL
|
||||
PRInt32 nameSpaceID;
|
||||
if (NS_SUCCEEDED(aDocElement->GetNameSpaceID(nameSpaceID)) &&
|
||||
nameSpaceID == nsXULAtoms::nameSpaceID) {
|
||||
NS_NewBoxFrame(aPresShell, &contentFrame, PR_TRUE);
|
||||
}
|
||||
else {
|
||||
else
|
||||
#endif
|
||||
{
|
||||
NS_NewDocumentElementFrame(aPresShell, &contentFrame);
|
||||
isBlockFrame = PR_TRUE;
|
||||
|
||||
@ -3598,12 +3606,15 @@ nsCSSFrameConstructor::ConstructRootFrame(nsIPresShell* aPresShell,
|
||||
nsIAtom* rootPseudo;
|
||||
|
||||
if (!isPaginated) {
|
||||
#ifdef INCLUDE_XUL
|
||||
PRInt32 nameSpaceID;
|
||||
if (NS_SUCCEEDED(aDocElement->GetNameSpaceID(nameSpaceID)) &&
|
||||
nameSpaceID == nsXULAtoms::nameSpaceID)
|
||||
{
|
||||
NS_NewRootBoxFrame(aPresShell, &rootFrame);
|
||||
} else {
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
NS_NewCanvasFrame(aPresShell, &rootFrame);
|
||||
}
|
||||
|
||||
@ -3650,11 +3661,14 @@ nsCSSFrameConstructor::ConstructRootFrame(nsIPresShell* aPresShell,
|
||||
// Only need to create a scroll frame/view for cases 2 and 3.
|
||||
// Currently OVERFLOW_SCROLL isn't honored, as
|
||||
// scrollportview::SetScrollPref is not implemented.
|
||||
#ifdef INCLUDE_XUL
|
||||
PRInt32 nameSpaceID; // Never create scrollbars for XUL documents
|
||||
if (NS_SUCCEEDED(aDocElement->GetNameSpaceID(nameSpaceID)) &&
|
||||
nameSpaceID == nsXULAtoms::nameSpaceID) {
|
||||
isScrollable = PR_FALSE;
|
||||
} else {
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsISupports> container;
|
||||
if (nsnull != aPresContext) {
|
||||
@ -3987,6 +4001,9 @@ nsCSSFrameConstructor::ConstructTextControlFrame(nsIPresShell* aPresShell
|
||||
PRBool
|
||||
nsCSSFrameConstructor::HasGfxScrollbars()
|
||||
{
|
||||
#ifndef INCLUDE_XUL
|
||||
return PR_FALSE;
|
||||
#endif
|
||||
// Get the Prefs
|
||||
if (!mGotGfxPrefs) {
|
||||
nsCOMPtr<nsIPref> pref(do_GetService(NS_PREF_CONTRACTID));
|
||||
@ -4060,7 +4077,7 @@ nsCSSFrameConstructor::ConstructSelectFrame(nsIPresShell* aPresShell,
|
||||
|
||||
nsHTMLContainerFrame::CreateViewForFrame(aPresContext, comboboxFrame,
|
||||
aStyleContext, aParentFrame, PR_FALSE);
|
||||
|
||||
#ifdef INCLUDE_XUL
|
||||
if (HasGfxScrollbars() && mDoGfxCombobox) {
|
||||
///////////////////////////////////////////////////////////////////
|
||||
// Combobox - New GFX Implementation
|
||||
@ -4234,7 +4251,9 @@ nsCSSFrameConstructor::ConstructSelectFrame(nsIPresShell* aPresShell,
|
||||
aNewFrame = comboboxFrame;
|
||||
aFrameHasBeenInitialized = PR_TRUE;
|
||||
}
|
||||
} else {
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
///////////////////////////////////////////////////////////////////
|
||||
// Combobox - Old Native Implementation
|
||||
///////////////////////////////////////////////////////////////////
|
||||
@ -4318,7 +4337,7 @@ nsCSSFrameConstructor::ConstructSelectFrame(nsIPresShell* aPresShell,
|
||||
}
|
||||
}
|
||||
} else if (HasGfxScrollbars() && mDoGfxListbox) {
|
||||
|
||||
#ifdef INCLUDE_XUL
|
||||
///////////////////////////////////////////////////////////////////
|
||||
// ListBox - New GFX Implementation
|
||||
///////////////////////////////////////////////////////////////////
|
||||
@ -4418,7 +4437,8 @@ nsCSSFrameConstructor::ConstructSelectFrame(nsIPresShell* aPresShell,
|
||||
aNewFrame = listFrame;
|
||||
|
||||
// yes we have already initialized our frame
|
||||
aFrameHasBeenInitialized = PR_TRUE;
|
||||
aFrameHasBeenInitialized = PR_TRUE;
|
||||
#endif
|
||||
} else {
|
||||
///////////////////////////////////////////////////////////////////
|
||||
// ListBox - Old Native Implementation
|
||||
@ -4616,7 +4636,7 @@ nsCSSFrameConstructor::ConstructTitledBoxFrame(nsIPresShell* aPresShell,
|
||||
nsIFrame * boxFrame;
|
||||
NS_NewTitledBoxInnerFrame(shell, &boxFrame);
|
||||
|
||||
|
||||
#ifdef INCLUDE_XUL
|
||||
// Resolve style and initialize the frame
|
||||
nsIStyleContext* styleContext;
|
||||
aPresContext->ResolvePseudoStyleContextFor(aContent, nsXULAtoms::titledboxContentPseudo,
|
||||
@ -4625,7 +4645,7 @@ nsCSSFrameConstructor::ConstructTitledBoxFrame(nsIPresShell* aPresShell,
|
||||
newFrame, styleContext, nsnull, boxFrame);
|
||||
|
||||
NS_RELEASE(styleContext);
|
||||
|
||||
#endif
|
||||
nsFrameItems childItems;
|
||||
|
||||
ProcessChildren(aPresShell, aPresContext, aState, aContent, boxFrame, PR_FALSE,
|
||||
@ -5411,7 +5431,7 @@ nsCSSFrameConstructor::CreateAnonymousFrames(nsIPresShell* aPresShell,
|
||||
|
||||
// nsGenericElement::SetDocument ought to keep a list like this one,
|
||||
// but it can't because nsGfxScrollFrames get around this.
|
||||
|
||||
#ifdef INCLUDE_XUL
|
||||
if (aTag != nsHTMLAtoms::input &&
|
||||
aTag != nsHTMLAtoms::textarea &&
|
||||
aTag != nsHTMLAtoms::combobox &&
|
||||
@ -5422,7 +5442,7 @@ nsCSSFrameConstructor::CreateAnonymousFrames(nsIPresShell* aPresShell,
|
||||
return NS_OK;
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
// get the document
|
||||
nsCOMPtr<nsIDocument> doc;
|
||||
nsresult rv = aParent->GetDocument(*getter_AddRefs(doc));
|
||||
@ -6415,6 +6435,7 @@ nsCSSFrameConstructor::BuildGfxScrollFrame (nsIPresShell* aPresShell,
|
||||
nsIFrame*& aNewFrame,
|
||||
nsFrameItems& aAnonymousFrames)
|
||||
{
|
||||
#ifdef INCLUDE_XUL
|
||||
NS_NewGfxScrollFrame(aPresShell, &aNewFrame, aDocument, aIsRoot);
|
||||
|
||||
InitAndRestoreFrame(aPresContext, aState, aContent,
|
||||
@ -6435,6 +6456,8 @@ nsCSSFrameConstructor::BuildGfxScrollFrame (nsIPresShell* aPresShell,
|
||||
aAnonymousFrames);
|
||||
|
||||
return NS_OK;
|
||||
#endif
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsresult
|
||||
@ -7011,6 +7034,8 @@ nsCSSFrameConstructor::InitAndRestoreFrame(nsIPresContext* aPresContext
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
NS_ASSERTION(aNewFrame, "Null frame cannot be initialized");
|
||||
if (!aNewFrame)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
// Initialize the frame
|
||||
rv = aNewFrame->Init(aPresContext, aContent, aParentFrame,
|
||||
@ -12235,6 +12260,7 @@ nsCSSFrameConstructor::CreateTreeWidgetContent(nsIPresContext* aPresContext,
|
||||
PRBool aIsScrollbar,
|
||||
nsILayoutHistoryState* aFrameState)
|
||||
{
|
||||
#ifdef INCLUDE_XUL
|
||||
nsCOMPtr<nsIPresShell> shell;
|
||||
aPresContext->GetShell(getter_AddRefs(shell));
|
||||
nsresult rv = NS_OK;
|
||||
@ -12318,6 +12344,9 @@ nsCSSFrameConstructor::CreateTreeWidgetContent(nsIPresContext* aPresContext,
|
||||
}
|
||||
|
||||
return rv;
|
||||
#else
|
||||
return NS_ERROR_FAILURE;
|
||||
#endif
|
||||
}
|
||||
|
||||
//----------------------------------------
|
||||
|
@ -1192,7 +1192,7 @@ DocumentViewerImpl::CreateStyleSet(nsIDocument* aDocument,
|
||||
(*aStyleSet)->AppendBackstopStyleSheet(mUAStyleSheet);
|
||||
}
|
||||
}
|
||||
return rv;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
@ -1181,12 +1181,7 @@ nsPresContext::GetLanguageSpecificTransformType(
|
||||
nsLanguageSpecificTransformType* aType)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aType);
|
||||
NS_ASSERTION(mLanguageSpecificTransformType !=
|
||||
eLanguageSpecificTransformType_Unknown,
|
||||
"language specific transform type not set yet");
|
||||
|
||||
*aType = mLanguageSpecificTransformType;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -2082,7 +2082,8 @@ NS_IMETHODIMP
|
||||
PresShell::ScrollFrameIntoView(nsIFrame *aFrame){
|
||||
if (!aFrame)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
|
||||
#ifdef INCLUDE_XUL
|
||||
// Before we scroll the frame into view, ask the command dispatcher
|
||||
// if we're resetting focus because a window just got an activate
|
||||
// event. If we are, we do not want to scroll the frame into view.
|
||||
@ -2123,7 +2124,7 @@ PresShell::ScrollFrameIntoView(nsIFrame *aFrame){
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
if (IsScrollingEnabled())
|
||||
return ScrollFrameIntoView(aFrame, NS_PRESSHELL_SCROLL_ANYWHERE,
|
||||
NS_PRESSHELL_SCROLL_ANYWHERE);
|
||||
@ -2913,7 +2914,7 @@ PresShell::ScrollFrameIntoView(nsIFrame *aFrame,
|
||||
if (!aFrame) {
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
#ifdef INCLUDE_XUL
|
||||
// Before we scroll the frame into view, ask the command dispatcher
|
||||
// if we're resetting focus because a window just got an activate
|
||||
// event. If we are, we do not want to scroll the frame into view.
|
||||
@ -2954,7 +2955,7 @@ PresShell::ScrollFrameIntoView(nsIFrame *aFrame,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
if (mViewManager) {
|
||||
// Get the viewport scroller
|
||||
nsIScrollableView* scrollingView;
|
||||
|
@ -1192,7 +1192,7 @@ DocumentViewerImpl::CreateStyleSet(nsIDocument* aDocument,
|
||||
(*aStyleSet)->AppendBackstopStyleSheet(mUAStyleSheet);
|
||||
}
|
||||
}
|
||||
return rv;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
@ -1181,12 +1181,7 @@ nsPresContext::GetLanguageSpecificTransformType(
|
||||
nsLanguageSpecificTransformType* aType)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aType);
|
||||
NS_ASSERTION(mLanguageSpecificTransformType !=
|
||||
eLanguageSpecificTransformType_Unknown,
|
||||
"language specific transform type not set yet");
|
||||
|
||||
*aType = mLanguageSpecificTransformType;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -2082,7 +2082,8 @@ NS_IMETHODIMP
|
||||
PresShell::ScrollFrameIntoView(nsIFrame *aFrame){
|
||||
if (!aFrame)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
|
||||
#ifdef INCLUDE_XUL
|
||||
// Before we scroll the frame into view, ask the command dispatcher
|
||||
// if we're resetting focus because a window just got an activate
|
||||
// event. If we are, we do not want to scroll the frame into view.
|
||||
@ -2123,7 +2124,7 @@ PresShell::ScrollFrameIntoView(nsIFrame *aFrame){
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
if (IsScrollingEnabled())
|
||||
return ScrollFrameIntoView(aFrame, NS_PRESSHELL_SCROLL_ANYWHERE,
|
||||
NS_PRESSHELL_SCROLL_ANYWHERE);
|
||||
@ -2913,7 +2914,7 @@ PresShell::ScrollFrameIntoView(nsIFrame *aFrame,
|
||||
if (!aFrame) {
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
#ifdef INCLUDE_XUL
|
||||
// Before we scroll the frame into view, ask the command dispatcher
|
||||
// if we're resetting focus because a window just got an activate
|
||||
// event. If we are, we do not want to scroll the frame into view.
|
||||
@ -2954,7 +2955,7 @@ PresShell::ScrollFrameIntoView(nsIFrame *aFrame,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
if (mViewManager) {
|
||||
// Get the viewport scroller
|
||||
nsIScrollableView* scrollingView;
|
||||
|
@ -804,7 +804,7 @@ nsHTMLDocument::StartDocumentLoad(const char* aCommand,
|
||||
if (scheme && nsCRT::strcasecmp("about", scheme) && (kCharsetFromBookmarks > charsetSource))
|
||||
{
|
||||
nsCOMPtr<nsIRDFDataSource> datasource;
|
||||
if (NS_SUCCEEDED(rv_detect = gRDF->GetDataSource("rdf:bookmarks", getter_AddRefs(datasource))))
|
||||
if (gRDF && NS_SUCCEEDED(rv_detect = gRDF->GetDataSource("rdf:bookmarks", getter_AddRefs(datasource))))
|
||||
{
|
||||
nsCOMPtr<nsIBookmarksService> bookmarks = do_QueryInterface(datasource);
|
||||
if (bookmarks)
|
||||
|
@ -82,10 +82,13 @@
|
||||
|
||||
#include "nsIDOMWindowInternal.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
#include "nsIMenuFrame.h"
|
||||
|
||||
#include "nsBox.h"
|
||||
|
||||
#ifdef INCLUDE_XUL
|
||||
#include "nsIDOMXULCommandDispatcher.h"
|
||||
#include "nsIDOMXULDocument.h"
|
||||
#include "nsIMenuFrame.h"
|
||||
#endif
|
||||
|
||||
// XXX - temporary, this is for GfxList View
|
||||
@ -132,13 +135,9 @@ nsresult
|
||||
NS_NewPolylineFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame);
|
||||
#endif
|
||||
|
||||
#ifdef INCLUDE_XUL
|
||||
#include "nsXULAtoms.h"
|
||||
#include "nsTreeIndentationFrame.h"
|
||||
#include "nsDocument.h"
|
||||
#include "nsIDOMElement.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsDocument.h"
|
||||
#include "nsToolbarItemFrame.h"
|
||||
#include "nsIScrollable.h"
|
||||
|
||||
#ifdef DEBUG
|
||||
@ -147,6 +146,12 @@ static PRBool gReallyNoisyContentUpdates = PR_FALSE;
|
||||
static PRBool gNoisyInlineConstruction = PR_FALSE;
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef INCLUDE_XUL
|
||||
#include "nsXULAtoms.h"
|
||||
#include "nsTreeIndentationFrame.h"
|
||||
#include "nsToolbarItemFrame.h"
|
||||
|
||||
#include "nsXULTreeFrame.h"
|
||||
#include "nsXULTreeOuterGroupFrame.h"
|
||||
#include "nsXULTreeSliceFrame.h"
|
||||
@ -3346,12 +3351,15 @@ nsCSSFrameConstructor::ConstructDocElementFrame(nsIPresShell* aPresShell,
|
||||
contentFrame->GetStyleContext(getter_AddRefs(styleContext));
|
||||
} else {
|
||||
// otherwise build a box or a block
|
||||
#ifdef INCLUDE_XUL
|
||||
PRInt32 nameSpaceID;
|
||||
if (NS_SUCCEEDED(aDocElement->GetNameSpaceID(nameSpaceID)) &&
|
||||
nameSpaceID == nsXULAtoms::nameSpaceID) {
|
||||
NS_NewBoxFrame(aPresShell, &contentFrame, PR_TRUE);
|
||||
}
|
||||
else {
|
||||
else
|
||||
#endif
|
||||
{
|
||||
NS_NewDocumentElementFrame(aPresShell, &contentFrame);
|
||||
isBlockFrame = PR_TRUE;
|
||||
|
||||
@ -3598,12 +3606,15 @@ nsCSSFrameConstructor::ConstructRootFrame(nsIPresShell* aPresShell,
|
||||
nsIAtom* rootPseudo;
|
||||
|
||||
if (!isPaginated) {
|
||||
#ifdef INCLUDE_XUL
|
||||
PRInt32 nameSpaceID;
|
||||
if (NS_SUCCEEDED(aDocElement->GetNameSpaceID(nameSpaceID)) &&
|
||||
nameSpaceID == nsXULAtoms::nameSpaceID)
|
||||
{
|
||||
NS_NewRootBoxFrame(aPresShell, &rootFrame);
|
||||
} else {
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
NS_NewCanvasFrame(aPresShell, &rootFrame);
|
||||
}
|
||||
|
||||
@ -3650,11 +3661,14 @@ nsCSSFrameConstructor::ConstructRootFrame(nsIPresShell* aPresShell,
|
||||
// Only need to create a scroll frame/view for cases 2 and 3.
|
||||
// Currently OVERFLOW_SCROLL isn't honored, as
|
||||
// scrollportview::SetScrollPref is not implemented.
|
||||
#ifdef INCLUDE_XUL
|
||||
PRInt32 nameSpaceID; // Never create scrollbars for XUL documents
|
||||
if (NS_SUCCEEDED(aDocElement->GetNameSpaceID(nameSpaceID)) &&
|
||||
nameSpaceID == nsXULAtoms::nameSpaceID) {
|
||||
isScrollable = PR_FALSE;
|
||||
} else {
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsISupports> container;
|
||||
if (nsnull != aPresContext) {
|
||||
@ -3987,6 +4001,9 @@ nsCSSFrameConstructor::ConstructTextControlFrame(nsIPresShell* aPresShell
|
||||
PRBool
|
||||
nsCSSFrameConstructor::HasGfxScrollbars()
|
||||
{
|
||||
#ifndef INCLUDE_XUL
|
||||
return PR_FALSE;
|
||||
#endif
|
||||
// Get the Prefs
|
||||
if (!mGotGfxPrefs) {
|
||||
nsCOMPtr<nsIPref> pref(do_GetService(NS_PREF_CONTRACTID));
|
||||
@ -4060,7 +4077,7 @@ nsCSSFrameConstructor::ConstructSelectFrame(nsIPresShell* aPresShell,
|
||||
|
||||
nsHTMLContainerFrame::CreateViewForFrame(aPresContext, comboboxFrame,
|
||||
aStyleContext, aParentFrame, PR_FALSE);
|
||||
|
||||
#ifdef INCLUDE_XUL
|
||||
if (HasGfxScrollbars() && mDoGfxCombobox) {
|
||||
///////////////////////////////////////////////////////////////////
|
||||
// Combobox - New GFX Implementation
|
||||
@ -4234,7 +4251,9 @@ nsCSSFrameConstructor::ConstructSelectFrame(nsIPresShell* aPresShell,
|
||||
aNewFrame = comboboxFrame;
|
||||
aFrameHasBeenInitialized = PR_TRUE;
|
||||
}
|
||||
} else {
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
///////////////////////////////////////////////////////////////////
|
||||
// Combobox - Old Native Implementation
|
||||
///////////////////////////////////////////////////////////////////
|
||||
@ -4318,7 +4337,7 @@ nsCSSFrameConstructor::ConstructSelectFrame(nsIPresShell* aPresShell,
|
||||
}
|
||||
}
|
||||
} else if (HasGfxScrollbars() && mDoGfxListbox) {
|
||||
|
||||
#ifdef INCLUDE_XUL
|
||||
///////////////////////////////////////////////////////////////////
|
||||
// ListBox - New GFX Implementation
|
||||
///////////////////////////////////////////////////////////////////
|
||||
@ -4418,7 +4437,8 @@ nsCSSFrameConstructor::ConstructSelectFrame(nsIPresShell* aPresShell,
|
||||
aNewFrame = listFrame;
|
||||
|
||||
// yes we have already initialized our frame
|
||||
aFrameHasBeenInitialized = PR_TRUE;
|
||||
aFrameHasBeenInitialized = PR_TRUE;
|
||||
#endif
|
||||
} else {
|
||||
///////////////////////////////////////////////////////////////////
|
||||
// ListBox - Old Native Implementation
|
||||
@ -4616,7 +4636,7 @@ nsCSSFrameConstructor::ConstructTitledBoxFrame(nsIPresShell* aPresShell,
|
||||
nsIFrame * boxFrame;
|
||||
NS_NewTitledBoxInnerFrame(shell, &boxFrame);
|
||||
|
||||
|
||||
#ifdef INCLUDE_XUL
|
||||
// Resolve style and initialize the frame
|
||||
nsIStyleContext* styleContext;
|
||||
aPresContext->ResolvePseudoStyleContextFor(aContent, nsXULAtoms::titledboxContentPseudo,
|
||||
@ -4625,7 +4645,7 @@ nsCSSFrameConstructor::ConstructTitledBoxFrame(nsIPresShell* aPresShell,
|
||||
newFrame, styleContext, nsnull, boxFrame);
|
||||
|
||||
NS_RELEASE(styleContext);
|
||||
|
||||
#endif
|
||||
nsFrameItems childItems;
|
||||
|
||||
ProcessChildren(aPresShell, aPresContext, aState, aContent, boxFrame, PR_FALSE,
|
||||
@ -5411,7 +5431,7 @@ nsCSSFrameConstructor::CreateAnonymousFrames(nsIPresShell* aPresShell,
|
||||
|
||||
// nsGenericElement::SetDocument ought to keep a list like this one,
|
||||
// but it can't because nsGfxScrollFrames get around this.
|
||||
|
||||
#ifdef INCLUDE_XUL
|
||||
if (aTag != nsHTMLAtoms::input &&
|
||||
aTag != nsHTMLAtoms::textarea &&
|
||||
aTag != nsHTMLAtoms::combobox &&
|
||||
@ -5422,7 +5442,7 @@ nsCSSFrameConstructor::CreateAnonymousFrames(nsIPresShell* aPresShell,
|
||||
return NS_OK;
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
// get the document
|
||||
nsCOMPtr<nsIDocument> doc;
|
||||
nsresult rv = aParent->GetDocument(*getter_AddRefs(doc));
|
||||
@ -6415,6 +6435,7 @@ nsCSSFrameConstructor::BuildGfxScrollFrame (nsIPresShell* aPresShell,
|
||||
nsIFrame*& aNewFrame,
|
||||
nsFrameItems& aAnonymousFrames)
|
||||
{
|
||||
#ifdef INCLUDE_XUL
|
||||
NS_NewGfxScrollFrame(aPresShell, &aNewFrame, aDocument, aIsRoot);
|
||||
|
||||
InitAndRestoreFrame(aPresContext, aState, aContent,
|
||||
@ -6435,6 +6456,8 @@ nsCSSFrameConstructor::BuildGfxScrollFrame (nsIPresShell* aPresShell,
|
||||
aAnonymousFrames);
|
||||
|
||||
return NS_OK;
|
||||
#endif
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsresult
|
||||
@ -7011,6 +7034,8 @@ nsCSSFrameConstructor::InitAndRestoreFrame(nsIPresContext* aPresContext
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
NS_ASSERTION(aNewFrame, "Null frame cannot be initialized");
|
||||
if (!aNewFrame)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
// Initialize the frame
|
||||
rv = aNewFrame->Init(aPresContext, aContent, aParentFrame,
|
||||
@ -12235,6 +12260,7 @@ nsCSSFrameConstructor::CreateTreeWidgetContent(nsIPresContext* aPresContext,
|
||||
PRBool aIsScrollbar,
|
||||
nsILayoutHistoryState* aFrameState)
|
||||
{
|
||||
#ifdef INCLUDE_XUL
|
||||
nsCOMPtr<nsIPresShell> shell;
|
||||
aPresContext->GetShell(getter_AddRefs(shell));
|
||||
nsresult rv = NS_OK;
|
||||
@ -12318,6 +12344,9 @@ nsCSSFrameConstructor::CreateTreeWidgetContent(nsIPresContext* aPresContext,
|
||||
}
|
||||
|
||||
return rv;
|
||||
#else
|
||||
return NS_ERROR_FAILURE;
|
||||
#endif
|
||||
}
|
||||
|
||||
//----------------------------------------
|
||||
|
@ -784,7 +784,7 @@ NS_IMETHODIMP
|
||||
nsXBLService::GetXBLDocumentInfo(const nsCString& aURLStr, nsIContent* aBoundElement, nsIXBLDocumentInfo** aResult)
|
||||
{
|
||||
*aResult = nsnull;
|
||||
if (gXULUtils->UseXULCache()) {
|
||||
if (gXULUtils && gXULUtils->UseXULCache()) {
|
||||
// The first line of defense is the chrome cache.
|
||||
// This cache crosses the entire product, so any XBL bindings that are
|
||||
// part of chrome will be reused across all XUL documents.
|
||||
@ -1032,7 +1032,7 @@ nsXBLService::LoadBindingDocumentInfo(nsIContent* aBoundElement, nsIDocument* aB
|
||||
|
||||
// We've got a file. Check our XBL document cache.
|
||||
nsCOMPtr<nsIXBLDocumentInfo> info;
|
||||
if (gXULUtils->UseXULCache()) {
|
||||
if (gXULUtils && gXULUtils->UseXULCache()) {
|
||||
// The first line of defense is the chrome cache.
|
||||
// This cache crosses the entire product, so that any XBL bindings that are
|
||||
// part of chrome will be reused across all XUL documents.
|
||||
@ -1092,7 +1092,7 @@ nsXBLService::LoadBindingDocumentInfo(nsIContent* aBoundElement, nsIDocument* aB
|
||||
|
||||
// If the doc is a chrome URI, then we put it into the XUL cache.
|
||||
PRBool cached = PR_FALSE;
|
||||
if (IsChromeURI(uri) && gXULUtils->UseXULCache()) {
|
||||
if (IsChromeURI(uri) && gXULUtils && gXULUtils->UseXULCache()) {
|
||||
cached = PR_TRUE;
|
||||
gXULCache->PutXBLDocumentInfo(info);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user