1999-02-05 06:55:18 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
*
|
1999-11-06 06:40:37 +03:00
|
|
|
* 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/
|
1999-02-05 06:55:18 +03:00
|
|
|
*
|
1999-11-06 06:40:37 +03:00
|
|
|
* 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.
|
1999-02-05 06:55:18 +03:00
|
|
|
*
|
1999-11-06 06:40:37 +03:00
|
|
|
* The Original Code is mozilla.org code.
|
|
|
|
*
|
|
|
|
* The Initial Developer of the Original Code is Netscape
|
1999-02-05 06:55:18 +03:00
|
|
|
* Communications Corporation. Portions created by Netscape are
|
1999-11-06 06:40:37 +03:00
|
|
|
* Copyright (C) 1998 Netscape Communications Corporation. All
|
|
|
|
* Rights Reserved.
|
|
|
|
*
|
|
|
|
* Contributor(s):
|
1999-02-05 06:55:18 +03:00
|
|
|
*/
|
|
|
|
#ifndef nsCSSFrameConstructor_h___
|
|
|
|
#define nsCSSFrameConstructor_h___
|
|
|
|
|
|
|
|
#include "nsIStyleFrameConstruction.h"
|
|
|
|
#include "nslayout.h"
|
1999-08-06 09:11:39 +04:00
|
|
|
#include "nsIPresContext.h"
|
1999-08-27 10:06:39 +04:00
|
|
|
#include "nsCOMPtr.h"
|
1999-10-12 04:16:06 +04:00
|
|
|
#include "nsIStyleContext.h"
|
1999-12-06 10:44:18 +03:00
|
|
|
#include "nsILayoutHistoryState.h"
|
1999-02-05 06:55:18 +03:00
|
|
|
|
|
|
|
class nsIDocument;
|
|
|
|
struct nsFrameItems;
|
|
|
|
struct nsAbsoluteItems;
|
1999-02-10 22:50:50 +03:00
|
|
|
struct nsTableCreator;
|
1999-02-05 06:55:18 +03:00
|
|
|
class nsIStyleContext;
|
1999-02-26 12:15:03 +03:00
|
|
|
struct nsTableList;
|
1999-04-05 06:53:07 +04:00
|
|
|
struct nsStyleContent;
|
1999-02-05 06:55:18 +03:00
|
|
|
struct nsStyleDisplay;
|
|
|
|
class nsIPresShell;
|
1999-03-25 09:42:07 +03:00
|
|
|
class nsVoidArray;
|
1999-08-05 07:09:22 +04:00
|
|
|
class nsIFrameManager;
|
1999-02-05 06:55:18 +03:00
|
|
|
|
1999-04-28 23:08:14 +04:00
|
|
|
class nsFrameConstructorState;
|
1999-08-07 01:14:45 +04:00
|
|
|
class nsIDOMHTMLSelectElement;
|
1999-04-28 23:08:14 +04:00
|
|
|
|
1999-02-05 06:55:18 +03: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
|
1999-12-05 02:49:50 +03:00
|
|
|
NS_IMETHOD ConstructRootFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-02-05 06:55:18 +03:00
|
|
|
nsIContent* aDocElement,
|
|
|
|
nsIFrame*& aNewFrame);
|
|
|
|
|
1999-04-28 02:14:54 +04:00
|
|
|
NS_IMETHOD ReconstructDocElementHierarchy(nsIPresContext* aPresContext);
|
1999-02-05 06:55:18 +03:00
|
|
|
|
|
|
|
NS_IMETHOD ContentAppended(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContainer,
|
|
|
|
PRInt32 aNewIndexInContainer);
|
|
|
|
|
|
|
|
NS_IMETHOD ContentInserted(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContainer,
|
|
|
|
nsIContent* aChild,
|
1999-12-06 10:44:18 +03:00
|
|
|
PRInt32 aIndexInContainer,
|
|
|
|
nsILayoutHistoryState* aFrameState);
|
1999-02-05 06:55:18 +03:00
|
|
|
|
|
|
|
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 04:05:14 +04:00
|
|
|
NS_IMETHOD ContentStatesChanged(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContent1,
|
|
|
|
nsIContent* aContent2);
|
1999-02-05 06:55:18 +03:00
|
|
|
NS_IMETHOD AttributeChanged(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContent,
|
1999-10-16 03:16:45 +04:00
|
|
|
PRInt32 aNameSpaceID,
|
1999-02-05 06:55:18 +03:00
|
|
|
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 09:42:07 +03:00
|
|
|
|
|
|
|
NS_IMETHOD ProcessRestyledFrames(nsStyleChangeList& aRestyleArray,
|
|
|
|
nsIPresContext* aPresContext);
|
|
|
|
|
1999-02-05 06:55:18 +03:00
|
|
|
// Notification that we were unable to render a replaced element.
|
1999-12-05 02:49:50 +03:00
|
|
|
NS_IMETHOD CantRenderReplacedElement(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-02-05 06:55:18 +03:00
|
|
|
nsIFrame* aFrame);
|
|
|
|
|
1999-02-24 07:03:50 +03:00
|
|
|
// Request to create a continuing frame
|
1999-12-05 02:49:50 +03:00
|
|
|
NS_IMETHOD CreateContinuingFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-02-24 07:03:50 +03:00
|
|
|
nsIFrame* aFrame,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIFrame** aContinuingFrame);
|
|
|
|
|
1999-07-02 08:46:19 +04: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 07:09:22 +04:00
|
|
|
NS_IMETHOD FindPrimaryFrameFor(nsIPresContext* aPresContext,
|
|
|
|
nsIFrameManager* aFrameManager,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame** aFrame);
|
1999-07-02 08:46:19 +04:00
|
|
|
|
1999-07-10 00:58:16 +04:00
|
|
|
NS_IMETHOD CreateTreeWidgetContent(nsIPresContext* aPresContext,
|
1999-06-23 07:02:21 +04:00
|
|
|
nsIFrame* aParentFrame,
|
1999-06-28 12:35:10 +04:00
|
|
|
nsIFrame* aPrevFrame,
|
1999-06-23 07:02:21 +04:00
|
|
|
nsIContent* aChild,
|
1999-06-28 12:35:10 +04:00
|
|
|
nsIFrame** aResult,
|
1999-06-30 00:20:40 +04:00
|
|
|
PRBool aIsAppend,
|
1999-12-06 10:44:18 +03:00
|
|
|
PRBool aIsScrollbar,
|
|
|
|
nsILayoutHistoryState* aFrameState);
|
|
|
|
|
1999-07-10 00:58:16 +04:00
|
|
|
NS_IMETHOD RemoveMappingsForFrameSubtree(nsIPresContext* aParentFrame,
|
1999-12-06 10:44:18 +03:00
|
|
|
nsIFrame* aRemovedFrame,
|
|
|
|
nsILayoutHistoryState* aFrameState);
|
1999-06-23 07:02:21 +04:00
|
|
|
|
1999-02-05 06:55:18 +03:00
|
|
|
protected:
|
|
|
|
|
1999-12-06 10:44:18 +03:00
|
|
|
nsresult InitAndRestoreFrame (nsIPresContext* aPresContext,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsIFrame* aPrevInFlow,
|
|
|
|
nsIFrame* aNewFrame);
|
|
|
|
|
1999-02-12 02:08:28 +03:00
|
|
|
nsresult ResolveStyleContext(nsIPresContext* aPresContext,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIAtom* aTag,
|
|
|
|
nsIStyleContext** aStyleContext);
|
|
|
|
|
1999-12-05 02:49:50 +03:00
|
|
|
nsresult ConstructFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-04-28 23:08:14 +04:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsFrameItems& aFrameItems);
|
|
|
|
|
1999-12-05 02:49:50 +03:00
|
|
|
nsresult ConstructDocElementFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-04-28 23:08:14 +04:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aDocElement,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIStyleContext* aParentStyleContext,
|
|
|
|
nsIFrame*& aNewFrame);
|
1999-02-05 06:55:18 +03:00
|
|
|
|
1999-12-05 02:49:50 +03:00
|
|
|
nsresult ConstructDocElementTableFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-04-30 23:51:59 +04:00
|
|
|
nsIContent* aDocElement,
|
|
|
|
nsIFrame* aParentFrame,
|
1999-12-06 10:44:18 +03:00
|
|
|
nsIFrame*& aNewTableFrame,
|
|
|
|
nsILayoutHistoryState* aFrameState);
|
1999-04-30 23:51:59 +04:00
|
|
|
|
1999-04-05 06:53:07 +04:00
|
|
|
nsresult CreateGeneratedFrameFor(nsIPresContext* aPresContext,
|
1999-09-07 07:09:33 +04:00
|
|
|
nsIDocument* aDocument,
|
1999-04-05 06:53:07 +04:00
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
const nsStyleContent* aStyleContent,
|
|
|
|
PRUint32 aContentIndex,
|
|
|
|
nsIFrame** aFrame);
|
|
|
|
|
1999-12-05 02:49:50 +03:00
|
|
|
PRBool CreateGeneratedContentFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-07-05 22:46:09 +04:00
|
|
|
nsFrameConstructorState& aState,
|
1999-03-30 19:22:54 +04:00
|
|
|
nsIFrame* aFrame,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsIAtom* aPseudoElement,
|
1999-07-05 22:46:09 +04:00
|
|
|
PRBool aForBlock,
|
1999-03-30 19:22:54 +04:00
|
|
|
nsIFrame** aResult);
|
|
|
|
|
1999-08-05 07:09:22 +04:00
|
|
|
nsresult AppendFrames(nsIPresContext* aPresContext,
|
|
|
|
nsIPresShell* aPresShell,
|
|
|
|
nsIFrameManager* aFrameManager,
|
|
|
|
nsIContent* aContainer,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIFrame* aFrameList);
|
1999-04-06 08:58:05 +04:00
|
|
|
|
1999-02-05 06:55:18 +03:00
|
|
|
// BEGIN TABLE SECTION
|
1999-12-05 02:49:50 +03:00
|
|
|
nsresult ConstructTableFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-04-28 23:08:14 +04:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParent,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsIFrame*& aNewFrame,
|
|
|
|
nsTableCreator& aTableCreator);
|
|
|
|
|
1999-12-05 02:49:50 +03:00
|
|
|
nsresult ConstructAnonymousTableFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-04-28 23:08:14 +04:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIFrame*& aNewTopFrame,
|
|
|
|
nsIFrame*& aOuterFrame,
|
|
|
|
nsIFrame*& aInnerFrame,
|
|
|
|
nsTableCreator& aTableCreator);
|
|
|
|
|
1999-12-05 02:49:50 +03:00
|
|
|
nsresult ConstructTableCaptionFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-04-28 23:08:14 +04:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParent,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsIFrame*& aNewTopMostFrame,
|
|
|
|
nsIFrame*& aNewCaptionFrame,
|
|
|
|
nsTableCreator& aTableCreator);
|
|
|
|
|
1999-12-05 02:49:50 +03:00
|
|
|
nsresult ConstructTableGroupFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-04-28 23:08:14 +04:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParent,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
PRBool aIsRowGroup,
|
|
|
|
nsIFrame*& aNewTopFrame,
|
|
|
|
nsIFrame*& aNewGroupFrame,
|
|
|
|
nsTableCreator& aTableCreator,
|
|
|
|
nsTableList* aToDo = nsnull);
|
|
|
|
|
1999-12-05 02:49:50 +03:00
|
|
|
nsresult ConstructTableGroupFrameOnly(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-04-28 23:08:14 +04:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParent,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
PRBool aIsRowGroup,
|
|
|
|
nsIFrame*& aNewTopMostFrame,
|
|
|
|
nsIFrame*& aNewGroupFrame,
|
|
|
|
nsTableCreator& aTableCreator,
|
|
|
|
PRBool aProcessChildren = PR_TRUE);
|
|
|
|
|
1999-12-05 02:49:50 +03:00
|
|
|
nsresult ConstructTableRowFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-04-28 23:08:14 +04:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParent,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsIFrame*& aNewTopMostFrame,
|
|
|
|
nsIFrame*& aNewRowFrame,
|
|
|
|
nsTableCreator& aTableCreator,
|
|
|
|
nsTableList* aToDo = nsnull);
|
|
|
|
|
1999-12-05 02:49:50 +03:00
|
|
|
nsresult ConstructTableRowFrameOnly(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-04-28 23:08:14 +04:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
PRBool aProcessChildren,
|
|
|
|
nsIFrame*& aNewRowFrame,
|
|
|
|
nsTableCreator& aTableCreator);
|
|
|
|
|
1999-12-05 02:49:50 +03:00
|
|
|
nsresult ConstructTableColFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-04-28 23:08:14 +04:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParent,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsIFrame*& aNewTopMostFrame,
|
|
|
|
nsIFrame*& aNewColFrame,
|
|
|
|
nsTableCreator& aTableCreator);
|
|
|
|
|
1999-12-05 02:49:50 +03:00
|
|
|
nsresult ConstructTableColFrameOnly(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-04-28 23:08:14 +04:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsIFrame*& aNewColFrame,
|
|
|
|
nsTableCreator& aTableCreator);
|
|
|
|
|
1999-12-05 02:49:50 +03:00
|
|
|
nsresult ConstructTableCellFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-04-28 23:08:14 +04:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsIFrame*& aNewTopMostFrame,
|
|
|
|
nsIFrame*& aNewCellFrame,
|
|
|
|
nsIFrame*& aNewCellBodyFrame,
|
|
|
|
nsTableCreator& aTableCreator,
|
|
|
|
PRBool aProcessChildren = PR_TRUE);
|
|
|
|
|
1999-12-05 02:49:50 +03:00
|
|
|
nsresult ConstructTableCellFrameOnly(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-04-28 23:08:14 +04:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsIFrame*& aNewCellFrame,
|
|
|
|
nsIFrame*& aNewCellBodyFrame,
|
|
|
|
nsTableCreator& aTableCreator,
|
|
|
|
PRBool aProcessChildren);
|
|
|
|
|
1999-12-05 02:49:50 +03:00
|
|
|
nsresult TableProcessChildren(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-04-28 23:08:14 +04:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsFrameItems& aChildList,
|
|
|
|
nsTableCreator& aTableCreator);
|
|
|
|
|
1999-12-05 02:49:50 +03:00
|
|
|
nsresult TableProcessChild(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-04-28 23:08:14 +04:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aChildContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIStyleContext* aParentStyleContext,
|
|
|
|
nsFrameItems& aChildItems,
|
|
|
|
nsTableCreator& aTableCreator);
|
1999-02-05 06:55:18 +03:00
|
|
|
|
1999-04-30 23:51:59 +04: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 12:15:03 +03:00
|
|
|
nsresult TableProcessTableList(nsIPresContext* aPresContext,
|
|
|
|
nsTableList& aTableList);
|
1999-02-05 06:55:18 +03:00
|
|
|
|
|
|
|
nsIFrame* TableGetAsNonScrollFrame(nsIPresContext* aPresContext,
|
|
|
|
nsIFrame* aFrame,
|
|
|
|
const nsStyleDisplay* aDisplayType);
|
|
|
|
|
1999-02-12 02:08:28 +03:00
|
|
|
PRBool TableIsValidCellContent(nsIPresContext* aPresContext,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIContent* aContent);
|
1999-02-05 06:55:18 +03:00
|
|
|
|
|
|
|
const nsStyleDisplay* GetDisplay(nsIFrame* aFrame);
|
1999-04-30 23:51:59 +04:00
|
|
|
|
|
|
|
PRBool IsTableRelated(PRUint8 aDisplay);
|
1999-02-05 06:55:18 +03:00
|
|
|
|
|
|
|
// END TABLE SECTION
|
|
|
|
|
1999-12-05 02:49:50 +03:00
|
|
|
nsresult CreatePlaceholderFrameFor(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-08-05 07:09:22 +04:00
|
|
|
nsIFrameManager* aFrameManager,
|
1999-02-05 06:55:18 +03:00
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aFrame,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsIFrame* aParentFrame,
|
1999-04-25 20:58:42 +04:00
|
|
|
nsIFrame** aPlaceholderFrame);
|
1999-02-26 20:11:54 +03:00
|
|
|
|
1999-12-05 02:49:50 +03:00
|
|
|
nsresult ConstructAlternateImageFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-04-14 08:00:16 +04:00
|
|
|
nsIContent* aContent,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIFrame*& aFrame);
|
1999-02-06 06:45:11 +03:00
|
|
|
|
1999-08-06 09:11:39 +04:00
|
|
|
nsWidgetRendering GetFormElementRenderingMode(nsIPresContext* aPresContext,
|
|
|
|
nsWidgetType aWidgetType);
|
|
|
|
|
1999-12-05 02:49:50 +03:00
|
|
|
nsresult ConstructRadioControlFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-06-22 00:41:56 +04:00
|
|
|
nsIFrame*& aNewFrame,
|
1999-08-03 18:41:48 +04:00
|
|
|
nsIContent* aContent,
|
|
|
|
nsIStyleContext* aStyleContext);
|
1999-06-13 02:32:41 +04:00
|
|
|
|
1999-12-05 02:49:50 +03:00
|
|
|
nsresult ConstructCheckboxControlFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
|
|
|
nsIFrame*& aNewFrame);
|
1999-08-06 09:11:39 +04:00
|
|
|
|
1999-12-05 02:49:50 +03:00
|
|
|
nsresult ConstructButtonControlFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
|
|
|
nsIFrame*& aNewFrame);
|
1999-08-06 09:11:39 +04:00
|
|
|
|
1999-12-05 02:49:50 +03:00
|
|
|
nsresult ConstructTextControlFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-08-20 02:11:03 +04:00
|
|
|
nsIFrame*& aNewFrame,
|
|
|
|
nsIContent* aContent);
|
1999-06-13 02:32:41 +04:00
|
|
|
|
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-15 02:00:24 +04:00
|
|
|
|
1999-12-05 02:49:50 +03:00
|
|
|
nsresult ConstructSelectFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-04-28 23:08:14 +04:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIAtom* aTag,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsIFrame*& aNewFrame,
|
|
|
|
PRBool& aProcessChildren,
|
|
|
|
PRBool aIsAbsolutelyPositioned,
|
|
|
|
PRBool& aFrameHasBeenInitialized,
|
|
|
|
PRBool aIsFixedPositioned,
|
|
|
|
nsFrameItems& aFrameItems);
|
|
|
|
|
2000-01-09 05:04:36 +03:00
|
|
|
nsresult ConstructFieldSetFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIAtom* aTag,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsIFrame*& aNewFrame,
|
|
|
|
PRBool& aProcessChildren,
|
|
|
|
PRBool aIsAbsolutelyPositioned,
|
|
|
|
PRBool& aFrameHasBeenInitialized,
|
|
|
|
PRBool aIsFixedPositioned);
|
|
|
|
|
2000-02-14 04:42:09 +03:00
|
|
|
nsresult ConstructTitledBoxFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIAtom* aTag,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsIFrame*& aNewFrame);
|
|
|
|
|
1999-12-05 02:49:50 +03:00
|
|
|
nsresult ConstructFrameByTag(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-04-28 23:08:14 +04:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIAtom* aTag,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsFrameItems& aFrameItems);
|
1999-02-05 06:55:18 +03:00
|
|
|
|
1999-12-05 02:49:50 +03:00
|
|
|
nsresult CreateAnonymousFrames(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-07-01 02:17:43 +04:00
|
|
|
nsIAtom* aTag,
|
|
|
|
nsFrameConstructorState& aState,
|
1999-08-27 10:06:39 +04:00
|
|
|
nsIContent* aParent,
|
|
|
|
nsIFrame* aNewFrame,
|
|
|
|
nsFrameItems& aChildItems);
|
|
|
|
|
1999-12-05 02:49:50 +03:00
|
|
|
nsresult CreateAnonymousFrames(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-08-27 10:06:39 +04:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aParent,
|
|
|
|
nsIDocument* aDocument,
|
1999-07-01 02:17:43 +04:00
|
|
|
nsIFrame* aNewFrame,
|
|
|
|
nsFrameItems& aChildItems);
|
|
|
|
|
1999-12-05 02:49:50 +03:00
|
|
|
nsresult CreateAnonymousTreeCellFrames(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-08-27 10:06:39 +04:00
|
|
|
nsIAtom* aTag,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aParent,
|
1999-09-28 04:57:31 +04:00
|
|
|
nsIFrame* aNewCellBodyFrame,
|
|
|
|
nsIFrame* aNewCellFrame,
|
1999-08-27 10:06:39 +04:00
|
|
|
nsFrameItems& aChildItems);
|
1999-07-01 02:17:43 +04:00
|
|
|
|
1999-10-02 14:41:40 +04:00
|
|
|
//MathML Mod - RBS
|
|
|
|
#ifdef MOZ_MATHML
|
1999-12-10 16:07:59 +03:00
|
|
|
nsresult ConstructMathMLFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-10-02 14:41:40 +04:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIAtom* aTag,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsFrameItems& aFrameItems);
|
|
|
|
#endif
|
|
|
|
|
1999-02-05 06:55:18 +03:00
|
|
|
#ifdef INCLUDE_XUL
|
1999-12-05 02:49:50 +03:00
|
|
|
nsresult ConstructXULFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-04-28 23:08:14 +04:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIAtom* aTag,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsFrameItems& aFrameItems,
|
2000-03-11 13:38:36 +03:00
|
|
|
PRBool aXBLBaseTag,
|
1999-04-28 23:08:14 +04:00
|
|
|
PRBool& aHaltProcessing);
|
1999-06-15 08:02:43 +04:00
|
|
|
|
1999-02-05 06:55:18 +03:00
|
|
|
#endif
|
|
|
|
|
1999-12-05 02:49:50 +03:00
|
|
|
nsresult ConstructFrameByDisplayType(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-04-28 23:08:14 +04:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
const nsStyleDisplay* aDisplay,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsFrameItems& aFrameItems);
|
1999-02-05 06:55:18 +03:00
|
|
|
|
2000-01-22 04:16:50 +03:00
|
|
|
nsresult GetAdjustedParentFrame(nsIPresContext* aPresContext,
|
|
|
|
nsIFrame* aCurrentParentFrame,
|
|
|
|
PRUint8 aChildDisplayType,
|
|
|
|
nsIFrame*& aNewParentFrame);
|
1999-02-05 06:55:18 +03:00
|
|
|
|
|
|
|
|
1999-12-05 02:49:50 +03:00
|
|
|
nsresult ProcessChildren(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-04-28 23:08:14 +04:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aFrame,
|
|
|
|
PRBool aCanHaveGeneratedContent,
|
1999-08-28 01:46:10 +04:00
|
|
|
nsFrameItems& aFrameItems,
|
|
|
|
PRBool aParentIsBlock);
|
1999-02-05 06:55:18 +03:00
|
|
|
|
1999-12-05 02:49:50 +03:00
|
|
|
nsresult CreateInputFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext *aPresContext,
|
1999-08-03 18:41:48 +04:00
|
|
|
nsIContent *aContent,
|
|
|
|
nsIFrame *&aFrame,
|
2000-02-24 00:36:29 +03:00
|
|
|
nsIStyleContext *aStyleContext);
|
1999-02-05 06:55:18 +03:00
|
|
|
|
1999-08-07 01:14:45 +04:00
|
|
|
nsresult RemoveDummyFrameFromSelect(nsIPresContext* aPresContext,
|
|
|
|
nsIPresShell * aPresShell,
|
|
|
|
nsIContent* aContainer,
|
|
|
|
nsIContent* aChild,
|
|
|
|
nsIDOMHTMLSelectElement * aSelectElement);
|
|
|
|
|
1999-02-05 06:55:18 +03:00
|
|
|
PRBool IsScrollable(nsIPresContext* aPresContext, const nsStyleDisplay* aDisplay);
|
|
|
|
|
1999-08-05 07:09:22 +04:00
|
|
|
nsIFrame* GetFrameFor(nsIPresShell* aFrameManager,
|
|
|
|
nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContent);
|
1999-02-05 06:55:18 +03:00
|
|
|
|
|
|
|
nsIFrame* GetAbsoluteContainingBlock(nsIPresContext* aPresContext,
|
|
|
|
nsIFrame* aFrame);
|
|
|
|
|
1999-02-26 20:11:54 +03:00
|
|
|
nsIFrame* GetFloaterContainingBlock(nsIPresContext* aPresContext,
|
|
|
|
nsIFrame* aFrame);
|
|
|
|
|
1999-08-20 02:16:23 +04:00
|
|
|
|
2000-01-27 05:17:04 +03:00
|
|
|
// Build a scroll frame:
|
|
|
|
// Calls BeginBuildingScrollFrame, InitAndRestoreFrame, and then FinishBuildingScrollFrame
|
|
|
|
//
|
|
|
|
// NOTE: this method does NOT set the primary frame for the content element
|
|
|
|
//
|
|
|
|
nsresult
|
|
|
|
BuildScrollFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIStyleContext* aContentStyle,
|
|
|
|
nsIFrame* aScrolledFrame,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIFrame*& aNewFrame,
|
|
|
|
nsIStyleContext*& aScrolledChildStyle);
|
|
|
|
|
|
|
|
// Builds the initial ScrollFrame:
|
|
|
|
// if Gfx scrollbasrs in ares, it creates a GfxScrollFrame, otherwise it creates a ScrollFrame
|
|
|
|
//
|
|
|
|
nsresult
|
|
|
|
BeginBuildingScrollFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIStyleContext* aContentStyle,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIAtom* aScrolledPseudo,
|
|
|
|
nsIDocument* aDocument,
|
|
|
|
nsIFrame*& aNewFrame,
|
|
|
|
nsCOMPtr<nsIStyleContext>& aScrolledChildStyle,
|
|
|
|
nsIFrame*& aScrollableFrame);
|
|
|
|
|
|
|
|
// Completes the building of the scrollframe:
|
|
|
|
// Creates and necessary views for the scrollframe and sets up the initial child list
|
|
|
|
//
|
|
|
|
nsresult
|
|
|
|
FinishBuildingScrollFrame(nsIPresContext* aPresContext,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aScrollFrame,
|
|
|
|
nsIFrame* aScrolledFrame,
|
|
|
|
nsIStyleContext* scrolledPseudoStyle);
|
|
|
|
|
|
|
|
// Creates a new GfxScrollFrame, Initializes it, and creates a scroll port for it
|
|
|
|
//
|
|
|
|
nsresult
|
|
|
|
BuildGfxScrollFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIDocument* aDocument,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsIFrame*& aNewFrame,
|
|
|
|
nsFrameItems& aAnonymousFrames);
|
|
|
|
|
|
|
|
|
|
|
|
nsresult
|
|
|
|
InitializeSelectFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIFrame* scrollFrame,
|
|
|
|
nsIFrame* scrolledFrame,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
PRBool aIsAbsolutelyPositioned,
|
|
|
|
PRBool aIsFixedPositioned,
|
|
|
|
PRBool aCreateBlock);
|
|
|
|
|
|
|
|
// Probes the PresContext for the boolean value "nglayout.widget.gfxscrollbars"
|
|
|
|
//
|
1999-08-27 10:06:39 +04:00
|
|
|
PRBool HasGfxScrollbars(nsIPresContext* aPresContext);
|
1999-08-20 02:16:23 +04:00
|
|
|
|
1999-02-05 06:55:18 +03:00
|
|
|
|
1999-02-27 10:15:09 +03:00
|
|
|
nsresult RecreateFramesForContent(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContent);
|
|
|
|
|
1999-02-27 22:02:48 +03:00
|
|
|
nsresult RecreateFramesOnAttributeChange(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIAtom* aAttribute);
|
1999-02-05 06:55:18 +03:00
|
|
|
|
1999-12-05 02:49:50 +03:00
|
|
|
nsresult CreateContinuingOuterTableFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-02-26 06:35:22 +03:00
|
|
|
nsIFrame* aFrame,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsIFrame** aContinuingFrame);
|
|
|
|
|
1999-12-05 02:49:50 +03:00
|
|
|
nsresult CreateContinuingTableFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-03-03 19:33:57 +03:00
|
|
|
nsIFrame* aFrame,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsIFrame** aContinuingFrame);
|
|
|
|
|
1999-04-28 02:14:54 +04:00
|
|
|
//----------------------------------------
|
|
|
|
|
|
|
|
// Methods support creating block frames and their children
|
|
|
|
|
1999-08-31 07:09:40 +04:00
|
|
|
static nsIStyleContext* GetFirstLetterStyle(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIStyleContext* aStyleContext);
|
|
|
|
|
|
|
|
static nsIStyleContext* GetFirstLineStyle(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIStyleContext* aStyleContext);
|
|
|
|
|
|
|
|
static PRBool HaveFirstLetterStyle(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIStyleContext* aStyleContext);
|
|
|
|
|
|
|
|
static PRBool HaveFirstLineStyle(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIStyleContext* aStyleContext);
|
|
|
|
|
|
|
|
static void HaveSpecialBlockStyle(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
PRBool* aHaveFirstLetterStyle,
|
|
|
|
PRBool* aHaveFirstLineStyle);
|
1999-04-28 02:14:54 +04:00
|
|
|
|
1999-07-05 22:46:09 +04:00
|
|
|
PRBool ShouldCreateFirstLetterFrame(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aFrame);
|
|
|
|
|
1999-12-05 02:49:50 +03:00
|
|
|
nsresult ConstructBlock(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-08-28 01:46:10 +04:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
const nsStyleDisplay* aDisplay,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsIFrame* aNewFrame);
|
|
|
|
|
1999-12-05 02:49:50 +03:00
|
|
|
nsresult ProcessBlockChildren(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-11-01 18:24:57 +03:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aFrame,
|
|
|
|
PRBool aCanHaveGeneratedContent,
|
|
|
|
nsFrameItems& aFrameItems,
|
|
|
|
PRBool aParentIsBlock);
|
|
|
|
|
1999-12-05 02:49:50 +03:00
|
|
|
nsresult ConstructInline(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-08-28 01:46:10 +04:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
const nsStyleDisplay* aDisplay,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIStyleContext* aStyleContext,
|
1999-11-01 18:24:57 +03:00
|
|
|
nsIFrame* aNewFrame,
|
|
|
|
nsIFrame** aNewBlockFrame,
|
|
|
|
nsIFrame** aNextInlineFrame);
|
|
|
|
|
1999-12-05 02:49:50 +03:00
|
|
|
nsresult ProcessInlineChildren(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-11-01 18:24:57 +03:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aFrame,
|
|
|
|
PRBool aCanHaveGeneratedContent,
|
|
|
|
nsFrameItems& aFrameItems,
|
|
|
|
PRBool* aKidsAllInline);
|
|
|
|
|
|
|
|
PRBool AreAllKidsInline(nsIFrame* aFrameList);
|
|
|
|
|
|
|
|
PRBool IsFrameSpecial(nsIFrameManager* aFrameManager, nsIFrame* aFrame);
|
|
|
|
|
|
|
|
PRBool IsFrameSpecial(nsIPresContext* aPresContext, nsIFrame* aFrame);
|
|
|
|
|
|
|
|
void SetFrameIsSpecial(nsIFrameManager* aFrameManager, nsIFrame* aFrame);
|
|
|
|
|
|
|
|
PRBool WipeContainingBlock(nsIPresContext* aPresContext,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* blockContent,
|
|
|
|
nsIFrame* aFrame,
|
|
|
|
nsIFrame* aFrameList);
|
|
|
|
|
|
|
|
nsresult ReframeContainingBlock(nsIPresContext* aPresContext, nsIFrame* aFrame);
|
|
|
|
|
|
|
|
nsresult RecreateEntireFrameTree(nsIPresContext* aPresContext);
|
1999-08-28 01:46:10 +04:00
|
|
|
|
1999-10-29 18:39:48 +04:00
|
|
|
//----------------------------------------
|
|
|
|
|
|
|
|
// Methods support :first-letter style
|
|
|
|
|
|
|
|
nsIContent* FindBlockFor(nsIPresContext* aPresContext,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContainer);
|
|
|
|
|
1999-12-05 02:49:50 +03:00
|
|
|
void CreateFloatingLetterFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-10-29 18:39:48 +04:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aTextContent,
|
|
|
|
nsIFrame* aTextFrame,
|
|
|
|
nsIContent* aBlockContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsFrameItems& aResult);
|
|
|
|
|
1999-12-05 02:49:50 +03:00
|
|
|
nsresult CreateLetterFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-10-29 18:39:48 +04:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aTextContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsFrameItems& aResult);
|
|
|
|
|
1999-12-05 02:49:50 +03:00
|
|
|
nsresult WrapFramesInFirstLetterFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-10-29 18:39:48 +04:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aBlockContent,
|
|
|
|
nsIFrame* aBlockFrame,
|
|
|
|
nsFrameItems& aBlockFrames);
|
|
|
|
|
1999-12-05 02:49:50 +03:00
|
|
|
nsresult WrapFramesInFirstLetterFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-10-29 18:39:48 +04:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIFrame* aParentFrameList,
|
|
|
|
nsIFrame** aModifiedParent,
|
|
|
|
nsIFrame** aTextFrame,
|
|
|
|
nsIFrame** aPrevFrame,
|
|
|
|
nsFrameItems& aLetterFrame,
|
|
|
|
PRBool* aStopLooking);
|
|
|
|
|
1999-12-05 02:49:50 +03:00
|
|
|
nsresult RecoverLetterFrames(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-10-29 18:39:48 +04:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIFrame* aBlockFrame);
|
|
|
|
|
|
|
|
//
|
|
|
|
nsresult RemoveLetterFrames(nsIPresContext* aPresContext,
|
|
|
|
nsIPresShell* aPresShell,
|
|
|
|
nsIFrameManager* aFrameManager,
|
|
|
|
nsIFrame* aBlockFrame);
|
|
|
|
|
|
|
|
// Recursive helper for RemoveLetterFrames
|
|
|
|
nsresult RemoveFirstLetterFrames(nsIPresContext* aPresContext,
|
|
|
|
nsIPresShell* aPresShell,
|
|
|
|
nsIFrameManager* aFrameManager,
|
|
|
|
nsIFrame* aFrame,
|
|
|
|
PRBool* aStopLooking);
|
|
|
|
|
|
|
|
// Special remove method for those pesky floating first-letter frames
|
|
|
|
nsresult RemoveFloatingFirstLetterFrames(nsIPresContext* aPresContext,
|
|
|
|
nsIPresShell* aPresShell,
|
|
|
|
nsIFrameManager* aFrameManager,
|
|
|
|
nsIFrame* aBlockFrame,
|
|
|
|
PRBool* aStopLooking);
|
|
|
|
|
1999-12-06 10:44:18 +03:00
|
|
|
// Capture state for the frame tree rooted at the frame associated with the
|
|
|
|
// content object, aContent
|
|
|
|
nsresult CaptureStateForFramesOf(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsILayoutHistoryState* aHistoryState);
|
|
|
|
|
|
|
|
// Capture state for the frame tree rooted at aFrame.
|
|
|
|
nsresult CaptureStateFor(nsIPresContext* aPresContext,
|
|
|
|
nsIFrame* aFrame,
|
|
|
|
nsILayoutHistoryState* aHistoryState);
|
|
|
|
|
1999-10-29 18:39:48 +04:00
|
|
|
//----------------------------------------
|
|
|
|
|
|
|
|
// Methods support :first-line style
|
1999-04-28 02:14:54 +04:00
|
|
|
|
1999-12-05 02:49:50 +03:00
|
|
|
nsresult WrapFramesInFirstLineFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-08-31 07:09:40 +04:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aFrame,
|
|
|
|
nsFrameItems& aFrameItems);
|
|
|
|
|
1999-12-05 02:49:50 +03:00
|
|
|
nsresult AppendFirstLineFrames(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-08-31 07:09:40 +04:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aBlockFrame,
|
|
|
|
nsFrameItems& aFrameItems);
|
|
|
|
|
|
|
|
nsresult InsertFirstLineFrames(nsIPresContext* aPresContext,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aBlockFrame,
|
|
|
|
nsIFrame** aParentFrame,
|
|
|
|
nsIFrame* aPrevSibling,
|
|
|
|
nsFrameItems& aFrameItems);
|
|
|
|
|
1999-02-05 06:55:18 +03:00
|
|
|
protected:
|
|
|
|
nsIDocument* mDocument;
|
|
|
|
|
|
|
|
nsIFrame* mInitialContainingBlock;
|
|
|
|
nsIFrame* mFixedContainingBlock;
|
|
|
|
nsIFrame* mDocElementContainingBlock;
|
1999-08-27 10:06:39 +04:00
|
|
|
nsIFrame* mGfxScrollFrame;
|
1999-11-11 02:51:44 +03:00
|
|
|
|
2000-01-14 12:28:54 +03:00
|
|
|
nsCOMPtr<nsILayoutHistoryState> mTempFrameTreeState;
|
1999-02-05 06:55:18 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* nsCSSFrameConstructor_h___ */
|