2001-09-29 00:14:13 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* ***** BEGIN LICENSE BLOCK *****
|
2004-04-18 18:30:37 +04:00
|
|
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
1998-09-09 02:34:40 +04:00
|
|
|
*
|
2004-04-18 18:30:37 +04:00
|
|
|
* The contents of this file are subject to the Mozilla 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/MPL/
|
1998-09-09 02:34:40 +04: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.
|
1998-09-09 02:34:40 +04:00
|
|
|
*
|
1999-11-06 06:40:37 +03:00
|
|
|
* The Original Code is mozilla.org code.
|
|
|
|
*
|
2004-04-18 18:30:37 +04:00
|
|
|
* The Initial Developer of the Original Code is
|
2001-09-29 00:14:13 +04:00
|
|
|
* 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
|
2004-04-18 18:30:37 +04:00
|
|
|
* either of 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"),
|
2001-09-29 00:14:13 +04:00
|
|
|
* 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
|
2004-04-18 18:30:37 +04:00
|
|
|
* use your version of this file under the terms of the MPL, indicate your
|
2001-09-29 00:14:13 +04:00
|
|
|
* 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
|
2004-04-18 18:30:37 +04:00
|
|
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
2001-09-29 00:14:13 +04:00
|
|
|
*
|
|
|
|
* ***** END LICENSE BLOCK ***** */
|
2001-07-16 06:40:48 +04:00
|
|
|
#include "nsIServiceManager.h"
|
1998-09-09 02:34:40 +04:00
|
|
|
#include "nsHTMLParts.h"
|
2001-01-27 17:09:34 +03:00
|
|
|
#include "nsHTMLContainerFrame.h"
|
1998-09-26 03:39:06 +04:00
|
|
|
#include "nsCSSRendering.h"
|
1998-09-09 02:34:40 +04:00
|
|
|
#include "nsIDocument.h"
|
2002-05-10 22:22:41 +04:00
|
|
|
#include "nsReflowPath.h"
|
1998-09-09 02:34:40 +04:00
|
|
|
#include "nsIPresContext.h"
|
2003-02-22 03:32:13 +03:00
|
|
|
#include "nsStyleContext.h"
|
1998-09-09 02:34:40 +04:00
|
|
|
#include "nsViewsCID.h"
|
|
|
|
#include "nsIView.h"
|
|
|
|
#include "nsIViewManager.h"
|
|
|
|
#include "nsIWidget.h"
|
|
|
|
#include "nsPageFrame.h"
|
|
|
|
#include "nsIRenderingContext.h"
|
|
|
|
#include "nsGUIEvent.h"
|
2000-12-30 22:22:22 +03:00
|
|
|
#include "nsIDOMEvent.h"
|
1998-09-09 02:34:40 +04:00
|
|
|
#include "nsStyleConsts.h"
|
|
|
|
#include "nsIViewManager.h"
|
|
|
|
#include "nsHTMLAtoms.h"
|
|
|
|
#include "nsIEventStateManager.h"
|
|
|
|
#include "nsIDeviceContext.h"
|
1998-10-19 04:44:28 +04:00
|
|
|
#include "nsIScrollableView.h"
|
1999-02-14 06:47:33 +03:00
|
|
|
#include "nsLayoutAtoms.h"
|
1999-07-27 18:15:42 +04:00
|
|
|
#include "nsIPresShell.h"
|
2001-05-23 03:52:17 +04:00
|
|
|
#include "nsIScrollPositionListener.h"
|
|
|
|
|
|
|
|
// for focus
|
|
|
|
#include "nsIDOMWindowInternal.h"
|
|
|
|
#include "nsIScriptGlobalObject.h"
|
|
|
|
#include "nsIFocusController.h"
|
|
|
|
#include "nsPIDOMWindow.h"
|
|
|
|
#include "nsIScrollableFrame.h"
|
|
|
|
#include "nsIScrollableView.h"
|
|
|
|
#include "nsIDocShell.h"
|
|
|
|
#include "nsICanvasFrame.h"
|
|
|
|
|
|
|
|
#ifdef DEBUG_rods
|
|
|
|
//#define DEBUG_CANVAS_FOCUS
|
|
|
|
#endif
|
1998-10-19 04:44:28 +04:00
|
|
|
|
|
|
|
// Interface IDs
|
1998-09-09 02:34:40 +04:00
|
|
|
|
1998-12-22 06:49:04 +03:00
|
|
|
/**
|
|
|
|
* Root frame class.
|
|
|
|
*
|
|
|
|
* The root frame is the parent frame for the document element's frame.
|
1999-06-27 06:39:09 +04:00
|
|
|
* It only supports having a single child frame which must be an area
|
|
|
|
* frame
|
1998-12-22 06:49:04 +03:00
|
|
|
*/
|
2001-05-23 03:52:17 +04:00
|
|
|
class CanvasFrame : public nsHTMLContainerFrame,
|
|
|
|
public nsIScrollPositionListener,
|
|
|
|
public nsICanvasFrame {
|
1998-09-09 02:34:40 +04:00
|
|
|
public:
|
2001-05-23 03:52:17 +04:00
|
|
|
CanvasFrame() : mDoPaintFocus(PR_FALSE) {}
|
|
|
|
|
|
|
|
// nsISupports
|
|
|
|
NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr);
|
|
|
|
|
|
|
|
NS_IMETHOD Init(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParent,
|
2003-02-22 03:32:13 +03:00
|
|
|
nsStyleContext* aContext,
|
2001-05-23 03:52:17 +04:00
|
|
|
nsIFrame* aPrevInFlow);
|
2002-07-09 08:30:28 +04:00
|
|
|
NS_IMETHOD Destroy(nsIPresContext* aPresContext);
|
2001-05-23 03:52:17 +04:00
|
|
|
|
1999-11-24 09:03:41 +03:00
|
|
|
NS_IMETHOD AppendFrames(nsIPresContext* aPresContext,
|
1999-07-27 18:15:42 +04:00
|
|
|
nsIPresShell& aPresShell,
|
|
|
|
nsIAtom* aListName,
|
|
|
|
nsIFrame* aFrameList);
|
1999-11-24 09:03:41 +03:00
|
|
|
NS_IMETHOD InsertFrames(nsIPresContext* aPresContext,
|
1999-07-27 18:15:42 +04:00
|
|
|
nsIPresShell& aPresShell,
|
|
|
|
nsIAtom* aListName,
|
|
|
|
nsIFrame* aPrevFrame,
|
|
|
|
nsIFrame* aFrameList);
|
1999-11-24 09:03:41 +03:00
|
|
|
NS_IMETHOD RemoveFrame(nsIPresContext* aPresContext,
|
1999-07-27 18:15:42 +04:00
|
|
|
nsIPresShell& aPresShell,
|
|
|
|
nsIAtom* aListName,
|
|
|
|
nsIFrame* aOldFrame);
|
|
|
|
|
1999-11-24 09:03:41 +03:00
|
|
|
NS_IMETHOD Reflow(nsIPresContext* aPresContext,
|
1998-10-02 08:10:00 +04:00
|
|
|
nsHTMLReflowMetrics& aDesiredSize,
|
|
|
|
const nsHTMLReflowState& aReflowState,
|
|
|
|
nsReflowStatus& aStatus);
|
1999-11-24 09:03:41 +03:00
|
|
|
NS_IMETHOD HandleEvent(nsIPresContext* aPresContext,
|
1998-09-09 02:34:40 +04:00
|
|
|
nsGUIEvent* aEvent,
|
1999-11-24 09:03:41 +03:00
|
|
|
nsEventStatus* aEventStatus);
|
2000-03-22 05:43:08 +03:00
|
|
|
NS_IMETHOD GetFrameForPoint(nsIPresContext* aPresContext,
|
|
|
|
const nsPoint& aPoint,
|
|
|
|
nsFramePaintLayer aWhichLayer,
|
|
|
|
nsIFrame** aFrame);
|
2004-03-12 07:40:17 +03:00
|
|
|
virtual PRBool IsContainingBlock() const { return PR_TRUE; }
|
1998-10-30 08:18:59 +03:00
|
|
|
|
2001-09-19 16:35:19 +04:00
|
|
|
NS_IMETHOD Paint(nsIPresContext* aPresContext,
|
2001-04-24 05:01:16 +04:00
|
|
|
nsIRenderingContext& aRenderingContext,
|
2001-09-19 16:35:19 +04:00
|
|
|
const nsRect& aDirtyRect,
|
|
|
|
nsFramePaintLayer aWhichLayer,
|
|
|
|
PRUint32 aFlags);
|
2001-04-24 05:01:16 +04:00
|
|
|
|
2001-05-23 03:52:17 +04:00
|
|
|
// nsIScrollPositionListener
|
|
|
|
NS_IMETHOD ScrollPositionWillChange(nsIScrollableView* aScrollable, nscoord aX, nscoord aY);
|
|
|
|
NS_IMETHOD ScrollPositionDidChange(nsIScrollableView* aScrollable, nscoord aX, nscoord aY);
|
|
|
|
|
|
|
|
// nsICanvasFrame
|
|
|
|
NS_IMETHOD SetHasFocus(PRBool aHasFocus) { mDoPaintFocus = aHasFocus; return NS_OK; }
|
|
|
|
|
1999-02-14 06:47:33 +03:00
|
|
|
/**
|
|
|
|
* Get the "type" of the frame
|
|
|
|
*
|
2000-04-19 06:13:43 +04:00
|
|
|
* @see nsLayoutAtoms::canvasFrame
|
1999-02-14 06:47:33 +03:00
|
|
|
*/
|
2003-10-31 23:19:18 +03:00
|
|
|
virtual nsIAtom* GetType() const;
|
2000-05-06 09:50:49 +04:00
|
|
|
|
1999-09-01 06:03:50 +04:00
|
|
|
#ifdef DEBUG
|
2001-11-14 04:33:42 +03:00
|
|
|
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
1999-09-01 06:03:50 +04:00
|
|
|
#endif
|
2001-05-19 03:08:00 +04:00
|
|
|
NS_IMETHOD GetContentForEvent(nsIPresContext* aPresContext,
|
|
|
|
nsEvent* aEvent,
|
|
|
|
nsIContent** aContent);
|
1998-11-13 05:20:31 +03:00
|
|
|
|
1998-10-30 08:18:59 +03:00
|
|
|
protected:
|
|
|
|
virtual PRIntn GetSkipSides() const;
|
2001-05-23 03:52:17 +04:00
|
|
|
|
|
|
|
// Data members
|
|
|
|
PRPackedBool mDoPaintFocus;
|
2002-07-09 08:30:28 +04:00
|
|
|
nsCOMPtr<nsIViewManager> mViewManager;
|
2002-12-14 19:55:41 +03:00
|
|
|
nscoord mSavedChildWidth, mSavedChildHeight;
|
2001-05-23 03:52:17 +04:00
|
|
|
|
|
|
|
private:
|
|
|
|
NS_IMETHOD_(nsrefcnt) AddRef() { return NS_OK; }
|
|
|
|
NS_IMETHOD_(nsrefcnt) Release() { return NS_OK; }
|
1998-09-09 02:34:40 +04:00
|
|
|
};
|
|
|
|
|
2001-05-23 03:52:17 +04:00
|
|
|
|
1998-09-09 02:34:40 +04:00
|
|
|
//----------------------------------------------------------------------
|
|
|
|
|
|
|
|
nsresult
|
2000-04-19 06:13:43 +04:00
|
|
|
NS_NewCanvasFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame)
|
1998-09-09 02:34:40 +04:00
|
|
|
{
|
1999-05-12 02:03:29 +04:00
|
|
|
NS_PRECONDITION(aNewFrame, "null OUT ptr");
|
|
|
|
if (nsnull == aNewFrame) {
|
|
|
|
return NS_ERROR_NULL_POINTER;
|
|
|
|
}
|
2000-04-19 06:13:43 +04:00
|
|
|
CanvasFrame* it = new (aPresShell)CanvasFrame;
|
1999-05-12 02:03:29 +04:00
|
|
|
if (nsnull == it) {
|
1998-09-09 02:34:40 +04:00
|
|
|
return NS_ERROR_OUT_OF_MEMORY;
|
|
|
|
}
|
1999-05-12 02:03:29 +04:00
|
|
|
*aNewFrame = it;
|
1998-09-09 02:34:40 +04:00
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
2001-05-23 03:52:17 +04:00
|
|
|
//--------------------------------------------------------------
|
|
|
|
// Frames are not refcounted, no need to AddRef
|
|
|
|
NS_IMETHODIMP
|
|
|
|
CanvasFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr)
|
|
|
|
{
|
|
|
|
NS_PRECONDITION(0 != aInstancePtr, "null ptr");
|
|
|
|
if (NULL == aInstancePtr) {
|
|
|
|
return NS_ERROR_NULL_POINTER;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (aIID.Equals(NS_GET_IID(nsIScrollPositionListener))) {
|
|
|
|
*aInstancePtr = (void*) ((nsIScrollPositionListener*) this);
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (aIID.Equals(NS_GET_IID(nsICanvasFrame))) {
|
|
|
|
*aInstancePtr = (void*) ((nsICanvasFrame*) this);
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return nsHTMLContainerFrame::QueryInterface(aIID, aInstancePtr);
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
CanvasFrame::Init(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParent,
|
2003-02-22 03:32:13 +03:00
|
|
|
nsStyleContext* aContext,
|
2001-05-23 03:52:17 +04:00
|
|
|
nsIFrame* aPrevInFlow)
|
|
|
|
{
|
|
|
|
nsresult rv = nsHTMLContainerFrame::Init(aPresContext,aContent,aParent,aContext,aPrevInFlow);
|
|
|
|
|
2003-06-29 07:43:05 +04:00
|
|
|
mViewManager = aPresContext->GetViewManager();
|
2001-05-23 03:52:17 +04:00
|
|
|
|
|
|
|
nsIScrollableView* scrollingView = nsnull;
|
2002-07-09 08:30:28 +04:00
|
|
|
mViewManager->GetRootScrollableView(&scrollingView);
|
2001-05-23 03:52:17 +04:00
|
|
|
if (scrollingView) {
|
2002-07-09 08:30:28 +04:00
|
|
|
scrollingView->AddScrollPositionListener(this);
|
2001-05-23 03:52:17 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
return rv;
|
2002-07-09 08:30:28 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
CanvasFrame::Destroy(nsIPresContext* aPresContext)
|
|
|
|
{
|
|
|
|
nsIScrollableView* scrollingView = nsnull;
|
|
|
|
mViewManager->GetRootScrollableView(&scrollingView);
|
|
|
|
if (scrollingView) {
|
|
|
|
scrollingView->RemoveScrollPositionListener(this);
|
|
|
|
}
|
2001-05-23 03:52:17 +04:00
|
|
|
|
2002-07-09 08:30:28 +04:00
|
|
|
return nsHTMLContainerFrame::Destroy(aPresContext);
|
2001-05-23 03:52:17 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
CanvasFrame::ScrollPositionWillChange(nsIScrollableView* aScrollable, nscoord aX, nscoord aY)
|
|
|
|
{
|
|
|
|
#ifdef DEBUG_CANVAS_FOCUS
|
|
|
|
{
|
|
|
|
PRBool hasFocus = PR_FALSE;
|
2002-07-09 08:30:28 +04:00
|
|
|
nsCOMPtr<nsIViewObserver> observer;
|
|
|
|
mViewManager->GetViewObserver(*getter_AddRefs(observer));
|
|
|
|
nsCOMPtr<nsIPresShell> shell = do_QueryInterface(observer);
|
|
|
|
nsCOMPtr<nsIPresContext> context;
|
|
|
|
shell->GetPresContext(getter_AddRefs(context));
|
2001-05-23 03:52:17 +04:00
|
|
|
nsCOMPtr<nsISupports> container;
|
2002-07-09 08:30:28 +04:00
|
|
|
context->GetContainer(getter_AddRefs(container));
|
2001-05-23 03:52:17 +04:00
|
|
|
nsCOMPtr<nsIDocShell> docShell(do_QueryInterface(container));
|
|
|
|
if (docShell) {
|
|
|
|
docShell->GetHasFocus(&hasFocus);
|
|
|
|
}
|
|
|
|
printf("SPWC: %p HF: %s mDoPaintFocus: %s\n", docShell.get(), hasFocus?"Y":"N", mDoPaintFocus?"Y":"N");
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
if (mDoPaintFocus) {
|
|
|
|
mDoPaintFocus = PR_FALSE;
|
2002-07-09 08:30:28 +04:00
|
|
|
mViewManager->UpdateAllViews(NS_VMREFRESH_NO_SYNC);
|
2001-05-23 03:52:17 +04:00
|
|
|
}
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
CanvasFrame::ScrollPositionDidChange(nsIScrollableView* aScrollable, nscoord aX, nscoord aY)
|
|
|
|
{
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
1999-01-26 03:05:21 +03:00
|
|
|
NS_IMETHODIMP
|
2000-04-19 06:13:43 +04:00
|
|
|
CanvasFrame::AppendFrames(nsIPresContext* aPresContext,
|
|
|
|
nsIPresShell& aPresShell,
|
|
|
|
nsIAtom* aListName,
|
|
|
|
nsIFrame* aFrameList)
|
1999-07-27 18:15:42 +04:00
|
|
|
{
|
|
|
|
nsresult rv;
|
|
|
|
|
|
|
|
NS_ASSERTION(!aListName, "unexpected child list name");
|
|
|
|
NS_PRECONDITION(mFrames.IsEmpty(), "already have a child frame");
|
|
|
|
if (aListName) {
|
|
|
|
// We only support unnamed principal child list
|
|
|
|
rv = NS_ERROR_INVALID_ARG;
|
|
|
|
|
|
|
|
} else if (!mFrames.IsEmpty()) {
|
|
|
|
// We only allow a single child frame
|
|
|
|
rv = NS_ERROR_FAILURE;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
// Insert the new frames
|
|
|
|
#ifdef NS_DEBUG
|
|
|
|
nsFrame::VerifyDirtyBitSet(aFrameList);
|
|
|
|
#endif
|
|
|
|
mFrames.AppendFrame(nsnull, aFrameList);
|
|
|
|
|
|
|
|
// Generate a reflow command to reflow the newly inserted frame
|
2001-12-18 01:39:59 +03:00
|
|
|
nsHTMLReflowCommand* reflowCmd;
|
|
|
|
rv = NS_NewHTMLReflowCommand(&reflowCmd, this, eReflowType_ReflowDirty);
|
1999-07-27 18:15:42 +04:00
|
|
|
if (NS_SUCCEEDED(rv)) {
|
|
|
|
aPresShell.AppendReflowCommand(reflowCmd);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
2000-04-19 06:13:43 +04:00
|
|
|
CanvasFrame::InsertFrames(nsIPresContext* aPresContext,
|
|
|
|
nsIPresShell& aPresShell,
|
|
|
|
nsIAtom* aListName,
|
|
|
|
nsIFrame* aPrevFrame,
|
|
|
|
nsIFrame* aFrameList)
|
1999-07-27 18:15:42 +04:00
|
|
|
{
|
|
|
|
nsresult rv;
|
|
|
|
|
|
|
|
// Because we only support a single child frame inserting is the same
|
|
|
|
// as appending
|
|
|
|
NS_PRECONDITION(!aPrevFrame, "unexpected previous sibling frame");
|
|
|
|
if (aPrevFrame) {
|
|
|
|
rv = NS_ERROR_UNEXPECTED;
|
|
|
|
} else {
|
|
|
|
rv = AppendFrames(aPresContext, aPresShell, aListName, aFrameList);
|
|
|
|
}
|
|
|
|
|
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
2000-04-19 06:13:43 +04:00
|
|
|
CanvasFrame::RemoveFrame(nsIPresContext* aPresContext,
|
|
|
|
nsIPresShell& aPresShell,
|
|
|
|
nsIAtom* aListName,
|
|
|
|
nsIFrame* aOldFrame)
|
1999-07-27 18:15:42 +04:00
|
|
|
{
|
|
|
|
nsresult rv;
|
|
|
|
|
|
|
|
NS_ASSERTION(!aListName, "unexpected child list name");
|
|
|
|
if (aListName) {
|
|
|
|
// We only support the unnamed principal child list
|
|
|
|
rv = NS_ERROR_INVALID_ARG;
|
|
|
|
|
|
|
|
} else if (aOldFrame == mFrames.FirstChild()) {
|
|
|
|
// It's our one and only child frame
|
|
|
|
// Damage the area occupied by the deleted frame
|
2004-03-10 06:09:05 +03:00
|
|
|
// The child of the canvas probably can't have an outline, but why bother
|
|
|
|
// thinking about that?
|
|
|
|
Invalidate(aOldFrame->GetOutlineRect() + aOldFrame->GetPosition(), PR_FALSE);
|
1999-07-27 18:15:42 +04:00
|
|
|
|
|
|
|
// Remove the frame and destroy it
|
|
|
|
mFrames.DestroyFrame(aPresContext, aOldFrame);
|
|
|
|
|
|
|
|
// Generate a reflow command so we get reflowed
|
2001-12-18 01:39:59 +03:00
|
|
|
nsHTMLReflowCommand* reflowCmd;
|
|
|
|
rv = NS_NewHTMLReflowCommand(&reflowCmd, this, eReflowType_ReflowDirty);
|
1999-07-27 18:15:42 +04:00
|
|
|
if (NS_SUCCEEDED(rv)) {
|
|
|
|
aPresShell.AppendReflowCommand(reflowCmd);
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
rv = NS_ERROR_FAILURE;
|
|
|
|
}
|
|
|
|
|
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
|
2001-04-24 05:01:16 +04:00
|
|
|
NS_IMETHODIMP
|
2001-09-19 16:35:19 +04:00
|
|
|
CanvasFrame::Paint(nsIPresContext* aPresContext,
|
2001-04-24 05:01:16 +04:00
|
|
|
nsIRenderingContext& aRenderingContext,
|
2001-09-19 16:35:19 +04:00
|
|
|
const nsRect& aDirtyRect,
|
|
|
|
nsFramePaintLayer aWhichLayer,
|
|
|
|
PRUint32 aFlags)
|
2001-04-24 05:01:16 +04:00
|
|
|
{
|
2002-12-11 07:00:18 +03:00
|
|
|
// We are wrapping the root frame of a document. We
|
|
|
|
// need to check the pres shell to find out if painting is locked
|
|
|
|
// down (because we're still in the early stages of document
|
|
|
|
// and frame construction. If painting is locked down, then we
|
|
|
|
// do not paint our children.
|
|
|
|
PRBool paintingSuppressed = PR_FALSE;
|
2003-12-21 08:36:36 +03:00
|
|
|
aPresContext->PresShell()->IsPaintingSuppressed(&paintingSuppressed);
|
2002-12-11 07:00:18 +03:00
|
|
|
if (paintingSuppressed) {
|
|
|
|
if (NS_FRAME_PAINT_LAYER_BACKGROUND == aWhichLayer) {
|
2002-12-24 01:05:47 +03:00
|
|
|
PaintSelf(aPresContext, aRenderingContext, aDirtyRect);
|
2002-12-11 07:00:18 +03:00
|
|
|
}
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
2001-05-23 03:52:17 +04:00
|
|
|
nsresult rv = nsHTMLContainerFrame::Paint(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer);
|
|
|
|
|
|
|
|
if (NS_FRAME_PAINT_LAYER_FOREGROUND == aWhichLayer) {
|
|
|
|
|
|
|
|
#ifdef DEBUG_CANVAS_FOCUS
|
|
|
|
nsCOMPtr<nsIContent> focusContent;
|
2004-02-27 20:17:37 +03:00
|
|
|
aPresContext->EventStateManager()->
|
|
|
|
GetFocusedContent(getter_AddRefs(focusContent));
|
2001-05-23 03:52:17 +04:00
|
|
|
|
|
|
|
PRBool hasFocus = PR_FALSE;
|
|
|
|
nsCOMPtr<nsISupports> container;
|
|
|
|
aPresContext->GetContainer(getter_AddRefs(container));
|
|
|
|
nsCOMPtr<nsIDocShell> docShell(do_QueryInterface(container));
|
|
|
|
if (docShell) {
|
|
|
|
docShell->GetHasFocus(&hasFocus);
|
|
|
|
printf("%p - CanvasFrame::Paint R:%d,%d,%d,%d DR: %d,%d,%d,%d\n", this,
|
|
|
|
mRect.x, mRect.y, mRect.width, mRect.height,
|
|
|
|
aDirtyRect.x, aDirtyRect.y, aDirtyRect.width, aDirtyRect.height);
|
|
|
|
}
|
|
|
|
printf("%p - Focus: %s c: %p DoPaint:%s\n", docShell.get(), hasFocus?"Y":"N",
|
|
|
|
focusContent.get(), mDoPaintFocus?"Y":"N");
|
|
|
|
#endif
|
|
|
|
|
|
|
|
if (mDoPaintFocus) {
|
2003-06-29 07:43:05 +04:00
|
|
|
nsRect focusRect = GetRect();
|
2001-05-23 03:52:17 +04:00
|
|
|
/////////////////////
|
|
|
|
// draw focus
|
|
|
|
// XXX This is only temporary
|
2001-06-01 02:19:43 +04:00
|
|
|
const nsStyleVisibility* vis = (const nsStyleVisibility*)mStyleContext->GetStyleData(eStyleStruct_Visibility);
|
2001-05-23 03:52:17 +04:00
|
|
|
// Only paint the focus if we're visible
|
2001-06-01 02:19:43 +04:00
|
|
|
if (vis->IsVisible()) {
|
2004-02-27 20:17:37 +03:00
|
|
|
nsIFrame * parentFrame = GetParent();
|
|
|
|
nsIView* parentView = parentFrame->GetView();
|
|
|
|
|
|
|
|
nsIScrollableView* scrollableView;
|
|
|
|
if (NS_SUCCEEDED(CallQueryInterface(parentView, &scrollableView))) {
|
|
|
|
nscoord width, height;
|
|
|
|
scrollableView->GetContainerSize(&width, &height);
|
|
|
|
const nsIView* clippedView;
|
|
|
|
scrollableView->GetClipView(&clippedView);
|
|
|
|
nsRect vcr = clippedView->GetBounds();
|
|
|
|
focusRect.width = vcr.width;
|
|
|
|
focusRect.height = vcr.height;
|
|
|
|
nscoord x,y;
|
|
|
|
scrollableView->GetScrollPosition(x, y);
|
|
|
|
focusRect.x += x;
|
|
|
|
focusRect.y += y;
|
2001-05-23 03:52:17 +04:00
|
|
|
}
|
2004-02-27 20:17:37 +03:00
|
|
|
|
|
|
|
nsStyleOutline outlineStyle(aPresContext);
|
|
|
|
outlineStyle.SetOutlineStyle(NS_STYLE_BORDER_STYLE_DOTTED);
|
|
|
|
outlineStyle.SetOutlineInvert();
|
|
|
|
|
|
|
|
float p2t = aPresContext->PixelsToTwips();
|
|
|
|
// XXX the CSS border for links is specified as 2px, but it
|
|
|
|
// is only drawn as 1px. Match this here.
|
|
|
|
nscoord onePixel = NSIntPixelsToTwips(1, p2t);
|
|
|
|
|
|
|
|
nsRect borderInside(focusRect.x + onePixel,
|
|
|
|
focusRect.y + onePixel,
|
|
|
|
focusRect.width - 2 * onePixel,
|
|
|
|
focusRect.height - 2 * onePixel);
|
|
|
|
|
|
|
|
nsCSSRendering::DrawDashedSides(0, aRenderingContext,
|
|
|
|
focusRect, nsnull,
|
|
|
|
nsnull, &outlineStyle,
|
|
|
|
PR_TRUE, focusRect,
|
|
|
|
borderInside, 0,
|
|
|
|
nsnull);
|
2001-05-23 03:52:17 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return rv;
|
2001-04-24 05:01:16 +04:00
|
|
|
}
|
|
|
|
|
1998-09-09 02:34:40 +04:00
|
|
|
NS_IMETHODIMP
|
2000-04-19 06:13:43 +04:00
|
|
|
CanvasFrame::Reflow(nsIPresContext* aPresContext,
|
|
|
|
nsHTMLReflowMetrics& aDesiredSize,
|
|
|
|
const nsHTMLReflowState& aReflowState,
|
|
|
|
nsReflowStatus& aStatus)
|
1998-09-09 02:34:40 +04:00
|
|
|
{
|
2000-04-21 18:59:47 +04:00
|
|
|
DO_GLOBAL_REFLOW_COUNT("CanvasFrame", aReflowState.reason);
|
2002-04-03 08:21:20 +04:00
|
|
|
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
|
2000-04-19 06:13:43 +04:00
|
|
|
NS_FRAME_TRACE_REFLOW_IN("CanvasFrame::Reflow");
|
2003-01-09 17:26:32 +03:00
|
|
|
//NS_PRECONDITION(!aDesiredSize.mComputeMEW, "unexpected request");
|
1998-09-09 02:34:40 +04:00
|
|
|
|
1998-12-22 06:49:04 +03:00
|
|
|
// Initialize OUT parameter
|
1998-09-09 02:34:40 +04:00
|
|
|
aStatus = NS_FRAME_COMPLETE;
|
|
|
|
|
1999-06-23 08:18:07 +04:00
|
|
|
PRBool isStyleChange = PR_FALSE;
|
1999-07-27 18:15:42 +04:00
|
|
|
PRBool isDirtyChildReflow = PR_FALSE;
|
1998-12-22 06:49:04 +03:00
|
|
|
|
|
|
|
// Check for an incremental reflow
|
|
|
|
if (eReflowReason_Incremental == aReflowState.reason) {
|
1998-11-17 02:16:03 +03:00
|
|
|
// See if we're the target frame
|
2002-05-10 22:22:41 +04:00
|
|
|
nsHTMLReflowCommand *command = aReflowState.path->mReflowCommand;
|
|
|
|
if (command) {
|
1998-11-17 02:16:03 +03:00
|
|
|
// Get the reflow type
|
2002-05-10 22:22:41 +04:00
|
|
|
nsReflowType reflowType;
|
|
|
|
command->GetType(reflowType);
|
1998-11-17 02:16:03 +03:00
|
|
|
|
1999-06-23 08:18:07 +04:00
|
|
|
switch (reflowType) {
|
2001-12-18 01:39:59 +03:00
|
|
|
case eReflowType_ReflowDirty:
|
1999-07-27 18:15:42 +04:00
|
|
|
isDirtyChildReflow = PR_TRUE;
|
1999-06-23 08:18:07 +04:00
|
|
|
break;
|
|
|
|
|
2001-12-18 01:39:59 +03:00
|
|
|
case eReflowType_StyleChanged:
|
1999-06-23 08:18:07 +04:00
|
|
|
// Remember it's a style change so we can set the reflow reason below
|
|
|
|
isStyleChange = PR_TRUE;
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
NS_ASSERTION(PR_FALSE, "unexpected reflow command type");
|
1998-11-17 02:16:03 +03:00
|
|
|
}
|
2002-05-10 22:22:41 +04:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
#ifdef DEBUG
|
|
|
|
nsReflowPath::iterator iter = aReflowState.path->FirstChild();
|
|
|
|
NS_ASSERTION(*iter == mFrames.FirstChild(), "unexpected next reflow command frame");
|
|
|
|
#endif
|
1998-11-17 02:16:03 +03:00
|
|
|
}
|
1998-09-09 02:34:40 +04:00
|
|
|
}
|
|
|
|
|
1998-12-22 06:49:04 +03:00
|
|
|
// Reflow our one and only child frame
|
1999-01-26 03:05:21 +03:00
|
|
|
nsHTMLReflowMetrics kidDesiredSize(nsnull);
|
1999-01-31 21:46:22 +03:00
|
|
|
if (mFrames.IsEmpty()) {
|
1999-07-27 18:15:42 +04:00
|
|
|
// We have no child frame, so return an empty size
|
1999-01-31 21:46:22 +03:00
|
|
|
aDesiredSize.width = aDesiredSize.height = 0;
|
|
|
|
aDesiredSize.ascent = aDesiredSize.descent = 0;
|
|
|
|
|
|
|
|
} else {
|
1999-01-26 03:05:21 +03:00
|
|
|
nsIFrame* kidFrame = mFrames.FirstChild();
|
1999-01-16 01:53:39 +03:00
|
|
|
|
1999-06-27 06:39:09 +04:00
|
|
|
// We must specify an unconstrained available height, because constrained
|
|
|
|
// is only for when we're paginated...
|
2002-05-10 22:22:41 +04:00
|
|
|
nsReflowReason reason;
|
1999-07-27 18:15:42 +04:00
|
|
|
if (isDirtyChildReflow) {
|
|
|
|
// Note: the only reason the frame would be dirty would be if it had
|
|
|
|
// just been inserted or appended
|
2002-05-10 22:22:41 +04:00
|
|
|
reason = eReflowReason_Initial;
|
1999-06-23 08:18:07 +04:00
|
|
|
} else if (isStyleChange) {
|
2002-05-10 22:22:41 +04:00
|
|
|
reason = eReflowReason_StyleChange;
|
|
|
|
} else {
|
|
|
|
reason = aReflowState.reason;
|
1998-12-22 06:49:04 +03:00
|
|
|
}
|
1998-10-01 08:46:11 +04:00
|
|
|
|
2002-05-10 22:22:41 +04:00
|
|
|
nsHTMLReflowState kidReflowState(aPresContext, aReflowState, kidFrame,
|
|
|
|
nsSize(aReflowState.availableWidth,
|
|
|
|
NS_UNCONSTRAINEDSIZE),
|
|
|
|
reason);
|
|
|
|
|
2002-12-14 19:55:41 +03:00
|
|
|
if (eReflowReason_Incremental == aReflowState.reason) {
|
|
|
|
// Restore original kid desired dimensions in case it decides to
|
|
|
|
// reuse them during incremental reflow.
|
2003-06-29 07:43:05 +04:00
|
|
|
kidFrame->SetSize(nsSize(mSavedChildWidth, mSavedChildHeight));
|
2002-12-14 19:55:41 +03:00
|
|
|
}
|
|
|
|
|
1998-12-22 06:49:04 +03:00
|
|
|
// Reflow the frame
|
1999-10-30 06:52:11 +04:00
|
|
|
ReflowChild(kidFrame, aPresContext, kidDesiredSize, kidReflowState,
|
1999-11-19 18:33:29 +03:00
|
|
|
kidReflowState.mComputedMargin.left, kidReflowState.mComputedMargin.top,
|
|
|
|
0, aStatus);
|
1999-10-30 06:52:11 +04:00
|
|
|
|
2002-12-14 19:55:41 +03:00
|
|
|
mSavedChildWidth = kidDesiredSize.width;
|
|
|
|
mSavedChildHeight = kidDesiredSize.height;
|
|
|
|
|
1999-10-30 06:52:11 +04:00
|
|
|
// The document element's background should cover the entire canvas, so
|
|
|
|
// take into account the combined area and any space taken up by
|
|
|
|
// absolutely positioned elements
|
|
|
|
nsMargin border;
|
|
|
|
|
2001-02-07 12:57:26 +03:00
|
|
|
if (!kidReflowState.mStyleBorder->GetBorder(border)) {
|
1999-10-30 06:52:11 +04:00
|
|
|
NS_NOTYETIMPLEMENTED("percentage border");
|
|
|
|
}
|
|
|
|
|
|
|
|
// First check the combined area
|
2003-06-29 07:43:05 +04:00
|
|
|
if (NS_FRAME_OUTSIDE_CHILDREN & kidFrame->GetStateBits()) {
|
1999-10-30 06:52:11 +04:00
|
|
|
// The background covers the content area and padding area, so check
|
|
|
|
// for children sticking outside the child frame's padding edge
|
|
|
|
nscoord paddingEdgeX = kidDesiredSize.width - border.right;
|
|
|
|
nscoord paddingEdgeY = kidDesiredSize.height - border.bottom;
|
|
|
|
|
1999-12-06 18:49:53 +03:00
|
|
|
if (kidDesiredSize.mOverflowArea.XMost() > paddingEdgeX) {
|
|
|
|
kidDesiredSize.width = kidDesiredSize.mOverflowArea.XMost() +
|
1999-10-30 06:52:11 +04:00
|
|
|
border.right;
|
1999-07-28 08:48:34 +04:00
|
|
|
}
|
1999-12-06 18:49:53 +03:00
|
|
|
if (kidDesiredSize.mOverflowArea.YMost() > paddingEdgeY) {
|
|
|
|
kidDesiredSize.height = kidDesiredSize.mOverflowArea.YMost() +
|
1999-10-30 06:52:11 +04:00
|
|
|
border.bottom;
|
1999-06-27 06:39:09 +04:00
|
|
|
}
|
1999-10-30 06:52:11 +04:00
|
|
|
}
|
1999-06-27 06:39:09 +04:00
|
|
|
|
1999-10-30 06:52:11 +04:00
|
|
|
// If our height is fixed, then make sure the child frame plus its top and
|
|
|
|
// bottom margin is at least that high as well...
|
|
|
|
if (NS_AUTOHEIGHT != aReflowState.mComputedHeight) {
|
|
|
|
nscoord totalHeight = kidDesiredSize.height + kidReflowState.mComputedMargin.top +
|
|
|
|
kidReflowState.mComputedMargin.bottom;
|
1999-02-09 08:09:39 +03:00
|
|
|
|
1999-10-30 06:52:11 +04:00
|
|
|
if (totalHeight < aReflowState.mComputedHeight) {
|
|
|
|
kidDesiredSize.height += aReflowState.mComputedHeight - totalHeight;
|
1999-02-09 08:09:39 +03:00
|
|
|
}
|
1999-10-30 06:52:11 +04:00
|
|
|
}
|
1999-06-27 06:39:09 +04:00
|
|
|
|
1999-11-19 18:33:29 +03:00
|
|
|
// Complete the reflow and position and size the child frame
|
2004-03-10 06:09:05 +03:00
|
|
|
FinishReflowChild(kidFrame, aPresContext, &kidReflowState, kidDesiredSize,
|
|
|
|
kidReflowState.mComputedMargin.left,
|
|
|
|
kidReflowState.mComputedMargin.top, 0);
|
1999-07-27 18:15:42 +04:00
|
|
|
|
1999-10-30 06:52:11 +04:00
|
|
|
// If the child frame was just inserted, then we're responsible for making sure
|
|
|
|
// it repaints
|
|
|
|
if (isDirtyChildReflow) {
|
2004-03-10 06:09:05 +03:00
|
|
|
Invalidate(kidFrame->GetOutlineRect() + kidFrame->GetPosition(), PR_FALSE);
|
1998-10-01 08:46:11 +04:00
|
|
|
}
|
1998-10-31 07:40:01 +03:00
|
|
|
|
1999-01-26 03:05:21 +03:00
|
|
|
// Return our desired size
|
1999-07-20 07:41:03 +04:00
|
|
|
aDesiredSize.width = kidDesiredSize.width + kidReflowState.mComputedMargin.left +
|
|
|
|
kidReflowState.mComputedMargin.right;
|
|
|
|
aDesiredSize.height = kidDesiredSize.height + kidReflowState.mComputedMargin.top +
|
|
|
|
kidReflowState.mComputedMargin.bottom;
|
1999-01-26 03:05:21 +03:00
|
|
|
aDesiredSize.ascent = aDesiredSize.height;
|
|
|
|
aDesiredSize.descent = 0;
|
1999-06-27 06:39:09 +04:00
|
|
|
// XXX Don't completely ignore NS_FRAME_OUTSIDE_CHILDREN for child frames
|
|
|
|
// that stick out on the left or top edges...
|
1999-01-26 03:05:21 +03:00
|
|
|
}
|
1998-09-09 02:34:40 +04:00
|
|
|
|
2000-04-19 06:13:43 +04:00
|
|
|
NS_FRAME_TRACE_REFLOW_OUT("CanvasFrame::Reflow", aStatus);
|
2002-05-29 02:50:43 +04:00
|
|
|
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
|
1998-09-09 02:34:40 +04:00
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
1998-10-30 08:18:59 +03:00
|
|
|
PRIntn
|
2000-04-19 06:13:43 +04:00
|
|
|
CanvasFrame::GetSkipSides() const
|
1998-10-30 08:18:59 +03:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
1998-09-09 02:34:40 +04:00
|
|
|
NS_IMETHODIMP
|
2000-04-19 06:13:43 +04:00
|
|
|
CanvasFrame::HandleEvent(nsIPresContext* aPresContext,
|
|
|
|
nsGUIEvent* aEvent,
|
|
|
|
nsEventStatus* aEventStatus)
|
1998-09-09 02:34:40 +04:00
|
|
|
{
|
1999-11-24 09:03:41 +03:00
|
|
|
NS_ENSURE_ARG_POINTER(aEventStatus);
|
|
|
|
if (nsEventStatus_eConsumeNoDefault == *aEventStatus) {
|
1998-11-18 08:25:26 +03:00
|
|
|
return NS_OK;
|
1998-11-13 02:03:35 +03:00
|
|
|
}
|
1998-09-09 02:34:40 +04:00
|
|
|
|
|
|
|
if (aEvent->message == NS_MOUSE_LEFT_BUTTON_UP ||
|
|
|
|
aEvent->message == NS_MOUSE_MIDDLE_BUTTON_UP ||
|
2000-04-12 07:04:11 +04:00
|
|
|
aEvent->message == NS_MOUSE_RIGHT_BUTTON_UP ||
|
|
|
|
aEvent->message == NS_MOUSE_MOVE ) {
|
2004-01-09 17:20:53 +03:00
|
|
|
nsIFrame *firstChild = GetFirstChild(nsnull);
|
2000-04-19 06:13:43 +04:00
|
|
|
//canvas frame needs to pass mouse events to its area frame so that mouse movement
|
2000-04-12 07:04:11 +04:00
|
|
|
//and selection code will work properly. this will still have the necessary effects
|
|
|
|
//that would have happened if nsFrame::HandleEvent was called.
|
2004-01-09 17:20:53 +03:00
|
|
|
if (firstChild)
|
2000-04-12 07:04:11 +04:00
|
|
|
firstChild->HandleEvent(aPresContext, aEvent, aEventStatus);
|
|
|
|
else
|
|
|
|
nsFrame::HandleEvent(aPresContext, aEvent, aEventStatus);
|
1998-09-09 02:34:40 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
2000-03-22 05:43:08 +03:00
|
|
|
NS_IMETHODIMP
|
2000-04-19 06:13:43 +04:00
|
|
|
CanvasFrame::GetFrameForPoint(nsIPresContext* aPresContext,
|
|
|
|
const nsPoint& aPoint,
|
|
|
|
nsFramePaintLayer aWhichLayer,
|
|
|
|
nsIFrame** aFrame)
|
2000-03-22 05:43:08 +03:00
|
|
|
{
|
|
|
|
// this should act like a block, so we need to override
|
|
|
|
return GetFrameForPointUsing(aPresContext, aPoint, nsnull, aWhichLayer, (aWhichLayer == NS_FRAME_PAINT_LAYER_BACKGROUND), aFrame);
|
|
|
|
}
|
|
|
|
|
2003-10-31 23:19:18 +03:00
|
|
|
nsIAtom*
|
|
|
|
CanvasFrame::GetType() const
|
1999-02-14 06:47:33 +03:00
|
|
|
{
|
2003-10-31 23:19:18 +03:00
|
|
|
return nsLayoutAtoms::canvasFrame;
|
1999-02-14 06:47:33 +03:00
|
|
|
}
|
|
|
|
|
2001-05-19 03:08:00 +04:00
|
|
|
NS_IMETHODIMP
|
|
|
|
CanvasFrame::GetContentForEvent(nsIPresContext* aPresContext,
|
|
|
|
nsEvent* aEvent,
|
|
|
|
nsIContent** aContent)
|
|
|
|
{
|
|
|
|
NS_ENSURE_ARG_POINTER(aContent);
|
|
|
|
nsresult rv = nsFrame::GetContentForEvent(aPresContext,
|
|
|
|
aEvent,
|
|
|
|
aContent);
|
|
|
|
if (NS_FAILED(rv) || !*aContent) {
|
|
|
|
nsIFrame* kid = mFrames.FirstChild();
|
|
|
|
if (kid) {
|
|
|
|
rv = kid->GetContentForEvent(aPresContext,
|
|
|
|
aEvent,
|
|
|
|
aContent);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
|
1999-11-02 01:12:45 +03:00
|
|
|
#ifdef DEBUG
|
1998-11-13 05:20:31 +03:00
|
|
|
NS_IMETHODIMP
|
2001-11-14 04:33:42 +03:00
|
|
|
CanvasFrame::GetFrameName(nsAString& aResult) const
|
1998-11-13 05:20:31 +03:00
|
|
|
{
|
2001-11-14 04:33:42 +03:00
|
|
|
return MakeFrameName(NS_LITERAL_STRING("Canvas"), aResult);
|
1998-11-13 05:20:31 +03:00
|
|
|
}
|
1999-09-01 05:02:16 +04:00
|
|
|
#endif
|