1999-02-05 03:55:18 +00:00
|
|
|
/* -*- 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.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.
|
|
|
|
*/
|
|
|
|
#ifndef nsCSSFrameConstructor_h___
|
|
|
|
#define nsCSSFrameConstructor_h___
|
|
|
|
|
|
|
|
#include "nsIStyleFrameConstruction.h"
|
|
|
|
#include "nslayout.h"
|
1999-08-06 05:11:39 +00:00
|
|
|
#include "nsIPresContext.h"
|
1999-02-05 03:55:18 +00:00
|
|
|
|
|
|
|
class nsIDocument;
|
|
|
|
struct nsFrameItems;
|
|
|
|
struct nsAbsoluteItems;
|
1999-02-10 19:50:50 +00:00
|
|
|
struct nsTableCreator;
|
1999-02-05 03:55:18 +00:00
|
|
|
class nsIStyleContext;
|
1999-02-26 09:15:03 +00:00
|
|
|
struct nsTableList;
|
1999-04-05 02:53:07 +00:00
|
|
|
struct nsStyleContent;
|
1999-02-05 03:55:18 +00:00
|
|
|
struct nsStyleDisplay;
|
|
|
|
class nsIPresShell;
|
1999-03-25 06:42:07 +00:00
|
|
|
class nsVoidArray;
|
1999-08-05 03:09:22 +00:00
|
|
|
class nsIFrameManager;
|
1999-02-05 03:55:18 +00:00
|
|
|
|
1999-04-28 19:08:14 +00:00
|
|
|
class nsFrameConstructorState;
|
|
|
|
|
1999-02-05 03:55:18 +00:00
|
|
|
class nsCSSFrameConstructor : public nsIStyleFrameConstruction {
|
|
|
|
public:
|
|
|
|
nsCSSFrameConstructor(void);
|
|
|
|
virtual ~nsCSSFrameConstructor(void);
|
|
|
|
|
|
|
|
private:
|
|
|
|
// These are not supported and are not implemented!
|
|
|
|
nsCSSFrameConstructor(const nsCSSFrameConstructor& aCopy);
|
|
|
|
nsCSSFrameConstructor& operator=(const nsCSSFrameConstructor& aCopy);
|
|
|
|
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
|
|
|
NS_IMETHOD Init(nsIDocument* aDocument);
|
|
|
|
|
|
|
|
// nsIStyleFrameConstruction API
|
|
|
|
NS_IMETHOD ConstructRootFrame(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aDocElement,
|
|
|
|
nsIFrame*& aNewFrame);
|
|
|
|
|
1999-04-27 22:14:54 +00:00
|
|
|
NS_IMETHOD ReconstructDocElementHierarchy(nsIPresContext* aPresContext);
|
1999-02-05 03:55:18 +00:00
|
|
|
|
|
|
|
NS_IMETHOD ContentAppended(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContainer,
|
|
|
|
PRInt32 aNewIndexInContainer);
|
|
|
|
|
|
|
|
NS_IMETHOD ContentInserted(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContainer,
|
|
|
|
nsIContent* aChild,
|
|
|
|
PRInt32 aIndexInContainer);
|
|
|
|
|
|
|
|
NS_IMETHOD ContentReplaced(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContainer,
|
|
|
|
nsIContent* aOldChild,
|
|
|
|
nsIContent* aNewChild,
|
|
|
|
PRInt32 aIndexInContainer);
|
|
|
|
|
|
|
|
NS_IMETHOD ContentRemoved(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContainer,
|
|
|
|
nsIContent* aChild,
|
|
|
|
PRInt32 aIndexInContainer);
|
|
|
|
|
|
|
|
NS_IMETHOD ContentChanged(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsISupports* aSubContent);
|
1999-04-20 00:05:14 +00:00
|
|
|
NS_IMETHOD ContentStatesChanged(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContent1,
|
|
|
|
nsIContent* aContent2);
|
1999-02-05 03:55:18 +00:00
|
|
|
NS_IMETHOD AttributeChanged(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIAtom* aAttribute,
|
|
|
|
PRInt32 aHint);
|
|
|
|
|
|
|
|
// Style change notifications
|
|
|
|
NS_IMETHOD StyleRuleChanged(nsIPresContext* aPresContext,
|
|
|
|
nsIStyleSheet* aStyleSheet,
|
|
|
|
nsIStyleRule* aStyleRule,
|
|
|
|
PRInt32 aHint); // See nsStyleConsts fot hint values
|
|
|
|
NS_IMETHOD StyleRuleAdded(nsIPresContext* aPresContext,
|
|
|
|
nsIStyleSheet* aStyleSheet,
|
|
|
|
nsIStyleRule* aStyleRule);
|
|
|
|
NS_IMETHOD StyleRuleRemoved(nsIPresContext* aPresContext,
|
|
|
|
nsIStyleSheet* aStyleSheet,
|
|
|
|
nsIStyleRule* aStyleRule);
|
1999-03-25 06:42:07 +00:00
|
|
|
|
|
|
|
NS_IMETHOD ProcessRestyledFrames(nsStyleChangeList& aRestyleArray,
|
|
|
|
nsIPresContext* aPresContext);
|
|
|
|
|
1999-02-05 03:55:18 +00:00
|
|
|
// Notification that we were unable to render a replaced element.
|
|
|
|
NS_IMETHOD CantRenderReplacedElement(nsIPresContext* aPresContext,
|
|
|
|
nsIFrame* aFrame);
|
|
|
|
|
1999-02-24 04:03:50 +00:00
|
|
|
// Request to create a continuing frame
|
|
|
|
NS_IMETHOD CreateContinuingFrame(nsIPresContext* aPresContext,
|
|
|
|
nsIFrame* aFrame,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIFrame** aContinuingFrame);
|
|
|
|
|
1999-07-02 04:46:19 +00:00
|
|
|
// Request to find the primary frame associated with a given content object.
|
|
|
|
// This is typically called by the pres shell when there is no mapping in
|
|
|
|
// the pres shell hash table
|
1999-08-05 03:09:22 +00:00
|
|
|
NS_IMETHOD FindPrimaryFrameFor(nsIPresContext* aPresContext,
|
|
|
|
nsIFrameManager* aFrameManager,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame** aFrame);
|
1999-07-02 04:46:19 +00:00
|
|
|
|
1999-07-09 20:58:16 +00:00
|
|
|
NS_IMETHOD CreateTreeWidgetContent(nsIPresContext* aPresContext,
|
1999-06-23 03:02:21 +00:00
|
|
|
nsIFrame* aParentFrame,
|
1999-06-28 08:35:10 +00:00
|
|
|
nsIFrame* aPrevFrame,
|
1999-06-23 03:02:21 +00:00
|
|
|
nsIContent* aChild,
|
1999-06-28 08:35:10 +00:00
|
|
|
nsIFrame** aResult,
|
1999-06-29 20:20:40 +00:00
|
|
|
PRBool aIsAppend,
|
|
|
|
PRBool aIsScrollbar);
|
1999-07-09 20:58:16 +00:00
|
|
|
NS_IMETHOD RemoveMappingsForFrameSubtree(nsIPresContext* aParentFrame,
|
|
|
|
nsIFrame* aRemovedFrame);
|
1999-06-23 03:02:21 +00:00
|
|
|
|
1999-02-05 03:55:18 +00:00
|
|
|
protected:
|
|
|
|
|
1999-02-11 23:08:28 +00:00
|
|
|
nsresult ResolveStyleContext(nsIPresContext* aPresContext,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIAtom* aTag,
|
|
|
|
nsIStyleContext** aStyleContext);
|
|
|
|
|
1999-04-28 19:08:14 +00:00
|
|
|
nsresult ConstructFrame(nsIPresContext* aPresContext,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
PRBool aHaveFirstLetterStyle,
|
|
|
|
nsFrameItems& aFrameItems);
|
|
|
|
|
|
|
|
nsresult ConstructDocElementFrame(nsIPresContext* aPresContext,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aDocElement,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIStyleContext* aParentStyleContext,
|
|
|
|
nsIFrame*& aNewFrame);
|
1999-02-05 03:55:18 +00:00
|
|
|
|
1999-04-30 19:51:59 +00:00
|
|
|
nsresult ConstructDocElementTableFrame(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aDocElement,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIFrame*& aNewTableFrame);
|
|
|
|
|
1999-04-05 02:53:07 +00:00
|
|
|
nsresult CreateGeneratedFrameFor(nsIPresContext* aPresContext,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
const nsStyleContent* aStyleContent,
|
|
|
|
PRUint32 aContentIndex,
|
|
|
|
nsIFrame** aFrame);
|
|
|
|
|
1999-03-30 15:22:54 +00:00
|
|
|
PRBool CreateGeneratedContentFrame(nsIPresContext* aPresContext,
|
1999-07-05 18:46:09 +00:00
|
|
|
nsFrameConstructorState& aState,
|
1999-03-30 15:22:54 +00:00
|
|
|
nsIFrame* aFrame,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsIAtom* aPseudoElement,
|
1999-07-05 18:46:09 +00:00
|
|
|
PRBool aMakeFirstLetterFrame,
|
|
|
|
PRBool aForBlock,
|
1999-03-30 15:22:54 +00:00
|
|
|
nsIFrame** aResult);
|
|
|
|
|
1999-08-05 03:09:22 +00:00
|
|
|
nsresult AppendFrames(nsIPresContext* aPresContext,
|
|
|
|
nsIPresShell* aPresShell,
|
|
|
|
nsIFrameManager* aFrameManager,
|
|
|
|
nsIContent* aContainer,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIFrame* aFrameList);
|
1999-04-06 04:58:05 +00:00
|
|
|
|
1999-02-05 03:55:18 +00:00
|
|
|
// BEGIN TABLE SECTION
|
1999-04-28 19:08:14 +00:00
|
|
|
nsresult ConstructTableFrame(nsIPresContext* aPresContext,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParent,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsIFrame*& aNewFrame,
|
|
|
|
nsTableCreator& aTableCreator);
|
|
|
|
|
|
|
|
nsresult ConstructAnonymousTableFrame(nsIPresContext* aPresContext,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIFrame*& aNewTopFrame,
|
|
|
|
nsIFrame*& aOuterFrame,
|
|
|
|
nsIFrame*& aInnerFrame,
|
|
|
|
nsTableCreator& aTableCreator);
|
|
|
|
|
|
|
|
nsresult ConstructTableCaptionFrame(nsIPresContext* aPresContext,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParent,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsIFrame*& aNewTopMostFrame,
|
|
|
|
nsIFrame*& aNewCaptionFrame,
|
|
|
|
nsTableCreator& aTableCreator);
|
|
|
|
|
|
|
|
nsresult ConstructTableGroupFrame(nsIPresContext* aPresContext,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParent,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
PRBool aIsRowGroup,
|
|
|
|
nsIFrame*& aNewTopFrame,
|
|
|
|
nsIFrame*& aNewGroupFrame,
|
|
|
|
nsTableCreator& aTableCreator,
|
|
|
|
nsTableList* aToDo = nsnull);
|
|
|
|
|
|
|
|
nsresult ConstructTableGroupFrameOnly(nsIPresContext* aPresContext,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParent,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
PRBool aIsRowGroup,
|
|
|
|
nsIFrame*& aNewTopMostFrame,
|
|
|
|
nsIFrame*& aNewGroupFrame,
|
|
|
|
nsTableCreator& aTableCreator,
|
|
|
|
PRBool aProcessChildren = PR_TRUE);
|
|
|
|
|
|
|
|
nsresult ConstructTableRowFrame(nsIPresContext* aPresContext,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParent,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsIFrame*& aNewTopMostFrame,
|
|
|
|
nsIFrame*& aNewRowFrame,
|
|
|
|
nsTableCreator& aTableCreator,
|
|
|
|
nsTableList* aToDo = nsnull);
|
|
|
|
|
|
|
|
nsresult ConstructTableRowFrameOnly(nsIPresContext* aPresContext,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
PRBool aProcessChildren,
|
|
|
|
nsIFrame*& aNewRowFrame,
|
|
|
|
nsTableCreator& aTableCreator);
|
|
|
|
|
|
|
|
nsresult ConstructTableColFrame(nsIPresContext* aPresContext,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParent,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsIFrame*& aNewTopMostFrame,
|
|
|
|
nsIFrame*& aNewColFrame,
|
|
|
|
nsTableCreator& aTableCreator);
|
|
|
|
|
|
|
|
nsresult ConstructTableColFrameOnly(nsIPresContext* aPresContext,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsIFrame*& aNewColFrame,
|
|
|
|
nsTableCreator& aTableCreator);
|
|
|
|
|
|
|
|
nsresult ConstructTableCellFrame(nsIPresContext* aPresContext,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsIFrame*& aNewTopMostFrame,
|
|
|
|
nsIFrame*& aNewCellFrame,
|
|
|
|
nsIFrame*& aNewCellBodyFrame,
|
|
|
|
nsTableCreator& aTableCreator,
|
|
|
|
PRBool aProcessChildren = PR_TRUE);
|
|
|
|
|
|
|
|
nsresult ConstructTableCellFrameOnly(nsIPresContext* aPresContext,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsIFrame*& aNewCellFrame,
|
|
|
|
nsIFrame*& aNewCellBodyFrame,
|
|
|
|
nsTableCreator& aTableCreator,
|
|
|
|
PRBool aProcessChildren);
|
|
|
|
|
|
|
|
nsresult TableProcessChildren(nsIPresContext* aPresContext,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsFrameItems& aChildList,
|
|
|
|
nsTableCreator& aTableCreator);
|
|
|
|
|
|
|
|
nsresult TableProcessChild(nsIPresContext* aPresContext,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aChildContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIStyleContext* aParentStyleContext,
|
|
|
|
nsFrameItems& aChildItems,
|
|
|
|
nsTableCreator& aTableCreator);
|
1999-02-05 03:55:18 +00:00
|
|
|
|
1999-04-30 19:51:59 +00:00
|
|
|
nsresult ConstructTableRowFrameOnly(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsAbsoluteItems& aAbsoluteItems,
|
|
|
|
PRBool aProcessChildren,
|
|
|
|
nsIFrame*& aNewRowFrame,
|
|
|
|
nsAbsoluteItems& aFixedItems,
|
|
|
|
nsTableCreator& aTableCreator);
|
|
|
|
|
|
|
|
nsresult ConstructTableColFrame(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParent,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsAbsoluteItems& aAbsoluteItems,
|
|
|
|
nsIFrame*& aNewTopMostFrame,
|
|
|
|
nsIFrame*& aNewColFrame,
|
|
|
|
nsAbsoluteItems& aFixedItems,
|
|
|
|
nsTableCreator& aTableCreator);
|
|
|
|
|
|
|
|
nsresult ConstructTableColFrameOnly(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsAbsoluteItems& aAbsoluteItems,
|
|
|
|
nsIFrame*& aNewColFrame,
|
|
|
|
nsAbsoluteItems& aFixedItems,
|
|
|
|
nsTableCreator& aTableCreator);
|
|
|
|
|
|
|
|
nsresult ConstructTableCellFrame(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsAbsoluteItems& aAbsoluteItems,
|
|
|
|
nsIFrame*& aNewTopMostFrame,
|
|
|
|
nsIFrame*& aNewCellFrame,
|
|
|
|
nsIFrame*& aNewCellBodyFrame,
|
|
|
|
nsAbsoluteItems& aFixedItems,
|
|
|
|
nsTableCreator& aTableCreator,
|
|
|
|
PRBool aProcessChildren = PR_TRUE);
|
|
|
|
|
|
|
|
nsresult ConstructTableCellFrameOnly(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsAbsoluteItems& aAbsoluteItems,
|
|
|
|
nsIFrame*& aNewCellFrame,
|
|
|
|
nsIFrame*& aNewCellBodyFrame,
|
|
|
|
nsAbsoluteItems& aFixedItems,
|
|
|
|
nsTableCreator& aTableCreator,
|
|
|
|
PRBool aProcessChildren);
|
|
|
|
|
|
|
|
nsresult TableProcessChildren(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsAbsoluteItems& aAbsoluteItems,
|
|
|
|
nsFrameItems& aChildList,
|
|
|
|
nsAbsoluteItems& aFixedItems,
|
|
|
|
nsTableCreator& aTableCreator);
|
|
|
|
|
|
|
|
nsresult TableProcessChild(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aChildContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIStyleContext* aParentStyleContext,
|
|
|
|
nsAbsoluteItems& aAbsoluteItems,
|
|
|
|
nsFrameItems& aChildItems,
|
|
|
|
nsAbsoluteItems& aFixedItems,
|
|
|
|
nsTableCreator& aTableCreator);
|
|
|
|
|
1999-02-26 09:15:03 +00:00
|
|
|
nsresult TableProcessTableList(nsIPresContext* aPresContext,
|
|
|
|
nsTableList& aTableList);
|
1999-02-05 03:55:18 +00:00
|
|
|
|
|
|
|
nsIFrame* TableGetAsNonScrollFrame(nsIPresContext* aPresContext,
|
|
|
|
nsIFrame* aFrame,
|
|
|
|
const nsStyleDisplay* aDisplayType);
|
|
|
|
|
1999-02-11 23:08:28 +00:00
|
|
|
PRBool TableIsValidCellContent(nsIPresContext* aPresContext,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIContent* aContent);
|
1999-02-05 03:55:18 +00:00
|
|
|
|
|
|
|
const nsStyleDisplay* GetDisplay(nsIFrame* aFrame);
|
1999-04-30 19:51:59 +00:00
|
|
|
|
|
|
|
PRBool IsTableRelated(PRUint8 aDisplay);
|
1999-02-05 03:55:18 +00:00
|
|
|
|
|
|
|
// END TABLE SECTION
|
|
|
|
|
|
|
|
nsresult CreatePlaceholderFrameFor(nsIPresContext* aPresContext,
|
1999-08-05 03:09:22 +00:00
|
|
|
nsIFrameManager* aFrameManager,
|
1999-02-05 03:55:18 +00:00
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aFrame,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsIFrame* aParentFrame,
|
1999-04-25 16:58:42 +00:00
|
|
|
nsIFrame** aPlaceholderFrame);
|
1999-02-26 17:11:54 +00:00
|
|
|
|
1999-04-14 04:00:16 +00:00
|
|
|
nsresult ConstructAlternateImageFrame(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIFrame*& aFrame);
|
1999-02-06 03:45:11 +00:00
|
|
|
|
1999-08-06 05:11:39 +00:00
|
|
|
nsWidgetRendering GetFormElementRenderingMode(nsIPresContext* aPresContext,
|
|
|
|
nsWidgetType aWidgetType);
|
|
|
|
|
1999-06-21 20:41:56 +00:00
|
|
|
nsresult ConstructRadioControlFrame(nsIPresContext* aPresContext,
|
|
|
|
nsIFrame*& aNewFrame,
|
1999-08-03 14:41:48 +00:00
|
|
|
nsIContent* aContent,
|
|
|
|
nsIStyleContext* aStyleContext);
|
1999-06-12 22:32:41 +00:00
|
|
|
|
1999-08-06 05:11:39 +00:00
|
|
|
nsresult ConstructCheckboxControlFrame(nsIPresContext* aPresContext,
|
|
|
|
nsIFrame*& aNewFrame);
|
|
|
|
|
|
|
|
nsresult ConstructButtonControlFrame(nsIPresContext* aPresContext,
|
|
|
|
nsIFrame*& aNewFrame);
|
|
|
|
|
1999-06-12 22:32:41 +00:00
|
|
|
nsresult ConstructTextControlFrame(nsIPresContext* aPresContext,
|
|
|
|
nsIFrame*& aNewFrame);
|
|
|
|
|
fixed bugs #6303, #6753, #6756, #6759
Re-wrote nsComboboxFrame.
removed the obsolete nsHTMLAtoms: comboText,comoTextSelected,comTextSelectedFocus,dropDownVisible,
dropdownHidden, dropDownBtnOut, dropDownBtnPressed,
Added nsHTMLAtoms::combobox, nsLayoutAtoms::popupList
Renamed dropDownList to dropDownListPseudo
Added "arrow.gif" as to be used the background-image for the combobox button
ua.css - added rules for select to differentiate between comboboxes and listboxes.
Added style rules to more closely match the XPTOOLKIT XPWidgets look.
removed the following :-moz-combobox-text, -moz-combobox-textselected
nsIFormControlFrame.h - Added SetSuggestedSize method.
nsButtonControlFrame - Implemented SetSuggestedSize.
nsCSSFrameConstructor.cpp - Rewrote ConstructSelectFrame.
nsIWidget.h -Added GetAbsoluteBounds method.
nsWindow.cpp - Implemented GetAbsoluteBounds.
1999-07-14 22:00:24 +00:00
|
|
|
|
1999-04-28 19:08:14 +00:00
|
|
|
nsresult ConstructSelectFrame(nsIPresContext* aPresContext,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIAtom* aTag,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsIFrame*& aNewFrame,
|
|
|
|
PRBool& aProcessChildren,
|
|
|
|
PRBool aIsAbsolutelyPositioned,
|
|
|
|
PRBool& aFrameHasBeenInitialized,
|
|
|
|
PRBool aIsFixedPositioned,
|
|
|
|
nsFrameItems& aFrameItems);
|
|
|
|
|
|
|
|
nsresult ConstructFrameByTag(nsIPresContext* aPresContext,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIAtom* aTag,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsFrameItems& aFrameItems);
|
1999-02-05 03:55:18 +00:00
|
|
|
|
1999-06-30 22:17:43 +00:00
|
|
|
nsresult CreateAnonymousFrames(nsIPresContext* aPresContext,
|
|
|
|
nsIAtom* aTag,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aNewFrame,
|
|
|
|
nsFrameItems& aChildItems);
|
|
|
|
|
|
|
|
|
1999-02-05 03:55:18 +00:00
|
|
|
#ifdef INCLUDE_XUL
|
1999-04-28 19:08:14 +00:00
|
|
|
nsresult ConstructXULFrame(nsIPresContext* aPresContext,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIAtom* aTag,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsFrameItems& aFrameItems,
|
|
|
|
PRBool& aHaltProcessing);
|
1999-06-15 04:02:43 +00:00
|
|
|
|
1999-02-05 03:55:18 +00:00
|
|
|
#endif
|
|
|
|
|
1999-04-28 19:08:14 +00:00
|
|
|
nsresult ConstructFrameByDisplayType(nsIPresContext* aPresContext,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
const nsStyleDisplay* aDisplay,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
PRBool aHaveFirstLetterStyle,
|
|
|
|
nsFrameItems& aFrameItems);
|
1999-02-05 03:55:18 +00:00
|
|
|
|
|
|
|
nsresult GetAdjustedParentFrame(nsIFrame* aCurrentParentFrame,
|
|
|
|
PRUint8 aChildDisplayType,
|
|
|
|
nsIFrame*& aNewParentFrame);
|
|
|
|
|
|
|
|
|
1999-04-28 19:08:14 +00:00
|
|
|
nsresult ProcessChildren(nsIPresContext* aPresContext,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aFrame,
|
|
|
|
PRBool aCanHaveGeneratedContent,
|
|
|
|
nsFrameItems& aFrameItems);
|
1999-02-05 03:55:18 +00:00
|
|
|
|
1999-08-03 14:41:48 +00:00
|
|
|
nsresult CreateInputFrame(nsIPresContext *aPresContext,
|
|
|
|
nsIContent *aContent,
|
|
|
|
nsIFrame *&aFrame,
|
|
|
|
nsIStyleContext *aStyleContext);
|
1999-02-05 03:55:18 +00:00
|
|
|
|
|
|
|
PRBool IsScrollable(nsIPresContext* aPresContext, const nsStyleDisplay* aDisplay);
|
|
|
|
|
1999-08-05 03:09:22 +00:00
|
|
|
nsIFrame* GetFrameFor(nsIPresShell* aFrameManager,
|
|
|
|
nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContent);
|
1999-02-05 03:55:18 +00:00
|
|
|
|
|
|
|
nsIFrame* GetAbsoluteContainingBlock(nsIPresContext* aPresContext,
|
|
|
|
nsIFrame* aFrame);
|
|
|
|
|
1999-02-26 17:11:54 +00:00
|
|
|
nsIFrame* GetFloaterContainingBlock(nsIPresContext* aPresContext,
|
|
|
|
nsIFrame* aFrame);
|
|
|
|
|
1999-04-28 19:08:14 +00:00
|
|
|
nsresult InitializeScrollFrame(nsIPresContext* aPresContext,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIFrame* aScrollFrame,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsIFrame*& aNewFrame,
|
|
|
|
PRBool aIsAbsolutelyPositioned,
|
|
|
|
PRBool aIsFixedPositioned,
|
|
|
|
PRBool aCreateBlock);
|
1999-02-05 03:55:18 +00:00
|
|
|
|
1999-02-27 07:15:09 +00:00
|
|
|
nsresult RecreateFramesForContent(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContent);
|
|
|
|
|
1999-03-25 06:42:07 +00:00
|
|
|
PRInt32 FindRestyledFramesBelow(nsIFrame* aFrame,
|
|
|
|
nsIPresContext* aPresContext,
|
|
|
|
PRInt32 aParentHint,
|
|
|
|
nsStyleChangeList& aResults);
|
|
|
|
|
1999-04-20 00:05:14 +00:00
|
|
|
PRInt32 ComputeStateChangeFor(nsIPresContext* aPresContext, nsIFrame* aFrame,
|
|
|
|
nsStyleChangeList& aChangeList,
|
|
|
|
PRInt32 aFrameChange);
|
|
|
|
|
1999-02-27 19:02:48 +00:00
|
|
|
nsresult RecreateFramesOnAttributeChange(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIAtom* aAttribute);
|
1999-02-05 03:55:18 +00:00
|
|
|
|
1999-02-26 03:35:22 +00:00
|
|
|
nsresult CreateContinuingOuterTableFrame(nsIPresContext* aPresContext,
|
|
|
|
nsIFrame* aFrame,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsIFrame** aContinuingFrame);
|
|
|
|
|
1999-03-03 16:33:57 +00:00
|
|
|
nsresult CreateContinuingTableFrame(nsIPresContext* aPresContext,
|
|
|
|
nsIFrame* aFrame,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsIFrame** aContinuingFrame);
|
|
|
|
|
1999-04-27 22:14:54 +00:00
|
|
|
//----------------------------------------
|
|
|
|
|
|
|
|
// Methods support creating block frames and their children
|
|
|
|
|
|
|
|
PRBool HaveFirstLetterStyle(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIStyleContext* aStyleContext);
|
|
|
|
|
|
|
|
nsIStyleContext* GetFirstLetterStyle(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIStyleContext* aStyleContext);
|
|
|
|
|
1999-07-05 18:46:09 +00:00
|
|
|
PRBool ShouldCreateFirstLetterFrame(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aFrame);
|
|
|
|
|
1999-04-28 19:08:14 +00:00
|
|
|
nsresult ProcessBlockChildren(nsIPresContext* aPresContext,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aFrame,
|
|
|
|
nsFrameItems& aFrameItems,
|
|
|
|
PRBool aCanHaveGeneratedContent,
|
|
|
|
PRBool aForBlock);
|
1999-04-27 22:14:54 +00:00
|
|
|
|
|
|
|
nsresult WrapTextFrame(nsIPresContext* aPresContext,
|
1999-08-05 03:09:22 +00:00
|
|
|
nsFrameConstructorState& aState,
|
1999-04-27 22:14:54 +00:00
|
|
|
nsIFrame* aTextFrame,
|
|
|
|
nsIContent* aParentContent,
|
|
|
|
nsIContent* aChildContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsFrameItems& aFrameItems,
|
1999-04-28 00:21:51 +00:00
|
|
|
nsAbsoluteItems& aFloatingItems,
|
|
|
|
PRBool aForBlock);
|
1999-04-27 22:14:54 +00:00
|
|
|
|
|
|
|
void CreateFloatingFirstLetterFrame(nsIPresContext* aPresContext,
|
1999-08-05 03:09:22 +00:00
|
|
|
nsIFrameManager* aFrameManager,
|
1999-04-27 22:14:54 +00:00
|
|
|
nsIFrame* aTextFrame,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIContent* aChildContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsFrameItems& aFrameItems,
|
|
|
|
nsFrameItems& aFloatingItems,
|
|
|
|
nsIStyleContext* aStyleContext);
|
|
|
|
|
1999-02-05 03:55:18 +00:00
|
|
|
protected:
|
|
|
|
nsIDocument* mDocument;
|
|
|
|
|
|
|
|
nsIFrame* mInitialContainingBlock;
|
|
|
|
nsIFrame* mFixedContainingBlock;
|
|
|
|
nsIFrame* mDocElementContainingBlock;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* nsCSSFrameConstructor_h___ */
|