Removing obsolete frames from XUL dir. a=ben

This commit is contained in:
hyatt@netscape.com
2000-11-28 07:13:14 +00:00
parent 744c3aae73
commit 3d854d35e0
11 changed files with 6 additions and 571 deletions

View File

@@ -204,9 +204,6 @@ NS_NewTextBoxFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame );
nsresult nsresult
NS_NewTitledBoxFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame ); NS_NewTitledBoxFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame );
nsresult
NS_NewTitleFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame );
nsresult nsresult
NS_NewButtonBoxFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame); NS_NewButtonBoxFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame);
@@ -216,12 +213,6 @@ NS_NewSliderFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame );
nsresult nsresult
NS_NewScrollbarFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame ); NS_NewScrollbarFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame );
nsresult
NS_NewSpinnerFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame );
nsresult
NS_NewFontPickerFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame );
nsresult nsresult
NS_NewScrollbarButtonFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame ); NS_NewScrollbarButtonFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame );
@@ -5995,31 +5986,6 @@ nsCSSFrameConstructor::ConstructXULFrame(nsIPresShell* aPresShell,
} }
} //------- End Grid ------ } //------- End Grid ------
else if (aTag == nsXULAtoms::title) {
processChildren = PR_TRUE;
isReplaced = PR_TRUE;
rv = NS_NewTitleFrame(aPresShell, &newFrame);
const nsStyleDisplay* display = (const nsStyleDisplay*)
aStyleContext->GetStyleData(eStyleStruct_Display);
// Boxes can scroll.
if (IsScrollable(aPresContext, display)) {
// set the top to be the newly created scrollframe
BuildScrollFrame(aPresShell, aPresContext, aState, aContent, aStyleContext, newFrame, aParentFrame,
topFrame, aStyleContext);
// we have a scrollframe so the parent becomes the scroll frame.
newFrame->GetParent(&aParentFrame);
primaryFrameSet = PR_TRUE;
frameHasBeenInitialized = PR_TRUE;
}
} // End of BOX CONSTRUCTION logic
else if (aTag == nsXULAtoms::titledbox) { else if (aTag == nsXULAtoms::titledbox) {
rv = NS_NewTitledBoxFrame(aPresShell, &newFrame); rv = NS_NewTitledBoxFrame(aPresShell, &newFrame);
@@ -6053,20 +6019,8 @@ nsCSSFrameConstructor::ConstructXULFrame(nsIPresShell* aPresShell,
processChildren = PR_TRUE; processChildren = PR_TRUE;
isReplaced = PR_TRUE; isReplaced = PR_TRUE;
} }
else if (aTag == nsXULAtoms::iframe || aTag == nsXULAtoms::editor ||
else if (aTag == nsXULAtoms::spinner) aTag == nsXULAtoms::browser) {
rv = NS_NewSpinnerFrame(aPresShell, &newFrame);
else if (aTag == nsXULAtoms::fontpicker)
rv = NS_NewFontPickerFrame(aPresShell, &newFrame);
else if (aTag == nsXULAtoms::iframe) {
isReplaced = PR_TRUE;
rv = NS_NewHTMLFrameOuterFrame(aPresShell, &newFrame);
}
else if (aTag == nsXULAtoms::editor) {
isReplaced = PR_TRUE;
rv = NS_NewHTMLFrameOuterFrame(aPresShell, &newFrame);
}
else if (aTag == nsXULAtoms::browser) {
isReplaced = PR_TRUE; isReplaced = PR_TRUE;
rv = NS_NewHTMLFrameOuterFrame(aPresShell, &newFrame); rv = NS_NewHTMLFrameOuterFrame(aPresShell, &newFrame);
} }

View File

@@ -204,9 +204,6 @@ NS_NewTextBoxFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame );
nsresult nsresult
NS_NewTitledBoxFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame ); NS_NewTitledBoxFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame );
nsresult
NS_NewTitleFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame );
nsresult nsresult
NS_NewButtonBoxFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame); NS_NewButtonBoxFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame);
@@ -216,12 +213,6 @@ NS_NewSliderFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame );
nsresult nsresult
NS_NewScrollbarFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame ); NS_NewScrollbarFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame );
nsresult
NS_NewSpinnerFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame );
nsresult
NS_NewFontPickerFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame );
nsresult nsresult
NS_NewScrollbarButtonFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame ); NS_NewScrollbarButtonFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame );
@@ -5995,31 +5986,6 @@ nsCSSFrameConstructor::ConstructXULFrame(nsIPresShell* aPresShell,
} }
} //------- End Grid ------ } //------- End Grid ------
else if (aTag == nsXULAtoms::title) {
processChildren = PR_TRUE;
isReplaced = PR_TRUE;
rv = NS_NewTitleFrame(aPresShell, &newFrame);
const nsStyleDisplay* display = (const nsStyleDisplay*)
aStyleContext->GetStyleData(eStyleStruct_Display);
// Boxes can scroll.
if (IsScrollable(aPresContext, display)) {
// set the top to be the newly created scrollframe
BuildScrollFrame(aPresShell, aPresContext, aState, aContent, aStyleContext, newFrame, aParentFrame,
topFrame, aStyleContext);
// we have a scrollframe so the parent becomes the scroll frame.
newFrame->GetParent(&aParentFrame);
primaryFrameSet = PR_TRUE;
frameHasBeenInitialized = PR_TRUE;
}
} // End of BOX CONSTRUCTION logic
else if (aTag == nsXULAtoms::titledbox) { else if (aTag == nsXULAtoms::titledbox) {
rv = NS_NewTitledBoxFrame(aPresShell, &newFrame); rv = NS_NewTitledBoxFrame(aPresShell, &newFrame);
@@ -6053,20 +6019,8 @@ nsCSSFrameConstructor::ConstructXULFrame(nsIPresShell* aPresShell,
processChildren = PR_TRUE; processChildren = PR_TRUE;
isReplaced = PR_TRUE; isReplaced = PR_TRUE;
} }
else if (aTag == nsXULAtoms::iframe || aTag == nsXULAtoms::editor ||
else if (aTag == nsXULAtoms::spinner) aTag == nsXULAtoms::browser) {
rv = NS_NewSpinnerFrame(aPresShell, &newFrame);
else if (aTag == nsXULAtoms::fontpicker)
rv = NS_NewFontPickerFrame(aPresShell, &newFrame);
else if (aTag == nsXULAtoms::iframe) {
isReplaced = PR_TRUE;
rv = NS_NewHTMLFrameOuterFrame(aPresShell, &newFrame);
}
else if (aTag == nsXULAtoms::editor) {
isReplaced = PR_TRUE;
rv = NS_NewHTMLFrameOuterFrame(aPresShell, &newFrame);
}
else if (aTag == nsXULAtoms::browser) {
isReplaced = PR_TRUE; isReplaced = PR_TRUE;
rv = NS_NewHTMLFrameOuterFrame(aPresShell, &newFrame); rv = NS_NewHTMLFrameOuterFrame(aPresShell, &newFrame);
} }

View File

@@ -66,7 +66,6 @@ CPPSRCS = \
nsStackFrame.cpp \ nsStackFrame.cpp \
nsSpringFrame.cpp \ nsSpringFrame.cpp \
nsTitledBoxFrame.cpp \ nsTitledBoxFrame.cpp \
nsTitleFrame.cpp \
nsFrameNavigator.cpp \ nsFrameNavigator.cpp \
nsSplitterFrame.cpp \ nsSplitterFrame.cpp \
nsGrippyFrame.cpp \ nsGrippyFrame.cpp \
@@ -75,11 +74,9 @@ CPPSRCS = \
nsProgressMeterFrame.cpp \ nsProgressMeterFrame.cpp \
nsTreeIndentationFrame.cpp \ nsTreeIndentationFrame.cpp \
nsTreeItemDragCapturer.cpp \ nsTreeItemDragCapturer.cpp \
nsSpinnerFrame.cpp \
nsScrollbarFrame.cpp \ nsScrollbarFrame.cpp \
nsScrollbarButtonFrame.cpp \ nsScrollbarButtonFrame.cpp \
nsSliderFrame.cpp \ nsSliderFrame.cpp \
nsFontPickerFrame.cpp \
nsMenuPopupFrame.cpp \ nsMenuPopupFrame.cpp \
nsMenuFrame.cpp \ nsMenuFrame.cpp \
nsMenuBarFrame.cpp \ nsMenuBarFrame.cpp \

View File

@@ -45,7 +45,6 @@ CPPSRCS= \
nsRootBoxFrame.cpp \ nsRootBoxFrame.cpp \
nsStackLayout.cpp \ nsStackLayout.cpp \
nsSplitterFrame.cpp \ nsSplitterFrame.cpp \
nsTitleFrame.cpp \
nsButtonBoxFrame.cpp \ nsButtonBoxFrame.cpp \
nsSpringFrame.cpp \ nsSpringFrame.cpp \
nsSliderFrame.cpp \ nsSliderFrame.cpp \
@@ -73,10 +72,8 @@ CPPSRCS= \
nsXULTreeSliceFrame.cpp \ nsXULTreeSliceFrame.cpp \
nsXULTreeCellFrame.cpp \ nsXULTreeCellFrame.cpp \
nsTreeLayout.cpp \ nsTreeLayout.cpp \
nsSpinnerFrame.cpp \
nsScrollbarFrame.cpp \ nsScrollbarFrame.cpp \
nsScrollbarButtonFrame.cpp \ nsScrollbarButtonFrame.cpp \
nsFontPickerFrame.cpp \
nsMenuPopupFrame.cpp \ nsMenuPopupFrame.cpp \
nsMenuFrame.cpp \ nsMenuFrame.cpp \
nsMenuBarFrame.cpp \ nsMenuBarFrame.cpp \
@@ -110,7 +107,6 @@ CPP_OBJS= \
.\$(OBJDIR)\nsMenuBarFrame.obj \ .\$(OBJDIR)\nsMenuBarFrame.obj \
.\$(OBJDIR)\nsMenuFrame.obj \ .\$(OBJDIR)\nsMenuFrame.obj \
.\$(OBJDIR)\nsSplitterFrame.obj \ .\$(OBJDIR)\nsSplitterFrame.obj \
.\$(OBJDIR)\nsTitleFrame.obj \
.\$(OBJDIR)\nsButtonBoxFrame.obj \ .\$(OBJDIR)\nsButtonBoxFrame.obj \
.\$(OBJDIR)\nsSpringFrame.obj \ .\$(OBJDIR)\nsSpringFrame.obj \
.\$(OBJDIR)\nsSliderFrame.obj \ .\$(OBJDIR)\nsSliderFrame.obj \
@@ -138,10 +134,8 @@ CPP_OBJS= \
.\$(OBJDIR)\nsXULTreeSliceFrame.obj \ .\$(OBJDIR)\nsXULTreeSliceFrame.obj \
.\$(OBJDIR)\nsXULTreeCellFrame.obj \ .\$(OBJDIR)\nsXULTreeCellFrame.obj \
.\$(OBJDIR)\nsTreeLayout.obj \ .\$(OBJDIR)\nsTreeLayout.obj \
.\$(OBJDIR)\nsSpinnerFrame.obj \
.\$(OBJDIR)\nsScrollbarFrame.obj \ .\$(OBJDIR)\nsScrollbarFrame.obj \
.\$(OBJDIR)\nsScrollbarButtonFrame.obj \ .\$(OBJDIR)\nsScrollbarButtonFrame.obj \
.\$(OBJDIR)\nsFontPickerFrame.obj \
.\$(OBJDIR)\nsMenuPopupFrame.obj \ .\$(OBJDIR)\nsMenuPopupFrame.obj \
.\$(OBJDIR)\nsMenuBarListener.obj \ .\$(OBJDIR)\nsMenuBarListener.obj \
.\$(OBJDIR)\nsMenuListener.obj \ .\$(OBJDIR)\nsMenuListener.obj \

View File

@@ -1,115 +0,0 @@
/* -*- 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 "nsFontPickerFrame.h"
#include "nsIContent.h"
#include "prtypes.h"
#include "nsIAtom.h"
#include "nsIPresContext.h"
#include "nsIStyleContext.h"
#include "nsCSSRendering.h"
#include "nsINameSpaceManager.h"
//
// NS_NewFontPickerFrame
//
// Wrapper for creating a new font picker
//
nsresult
NS_NewFontPickerFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame)
{
NS_PRECONDITION(aNewFrame, "null OUT ptr");
if (nsnull == aNewFrame) {
return NS_ERROR_NULL_POINTER;
}
nsFontPickerFrame* it = new (aPresShell) nsFontPickerFrame;
if ( !it )
return NS_ERROR_OUT_OF_MEMORY;
*aNewFrame = it;
return NS_OK;
}
//
// nsFontPickerFrame cntr
//
nsFontPickerFrame::nsFontPickerFrame()
{
} // cntr
//
// Paint
//
// Overidden to handle ???
//
NS_METHOD
nsFontPickerFrame::Paint(nsIPresContext* aPresContext,
nsIRenderingContext& aRenderingContext,
const nsRect& aDirtyRect,
nsFramePaintLayer aWhichLayer)
{
return nsLeafFrame::Paint(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer);
}
//
// GetDesiredSize
//
// For now, be as big as CSS wants us to be, or some small default size.
//
void
nsFontPickerFrame :: GetDesiredSize(nsIPresContext* aPresContext,
const nsHTMLReflowState& aReflowState,
nsHTMLReflowMetrics& aDesiredLayoutSize)
{
const int CSS_NOTSET = -1;
nsSize styleSize;
if (NS_UNCONSTRAINEDSIZE != aReflowState.mComputedWidth) {
styleSize.width = aReflowState.mComputedWidth;
}
else {
styleSize.width = CSS_NOTSET;
}
if (NS_UNCONSTRAINEDSIZE != aReflowState.mComputedHeight) {
styleSize.height = aReflowState.mComputedHeight;
}
else {
styleSize.height = CSS_NOTSET;
}
// subclasses should always override this method, but if not and no css, make it small
aDesiredLayoutSize.width = (styleSize.width > CSS_NOTSET) ? styleSize.width : 200;
aDesiredLayoutSize.height = (styleSize.height > CSS_NOTSET) ? styleSize.height : 200;
aDesiredLayoutSize.ascent = aDesiredLayoutSize.height;
aDesiredLayoutSize.descent = 0;
if (aDesiredLayoutSize.maxElementSize) {
aDesiredLayoutSize.maxElementSize->width = aDesiredLayoutSize.width;
aDesiredLayoutSize.maxElementSize->height = aDesiredLayoutSize.height;
}
} // GetDesiredSize

View File

@@ -1,67 +0,0 @@
/* -*- 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):
*/
//
// nsFontPickerFrame
//
#ifndef nsFontPickerFrame_h__
#define nsFontPickerFrame_h__
#include "nsLeafFrame.h"
#include "prtypes.h"
#include "nsIAtom.h"
#include "nsCOMPtr.h"
class nsString;
nsresult NS_NewFontPickerFrame(nsIPresShell* aPresShell, nsIFrame** aResult) ;
class nsFontPickerFrame : public nsLeafFrame
{
public:
nsFontPickerFrame();
#ifdef DEBUG
NS_IMETHOD GetFrameName(nsString& aResult) const {
return MakeFrameName("FontPickerFrame", aResult);
}
#endif
// nsIFrame overrides
NS_IMETHOD Paint(nsIPresContext* aPresContext,
nsIRenderingContext& aRenderingContext,
const nsRect& aDirtyRect,
nsFramePaintLayer aWhichLayer);
protected:
virtual void GetDesiredSize(nsIPresContext* aPresContext,
const nsHTMLReflowState& aReflowState,
nsHTMLReflowMetrics& aDesiredSize) ;
}; // class nsFontPickerFrame
#endif

View File

@@ -1,115 +0,0 @@
/* -*- 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 "nsSpinnerFrame.h"
#include "nsIContent.h"
#include "prtypes.h"
#include "nsIAtom.h"
#include "nsIPresContext.h"
#include "nsIStyleContext.h"
#include "nsCSSRendering.h"
#include "nsINameSpaceManager.h"
//
// NS_NewSpinnerFrame
//
// Wrapper for creating a new spinner
//
nsresult
NS_NewSpinnerFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame)
{
NS_PRECONDITION(aNewFrame, "null OUT ptr");
if (nsnull == aNewFrame) {
return NS_ERROR_NULL_POINTER;
}
nsSpinnerFrame* it = new (aPresShell) nsSpinnerFrame;
if ( !it )
return NS_ERROR_OUT_OF_MEMORY;
*aNewFrame = it;
return NS_OK;
}
//
// nsSpinnerFrame cntr
//
nsSpinnerFrame::nsSpinnerFrame()
{
} // cntr
//
// Paint
//
// Overidden to handle ???
//
NS_METHOD
nsSpinnerFrame::Paint(nsIPresContext* aPresContext,
nsIRenderingContext& aRenderingContext,
const nsRect& aDirtyRect,
nsFramePaintLayer aWhichLayer)
{
return nsLeafFrame::Paint(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer);
}
//
// GetDesiredSize
//
// For now, be as big as CSS wants us to be, or some small default size.
//
void
nsSpinnerFrame :: GetDesiredSize(nsIPresContext* aPresContext,
const nsHTMLReflowState& aReflowState,
nsHTMLReflowMetrics& aDesiredLayoutSize)
{
const int CSS_NOTSET = -1;
nsSize styleSize;
if (NS_UNCONSTRAINEDSIZE != aReflowState.mComputedWidth) {
styleSize.width = aReflowState.mComputedWidth;
}
else {
styleSize.width = CSS_NOTSET;
}
if (NS_UNCONSTRAINEDSIZE != aReflowState.mComputedHeight) {
styleSize.height = aReflowState.mComputedHeight;
}
else {
styleSize.height = CSS_NOTSET;
}
// subclasses should always override this method, but if not and no css, make it small
aDesiredLayoutSize.width = (styleSize.width > CSS_NOTSET) ? styleSize.width : 200;
aDesiredLayoutSize.height = (styleSize.height > CSS_NOTSET) ? styleSize.height : 200;
aDesiredLayoutSize.ascent = aDesiredLayoutSize.height;
aDesiredLayoutSize.descent = 0;
if (aDesiredLayoutSize.maxElementSize) {
aDesiredLayoutSize.maxElementSize->width = aDesiredLayoutSize.width;
aDesiredLayoutSize.maxElementSize->height = aDesiredLayoutSize.height;
}
} // GetDesiredSize

View File

@@ -1,67 +0,0 @@
/* -*- 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):
*/
//
// nsSpinnerFrame
//
#ifndef nsSpinnerFrame_h__
#define nsSpinnerFrame_h__
#include "nsLeafFrame.h"
#include "prtypes.h"
#include "nsIAtom.h"
#include "nsCOMPtr.h"
class nsString;
nsresult NS_NewSpinnerFrame(nsIPresShell* aPresShell, nsIFrame** aResult) ;
class nsSpinnerFrame : public nsLeafFrame
{
public:
nsSpinnerFrame();
#ifdef DEBUG
NS_IMETHOD GetFrameName(nsString& aResult) const {
return MakeFrameName("SpinnerFrame", aResult);
}
#endif
// nsIFrame overrides
NS_IMETHOD Paint(nsIPresContext* aPresContext,
nsIRenderingContext& aRenderingContext,
const nsRect& aDirtyRect,
nsFramePaintLayer aWhichLayer);
protected:
virtual void GetDesiredSize(nsIPresContext* aPresContext,
const nsHTMLReflowState& aReflowState,
nsHTMLReflowMetrics& aDesiredSize) ;
}; // class nsSpinnerFrame
#endif

View File

@@ -1,52 +0,0 @@
/* -*- 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):
*/
// YY need to pass isMultiple before create called
#include "nsTitleFrame.h"
nsresult
NS_NewTitleFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame)
{
NS_PRECONDITION(aNewFrame, "null OUT ptr");
if (nsnull == aNewFrame) {
return NS_ERROR_NULL_POINTER;
}
nsTitleFrame* it = new (aPresShell) nsTitleFrame(aPresShell);
if (!it) {
return NS_ERROR_OUT_OF_MEMORY;
}
*aNewFrame = it;
return NS_OK;
}
nsTitleFrame::nsTitleFrame(nsIPresShell* aPresShell):nsBoxFrame(aPresShell)
{
}
#ifdef NS_DEBUG
NS_IMETHODIMP
nsTitleFrame::GetFrameName(nsString& aResult) const
{
return MakeFrameName("Title", aResult);
}
#endif

View File

@@ -1,48 +0,0 @@
/* -*- 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 nsTitleFrame_h___
#define nsTitleFrame_h___
#include "nsBoxFrame.h"
class nsTitleFrame : public nsBoxFrame {
public:
nsTitleFrame(nsIPresShell* aShell);
// we are always a vertical box.
virtual PRBool GetInitialOrientation(PRBool& aIsHorizontal) { aIsHorizontal = PR_FALSE; return PR_TRUE; }
// never autostretch we align out children.
virtual PRBool GetInitialAutoStretch(PRBool& aStretch) { aStretch = PR_FALSE; return PR_TRUE; }
// we are always flexible
virtual PRBool GetDefaultFlex(PRInt32& aFlex) { aFlex = 1; return PR_TRUE; }
#ifdef NS_DEBUG
NS_IMETHOD GetFrameName(nsString& aResult) const;
#endif
};
#endif // guard

View File

@@ -740,7 +740,7 @@
</content> </content>
</binding> </binding>
<binding id="title"> <binding id="title" extends="xul:box">
<content> <content>
<xul:text inherits="value"/> <xul:text inherits="value"/>
</content> </content>