2001-09-29 00:14:13 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* ***** BEGIN LICENSE BLOCK *****
|
|
|
|
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
1999-02-05 06:55:18 +03:00
|
|
|
*
|
2001-09-29 00:14:13 +04: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
|
|
|
*
|
2001-09-29 00:14:13 +04: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.
|
|
|
|
*
|
2001-09-29 00:14:13 +04:00
|
|
|
* The Initial Developer of the Original Code is
|
|
|
|
* Netscape Communications Corporation.
|
|
|
|
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
|
|
* the Initial Developer. All Rights Reserved.
|
1999-11-06 06:40:37 +03:00
|
|
|
*
|
2001-09-29 00:14:13 +04:00
|
|
|
* Contributor(s):
|
|
|
|
*
|
|
|
|
* Alternatively, the contents of this file may be used under the terms of
|
|
|
|
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
|
|
|
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
|
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
* of those above. If you wish to allow use of your version of this file only
|
|
|
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
|
|
* use your version of this file under the terms of the NPL, indicate your
|
|
|
|
* decision by deleting the provisions above and replace them with the notice
|
|
|
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
* the provisions above, a recipient may use your version of this file under
|
|
|
|
* the terms of any one of the NPL, the GPL or the LGPL.
|
|
|
|
*
|
|
|
|
* ***** END LICENSE BLOCK ***** */
|
1999-02-05 06:55:18 +03:00
|
|
|
#ifndef nsCSSFrameConstructor_h___
|
|
|
|
#define nsCSSFrameConstructor_h___
|
|
|
|
|
2001-02-20 00:50:04 +03:00
|
|
|
#include "nsICSSFrameConstructor.h"
|
1999-02-05 06:55:18 +03:00
|
|
|
#include "nsIStyleFrameConstruction.h"
|
1999-08-06 09:11:39 +04:00
|
|
|
#include "nsIPresContext.h"
|
1999-08-27 10:06:39 +04:00
|
|
|
#include "nsCOMPtr.h"
|
1999-12-06 10:44:18 +03:00
|
|
|
#include "nsILayoutHistoryState.h"
|
2001-08-24 00:07:10 +04:00
|
|
|
#include "nsIXBLService.h"
|
|
|
|
#include "nsIServiceManager.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-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
|
|
|
|
2001-09-13 00:19:41 +04:00
|
|
|
class nsCSSFrameConstructor : public nsIStyleFrameConstruction,
|
|
|
|
public nsICSSFrameConstructor
|
|
|
|
{
|
1999-02-05 06:55:18 +03:00
|
|
|
public:
|
|
|
|
nsCSSFrameConstructor(void);
|
|
|
|
virtual ~nsCSSFrameConstructor(void);
|
|
|
|
|
2001-08-24 00:07:10 +04:00
|
|
|
// Maintain global objects - gXBLService
|
|
|
|
static nsresult InitGlobals() { return CallGetService("@mozilla.org/xbl;1", &gXBLService); }
|
|
|
|
static void ReleaseGlobals() { NS_IF_RELEASE(gXBLService); }
|
|
|
|
|
1999-02-05 06:55:18 +03:00
|
|
|
private:
|
|
|
|
// These are not supported and are not implemented!
|
|
|
|
nsCSSFrameConstructor(const nsCSSFrameConstructor& aCopy);
|
|
|
|
nsCSSFrameConstructor& operator=(const nsCSSFrameConstructor& aCopy);
|
|
|
|
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
2001-02-20 00:50:04 +03:00
|
|
|
// nsICSSFrameConstructor
|
1999-02-05 06:55:18 +03:00
|
|
|
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,
|
2001-08-25 06:01:08 +04:00
|
|
|
PRInt32 aModType,
|
1999-02-05 06:55:18 +03:00
|
|
|
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,
|
2001-01-17 01:10:04 +03:00
|
|
|
nsIFrame** aFrame,
|
|
|
|
nsFindFrameHint* aHint);
|
1999-07-02 08:46:19 +04:00
|
|
|
|
2001-09-13 00:19:41 +04:00
|
|
|
// Get the XBL insertion point for a child
|
|
|
|
NS_IMETHOD GetInsertionPoint(nsIPresShell* aPresShell,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIContent* aChildContent,
|
2001-10-25 11:31:18 +04:00
|
|
|
nsIFrame** aInsertionPoint,
|
|
|
|
PRBool* aMultiple = nsnull);
|
2001-09-13 00:19:41 +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,
|
|
|
|
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
|
2000-04-04 05:28:15 +04:00
|
|
|
nsresult ConstructTableFrame(nsIPresShell* aPresShell,
|
1999-12-05 02:49:50 +03:00
|
|
|
nsIPresContext* aPresContext,
|
1999-04-28 23:08:14 +04:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParent,
|
|
|
|
nsIStyleContext* aStyleContext,
|
2000-04-04 05:28:15 +04:00
|
|
|
nsTableCreator& aTableCreator,
|
|
|
|
PRBool aIsPseudo,
|
|
|
|
nsFrameItems& aChildItems,
|
|
|
|
nsIFrame*& aNewOuterFrame,
|
|
|
|
nsIFrame*& aNewInnerFrame,
|
|
|
|
PRBool& aIsPseudoParent);
|
|
|
|
|
|
|
|
nsresult ConstructTableCaptionFrame(nsIPresShell* aPresShell,
|
1999-12-05 02:49:50 +03:00
|
|
|
nsIPresContext* aPresContext,
|
1999-04-28 23:08:14 +04:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParent,
|
|
|
|
nsIStyleContext* aStyleContext,
|
2000-04-04 05:28:15 +04:00
|
|
|
nsTableCreator& aTableCreator,
|
|
|
|
nsFrameItems& aChildItems,
|
|
|
|
nsIFrame*& aNewFrame,
|
|
|
|
PRBool& aIsPseudoParent);
|
1999-04-28 23:08:14 +04:00
|
|
|
|
2000-04-04 05:28:15 +04:00
|
|
|
nsresult ConstructTableRowGroupFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParent,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsTableCreator& aTableCreator,
|
|
|
|
PRBool aIsPseudo,
|
|
|
|
nsFrameItems& aChildItems,
|
|
|
|
nsIFrame*& aNewFrame,
|
|
|
|
PRBool& aIsPseudoParent);
|
|
|
|
|
|
|
|
nsresult ConstructTableColGroupFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParent,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsTableCreator& aTableCreator,
|
|
|
|
PRBool aIsPseudo,
|
|
|
|
nsFrameItems& aChildItems,
|
|
|
|
nsIFrame*& aNewFrame,
|
|
|
|
PRBool& aIsPseudoParent);
|
|
|
|
|
|
|
|
nsresult ConstructTableRowFrame(nsIPresShell* aPresShell,
|
1999-12-05 02:49:50 +03:00
|
|
|
nsIPresContext* aPresContext,
|
1999-04-28 23:08:14 +04:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParent,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsTableCreator& aTableCreator,
|
2000-04-04 05:28:15 +04:00
|
|
|
PRBool aIsPseudo,
|
|
|
|
nsFrameItems& aChildItems,
|
|
|
|
nsIFrame*& aNewFrame,
|
|
|
|
PRBool& aIsPseudoParent);
|
1999-04-28 23:08:14 +04:00
|
|
|
|
2000-04-04 05:28:15 +04:00
|
|
|
nsresult ConstructTableColFrame(nsIPresShell* aPresShell,
|
1999-12-05 02:49:50 +03:00
|
|
|
nsIPresContext* aPresContext,
|
1999-04-28 23:08:14 +04:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParent,
|
|
|
|
nsIStyleContext* aStyleContext,
|
2000-04-04 05:28:15 +04:00
|
|
|
nsTableCreator& aTableCreator,
|
|
|
|
PRBool aIsPseudo,
|
|
|
|
nsFrameItems& aChildItems,
|
|
|
|
nsIFrame*& aNewFrame,
|
|
|
|
PRBool& aIsPseudoParent);
|
1999-04-28 23:08:14 +04:00
|
|
|
|
2000-04-04 05:28:15 +04:00
|
|
|
nsresult ConstructTableCellFrame(nsIPresShell* aPresShell,
|
1999-12-05 02:49:50 +03:00
|
|
|
nsIPresContext* aPresContext,
|
1999-04-28 23:08:14 +04:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsTableCreator& aTableCreator,
|
2000-04-04 05:28:15 +04:00
|
|
|
PRBool aIsPseudo,
|
|
|
|
nsFrameItems& aChildItems,
|
|
|
|
nsIFrame*& aNewCellOuterFrame,
|
|
|
|
nsIFrame*& aNewCellInnerFrame,
|
|
|
|
PRBool& aIsPseudoParent);
|
|
|
|
|
2000-10-25 18:55:21 +04:00
|
|
|
PRBool MustGeneratePseudoParent(nsIPresContext* aPresContext,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIAtom* aTag,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIStyleContext* aContext);
|
2000-04-04 05:28:15 +04:00
|
|
|
|
|
|
|
nsresult ConstructTableForeignFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrameIn,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsTableCreator& aTableCreator,
|
|
|
|
nsFrameItems& aChildItems,
|
|
|
|
nsIFrame*& aNewFrame,
|
|
|
|
PRBool& aIsPseudoParent);
|
1999-04-28 23:08:14 +04:00
|
|
|
|
2000-04-04 05:28:15 +04:00
|
|
|
nsresult CreatePseudoTableFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
|
|
|
nsTableCreator& aTableCreator,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIFrame* aParentFrameIn = nsnull);
|
|
|
|
|
|
|
|
nsresult CreatePseudoRowGroupFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
|
|
|
nsTableCreator& aTableCreator,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIFrame* aParentFrameIn = nsnull);
|
|
|
|
|
|
|
|
nsresult CreatePseudoColGroupFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
|
|
|
nsTableCreator& aTableCreator,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIFrame* aParentFrameIn = nsnull);
|
|
|
|
|
|
|
|
nsresult CreatePseudoRowFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
|
|
|
nsTableCreator& aTableCreator,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIFrame* aParentFrameIn = nsnull);
|
|
|
|
|
|
|
|
nsresult CreatePseudoCellFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
|
|
|
nsTableCreator& aTableCreator,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIFrame* aParentFrameIn = nsnull);
|
|
|
|
|
|
|
|
nsresult GetPseudoTableFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
|
|
|
nsTableCreator& aTableCreator,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIFrame& aParentFrameIn);
|
|
|
|
|
|
|
|
nsresult GetPseudoColGroupFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
|
|
|
nsTableCreator& aTableCreator,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIFrame& aParentFrameIn);
|
1999-04-28 23:08:14 +04:00
|
|
|
|
2000-04-04 05:28:15 +04:00
|
|
|
nsresult GetPseudoRowGroupFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
|
|
|
nsTableCreator& aTableCreator,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIFrame& aParentFrameIn);
|
|
|
|
|
|
|
|
nsresult GetPseudoRowFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
|
|
|
nsTableCreator& aTableCreator,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIFrame& aParentFrameIn);
|
|
|
|
|
|
|
|
nsresult GetPseudoCellFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
|
|
|
nsTableCreator& aTableCreator,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIFrame& aParentFrameIn);
|
|
|
|
|
|
|
|
nsresult GetParentFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
|
|
|
nsTableCreator& aTableCreator,
|
|
|
|
nsIFrame& aParentFrameIn,
|
|
|
|
nsIAtom* aChildFrameType,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIFrame*& aParentFrame,
|
|
|
|
PRBool& aIsPseudoParent);
|
|
|
|
|
|
|
|
nsresult TableProcessChildren(nsIPresShell* aPresShell,
|
1999-12-05 02:49:50 +03:00
|
|
|
nsIPresContext* aPresContext,
|
1999-04-28 23:08:14 +04:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
2000-04-04 05:28:15 +04:00
|
|
|
nsTableCreator& aTableCreator,
|
|
|
|
nsFrameItems& aChildItems,
|
|
|
|
nsIFrame*& aCaption);
|
1999-04-28 23:08:14 +04:00
|
|
|
|
2000-04-04 05:28:15 +04:00
|
|
|
nsresult TableProcessChild(nsIPresShell* aPresShell,
|
1999-12-05 02:49:50 +03:00
|
|
|
nsIPresContext* aPresContext,
|
1999-04-28 23:08:14 +04:00
|
|
|
nsFrameConstructorState& aState,
|
2001-10-30 09:02:05 +03:00
|
|
|
nsIContent* aChildContent,
|
|
|
|
nsIContent* aParentContent,
|
1999-04-28 23:08:14 +04:00
|
|
|
nsIFrame* aParentFrame,
|
2000-04-04 05:28:15 +04:00
|
|
|
nsIAtom* aParentFrameType,
|
1999-04-28 23:08:14 +04:00
|
|
|
nsIStyleContext* aParentStyleContext,
|
2000-04-04 05:28:15 +04:00
|
|
|
nsTableCreator& aTableCreator,
|
1999-04-28 23:08:14 +04:00
|
|
|
nsFrameItems& aChildItems,
|
2000-04-04 05:28:15 +04:00
|
|
|
nsIFrame*& aCaption);
|
1999-02-05 06:55:18 +03:00
|
|
|
|
|
|
|
const nsStyleDisplay* GetDisplay(nsIFrame* aFrame);
|
1999-04-30 23:51:59 +04:00
|
|
|
|
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
|
|
|
|
2000-07-19 09:06:55 +04:00
|
|
|
nsresult ConstructAlternateFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
|
|
|
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
|
|
|
|
2000-03-24 18:48:59 +03:00
|
|
|
nsresult ConstructCheckboxControlFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
|
|
|
nsIFrame*& aNewFrame,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIStyleContext* aStyleContext);
|
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-11-28 01:47:33 +03:00
|
|
|
nsresult ConstructFrameByTag(nsIPresShell* aPresShell,
|
1999-12-05 02:49:50 +03:00
|
|
|
nsIPresContext* aPresContext,
|
1999-04-28 23:08:14 +04:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIAtom* aTag,
|
2000-05-24 12:19:10 +04:00
|
|
|
PRInt32 aNameSpaceID,
|
1999-04-28 23:08:14 +04:00
|
|
|
nsIStyleContext* aStyleContext,
|
2001-03-21 08:10:40 +03:00
|
|
|
nsFrameItems& aFrameItems);
|
1999-02-05 06:55:18 +03:00
|
|
|
|
2000-05-16 00:25:02 +04:00
|
|
|
nsresult ConstructFrameInternal( nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIAtom* aTag,
|
2000-05-24 12:19:10 +04:00
|
|
|
PRInt32 aNameSpaceID,
|
2000-05-16 00:25:02 +04:00
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsFrameItems& aFrameItems,
|
|
|
|
PRBool aXBLBaseTag);
|
|
|
|
|
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,
|
2001-08-21 01:42:14 +04:00
|
|
|
nsFrameItems& aChildItems,
|
|
|
|
PRBool aIsRoot = PR_FALSE);
|
1999-08-27 10:06:39 +04:00
|
|
|
|
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-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,
|
2000-05-24 12:19:10 +04:00
|
|
|
PRInt32 aNameSpaceID,
|
1999-10-02 14:41:40 +04:00
|
|
|
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,
|
2000-05-24 12:19:10 +04:00
|
|
|
PRInt32 aNameSpaceID,
|
1999-04-28 23:08:14 +04:00
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsFrameItems& aFrameItems,
|
2000-12-07 13:12:02 +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
|
|
|
|
|
2000-04-02 02:26:38 +04:00
|
|
|
// SVG - rods
|
|
|
|
#ifdef MOZ_SVG
|
|
|
|
nsresult ConstructSVGFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIAtom* aTag,
|
2000-05-24 12:19:10 +04:00
|
|
|
PRInt32 aNameSpaceID,
|
2000-04-02 02:26:38 +04:00
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsFrameItems& aFrameItems);
|
|
|
|
#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,
|
2000-04-04 05:28:15 +04:00
|
|
|
PRBool aParentIsBlock,
|
|
|
|
nsTableCreator* aTableCreator = nsnull);
|
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,
|
2000-12-07 13:12:02 +03:00
|
|
|
nsIStyleContext*& aScrolledChildStyle,
|
|
|
|
nsIFrame* aScrollPort = nsnull);
|
2000-01-27 05:17:04 +03:00
|
|
|
|
|
|
|
// 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,
|
2000-03-31 11:02:06 +04:00
|
|
|
PRBool aIsRoot,
|
2000-01-27 05:17:04 +03:00
|
|
|
nsIFrame*& aNewFrame,
|
|
|
|
nsCOMPtr<nsIStyleContext>& aScrolledChildStyle,
|
2000-12-07 13:12:02 +03:00
|
|
|
nsIFrame*& aScrollableFrame,
|
|
|
|
nsIFrame* aScrollPort = nsnull);
|
2000-01-27 05:17:04 +03:00
|
|
|
|
|
|
|
// 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,
|
2000-03-31 11:02:06 +04:00
|
|
|
PRBool aIsRoot,
|
2000-01-27 05:17:04 +03:00
|
|
|
nsIFrame*& aNewFrame,
|
2000-12-07 13:12:02 +03:00
|
|
|
nsFrameItems& aAnonymousFrames,
|
|
|
|
nsIFrame* aScrollPort = nsnull);
|
2000-01-27 05:17:04 +03:00
|
|
|
|
|
|
|
|
|
|
|
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"
|
|
|
|
//
|
2000-03-28 02:12:42 +04:00
|
|
|
PRBool HasGfxScrollbars();
|
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,
|
2001-06-01 02:19:43 +04:00
|
|
|
nsIContent* aContent, PRBool aInlineStyle = PR_FALSE,
|
|
|
|
nsIStyleRule* aRule = nsnull,
|
|
|
|
nsIStyleContext* aContext = nsnull);
|
1999-02-27 10:15:09 +03:00
|
|
|
|
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,
|
2000-06-07 10:58:45 +04:00
|
|
|
PRBool aIsPositioned,
|
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 WipeContainingBlock(nsIPresContext* aPresContext,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* blockContent,
|
|
|
|
nsIFrame* aFrame,
|
|
|
|
nsIFrame* aFrameList);
|
|
|
|
|
2000-07-06 08:31:33 +04:00
|
|
|
nsresult SplitToContainingBlock(nsIPresContext* aPresContext,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIFrame* aFrame,
|
|
|
|
nsIFrame* aLeftInlineChildFrame,
|
|
|
|
nsIFrame* aBlockChildFrame,
|
|
|
|
nsIFrame* aRightInlineChildFrame,
|
|
|
|
PRBool aTransfer);
|
|
|
|
|
1999-11-01 18:24:57 +03:00
|
|
|
nsresult ReframeContainingBlock(nsIPresContext* aPresContext, nsIFrame* aFrame);
|
|
|
|
|
2000-06-07 10:58:45 +04:00
|
|
|
nsresult StyleChangeReflow(nsIPresContext* aPresContext, nsIFrame* aFrame, nsIAtom* aAttribute);
|
|
|
|
|
1999-11-01 18:24:57 +03:00
|
|
|
nsresult RecreateEntireFrameTree(nsIPresContext* aPresContext);
|
1999-08-28 01:46:10 +04:00
|
|
|
|
2001-01-17 01:10:04 +03:00
|
|
|
/** Helper function that searches the immediate child frames
|
|
|
|
* (and their children if the frames are "special")
|
|
|
|
* for a frame that maps the specified content object
|
|
|
|
*
|
|
|
|
* @param aPresContext the presentation context
|
|
|
|
* @param aParentFrame the primary frame for aParentContent
|
|
|
|
* @param aContent the content node for which we seek a frame
|
|
|
|
* @param aParentContent the parent for aContent
|
|
|
|
* @param aHint an optional hint used to make the search for aFrame faster
|
|
|
|
*/
|
|
|
|
nsIFrame* FindFrameWithContent(nsIPresContext* aPresContext,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIContent* aParentContent,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsFindFrameHint* aHint);
|
2000-03-24 02:18:56 +03: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);
|
|
|
|
|
2000-08-30 22:51:45 +04:00
|
|
|
nsresult RemoveFixedItems(nsIPresContext& aPresContext,
|
|
|
|
nsIPresShell& aPresShell);
|
|
|
|
|
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-03-28 02:12:42 +04:00
|
|
|
// Cached Prefs
|
|
|
|
PRBool mGotGfxPrefs;
|
|
|
|
PRBool mHasGfxScrollbars;
|
|
|
|
|
2001-02-02 03:54:47 +03:00
|
|
|
nsCOMPtr<nsILayoutHistoryState> mTempFrameTreeState;
|
2001-08-24 00:07:10 +04:00
|
|
|
|
|
|
|
static nsIXBLService * gXBLService;
|
1999-02-05 06:55:18 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* nsCSSFrameConstructor_h___ */
|