2001-09-28 20:14:13 +00: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 03:55:18 +00:00
|
|
|
*
|
2001-09-28 20:14:13 +00: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 03:55:18 +00:00
|
|
|
*
|
2001-09-28 20:14:13 +00: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 03:55:18 +00:00
|
|
|
*
|
1999-11-06 03:40:37 +00:00
|
|
|
* The Original Code is mozilla.org code.
|
|
|
|
*
|
2001-09-28 20:14:13 +00: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 03:40:37 +00:00
|
|
|
*
|
2001-09-28 20:14:13 +00: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 03:55:18 +00:00
|
|
|
#ifndef nsCSSFrameConstructor_h___
|
|
|
|
#define nsCSSFrameConstructor_h___
|
|
|
|
|
2001-02-19 21:50:04 +00:00
|
|
|
#include "nsICSSFrameConstructor.h"
|
1999-02-05 03:55:18 +00:00
|
|
|
#include "nsIStyleFrameConstruction.h"
|
1999-08-06 05:11:39 +00:00
|
|
|
#include "nsIPresContext.h"
|
1999-08-27 06:06:39 +00:00
|
|
|
#include "nsCOMPtr.h"
|
1999-12-06 07:44:18 +00:00
|
|
|
#include "nsILayoutHistoryState.h"
|
2001-08-23 20:07:10 +00:00
|
|
|
#include "nsIXBLService.h"
|
|
|
|
#include "nsIServiceManager.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-04-28 19:08:14 +00:00
|
|
|
class nsFrameConstructorState;
|
1999-08-06 21:14:45 +00:00
|
|
|
class nsIDOMHTMLSelectElement;
|
1999-04-28 19:08:14 +00:00
|
|
|
|
2001-09-12 20:19:41 +00:00
|
|
|
class nsCSSFrameConstructor : public nsIStyleFrameConstruction,
|
|
|
|
public nsICSSFrameConstructor
|
|
|
|
{
|
1999-02-05 03:55:18 +00:00
|
|
|
public:
|
|
|
|
nsCSSFrameConstructor(void);
|
|
|
|
virtual ~nsCSSFrameConstructor(void);
|
|
|
|
|
2001-08-23 20:07:10 +00:00
|
|
|
// Maintain global objects - gXBLService
|
|
|
|
static nsresult InitGlobals() { return CallGetService("@mozilla.org/xbl;1", &gXBLService); }
|
|
|
|
static void ReleaseGlobals() { NS_IF_RELEASE(gXBLService); }
|
|
|
|
|
2001-11-07 04:32:25 +00:00
|
|
|
// get the alternate text for a content node
|
|
|
|
static void GetAlternateTextFor(nsIContent* aContent,
|
|
|
|
nsIAtom* aTag, // content object's tag
|
|
|
|
nsString& aAltText);
|
1999-02-05 03:55:18 +00: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-19 21:50:04 +00:00
|
|
|
// nsICSSFrameConstructor
|
1999-02-05 03:55:18 +00:00
|
|
|
NS_IMETHOD Init(nsIDocument* aDocument);
|
|
|
|
|
|
|
|
// nsIStyleFrameConstruction API
|
2002-01-14 22:05:26 +00:00
|
|
|
NS_IMETHOD ConstructRootFrame(nsIPresShell* aPresShell,
|
1999-12-04 23:49:50 +00:00
|
|
|
nsIPresContext* aPresContext,
|
1999-02-05 03:55:18 +00:00
|
|
|
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);
|
|
|
|
|
2002-01-14 22:05:26 +00:00
|
|
|
NS_IMETHOD ContentInserted(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContainer,
|
|
|
|
nsIContent* aChild,
|
|
|
|
PRInt32 aIndexInContainer,
|
|
|
|
nsILayoutHistoryState* aFrameState,
|
|
|
|
PRBool aInContentReplaced);
|
1999-02-05 03:55:18 +00:00
|
|
|
|
|
|
|
NS_IMETHOD ContentReplaced(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContainer,
|
|
|
|
nsIContent* aOldChild,
|
|
|
|
nsIContent* aNewChild,
|
|
|
|
PRInt32 aIndexInContainer);
|
|
|
|
|
|
|
|
NS_IMETHOD ContentRemoved(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContainer,
|
|
|
|
nsIContent* aChild,
|
2002-01-14 22:05:26 +00:00
|
|
|
PRInt32 aIndexInContainer,
|
|
|
|
PRBool aInContentReplaced);
|
1999-02-05 03:55:18 +00:00
|
|
|
|
|
|
|
NS_IMETHOD ContentChanged(nsIPresContext* aPresContext,
|
2002-01-14 22:05:26 +00:00
|
|
|
nsIContent* aContent,
|
|
|
|
nsISupports* aSubContent);
|
|
|
|
|
1999-04-20 00:05:14 +00:00
|
|
|
NS_IMETHOD ContentStatesChanged(nsIPresContext* aPresContext,
|
2002-01-14 22:05:26 +00:00
|
|
|
nsIContent* aContent1,
|
2002-03-07 03:34:29 +00:00
|
|
|
nsIContent* aContent2,
|
|
|
|
nsIAtom* aChangedPseudoClass);
|
2002-01-14 22:05:26 +00:00
|
|
|
|
1999-02-05 03:55:18 +00:00
|
|
|
NS_IMETHOD AttributeChanged(nsIPresContext* aPresContext,
|
2002-01-14 22:05:26 +00:00
|
|
|
nsIContent* aContent,
|
|
|
|
PRInt32 aNameSpaceID,
|
|
|
|
nsIAtom* aAttribute,
|
|
|
|
PRInt32 aModType,
|
|
|
|
PRInt32 aHint);
|
1999-02-05 03:55:18 +00:00
|
|
|
|
|
|
|
// Style change notifications
|
|
|
|
NS_IMETHOD StyleRuleChanged(nsIPresContext* aPresContext,
|
2002-01-14 22:05:26 +00:00
|
|
|
nsIStyleSheet* aStyleSheet,
|
|
|
|
nsIStyleRule* aStyleRule,
|
|
|
|
PRInt32 aHint); // See nsStyleConsts fot hint values
|
|
|
|
|
1999-02-05 03:55:18 +00:00
|
|
|
NS_IMETHOD StyleRuleAdded(nsIPresContext* aPresContext,
|
2002-01-14 22:05:26 +00:00
|
|
|
nsIStyleSheet* aStyleSheet,
|
|
|
|
nsIStyleRule* aStyleRule);
|
|
|
|
|
1999-02-05 03:55:18 +00:00
|
|
|
NS_IMETHOD StyleRuleRemoved(nsIPresContext* aPresContext,
|
2002-01-14 22:05:26 +00:00
|
|
|
nsIStyleSheet* aStyleSheet,
|
|
|
|
nsIStyleRule* aStyleRule);
|
1999-03-25 06:42:07 +00:00
|
|
|
|
|
|
|
NS_IMETHOD ProcessRestyledFrames(nsStyleChangeList& aRestyleArray,
|
2002-01-14 22:05:26 +00:00
|
|
|
nsIPresContext* aPresContext);
|
1999-03-25 06:42:07 +00:00
|
|
|
|
1999-02-05 03:55:18 +00:00
|
|
|
// Notification that we were unable to render a replaced element.
|
2002-01-14 22:05:26 +00:00
|
|
|
NS_IMETHOD CantRenderReplacedElement(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
|
|
|
nsIFrame* aFrame);
|
1999-02-05 03:55:18 +00:00
|
|
|
|
1999-02-24 04:03:50 +00:00
|
|
|
// Request to create a continuing frame
|
2002-01-14 22:05:26 +00:00
|
|
|
NS_IMETHOD CreateContinuingFrame(nsIPresShell* aPresShell,
|
1999-12-04 23:49:50 +00:00
|
|
|
nsIPresContext* aPresContext,
|
1999-02-24 04:03:50 +00:00
|
|
|
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,
|
2001-01-16 22:10:04 +00:00
|
|
|
nsIFrame** aFrame,
|
|
|
|
nsFindFrameHint* aHint);
|
1999-07-02 04:46:19 +00:00
|
|
|
|
2001-09-12 20:19:41 +00:00
|
|
|
// Get the XBL insertion point for a child
|
|
|
|
NS_IMETHOD GetInsertionPoint(nsIPresShell* aPresShell,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIContent* aChildContent,
|
2001-10-25 07:31:18 +00:00
|
|
|
nsIFrame** aInsertionPoint,
|
|
|
|
PRBool* aMultiple = nsnull);
|
2001-09-12 20:19:41 +00:00
|
|
|
|
2002-01-14 22:05:26 +00:00
|
|
|
NS_IMETHOD CreateTreeWidgetContent(nsIPresContext* aPresContext,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIFrame* aPrevFrame,
|
|
|
|
nsIContent* aChild,
|
|
|
|
nsIFrame** aResult,
|
|
|
|
PRBool aIsAppend,
|
|
|
|
PRBool aIsScrollbar,
|
1999-12-06 07:44:18 +00:00
|
|
|
nsILayoutHistoryState* aFrameState);
|
|
|
|
|
2002-01-12 01:18:10 +00:00
|
|
|
NS_IMETHOD CreateListBoxContent(nsIPresContext* aPresContext,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIFrame* aPrevFrame,
|
|
|
|
nsIContent* aChild,
|
|
|
|
nsIFrame** aResult,
|
|
|
|
PRBool aIsAppend,
|
|
|
|
PRBool aIsScrollbar,
|
|
|
|
nsILayoutHistoryState* aFrameState);
|
|
|
|
|
2002-01-14 22:05:26 +00:00
|
|
|
NS_IMETHOD RemoveMappingsForFrameSubtree(nsIPresContext* aParentFrame,
|
|
|
|
nsIFrame* aRemovedFrame,
|
1999-12-06 07:44:18 +00:00
|
|
|
nsILayoutHistoryState* aFrameState);
|
1999-06-23 03:02:21 +00:00
|
|
|
|
1999-02-05 03:55:18 +00:00
|
|
|
protected:
|
|
|
|
|
1999-12-06 07:44:18 +00:00
|
|
|
nsresult InitAndRestoreFrame (nsIPresContext* aPresContext,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsIFrame* aPrevInFlow,
|
|
|
|
nsIFrame* aNewFrame);
|
|
|
|
|
1999-02-11 23:08:28 +00:00
|
|
|
nsresult ResolveStyleContext(nsIPresContext* aPresContext,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIStyleContext** aStyleContext);
|
|
|
|
|
1999-12-04 23:49:50 +00:00
|
|
|
nsresult ConstructFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-04-28 19:08:14 +00:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsFrameItems& aFrameItems);
|
|
|
|
|
2002-01-14 22:05:26 +00:00
|
|
|
nsresult ConstructDocElementFrame(nsIPresShell* aPresShell,
|
1999-12-04 23:49:50 +00:00
|
|
|
nsIPresContext* aPresContext,
|
1999-04-28 19:08:14 +00:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aDocElement,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIStyleContext* aParentStyleContext,
|
|
|
|
nsIFrame*& aNewFrame);
|
1999-02-05 03:55:18 +00:00
|
|
|
|
2002-01-14 22:05:26 +00:00
|
|
|
nsresult ConstructDocElementTableFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aDocElement,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIFrame*& aNewTableFrame,
|
1999-12-06 07:44:18 +00:00
|
|
|
nsILayoutHistoryState* aFrameState);
|
1999-04-30 19:51:59 +00:00
|
|
|
|
1999-04-05 02:53:07 +00:00
|
|
|
nsresult CreateGeneratedFrameFor(nsIPresContext* aPresContext,
|
1999-09-07 03:09:33 +00:00
|
|
|
nsIDocument* aDocument,
|
1999-04-05 02:53:07 +00:00
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
const nsStyleContent* aStyleContent,
|
|
|
|
PRUint32 aContentIndex,
|
|
|
|
nsIFrame** aFrame);
|
|
|
|
|
2002-01-14 22:05:26 +00:00
|
|
|
PRBool CreateGeneratedContentFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-07-05 18:46:09 +00:00
|
|
|
nsFrameConstructorState& aState,
|
2002-01-14 22:05:26 +00:00
|
|
|
nsIFrame* aFrame,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsIAtom* aPseudoElement,
|
|
|
|
PRBool aForBlock,
|
|
|
|
nsIFrame** aResult);
|
1999-03-30 15:22:54 +00:00
|
|
|
|
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
|
2000-04-04 01:28:15 +00:00
|
|
|
nsresult ConstructTableFrame(nsIPresShell* aPresShell,
|
1999-12-04 23:49:50 +00:00
|
|
|
nsIPresContext* aPresContext,
|
1999-04-28 19:08:14 +00:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParent,
|
|
|
|
nsIStyleContext* aStyleContext,
|
2000-04-04 01:28:15 +00:00
|
|
|
nsTableCreator& aTableCreator,
|
|
|
|
PRBool aIsPseudo,
|
|
|
|
nsFrameItems& aChildItems,
|
|
|
|
nsIFrame*& aNewOuterFrame,
|
|
|
|
nsIFrame*& aNewInnerFrame,
|
|
|
|
PRBool& aIsPseudoParent);
|
|
|
|
|
|
|
|
nsresult ConstructTableCaptionFrame(nsIPresShell* aPresShell,
|
1999-12-04 23:49:50 +00:00
|
|
|
nsIPresContext* aPresContext,
|
1999-04-28 19:08:14 +00:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParent,
|
|
|
|
nsIStyleContext* aStyleContext,
|
2000-04-04 01:28:15 +00:00
|
|
|
nsTableCreator& aTableCreator,
|
|
|
|
nsFrameItems& aChildItems,
|
|
|
|
nsIFrame*& aNewFrame,
|
|
|
|
PRBool& aIsPseudoParent);
|
1999-04-28 19:08:14 +00:00
|
|
|
|
2000-04-04 01:28:15 +00: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-04 23:49:50 +00:00
|
|
|
nsIPresContext* aPresContext,
|
1999-04-28 19:08:14 +00:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParent,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsTableCreator& aTableCreator,
|
2000-04-04 01:28:15 +00:00
|
|
|
PRBool aIsPseudo,
|
|
|
|
nsFrameItems& aChildItems,
|
|
|
|
nsIFrame*& aNewFrame,
|
|
|
|
PRBool& aIsPseudoParent);
|
1999-04-28 19:08:14 +00:00
|
|
|
|
2000-04-04 01:28:15 +00:00
|
|
|
nsresult ConstructTableColFrame(nsIPresShell* aPresShell,
|
1999-12-04 23:49:50 +00:00
|
|
|
nsIPresContext* aPresContext,
|
1999-04-28 19:08:14 +00:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParent,
|
|
|
|
nsIStyleContext* aStyleContext,
|
2000-04-04 01:28:15 +00:00
|
|
|
nsTableCreator& aTableCreator,
|
|
|
|
PRBool aIsPseudo,
|
|
|
|
nsFrameItems& aChildItems,
|
|
|
|
nsIFrame*& aNewFrame,
|
|
|
|
PRBool& aIsPseudoParent);
|
1999-04-28 19:08:14 +00:00
|
|
|
|
2000-04-04 01:28:15 +00:00
|
|
|
nsresult ConstructTableCellFrame(nsIPresShell* aPresShell,
|
1999-12-04 23:49:50 +00:00
|
|
|
nsIPresContext* aPresContext,
|
1999-04-28 19:08:14 +00:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsTableCreator& aTableCreator,
|
2000-04-04 01:28:15 +00:00
|
|
|
PRBool aIsPseudo,
|
|
|
|
nsFrameItems& aChildItems,
|
|
|
|
nsIFrame*& aNewCellOuterFrame,
|
|
|
|
nsIFrame*& aNewCellInnerFrame,
|
|
|
|
PRBool& aIsPseudoParent);
|
|
|
|
|
2000-10-25 14:55:21 +00:00
|
|
|
PRBool MustGeneratePseudoParent(nsIPresContext* aPresContext,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIAtom* aTag,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIStyleContext* aContext);
|
2000-04-04 01:28:15 +00: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 19:08:14 +00:00
|
|
|
|
2000-04-04 01:28:15 +00: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 19:08:14 +00:00
|
|
|
|
2000-04-04 01:28:15 +00: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-04 23:49:50 +00:00
|
|
|
nsIPresContext* aPresContext,
|
1999-04-28 19:08:14 +00:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
2000-04-04 01:28:15 +00:00
|
|
|
nsTableCreator& aTableCreator,
|
|
|
|
nsFrameItems& aChildItems,
|
|
|
|
nsIFrame*& aCaption);
|
1999-04-28 19:08:14 +00:00
|
|
|
|
2000-04-04 01:28:15 +00:00
|
|
|
nsresult TableProcessChild(nsIPresShell* aPresShell,
|
1999-12-04 23:49:50 +00:00
|
|
|
nsIPresContext* aPresContext,
|
1999-04-28 19:08:14 +00:00
|
|
|
nsFrameConstructorState& aState,
|
2001-10-30 06:02:05 +00:00
|
|
|
nsIContent* aChildContent,
|
|
|
|
nsIContent* aParentContent,
|
1999-04-28 19:08:14 +00:00
|
|
|
nsIFrame* aParentFrame,
|
2000-04-04 01:28:15 +00:00
|
|
|
nsIAtom* aParentFrameType,
|
1999-04-28 19:08:14 +00:00
|
|
|
nsIStyleContext* aParentStyleContext,
|
2000-04-04 01:28:15 +00:00
|
|
|
nsTableCreator& aTableCreator,
|
1999-04-28 19:08:14 +00:00
|
|
|
nsFrameItems& aChildItems,
|
2000-04-04 01:28:15 +00:00
|
|
|
nsIFrame*& aCaption);
|
1999-02-05 03:55:18 +00:00
|
|
|
|
|
|
|
const nsStyleDisplay* GetDisplay(nsIFrame* aFrame);
|
1999-04-30 19:51:59 +00:00
|
|
|
|
1999-02-05 03:55:18 +00:00
|
|
|
// END TABLE SECTION
|
|
|
|
|
2002-01-14 22:05:26 +00:00
|
|
|
nsresult CreatePlaceholderFrameFor(nsIPresShell* aPresShell,
|
1999-12-04 23:49:50 +00:00
|
|
|
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
|
|
|
|
2002-01-14 22:05:26 +00:00
|
|
|
nsresult ConstructAlternateFrame(nsIPresShell* aPresShell,
|
2000-07-19 05:06:55 +00:00
|
|
|
nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIFrame*& aFrame);
|
1999-02-06 03:45:11 +00:00
|
|
|
|
2002-01-14 22:05:26 +00:00
|
|
|
nsWidgetRendering GetFormElementRenderingMode(nsIPresContext* aPresContext,
|
|
|
|
nsWidgetType aWidgetType);
|
1999-08-06 05:11:39 +00:00
|
|
|
|
2002-01-14 22:05:26 +00:00
|
|
|
nsresult ConstructRadioControlFrame(nsIPresShell* aPresShell,
|
1999-12-04 23:49:50 +00:00
|
|
|
nsIPresContext* aPresContext,
|
1999-06-21 20:41:56 +00:00
|
|
|
nsIFrame*& aNewFrame,
|
1999-08-03 14:41:48 +00:00
|
|
|
nsIContent* aContent,
|
|
|
|
nsIStyleContext* aStyleContext);
|
1999-06-12 22:32:41 +00:00
|
|
|
|
2000-03-24 15:48:59 +00:00
|
|
|
nsresult ConstructCheckboxControlFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
|
|
|
nsIFrame*& aNewFrame,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIStyleContext* aStyleContext);
|
1999-08-06 05:11:39 +00:00
|
|
|
|
2002-01-14 22:05:26 +00:00
|
|
|
nsresult ConstructButtonControlFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
|
|
|
nsIFrame*& aNewFrame);
|
1999-08-06 05:11:39 +00:00
|
|
|
|
2002-01-14 22:05:26 +00:00
|
|
|
nsresult ConstructTextControlFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
|
|
|
nsIFrame*& aNewFrame,
|
|
|
|
nsIContent* aContent);
|
1999-06-12 22:32:41 +00: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-14 22:00:24 +00:00
|
|
|
|
2002-01-14 22:05:26 +00:00
|
|
|
nsresult ConstructSelectFrame(nsIPresShell* aPresShell,
|
1999-12-04 23:49:50 +00:00
|
|
|
nsIPresContext* aPresContext,
|
1999-04-28 19:08:14 +00:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIAtom* aTag,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsIFrame*& aNewFrame,
|
|
|
|
PRBool& aProcessChildren,
|
|
|
|
PRBool aIsAbsolutelyPositioned,
|
|
|
|
PRBool& aFrameHasBeenInitialized,
|
|
|
|
PRBool aIsFixedPositioned,
|
|
|
|
nsFrameItems& aFrameItems);
|
|
|
|
|
2002-01-14 22:05:26 +00:00
|
|
|
nsresult ConstructFieldSetFrame(nsIPresShell* aPresShell,
|
2000-01-09 02:04:36 +00:00
|
|
|
nsIPresContext* aPresContext,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIAtom* aTag,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsIFrame*& aNewFrame,
|
|
|
|
PRBool& aProcessChildren,
|
|
|
|
PRBool aIsAbsolutelyPositioned,
|
|
|
|
PRBool& aFrameHasBeenInitialized,
|
|
|
|
PRBool aIsFixedPositioned);
|
|
|
|
|
2001-12-09 04:28:41 +00:00
|
|
|
nsresult ConstructTextFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsFrameItems& aFrameItems);
|
|
|
|
|
|
|
|
nsresult ConstructHTMLFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIAtom* aTag,
|
|
|
|
PRInt32 aNameSpaceID,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsFrameItems& aFrameItems);
|
1999-02-05 03:55:18 +00:00
|
|
|
|
2000-05-15 20:25:02 +00:00
|
|
|
nsresult ConstructFrameInternal( nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIAtom* aTag,
|
2000-05-24 08:19:10 +00:00
|
|
|
PRInt32 aNameSpaceID,
|
2000-05-15 20:25:02 +00:00
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsFrameItems& aFrameItems,
|
|
|
|
PRBool aXBLBaseTag);
|
|
|
|
|
2002-01-14 22:05:26 +00:00
|
|
|
nsresult CreateAnonymousFrames(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-06-30 22:17:43 +00:00
|
|
|
nsIAtom* aTag,
|
|
|
|
nsFrameConstructorState& aState,
|
1999-08-27 06:06:39 +00:00
|
|
|
nsIContent* aParent,
|
|
|
|
nsIFrame* aNewFrame,
|
2001-08-20 21:42:14 +00:00
|
|
|
nsFrameItems& aChildItems,
|
|
|
|
PRBool aIsRoot = PR_FALSE);
|
1999-08-27 06:06:39 +00:00
|
|
|
|
2002-01-14 22:05:26 +00:00
|
|
|
nsresult CreateAnonymousFrames(nsIPresShell* aPresShell,
|
1999-12-04 23:49:50 +00:00
|
|
|
nsIPresContext* aPresContext,
|
1999-08-27 06:06:39 +00:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aParent,
|
|
|
|
nsIDocument* aDocument,
|
1999-06-30 22:17:43 +00:00
|
|
|
nsIFrame* aNewFrame,
|
|
|
|
nsFrameItems& aChildItems);
|
|
|
|
|
1999-10-02 10:41:40 +00:00
|
|
|
//MathML Mod - RBS
|
|
|
|
#ifdef MOZ_MATHML
|
1999-12-10 13:07:59 +00:00
|
|
|
nsresult ConstructMathMLFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-10-02 10:41:40 +00:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIAtom* aTag,
|
2000-05-24 08:19:10 +00:00
|
|
|
PRInt32 aNameSpaceID,
|
1999-10-02 10:41:40 +00:00
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsFrameItems& aFrameItems);
|
|
|
|
#endif
|
|
|
|
|
1999-02-05 03:55:18 +00:00
|
|
|
#ifdef INCLUDE_XUL
|
2002-01-14 22:05:26 +00:00
|
|
|
nsresult ConstructXULFrame(nsIPresShell* aPresShell,
|
1999-12-04 23:49:50 +00:00
|
|
|
nsIPresContext* aPresContext,
|
1999-04-28 19:08:14 +00:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIAtom* aTag,
|
2000-05-24 08:19:10 +00:00
|
|
|
PRInt32 aNameSpaceID,
|
1999-04-28 19:08:14 +00:00
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsFrameItems& aFrameItems,
|
2000-12-07 10:12:02 +00:00
|
|
|
PRBool aXBLBaseTag,
|
1999-04-28 19:08:14 +00:00
|
|
|
PRBool& aHaltProcessing);
|
1999-06-15 04:02:43 +00:00
|
|
|
|
1999-02-05 03:55:18 +00:00
|
|
|
#endif
|
|
|
|
|
2000-04-01 22:26:38 +00:00
|
|
|
// SVG - rods
|
|
|
|
#ifdef MOZ_SVG
|
2002-01-14 22:05:26 +00:00
|
|
|
nsresult ConstructSVGFrame(nsIPresShell* aPresShell,
|
2000-04-01 22:26:38 +00:00
|
|
|
nsIPresContext* aPresContext,
|
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIAtom* aTag,
|
2000-05-24 08:19:10 +00:00
|
|
|
PRInt32 aNameSpaceID,
|
2000-04-01 22:26:38 +00:00
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsFrameItems& aFrameItems);
|
|
|
|
#endif
|
|
|
|
|
2002-01-14 22:05:26 +00:00
|
|
|
nsresult ConstructFrameByDisplayType(nsIPresShell* aPresShell,
|
1999-12-04 23:49:50 +00:00
|
|
|
nsIPresContext* aPresContext,
|
1999-04-28 19:08:14 +00:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
const nsStyleDisplay* aDisplay,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsFrameItems& aFrameItems);
|
1999-02-05 03:55:18 +00:00
|
|
|
|
2000-01-22 01:16:50 +00:00
|
|
|
nsresult GetAdjustedParentFrame(nsIPresContext* aPresContext,
|
|
|
|
nsIFrame* aCurrentParentFrame,
|
|
|
|
PRUint8 aChildDisplayType,
|
|
|
|
nsIFrame*& aNewParentFrame);
|
1999-02-05 03:55:18 +00:00
|
|
|
|
|
|
|
|
2002-01-14 22:05:26 +00:00
|
|
|
nsresult ProcessChildren(nsIPresShell* aPresShell,
|
1999-12-04 23:49:50 +00:00
|
|
|
nsIPresContext* aPresContext,
|
1999-04-28 19:08:14 +00:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aFrame,
|
|
|
|
PRBool aCanHaveGeneratedContent,
|
1999-08-27 21:46:10 +00:00
|
|
|
nsFrameItems& aFrameItems,
|
2000-04-04 01:28:15 +00:00
|
|
|
PRBool aParentIsBlock,
|
|
|
|
nsTableCreator* aTableCreator = nsnull);
|
1999-02-05 03:55:18 +00:00
|
|
|
|
2001-11-02 07:40:01 +00:00
|
|
|
nsresult CreateInputFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame*& aFrame,
|
|
|
|
nsIStyleContext* aStyleContext);
|
|
|
|
|
2002-01-14 22:05:26 +00:00
|
|
|
nsresult AddDummyFrameToSelect(nsIPresContext* aPresContext,
|
|
|
|
nsIPresShell* aPresShell,
|
2001-11-02 07:40:01 +00:00
|
|
|
nsFrameConstructorState& aState,
|
2002-01-14 22:05:26 +00:00
|
|
|
nsIFrame* aListFrame,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsFrameItems* aChildItems,
|
|
|
|
nsIContent* aContainer,
|
2001-11-02 07:40:01 +00:00
|
|
|
nsIDOMHTMLSelectElement* aSelectElement);
|
1999-02-05 03:55:18 +00:00
|
|
|
|
2002-01-14 22:05:26 +00:00
|
|
|
nsresult RemoveDummyFrameFromSelect(nsIPresContext* aPresContext,
|
|
|
|
nsIPresShell* aPresShell,
|
|
|
|
nsIContent* aContainer,
|
|
|
|
nsIContent* aChild,
|
|
|
|
nsIDOMHTMLSelectElement* aSelectElement);
|
1999-08-06 21:14:45 +00:00
|
|
|
|
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-08-19 22:16:23 +00:00
|
|
|
|
2000-01-27 02:17:04 +00: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 10:12:02 +00:00
|
|
|
nsIStyleContext*& aScrolledChildStyle,
|
|
|
|
nsIFrame* aScrollPort = nsnull);
|
2000-01-27 02:17:04 +00: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 07:02:06 +00:00
|
|
|
PRBool aIsRoot,
|
2000-01-27 02:17:04 +00:00
|
|
|
nsIFrame*& aNewFrame,
|
|
|
|
nsCOMPtr<nsIStyleContext>& aScrolledChildStyle,
|
2000-12-07 10:12:02 +00:00
|
|
|
nsIFrame*& aScrollableFrame,
|
|
|
|
nsIFrame* aScrollPort = nsnull);
|
2000-01-27 02:17:04 +00: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 07:02:06 +00:00
|
|
|
PRBool aIsRoot,
|
2000-01-27 02:17:04 +00:00
|
|
|
nsIFrame*& aNewFrame,
|
2000-12-07 10:12:02 +00:00
|
|
|
nsFrameItems& aAnonymousFrames,
|
|
|
|
nsIFrame* aScrollPort = nsnull);
|
2000-01-27 02:17:04 +00: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);
|
|
|
|
|
2002-01-05 07:17:10 +00:00
|
|
|
// cache the "nglayout.widget.gfxscrollbars" pref
|
2000-03-27 22:12:42 +00:00
|
|
|
PRBool HasGfxScrollbars();
|
2002-01-05 07:17:10 +00:00
|
|
|
// cache the "nglayout.debug.enable_xbl_forms" pref
|
|
|
|
PRBool UseXBLForms();
|
1999-02-05 03:55:18 +00:00
|
|
|
|
2002-01-14 22:05:26 +00:00
|
|
|
nsresult RecreateFramesForContent(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContent,
|
|
|
|
PRBool aInlineStyle = PR_FALSE,
|
|
|
|
nsIStyleRule* aRule = nsnull,
|
2001-05-31 22:19:43 +00:00
|
|
|
nsIStyleContext* aContext = nsnull);
|
1999-02-27 07:15:09 +00:00
|
|
|
|
1999-02-27 19:02:48 +00:00
|
|
|
nsresult RecreateFramesOnAttributeChange(nsIPresContext* aPresContext,
|
2002-01-14 22:05:26 +00:00
|
|
|
nsIContent* aContent,
|
|
|
|
nsIAtom* aAttribute);
|
1999-02-05 03:55:18 +00:00
|
|
|
|
2002-01-14 22:05:26 +00:00
|
|
|
nsresult CreateContinuingOuterTableFrame(nsIPresShell* aPresShell,
|
1999-12-04 23:49:50 +00:00
|
|
|
nsIPresContext* aPresContext,
|
1999-02-26 03:35:22 +00:00
|
|
|
nsIFrame* aFrame,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsIFrame** aContinuingFrame);
|
|
|
|
|
2002-01-14 22:05:26 +00:00
|
|
|
nsresult CreateContinuingTableFrame(nsIPresShell* aPresShell,
|
1999-12-04 23:49:50 +00:00
|
|
|
nsIPresContext* aPresContext,
|
1999-03-03 16:33:57 +00:00
|
|
|
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
|
|
|
|
|
2002-01-14 22:05:26 +00:00
|
|
|
static nsIStyleContext* GetFirstLetterStyle(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContent,
|
1999-08-31 03:09:40 +00:00
|
|
|
nsIStyleContext* aStyleContext);
|
|
|
|
|
2002-01-14 22:05:26 +00:00
|
|
|
static nsIStyleContext* GetFirstLineStyle(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContent,
|
1999-08-31 03:09:40 +00:00
|
|
|
nsIStyleContext* aStyleContext);
|
|
|
|
|
2002-01-14 22:05:26 +00:00
|
|
|
static PRBool HaveFirstLetterStyle(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContent,
|
1999-08-31 03:09:40 +00:00
|
|
|
nsIStyleContext* aStyleContext);
|
|
|
|
|
2002-01-14 22:05:26 +00:00
|
|
|
static PRBool HaveFirstLineStyle(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContent,
|
1999-08-31 03:09:40 +00:00
|
|
|
nsIStyleContext* aStyleContext);
|
|
|
|
|
2002-01-14 22:05:26 +00:00
|
|
|
static void HaveSpecialBlockStyle(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContent,
|
1999-08-31 03:09:40 +00:00
|
|
|
nsIStyleContext* aStyleContext,
|
2002-01-14 22:05:26 +00:00
|
|
|
PRBool* aHaveFirstLetterStyle,
|
|
|
|
PRBool* aHaveFirstLineStyle);
|
1999-04-27 22:14:54 +00:00
|
|
|
|
1999-07-05 18:46:09 +00:00
|
|
|
PRBool ShouldCreateFirstLetterFrame(nsIPresContext* aPresContext,
|
2002-01-14 22:05:26 +00:00
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aFrame);
|
1999-07-05 18:46:09 +00:00
|
|
|
|
2002-01-14 22:05:26 +00:00
|
|
|
nsresult ConstructBlock(nsIPresShell* aPresShell,
|
1999-12-04 23:49:50 +00:00
|
|
|
nsIPresContext* aPresContext,
|
1999-08-27 21:46:10 +00:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
const nsStyleDisplay* aDisplay,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsIFrame* aNewFrame);
|
|
|
|
|
2002-01-14 22:05:26 +00:00
|
|
|
nsresult ProcessBlockChildren(nsIPresShell* aPresShell,
|
1999-12-04 23:49:50 +00:00
|
|
|
nsIPresContext* aPresContext,
|
1999-11-01 15:24:57 +00:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aFrame,
|
|
|
|
PRBool aCanHaveGeneratedContent,
|
|
|
|
nsFrameItems& aFrameItems,
|
|
|
|
PRBool aParentIsBlock);
|
|
|
|
|
2002-01-14 22:05:26 +00:00
|
|
|
nsresult ConstructInline(nsIPresShell* aPresShell,
|
1999-12-04 23:49:50 +00:00
|
|
|
nsIPresContext* aPresContext,
|
1999-08-27 21:46:10 +00:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
const nsStyleDisplay* aDisplay,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIStyleContext* aStyleContext,
|
2000-06-07 06:58:45 +00:00
|
|
|
PRBool aIsPositioned,
|
1999-11-01 15:24:57 +00:00
|
|
|
nsIFrame* aNewFrame,
|
|
|
|
nsIFrame** aNewBlockFrame,
|
|
|
|
nsIFrame** aNextInlineFrame);
|
|
|
|
|
2002-01-14 22:05:26 +00:00
|
|
|
nsresult ProcessInlineChildren(nsIPresShell* aPresShell,
|
1999-12-04 23:49:50 +00:00
|
|
|
nsIPresContext* aPresContext,
|
1999-11-01 15:24:57 +00:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aFrame,
|
|
|
|
PRBool aCanHaveGeneratedContent,
|
|
|
|
nsFrameItems& aFrameItems,
|
|
|
|
PRBool* aKidsAllInline);
|
|
|
|
|
|
|
|
PRBool AreAllKidsInline(nsIFrame* aFrameList);
|
|
|
|
|
2002-01-14 22:05:26 +00:00
|
|
|
PRBool WipeContainingBlock(nsIPresContext* aPresContext,
|
1999-11-01 15:24:57 +00:00
|
|
|
nsFrameConstructorState& aState,
|
2002-01-14 22:05:26 +00:00
|
|
|
nsIContent* blockContent,
|
|
|
|
nsIFrame* aFrame,
|
|
|
|
nsIFrame* aFrameList);
|
1999-11-01 15:24:57 +00:00
|
|
|
|
2002-01-14 22:05:26 +00:00
|
|
|
nsresult SplitToContainingBlock(nsIPresContext* aPresContext,
|
2000-07-06 04:31:33 +00:00
|
|
|
nsFrameConstructorState& aState,
|
2002-01-14 22:05:26 +00:00
|
|
|
nsIFrame* aFrame,
|
|
|
|
nsIFrame* aLeftInlineChildFrame,
|
|
|
|
nsIFrame* aBlockChildFrame,
|
|
|
|
nsIFrame* aRightInlineChildFrame,
|
|
|
|
PRBool aTransfer);
|
2000-07-06 04:31:33 +00:00
|
|
|
|
1999-11-01 15:24:57 +00:00
|
|
|
nsresult ReframeContainingBlock(nsIPresContext* aPresContext, nsIFrame* aFrame);
|
|
|
|
|
2000-06-07 06:58:45 +00:00
|
|
|
nsresult StyleChangeReflow(nsIPresContext* aPresContext, nsIFrame* aFrame, nsIAtom* aAttribute);
|
|
|
|
|
1999-11-01 15:24:57 +00:00
|
|
|
nsresult RecreateEntireFrameTree(nsIPresContext* aPresContext);
|
1999-08-27 21:46:10 +00:00
|
|
|
|
2001-01-16 22:10:04 +00: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-23 23:18:56 +00:00
|
|
|
|
1999-10-29 14:39:48 +00:00
|
|
|
//----------------------------------------
|
|
|
|
|
|
|
|
// Methods support :first-letter style
|
|
|
|
|
2002-01-14 22:05:26 +00:00
|
|
|
nsIContent* FindBlockFor(nsIPresContext* aPresContext,
|
1999-10-29 14:39:48 +00:00
|
|
|
nsFrameConstructorState& aState,
|
2002-01-14 22:05:26 +00:00
|
|
|
nsIContent* aContainer);
|
1999-10-29 14:39:48 +00:00
|
|
|
|
2002-01-14 22:05:26 +00:00
|
|
|
void CreateFloatingLetterFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-10-29 14:39:48 +00:00
|
|
|
nsFrameConstructorState& aState,
|
2002-01-14 22:05:26 +00:00
|
|
|
nsIContent* aTextContent,
|
|
|
|
nsIFrame* aTextFrame,
|
|
|
|
nsIContent* aBlockContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIStyleContext* aStyleContext,
|
|
|
|
nsFrameItems& aResult);
|
|
|
|
|
|
|
|
nsresult CreateLetterFrame(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-10-29 14:39:48 +00:00
|
|
|
nsFrameConstructorState& aState,
|
2002-01-14 22:05:26 +00:00
|
|
|
nsIContent* aTextContent,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsFrameItems& aResult);
|
1999-10-29 14:39:48 +00:00
|
|
|
|
2002-01-14 22:05:26 +00:00
|
|
|
nsresult WrapFramesInFirstLetterFrame(nsIPresShell* aPresShell,
|
1999-12-04 23:49:50 +00:00
|
|
|
nsIPresContext* aPresContext,
|
1999-10-29 14:39:48 +00:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aBlockContent,
|
|
|
|
nsIFrame* aBlockFrame,
|
|
|
|
nsFrameItems& aBlockFrames);
|
|
|
|
|
2002-01-14 22:05:26 +00:00
|
|
|
nsresult WrapFramesInFirstLetterFrame(nsIPresShell* aPresShell,
|
1999-12-04 23:49:50 +00:00
|
|
|
nsIPresContext* aPresContext,
|
1999-10-29 14:39:48 +00:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIFrame* aParentFrame,
|
|
|
|
nsIFrame* aParentFrameList,
|
|
|
|
nsIFrame** aModifiedParent,
|
|
|
|
nsIFrame** aTextFrame,
|
|
|
|
nsIFrame** aPrevFrame,
|
|
|
|
nsFrameItems& aLetterFrame,
|
|
|
|
PRBool* aStopLooking);
|
|
|
|
|
2002-01-14 22:05:26 +00:00
|
|
|
nsresult RecoverLetterFrames(nsIPresShell* aPresShell,
|
|
|
|
nsIPresContext* aPresContext,
|
1999-10-29 14:39:48 +00:00
|
|
|
nsFrameConstructorState& aState,
|
2002-01-14 22:05:26 +00:00
|
|
|
nsIFrame* aBlockFrame);
|
1999-10-29 14:39:48 +00:00
|
|
|
|
|
|
|
//
|
2002-01-14 22:05:26 +00:00
|
|
|
nsresult RemoveLetterFrames(nsIPresContext* aPresContext,
|
|
|
|
nsIPresShell* aPresShell,
|
1999-10-29 14:39:48 +00:00
|
|
|
nsIFrameManager* aFrameManager,
|
2002-01-14 22:05:26 +00:00
|
|
|
nsIFrame* aBlockFrame);
|
1999-10-29 14:39:48 +00:00
|
|
|
|
|
|
|
// Recursive helper for RemoveLetterFrames
|
2002-01-14 22:05:26 +00:00
|
|
|
nsresult RemoveFirstLetterFrames(nsIPresContext* aPresContext,
|
|
|
|
nsIPresShell* aPresShell,
|
1999-10-29 14:39:48 +00:00
|
|
|
nsIFrameManager* aFrameManager,
|
2002-01-14 22:05:26 +00:00
|
|
|
nsIFrame* aFrame,
|
|
|
|
PRBool* aStopLooking);
|
1999-10-29 14:39:48 +00:00
|
|
|
|
|
|
|
// Special remove method for those pesky floating first-letter frames
|
2002-01-14 22:05:26 +00:00
|
|
|
nsresult RemoveFloatingFirstLetterFrames(nsIPresContext* aPresContext,
|
|
|
|
nsIPresShell* aPresShell,
|
1999-10-29 14:39:48 +00:00
|
|
|
nsIFrameManager* aFrameManager,
|
2002-01-14 22:05:26 +00:00
|
|
|
nsIFrame* aBlockFrame,
|
|
|
|
PRBool* aStopLooking);
|
1999-10-29 14:39:48 +00:00
|
|
|
|
1999-12-06 07:44:18 +00: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.
|
2002-01-14 22:05:26 +00:00
|
|
|
nsresult CaptureStateFor(nsIPresContext* aPresContext,
|
|
|
|
nsIFrame* aFrame,
|
1999-12-06 07:44:18 +00:00
|
|
|
nsILayoutHistoryState* aHistoryState);
|
|
|
|
|
1999-10-29 14:39:48 +00:00
|
|
|
//----------------------------------------
|
|
|
|
|
|
|
|
// Methods support :first-line style
|
1999-04-27 22:14:54 +00:00
|
|
|
|
2002-01-14 22:05:26 +00:00
|
|
|
nsresult WrapFramesInFirstLineFrame(nsIPresShell* aPresShell,
|
1999-12-04 23:49:50 +00:00
|
|
|
nsIPresContext* aPresContext,
|
1999-08-31 03:09:40 +00:00
|
|
|
nsFrameConstructorState& aState,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aFrame,
|
|
|
|
nsFrameItems& aFrameItems);
|
|
|
|
|
2002-01-14 22:05:26 +00:00
|
|
|
nsresult AppendFirstLineFrames(nsIPresShell* aPresShell,
|
1999-12-04 23:49:50 +00:00
|
|
|
nsIPresContext* aPresContext,
|
1999-08-31 03:09:40 +00: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 18:51:45 +00:00
|
|
|
nsresult RemoveFixedItems(nsIPresContext& aPresContext,
|
|
|
|
nsIPresShell& aPresShell);
|
|
|
|
|
1999-02-05 03:55:18 +00:00
|
|
|
protected:
|
|
|
|
nsIDocument* mDocument;
|
|
|
|
|
|
|
|
nsIFrame* mInitialContainingBlock;
|
|
|
|
nsIFrame* mFixedContainingBlock;
|
|
|
|
nsIFrame* mDocElementContainingBlock;
|
1999-08-27 06:06:39 +00:00
|
|
|
nsIFrame* mGfxScrollFrame;
|
1999-11-10 23:51:44 +00:00
|
|
|
|
2000-03-27 22:12:42 +00:00
|
|
|
// Cached Prefs
|
2002-01-05 07:17:10 +00:00
|
|
|
PRPackedBool mGotGfxPrefs;
|
|
|
|
PRPackedBool mGotXBLFormPrefs;
|
|
|
|
PRPackedBool mHasGfxScrollbars;
|
|
|
|
PRPackedBool mUseXBLForms;
|
2000-03-27 22:12:42 +00:00
|
|
|
|
2001-02-02 00:54:47 +00:00
|
|
|
nsCOMPtr<nsILayoutHistoryState> mTempFrameTreeState;
|
2001-08-23 20:07:10 +00:00
|
|
|
|
|
|
|
static nsIXBLService * gXBLService;
|
1999-02-05 03:55:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* nsCSSFrameConstructor_h___ */
|