Change nsIPresContext to nsPresContext globally, follow-up to bug 253470. rs=roc

This commit is contained in:
bryner%brianryner.com 2004-07-31 23:15:21 +00:00
Родитель 97d85a384b
Коммит cc807b07b1
746 изменённых файлов: 6863 добавлений и 26054 удалений

Просмотреть файл

@ -75,7 +75,7 @@ nsAccessibleHyperText::nsAccessibleHyperText(nsIDOMNode* aDomNode, nsIWeakRefere
nsIFrame *parentFrame = nsAccessible::GetParentBlockFrame(frame);
NS_ASSERTION(parentFrame, "Error: HyperText can't get parent block frame");
if (parentFrame) {
nsCOMPtr<nsIPresContext> presContext;
nsCOMPtr<nsPresContext> presContext;
shell->GetPresContext(getter_AddRefs(presContext));
nsIFrame* childFrame = parentFrame->GetFirstChild(nsnull);
PRBool bSave = PR_FALSE;
@ -90,7 +90,7 @@ void nsAccessibleHyperText::Shutdown()
mTextChildren = nsnull;
}
PRBool nsAccessibleHyperText::GetAllTextChildren(nsIPresContext *aPresContext, nsIFrame *aCurFrame, nsIDOMNode* aNode, PRBool &bSave)
PRBool nsAccessibleHyperText::GetAllTextChildren(nsPresContext *aPresContext, nsIFrame *aCurFrame, nsIDOMNode* aNode, PRBool &bSave)
{
if (! aCurFrame)
return PR_FALSE;

Просмотреть файл

@ -65,7 +65,7 @@ protected:
nsCOMPtr<nsISupportsArray> mTextChildren;
PRInt32 mIndex;
PRBool GetAllTextChildren(nsIPresContext *aPresContext, nsIFrame *aCurFrame, nsIDOMNode* aNode, PRBool &bSave);
PRBool GetAllTextChildren(nsPresContext *aPresContext, nsIFrame *aCurFrame, nsIDOMNode* aNode, PRBool &bSave);
nsIDOMNode* FindTextNodeByOffset(PRInt32 aOffset, PRInt32& aBeforeLength);
nsresult GetTextHelper(EGetTextType aType, nsAccessibleTextBoundary aBoundaryType,
PRInt32 aOffset, PRInt32 *aStartOffset, PRInt32 *aEndOffset, nsAString & aText);

Просмотреть файл

@ -104,7 +104,7 @@ nsresult nsAccessibleText::GetSelections(nsISelectionController **aSelCon, nsISe
// Get the selection and selection controller
nsCOMPtr<nsISelectionController> selCon;
nsCOMPtr<nsISelection> domSel;
nsCOMPtr<nsIPresContext> context;
nsCOMPtr<nsPresContext> context;
shell->GetPresContext(getter_AddRefs(context));
frame->GetSelectionController(context, getter_AddRefs(selCon));
if (selCon)
@ -648,7 +648,7 @@ NS_IMETHODIMP nsAccessibleText::GetCharacterExtents(PRInt32 aOffset,
nsIPresShell *shell = doc->GetShellAt(0);
NS_ENSURE_TRUE(shell, NS_ERROR_FAILURE);
nsCOMPtr<nsIPresContext> context;
nsCOMPtr<nsPresContext> context;
shell->GetPresContext(getter_AddRefs(context));
NS_ENSURE_TRUE(context, NS_ERROR_FAILURE);

Просмотреть файл

@ -53,7 +53,7 @@
#include "nsIFrame.h"
#include "nsIPrefService.h"
#include "nsIPrefBranch.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsIPresShell.h"
#include "nsIServiceManager.h"
#include "nsIStringBundle.h"
@ -230,13 +230,13 @@ already_AddRefed<nsIPresShell> nsAccessNode::GetPresShell()
return resultShell;
}
already_AddRefed<nsIPresContext> nsAccessNode::GetPresContext()
already_AddRefed<nsPresContext> nsAccessNode::GetPresContext()
{
nsCOMPtr<nsIPresShell> presShell(GetPresShell());
if (!presShell) {
return nsnull;
}
nsIPresContext *presContext;
nsPresContext *presContext;
presShell->GetPresContext(&presContext); // Addref'd
return presContext;
}
@ -412,7 +412,7 @@ NS_IMETHODIMP
nsAccessNode::GetComputedStyleValue(const nsAString& aPseudoElt, const nsAString& aPropertyName, nsAString& aValue)
{
nsCOMPtr<nsIDOMElement> domElement(do_QueryInterface(mDOMNode));
nsCOMPtr<nsIPresContext> presContext(GetPresContext());
nsCOMPtr<nsPresContext> presContext(GetPresContext());
NS_ENSURE_TRUE(domElement && presContext, NS_ERROR_FAILURE);
nsCOMPtr<nsISupports> container = presContext->GetContainer();

Просмотреть файл

@ -53,7 +53,7 @@
#include "nsInterfaceHashtable.h"
class nsIPresShell;
class nsIPresContext;
class nsPresContext;
class nsIAccessibleDocument;
class nsIFrame;
class nsIDOMNodeList;
@ -122,7 +122,7 @@ class nsAccessNode: public nsIAccessNode, public nsPIAccessNode
protected:
nsresult MakeAccessNode(nsIDOMNode *aNode, nsIAccessNode **aAccessNode);
already_AddRefed<nsIPresShell> GetPresShell();
already_AddRefed<nsIPresContext> GetPresContext();
already_AddRefed<nsPresContext> GetPresContext();
already_AddRefed<nsIAccessibleDocument> GetDocAccessible();
virtual nsIFrame* GetFrame();

Просмотреть файл

@ -65,7 +65,7 @@
#include "nsINameSpaceManager.h"
#include "nsIObserverService.h"
#include "nsIPluginInstance.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsIPresShell.h"
#include "nsITextContent.h"
#include "nsIWebNavigation.h"
@ -523,7 +523,7 @@ nsAccessibilityService::CreateHTMLCheckboxAccessibleXBL(nsIDOMNode *aNode, nsIAc
NS_IMETHODIMP
nsAccessibilityService::CreateHTMLComboboxAccessible(nsIDOMNode* aDOMNode, nsISupports* aPresContext, nsIAccessible **_retval)
{
nsCOMPtr<nsIPresContext> presContext(do_QueryInterface(aPresContext));
nsCOMPtr<nsPresContext> presContext(do_QueryInterface(aPresContext));
NS_ASSERTION(presContext,"Error non prescontext passed to accessible factory!!!");
nsCOMPtr<nsIWeakReference> weakShell =
@ -590,7 +590,7 @@ nsAccessibilityService::CreateHTMLGroupboxAccessible(nsISupports *aFrame, nsIAcc
NS_IMETHODIMP
nsAccessibilityService::CreateHTMLListboxAccessible(nsIDOMNode* aDOMNode, nsISupports* aPresContext, nsIAccessible **_retval)
{
nsCOMPtr<nsIPresContext> presContext(do_QueryInterface(aPresContext));
nsCOMPtr<nsPresContext> presContext(do_QueryInterface(aPresContext));
NS_ASSERTION(presContext,"Error non prescontext passed to accessible factory!!!");
nsCOMPtr<nsIWeakReference> weakShell =
@ -701,7 +701,7 @@ nsAccessibilityService::CreateHTMLSelectOptionAccessible(nsIDOMNode* aDOMNode,
nsISupports* aPresContext,
nsIAccessible **_retval)
{
nsCOMPtr<nsIPresContext> presContext(do_QueryInterface(aPresContext));
nsCOMPtr<nsPresContext> presContext(do_QueryInterface(aPresContext));
NS_ASSERTION(presContext,"Error non prescontext passed to accessible factory!!!");
nsCOMPtr<nsIWeakReference> weakShell =
@ -839,7 +839,7 @@ nsAccessibilityService::CreateHTMLTextAccessible(nsISupports *aFrame, nsIAccessi
return NS_ERROR_FAILURE;
nsCOMPtr<nsIPresShell> presShell(do_QueryReferent(weakShell));
nsCOMPtr<nsIPresContext> presContext;
nsCOMPtr<nsPresContext> presContext;
presShell->GetPresContext(getter_AddRefs(presContext));
nsIFrame* childFrame = parentFrame->GetFirstChild(nsnull);
PRInt32 index = 0;

Просмотреть файл

@ -42,7 +42,7 @@
#include "nsIDocument.h"
#include "nsIImageDocument.h"
#include "nsIPresShell.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsIContent.h"
#include "nsIFrame.h"
#include "nsIScrollableView.h"
@ -514,7 +514,7 @@ PRBool nsAccessible::IsPartiallyVisible(PRBool *aIsOffscreen)
return PR_FALSE;
}
nsCOMPtr<nsIPresContext> presContext;
nsCOMPtr<nsPresContext> presContext;
shell->GetPresContext(getter_AddRefs(presContext));
if (!presContext)
return PR_FALSE;
@ -636,7 +636,7 @@ NS_IMETHODIMP nsAccessible::GetChildAtPoint(PRInt32 tx, PRInt32 ty, nsIAccessibl
return NS_ERROR_FAILURE;
}
void nsAccessible::GetScreenOrigin(nsIPresContext *aPresContext, nsIFrame *aFrame, nsRect *aRect)
void nsAccessible::GetScreenOrigin(nsPresContext *aPresContext, nsIFrame *aFrame, nsRect *aRect)
{
aRect->x = aRect->y = 0;
@ -803,7 +803,7 @@ NS_IMETHODIMP nsAccessible::GetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PR
// Another frame, same node <- Example
// Another frame, same node
nsCOMPtr<nsIPresContext> presContext(GetPresContext());
nsCOMPtr<nsPresContext> presContext(GetPresContext());
if (!presContext)
{
*x = *y = *width = *height = 0;
@ -940,7 +940,7 @@ NS_IMETHODIMP nsAccessible::TakeFocus()
if (!content) {
return NS_ERROR_FAILURE;
}
content->SetFocus(nsCOMPtr<nsIPresContext>(GetPresContext()));
content->SetFocus(nsCOMPtr<nsPresContext>(GetPresContext()));
return NS_OK;
}
@ -1418,7 +1418,7 @@ nsresult nsAccessible::GetParentBlockNode(nsIPresShell *aPresShell, nsIDOMNode *
if (! parentFrame)
return NS_ERROR_FAILURE;
nsCOMPtr<nsIPresContext> presContext;
nsCOMPtr<nsPresContext> presContext;
aPresShell->GetPresContext(getter_AddRefs(presContext));
nsIAtom* frameType = nsnull;
while (frame && (frameType = frame->GetType()) != nsAccessibilityAtoms::textFrame) {
@ -1459,7 +1459,7 @@ nsIFrame* nsAccessible::GetParentBlockFrame(nsIFrame *aFrame)
return frame;
}
PRBool nsAccessible::FindTextFrame(PRInt32 &index, nsIPresContext *aPresContext, nsIFrame *aCurFrame,
PRBool nsAccessible::FindTextFrame(PRInt32 &index, nsPresContext *aPresContext, nsIFrame *aCurFrame,
nsIFrame **aFirstTextFrame, const nsIFrame *aTextFrame)
// Do a depth-first traversal to find the given text frame(aTextFrame)'s index of the block frame(aCurFrame)
// it belongs to, also return the first text frame within the same block.

Просмотреть файл

@ -79,7 +79,7 @@ public:
#ifdef MOZ_ACCESSIBILITY_ATK
static nsresult GetParentBlockNode(nsIPresShell *aPresShell, nsIDOMNode *aCurrentNode, nsIDOMNode **aBlockNode);
static nsIFrame* GetParentBlockFrame(nsIFrame *aFrame);
static PRBool FindTextFrame(PRInt32 &index, nsIPresContext *aPresContext, nsIFrame *aCurFrame,
static PRBool FindTextFrame(PRInt32 &index, nsPresContext *aPresContext, nsIFrame *aCurFrame,
nsIFrame **aFirstTextFrame, const nsIFrame *aTextFrame);
#endif
@ -105,7 +105,7 @@ protected:
static nsresult GetFullKeyName(const nsAString& aModifierName, const nsAString& aKeyName, nsAString& aStringOut);
static nsresult GetTranslatedString(const nsAString& aKey, nsAString& aStringOut);
void GetScrollOffset(nsRect *aRect);
void GetScreenOrigin(nsIPresContext *aPresContext, nsIFrame *aFrame, nsRect *aRect);
void GetScreenOrigin(nsPresContext *aPresContext, nsIFrame *aFrame, nsRect *aRect);
nsresult AppendFlatStringFromSubtreeRecurse(nsIContent *aContent, nsAString *aFlatString);
virtual void CacheChildren(PRBool aWalkAnonContent);

Просмотреть файл

@ -42,7 +42,7 @@
#include "nsAccessibleWrap.h"
#include "nsGUIEvent.h"
#include "nsILink.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsIPresShell.h"
#include "nsIServiceManager.h"
@ -162,7 +162,7 @@ NS_IMPL_ISUPPORTS_INHERITED0(nsLinkableAccessible, nsAccessible)
NS_IMETHODIMP nsLinkableAccessible::TakeFocus()
{
if (IsALink()) {
mLinkContent->SetFocus(nsCOMPtr<nsIPresContext>(GetPresContext()));
mLinkContent->SetFocus(nsCOMPtr<nsPresContext>(GetPresContext()));
}
return NS_OK;
@ -244,7 +244,7 @@ NS_IMETHODIMP nsLinkableAccessible::DoAction(PRUint8 index)
// Action 0 (default action): Jump to link
if (index == eAction_Jump) {
if (IsALink()) {
nsCOMPtr<nsIPresContext> presContext(GetPresContext());
nsCOMPtr<nsPresContext> presContext(GetPresContext());
if (presContext) {
nsMouseEvent linkClickEvent(NS_MOUSE_LEFT_CLICK);
@ -329,7 +329,7 @@ NS_IMETHODIMP nsGenericAccessible::TakeFocus()
return NS_ERROR_FAILURE; // Node already shut down
}
content->SetFocus(nsCOMPtr<nsIPresContext>(GetPresContext()));
content->SetFocus(nsCOMPtr<nsPresContext>(GetPresContext()));
return NS_OK;
}

Просмотреть файл

@ -105,7 +105,7 @@ NS_IMETHODIMP nsCaretAccessible::AttachNewSelectionListener(nsIDOMNode *aCurrent
nsIFrame *frame = nsnull;
presShell->GetPrimaryFrameFor(content, &frame);
nsCOMPtr<nsIPresContext> presContext;
nsCOMPtr<nsPresContext> presContext;
presShell->GetPresContext(getter_AddRefs(presContext));
if (!frame || !presContext)
return NS_ERROR_FAILURE;
@ -160,7 +160,7 @@ NS_IMETHODIMP nsCaretAccessible::NotifySelectionChanged(nsIDOMDocument *aDoc, ns
nsIAccessibleEvent::EVENT_HIDE, this, nsnull);
}
nsCOMPtr<nsIPresContext> presContext;
nsCOMPtr<nsPresContext> presContext;
presShell->GetPresContext(getter_AddRefs(presContext));
nsIViewManager* viewManager = presShell->GetViewManager();
if (!presContext || !viewManager)

Просмотреть файл

@ -516,7 +516,7 @@ nsresult nsDocAccessible::AddEventListeners()
}
}
nsCOMPtr<nsIPresContext> context;
nsCOMPtr<nsPresContext> context;
presShell->GetPresContext(getter_AddRefs(context));
NS_ENSURE_TRUE(context, NS_ERROR_FAILURE);

Просмотреть файл

@ -114,7 +114,7 @@ NS_IMETHODIMP nsHTMLAreaAccessible::GetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *w
*x = *y = *width = *height = 0;
nsCOMPtr<nsIPresContext> presContext(GetPresContext());
nsCOMPtr<nsPresContext> presContext(GetPresContext());
NS_ENSURE_TRUE(presContext, NS_ERROR_FAILURE);
nsCOMPtr<nsIContent> ourContent(do_QueryInterface(mDOMNode));

Просмотреть файл

@ -353,7 +353,7 @@ NS_IMETHODIMP nsHTMLTextFieldAccessible::GetState(PRUint32 *_retval)
nsIFrame *frame = GetFrame();
if (frame) {
nsCOMPtr<nsIPresContext> context(GetPresContext());
nsCOMPtr<nsPresContext> context(GetPresContext());
NS_ENSURE_TRUE(context, NS_ERROR_FAILURE);
nsCOMPtr<nsISelectionController> selCon;
frame->GetSelectionController(context,getter_AddRefs(selCon));

Просмотреть файл

@ -113,7 +113,7 @@ void nsHTMLSelectableAccessible::iterator::CalcSelectionCount(PRInt32 *aSelectio
void nsHTMLSelectableAccessible::iterator::AddAccessibleIfSelected(nsIAccessibilityService *aAccService,
nsIMutableArray *aSelectedAccessibles,
nsIPresContext *aContext)
nsPresContext *aContext)
{
PRBool isSelected = PR_FALSE;
nsCOMPtr<nsIAccessible> tempAccess;
@ -132,7 +132,7 @@ void nsHTMLSelectableAccessible::iterator::AddAccessibleIfSelected(nsIAccessibil
PRBool nsHTMLSelectableAccessible::iterator::GetAccessibleIfSelected(PRInt32 aIndex,
nsIAccessibilityService *aAccService,
nsIPresContext *aContext,
nsPresContext *aContext,
nsIAccessible **aAccessible)
{
PRBool isSelected = PR_FALSE;
@ -211,7 +211,7 @@ NS_IMETHODIMP nsHTMLSelectableAccessible::GetSelectedChildren(nsIArray **_retval
if (!selectedAccessibles)
return NS_ERROR_OUT_OF_MEMORY;
nsCOMPtr<nsIPresContext> context(GetPresContext());
nsCOMPtr<nsPresContext> context(GetPresContext());
if (!context)
return NS_ERROR_FAILURE;
@ -237,7 +237,7 @@ NS_IMETHODIMP nsHTMLSelectableAccessible::RefSelection(PRInt32 aIndex, nsIAccess
if (!accService)
return NS_ERROR_FAILURE;
nsCOMPtr<nsIPresContext> context(GetPresContext());
nsCOMPtr<nsPresContext> context(GetPresContext());
if (!context)
return NS_ERROR_FAILURE;
@ -1098,7 +1098,7 @@ NS_IMETHODIMP nsHTMLComboboxButtonAccessible::GetNumActions(PRUint8 *aNumActions
NS_IMETHODIMP nsHTMLComboboxButtonAccessible::DoAction(PRUint8 aIndex)
{
nsIFrame* frame = nsAccessible::GetBoundsFrame();
nsCOMPtr<nsIPresContext> context(GetPresContext());
nsCOMPtr<nsPresContext> context(GetPresContext());
if (!frame || !context)
return NS_ERROR_FAILURE;
@ -1158,7 +1158,7 @@ void nsHTMLComboboxButtonAccessible::GetBoundsRect(nsRect& aBounds, nsIFrame** a
// bounding frame is the ComboboxControlFrame
nsIFrame *frame = nsAccessible::GetBoundsFrame();
*aBoundingFrame = frame;
nsCOMPtr<nsIPresContext> context(GetPresContext());
nsCOMPtr<nsPresContext> context(GetPresContext());
if (!frame || !context)
return;

Просмотреть файл

@ -104,8 +104,8 @@ protected:
void Select(PRBool aSelect);
void AddAccessibleIfSelected(nsIAccessibilityService *aAccService,
nsIMutableArray *aSelectedAccessibles,
nsIPresContext *aContext);
PRBool GetAccessibleIfSelected(PRInt32 aIndex, nsIAccessibilityService *aAccService, nsIPresContext *aContext, nsIAccessible **_retval);
nsPresContext *aContext);
PRBool GetAccessibleIfSelected(PRInt32 aIndex, nsIAccessibilityService *aAccService, nsPresContext *aContext, nsIAccessible **_retval);
PRBool Advance();
};

Просмотреть файл

@ -42,7 +42,7 @@
#include "nsBulletFrame.h"
#include "nsIAccessibleDocument.h"
#include "nsIFrame.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsIPresShell.h"
#include "nsISelection.h"
#include "nsISelectionController.h"
@ -82,7 +82,7 @@ NS_IMETHODIMP nsHTMLTextAccessible::GetState(PRUint32 *aState)
return NS_ERROR_FAILURE;
}
nsCOMPtr<nsIPresContext> context;
nsCOMPtr<nsPresContext> context;
shell->GetPresContext(getter_AddRefs(context));
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
nsIFrame *frame = nsnull;

Просмотреть файл

@ -44,7 +44,7 @@
#include "nsIAccessibleDocument.h"
#include "nsIDOMRange.h"
#include "nsIFrame.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsIPresShell.h"
#include "nsIRenderingContext.h"
#include "nsISelection.h"
@ -172,7 +172,7 @@ STDMETHODIMP nsTextAccessibleWrap::scrollToSubstring(
return E_FAIL; // This accessible has been shut down
}
nsCOMPtr<nsIPresContext> presContext;
nsCOMPtr<nsPresContext> presContext;
presShell->GetPresContext(getter_AddRefs(presContext));
nsCOMPtr<nsIDOMRange> scrollToRange = do_CreateInstance(kRangeCID);
nsCOMPtr<nsISelectionController> selCon;
@ -200,7 +200,7 @@ STDMETHODIMP nsTextAccessibleWrap::scrollToSubstring(
}
nsIFrame* nsTextAccessibleWrap::GetPointFromOffset(nsIFrame *aContainingFrame,
nsIPresContext *aPresContext,
nsPresContext *aPresContext,
nsIRenderingContext *aRendContext,
PRInt32 aOffset,
nsPoint& aOutPoint)
@ -226,7 +226,7 @@ nsresult nsTextAccessibleWrap::GetCharacterExtents(PRInt32 aStartOffset, PRInt32
nsCOMPtr<nsIPresShell> presShell(GetPresShell());
NS_ENSURE_TRUE(presShell, NS_ERROR_FAILURE);
nsCOMPtr<nsIPresContext> presContext;
nsCOMPtr<nsPresContext> presContext;
presShell->GetPresContext(getter_AddRefs(presContext));
NS_ENSURE_TRUE(presContext, NS_ERROR_FAILURE);
float t2p = presContext->TwipsToPixels();

Просмотреть файл

@ -45,7 +45,7 @@
#include "nsRect.h"
class nsIFrame;
class nsIPresContext;
class nsPresContext;
class nsIRenderingContext;
class nsTextAccessibleWrap : public nsTextAccessible,
@ -89,7 +89,7 @@ class nsTextAccessibleWrap : public nsTextAccessible,
PRInt32* aWidth, PRInt32* aHeight);
// Return child frame containing offset on success
nsIFrame* GetPointFromOffset(nsIFrame *aContainingFrame, nsIPresContext *aPresContext,
nsIFrame* GetPointFromOffset(nsIFrame *aContainingFrame, nsPresContext *aPresContext,
nsIRenderingContext *aRenderingContext,
PRInt32 aOffset, nsPoint& aOutPoint);
};

Просмотреть файл

@ -47,7 +47,7 @@
// Forward declarations
class nsIAtom;
class nsIDocument;
class nsIPresContext;
class nsPresContext;
class nsVoidArray;
class nsIDOMEvent;
class nsIContent;
@ -379,7 +379,7 @@ public:
* @param aEventStatus the status returned from the function. Generally
* nsEventStatus_eIgnore
*/
virtual nsresult HandleDOMEvent(nsIPresContext* aPresContext,
virtual nsresult HandleDOMEvent(nsPresContext* aPresContext,
nsEvent* aEvent, nsIDOMEvent** aDOMEvent,
PRUint32 aFlags,
nsEventStatus* aEventStatus) = 0;
@ -416,7 +416,7 @@ public:
* @param aPresContext the pres context
* @see nsGenericHTMLElement::SetElementFocus()
*/
virtual void SetFocus(nsIPresContext* aPresContext)
virtual void SetFocus(nsPresContext* aPresContext)
{
}
@ -431,7 +431,7 @@ public:
* @param aPresContext the pres context
* @see nsGenericHTMLElement::SetElementFocus()
*/
virtual void RemoveFocus(nsIPresContext* aPresContext)
virtual void RemoveFocus(nsPresContext* aPresContext)
{
}

Просмотреть файл

@ -55,7 +55,7 @@
class nsIAtom;
class nsIContent;
class nsIPresContext;
class nsPresContext;
class nsIPresShell;
class nsIStreamListener;
@ -296,7 +296,7 @@ public:
* presentation context (presentation contexts <b>must not</b> be
* shared among multiple presentation shells).
*/
virtual nsresult CreateShell(nsIPresContext* aContext,
virtual nsresult CreateShell(nsPresContext* aContext,
nsIViewManager* aViewManager,
nsStyleSet* aStyleSet,
nsIPresShell** aInstancePtrResult) = 0;
@ -517,7 +517,7 @@ public:
virtual void StyleRuleRemoved(nsIStyleSheet* aStyleSheet,
nsIStyleRule* aStyleRule) = 0;
virtual nsresult HandleDOMEvent(nsIPresContext* aPresContext,
virtual nsresult HandleDOMEvent(nsPresContext* aPresContext,
nsEvent* aEvent, nsIDOMEvent** aDOMEvent,
PRUint32 aFlags,
nsEventStatus* aEventStatus) = 0;

Просмотреть файл

@ -1,71 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* 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/
*
* 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.
*
* The Original Code is Mozilla Communicator client code.
*
* 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.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* 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"),
* 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 MPL, 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 MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsIDocumentViewer_h___
#define nsIDocumentViewer_h___
#include "nsIContentViewer.h"
class nsIDocument;
class nsIPresContext;
class nsIPresShell;
class nsIStyleSheet;
#define NS_IDOCUMENT_VIEWER_IID \
{ 0xa6cf9057, 0x15b3, 0x11d2,{0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}
/**
* A document viewer is a kind of content viewer that uses NGLayout
* to manage the presentation of the content.
*/
class nsIDocumentViewer : public nsIContentViewer
{
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOCUMENT_VIEWER_IID)
NS_IMETHOD SetUAStyleSheet(nsIStyleSheet* aUAStyleSheet) = 0;
NS_IMETHOD GetDocument(nsIDocument** aResult) = 0;
NS_IMETHOD GetPresShell(nsIPresShell** aResult) = 0;
NS_IMETHOD GetPresContext(nsIPresContext** aResult) = 0;
NS_IMETHOD CreateDocumentViewerUsing(nsIPresContext* aPresContext,
nsIDocumentViewer** aResult) = 0;
};
#endif /* nsIDocumentViewer_h___ */

Просмотреть файл

@ -42,7 +42,7 @@
#include "nsISupports.h"
class nsIStyleSheet;
class nsIPresContext;
class nsPresContext;
class nsIContent;
struct nsRuleData;

Просмотреть файл

@ -40,13 +40,13 @@
#include <stdio.h>
#include "nsISupports.h"
#include "nsIPresContext.h" // for nsCompatability
#include "nsPresContext.h" // for nsCompatability
#include "nsILinkHandler.h"
#include "nsString.h"
#include "nsChangeHint.h"
class nsIStyleSheet;
class nsIPresContext;
class nsPresContext;
class nsIContent;
class nsIStyledContent;
class nsISupportsArray;
@ -58,7 +58,7 @@ class nsRuleWalker;
// nsCSSStyleSheet.cpp.
struct RuleProcessorData {
RuleProcessorData(nsIPresContext* aPresContext,
RuleProcessorData(nsPresContext* aPresContext,
nsIContent* aContent,
nsRuleWalker* aRuleWalker,
nsCompatibility* aCompat = nsnull);
@ -66,17 +66,17 @@ struct RuleProcessorData {
// NOTE: not |virtual|
~RuleProcessorData();
void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
void* operator new(size_t sz, nsPresContext* aContext) CPP_THROW_NEW {
return aContext->AllocateFromShell(sz);
}
void Destroy(nsIPresContext* aContext) {
void Destroy(nsPresContext* aContext) {
this->~RuleProcessorData();
aContext->FreeToShell(sizeof(RuleProcessorData), this);
};
const nsString* GetLang();
nsIPresContext* mPresContext;
nsPresContext* mPresContext;
nsIContent* mContent; // weak ref
nsIContent* mParentContent; // if content, content->GetParent(); weak ref
nsRuleWalker* mRuleWalker; // Used to add rules to our results.
@ -102,7 +102,7 @@ protected:
};
struct ElementRuleProcessorData : public RuleProcessorData {
ElementRuleProcessorData(nsIPresContext* aPresContext,
ElementRuleProcessorData(nsPresContext* aPresContext,
nsIContent* aContent,
nsRuleWalker* aRuleWalker)
: RuleProcessorData(aPresContext,aContent,aRuleWalker)
@ -113,7 +113,7 @@ struct ElementRuleProcessorData : public RuleProcessorData {
};
struct PseudoRuleProcessorData : public RuleProcessorData {
PseudoRuleProcessorData(nsIPresContext* aPresContext,
PseudoRuleProcessorData(nsPresContext* aPresContext,
nsIContent* aParentContent,
nsIAtom* aPseudoTag,
nsICSSPseudoComparator* aComparator,
@ -131,7 +131,7 @@ struct PseudoRuleProcessorData : public RuleProcessorData {
};
struct StateRuleProcessorData : public RuleProcessorData {
StateRuleProcessorData(nsIPresContext* aPresContext,
StateRuleProcessorData(nsPresContext* aPresContext,
nsIContent* aContent,
PRInt32 aStateMask)
: RuleProcessorData(aPresContext, aContent, nsnull),
@ -144,7 +144,7 @@ struct StateRuleProcessorData : public RuleProcessorData {
};
struct AttributeRuleProcessorData : public RuleProcessorData {
AttributeRuleProcessorData(nsIPresContext* aPresContext,
AttributeRuleProcessorData(nsPresContext* aPresContext,
nsIContent* aContent,
nsIAtom* aAttribute,
PRInt32 aModType)

Просмотреть файл

@ -45,7 +45,7 @@ class nsString;
class nsIURI;
class nsIStyleRule;
class nsISupportsArray;
class nsIPresContext;
class nsPresContext;
class nsIContent;
class nsIDocument;
class nsIStyleRuleProcessor;

Просмотреть файл

@ -87,7 +87,7 @@
#include "nsIImage.h"
#include "nsIDocument.h"
#include "nsIPresShell.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsIScriptGlobalObject.h"
#include "nsIDocShellTreeItem.h"
#include "nsIFrame.h"

Просмотреть файл

@ -52,7 +52,7 @@ class nsISelection;
class nsITransferable;
class nsIImage;
class nsIPresShell;
class nsIPresContext;
class nsPresContext;
class nsIContent;
class nsIDocument;
class nsIURI;

Просмотреть файл

@ -50,7 +50,7 @@
#include "nsISupportsArray.h"
#include "nsIFocusTracker.h"
#include "nsCOMPtr.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsIComponentManager.h"
#include "nsContentCID.h"
#include "nsLayoutCID.h"

Просмотреть файл

@ -55,7 +55,7 @@
#include "nsIParser.h"
#include "nsContentErrors.h"
#include "nsIPresShell.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsIViewManager.h"
#include "nsIScrollableView.h"
#include "nsIContentViewer.h"
@ -942,7 +942,7 @@ nsContentSink::StartLayout(PRBool aIsFrameset)
shell->BeginObservingDocument();
// Resize-reflow this time
nsCOMPtr<nsIPresContext> cx;
nsCOMPtr<nsPresContext> cx;
shell->GetPresContext(getter_AddRefs(cx));
nsRect r = cx->GetVisibleArea();
shell->InitialReflow(r.width, r.height);

Просмотреть файл

@ -79,7 +79,7 @@
#include "nsDOMError.h"
#include "nsIScrollableView.h"
#include "nsIPresShell.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsContentUtils.h"
#include "nsNodeInfoManager.h"
#include "nsIXBLService.h"
@ -397,7 +397,7 @@ nsDOMImplementation::CreateDocument(const nsAString& aNamespaceURI,
nsIDocShell *docShell = nsContentUtils::GetDocShellFromCaller();
if (docShell) {
nsCOMPtr<nsIPresContext> presContext;
nsCOMPtr<nsPresContext> presContext;
docShell->GetPresContext(getter_AddRefs(presContext));
if (presContext) {
nsCOMPtr<nsISupports> container = presContext->GetContainer();
@ -1268,7 +1268,7 @@ nsDocument::TryChannelCharset(nsIChannel *aChannel,
}
nsresult
nsDocument::CreateShell(nsIPresContext* aContext, nsIViewManager* aViewManager,
nsDocument::CreateShell(nsPresContext* aContext, nsIViewManager* aViewManager,
nsStyleSet* aStyleSet,
nsIPresShell** aInstancePtrResult)
{
@ -1280,7 +1280,7 @@ nsDocument::CreateShell(nsIPresContext* aContext, nsIViewManager* aViewManager,
}
nsresult
nsDocument::doCreateShell(nsIPresContext* aContext,
nsDocument::doCreateShell(nsPresContext* aContext,
nsIViewManager* aViewManager, nsStyleSet* aStyleSet,
nsCompatibility aCompatMode,
nsIPresShell** aInstancePtrResult)
@ -1995,7 +1995,7 @@ nsDocument::EndLoad()
nsIPresShell *shell = ancestor_doc->GetShellAt(0);
if (shell) {
nsCOMPtr<nsIPresContext> context;
nsCOMPtr<nsPresContext> context;
shell->GetPresContext(getter_AddRefs(context));
if (context) {
@ -2788,7 +2788,7 @@ nsDocument::GetDefaultView(nsIDOMAbstractView** aDefaultView)
mPresShells.ElementAt(0));
NS_ENSURE_TRUE(shell, NS_OK);
nsCOMPtr<nsIPresContext> ctx;
nsCOMPtr<nsPresContext> ctx;
nsresult rv = shell->GetPresContext(getter_AddRefs(ctx));
NS_ENSURE_TRUE(NS_SUCCEEDED(rv) && ctx, rv);
@ -2833,7 +2833,7 @@ nsDocument::SetTitle(const nsAString& aTitle)
nsCOMPtr<nsIPresShell> shell =
NS_STATIC_CAST(nsIPresShell*, mPresShells[i]);
nsCOMPtr<nsIPresContext> context;
nsCOMPtr<nsPresContext> context;
nsresult rv = shell->GetPresContext(getter_AddRefs(context));
NS_ENSURE_SUCCESS(rv, rv);
@ -2986,7 +2986,7 @@ nsDocument::GetDir(nsAString& aDirection)
{
nsCOMPtr<nsIPresShell> shell = (nsIPresShell*)mPresShells.SafeElementAt(0);
if (shell) {
nsCOMPtr<nsIPresContext> context;
nsCOMPtr<nsPresContext> context;
shell->GetPresContext(getter_AddRefs(context));
if (context) {
PRUint32 options = context->GetBidi();
@ -3017,7 +3017,7 @@ nsDocument::SetDir(const nsAString& aDirection)
return NS_OK;
}
nsCOMPtr<nsIPresContext> context;
nsCOMPtr<nsPresContext> context;
shell->GetPresContext(getter_AddRefs(context));
NS_ENSURE_TRUE(context, NS_ERROR_UNEXPECTED);
@ -3788,7 +3788,7 @@ nsDocument::GetSystemEventGroup(nsIDOMEventGroup **aGroup)
}
nsresult
nsDocument::HandleDOMEvent(nsIPresContext* aPresContext, nsEvent* aEvent,
nsDocument::HandleDOMEvent(nsPresContext* aPresContext, nsEvent* aEvent,
nsIDOMEvent** aDOMEvent, PRUint32 aFlags,
nsEventStatus* aEventStatus)
{
@ -3920,7 +3920,7 @@ nsDocument::DispatchEvent(nsIDOMEvent* aEvent, PRBool *_retval)
return NS_ERROR_FAILURE;
// Retrieve the context
nsCOMPtr<nsIPresContext> presContext;
nsCOMPtr<nsPresContext> presContext;
shell->GetPresContext(getter_AddRefs(presContext));
return presContext->EventStateManager()->
@ -3984,7 +3984,7 @@ nsDocument::CreateEvent(const nsAString& aEventType, nsIDOMEvent** aReturn)
// Obtain a presentation context
nsIPresShell *shell = GetShellAt(0);
nsCOMPtr<nsIPresContext> presContext;
nsCOMPtr<nsPresContext> presContext;
if (shell) {
// Retrieve the context

Просмотреть файл

@ -279,7 +279,7 @@ public:
* it's presentation context (presentation context's <b>must not</b> be
* shared among multiple presentation shell's).
*/
virtual nsresult CreateShell(nsIPresContext* aContext,
virtual nsresult CreateShell(nsPresContext* aContext,
nsIViewManager* aViewManager,
nsStyleSet* aStyleSet,
nsIPresShell** aInstancePtrResult);
@ -416,7 +416,7 @@ public:
nsAString& Standalone);
virtual PRBool IsScriptEnabled();
virtual nsresult HandleDOMEvent(nsIPresContext* aPresContext,
virtual nsresult HandleDOMEvent(nsPresContext* aPresContext,
nsEvent* aEvent, nsIDOMEvent** aDOMEvent,
PRUint32 aFlags,
nsEventStatus* aEventStatus);
@ -516,7 +516,7 @@ protected:
PRInt32& aCharsetSource,
nsACString& aCharset);
nsresult doCreateShell(nsIPresContext* aContext,
nsresult doCreateShell(nsPresContext* aContext,
nsIViewManager* aViewManager, nsStyleSet* aStyleSet,
nsCompatibility aCompatMode,
nsIPresShell** aInstancePtrResult);

Просмотреть файл

@ -155,7 +155,7 @@ public:
*aPrefix = nsnull;
return NS_ERROR_ILLEGAL_VALUE;
}
virtual nsresult HandleDOMEvent(nsIPresContext* aPresContext,
virtual nsresult HandleDOMEvent(nsPresContext* aPresContext,
nsEvent* aEvent, nsIDOMEvent** aDOMEvent,
PRUint32 aFlags, nsEventStatus* aEventStatus)
{

Просмотреть файл

@ -50,7 +50,7 @@
#include "nsIDocumentViewerPrint.h"
#include "nsIDocument.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsIPresShell.h"
#include "nsStyleSet.h"
#include "nsIStyleSheet.h"
@ -308,7 +308,7 @@ class DocumentViewerImpl : public nsIDocumentViewer,
friend class nsPrintEngine;
public:
DocumentViewerImpl(nsIPresContext* aPresContext);
DocumentViewerImpl(nsPresContext* aPresContext);
NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
@ -322,8 +322,8 @@ public:
NS_IMETHOD SetUAStyleSheet(nsIStyleSheet* aUAStyleSheet);
NS_IMETHOD GetDocument(nsIDocument** aResult);
NS_IMETHOD GetPresShell(nsIPresShell** aResult);
NS_IMETHOD GetPresContext(nsIPresContext** aResult);
NS_IMETHOD CreateDocumentViewerUsing(nsIPresContext* aPresContext,
NS_IMETHOD GetPresContext(nsPresContext** aResult);
NS_IMETHOD CreateDocumentViewerUsing(nsPresContext* aPresContext,
nsIDocumentViewer** aResult);
// nsIContentViewerEdit
@ -390,7 +390,7 @@ protected:
nsCOMPtr<nsIDocument> mDocument;
nsCOMPtr<nsIWidget> mWindow; // ??? should we really own it?
nsCOMPtr<nsIViewManager> mViewManager;
nsCOMPtr<nsIPresContext> mPresContext;
nsCOMPtr<nsPresContext> mPresContext;
nsCOMPtr<nsIPresShell> mPresShell;
nsCOMPtr<nsIStyleSheet> mUAStyleSheet;
@ -495,7 +495,7 @@ void DocumentViewerImpl::PrepareToStartLoad()
}
// Note: operator new zeros our memory, so no need to init things to null.
DocumentViewerImpl::DocumentViewerImpl(nsIPresContext* aPresContext)
DocumentViewerImpl::DocumentViewerImpl(nsPresContext* aPresContext)
: mPresContext(aPresContext),
mHintCharsetSource(kCharsetUninitialized),
mAllowPlugins(PR_TRUE),
@ -790,9 +790,9 @@ DocumentViewerImpl::InitInternal(nsIWidget* aParentWidget,
if (aDoCreation) {
if (aParentWidget && !mPresContext) {
// Create presentation context
mPresContext = new nsIPresContext(GetIsCreatingPrintPreview() ?
nsIPresContext::eContext_PrintPreview :
nsIPresContext::eContext_Galley);
mPresContext = new nsPresContext(GetIsCreatingPrintPreview() ?
nsPresContext::eContext_PrintPreview :
nsPresContext::eContext_Galley);
NS_ENSURE_TRUE(mPresContext, NS_ERROR_OUT_OF_MEMORY);
nsresult rv = mPresContext->Init(aDeviceContext);
@ -1361,7 +1361,7 @@ DocumentViewerImpl::GetPresShell(nsIPresShell** aResult)
}
NS_IMETHODIMP
DocumentViewerImpl::GetPresContext(nsIPresContext** aResult)
DocumentViewerImpl::GetPresContext(nsPresContext** aResult)
{
NS_IF_ADDREF(*aResult = mPresContext);
@ -1490,7 +1490,7 @@ DocumentViewerImpl::Show(void)
}
NS_ASSERTION(!mPresContext, "Shouldn't have a prescontext if we have no shell!");
mPresContext = new nsIPresContext(nsIPresContext::eContext_Galley);
mPresContext = new nsPresContext(nsPresContext::eContext_Galley);
NS_ENSURE_TRUE(mPresContext, NS_ERROR_OUT_OF_MEMORY);
rv = mPresContext->Init(mDeviceContext);
@ -1935,7 +1935,7 @@ nsresult DocumentViewerImpl::GetDocumentSelection(nsISelection **aSelection,
}
NS_IMETHODIMP
DocumentViewerImpl::CreateDocumentViewerUsing(nsIPresContext* aPresContext,
DocumentViewerImpl::CreateDocumentViewerUsing(nsPresContext* aPresContext,
nsIDocumentViewer** aResult)
{
if (!mDocument) {
@ -2668,7 +2668,7 @@ NS_IMETHODIMP DocumentViewerImpl::SizeToContent()
NS_ENSURE_SUCCESS(presShell->ResizeReflow(NS_UNCONSTRAINEDSIZE,
NS_UNCONSTRAINEDSIZE), NS_ERROR_FAILURE);
nsCOMPtr<nsIPresContext> presContext;
nsCOMPtr<nsPresContext> presContext;
GetPresContext(getter_AddRefs(presContext));
NS_ENSURE_TRUE(presContext, NS_ERROR_FAILURE);

Просмотреть файл

@ -40,7 +40,7 @@
#include "nsIDOMHTMLIFrameElement.h"
#include "nsIDOMHTMLFrameElement.h"
#include "nsIDOMWindow.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsIPresShell.h"
#include "nsIContent.h"
#include "nsIDocument.h"

Просмотреть файл

@ -49,7 +49,7 @@
#include "nsISupportsArray.h"
#include "nsIFocusTracker.h"
#include "nsCOMPtr.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsIComponentManager.h"
#include "nsContentCID.h"
#include "nsIPresShell.h"

Просмотреть файл

@ -695,7 +695,7 @@ nsGenericDOMDataNode::GetAttrCount() const
}
nsresult
nsGenericDOMDataNode::HandleDOMEvent(nsIPresContext* aPresContext,
nsGenericDOMDataNode::HandleDOMEvent(nsPresContext* aPresContext,
nsEvent* aEvent, nsIDOMEvent** aDOMEvent,
PRUint32 aFlags,
nsEventStatus* aEventStatus)

Просмотреть файл

@ -195,7 +195,7 @@ public:
virtual void List(FILE* out, PRInt32 aIndent) const;
virtual void DumpContent(FILE* out, PRInt32 aIndent, PRBool aDumpAll) const;
#endif
virtual nsresult HandleDOMEvent(nsIPresContext* aPresContext,
virtual nsresult HandleDOMEvent(nsPresContext* aPresContext,
nsEvent* aEvent, nsIDOMEvent** aDOMEvent,
PRUint32 aFlags,
nsEventStatus* aEventStatus);

Просмотреть файл

@ -57,7 +57,7 @@
#include "nsNetUtil.h"
#include "nsIFrame.h"
#include "nsIPresShell.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsStyleConsts.h"
#include "nsIView.h"
#include "nsIViewManager.h"
@ -1790,7 +1790,7 @@ nsGenericElement::GetNodeInfo() const
}
nsresult
nsGenericElement::HandleDOMEvent(nsIPresContext* aPresContext,
nsGenericElement::HandleDOMEvent(nsPresContext* aPresContext,
nsEvent* aEvent,
nsIDOMEvent** aDOMEvent,
PRUint32 aFlags,
@ -2356,7 +2356,7 @@ nsGenericElement::GetRangeList() const
}
void
nsGenericElement::SetFocus(nsIPresContext* aPresContext)
nsGenericElement::SetFocus(nsPresContext* aPresContext)
{
// Traditionally focusable elements can take focus as long as they don't set
// the disabled attribute
@ -3061,7 +3061,7 @@ nsGenericElement::PostQueryInterface(REFNSIID aIID, void** aInstancePtr)
//----------------------------------------------------------------------
nsresult
nsGenericElement::LeaveLink(nsIPresContext* aPresContext)
nsGenericElement::LeaveLink(nsPresContext* aPresContext)
{
nsILinkHandler *handler = aPresContext->GetLinkHandler();
if (!handler) {
@ -3072,7 +3072,7 @@ nsGenericElement::LeaveLink(nsIPresContext* aPresContext)
}
nsresult
nsGenericElement::TriggerLink(nsIPresContext* aPresContext,
nsGenericElement::TriggerLink(nsPresContext* aPresContext,
nsLinkVerb aVerb,
nsIURI* aOriginURI,
nsIURI* aLinkURI,

Просмотреть файл

@ -385,14 +385,14 @@ public:
virtual nsresult RangeAdd(nsIDOMRange* aRange);
virtual void RangeRemove(nsIDOMRange* aRange);
virtual const nsVoidArray *GetRangeList() const;
virtual nsresult HandleDOMEvent(nsIPresContext* aPresContext,
virtual nsresult HandleDOMEvent(nsPresContext* aPresContext,
nsEvent* aEvent,
nsIDOMEvent** aDOMEvent,
PRUint32 aFlags,
nsEventStatus* aEventStatus);
virtual PRUint32 ContentID() const;
virtual void SetContentID(PRUint32 aID);
virtual void SetFocus(nsIPresContext* aContext);
virtual void SetFocus(nsPresContext* aContext);
virtual nsIContent *GetBindingParent() const;
virtual nsresult SetBindingParent(nsIContent* aParent);
virtual PRBool IsContentOfType(PRUint32 aFlags) const;
@ -563,7 +563,7 @@ public:
* This would be false for loads from auto XLinks or from the
* click() method if we ever implement it.
*/
nsresult TriggerLink(nsIPresContext* aPresContext,
nsresult TriggerLink(nsPresContext* aPresContext,
nsLinkVerb aVerb,
nsIURI* aOriginURI,
nsIURI* aLinkURI,
@ -573,7 +573,7 @@ public:
/**
* Do whatever needs to be done when the mouse leaves a link
*/
nsresult LeaveLink(nsIPresContext* aPresContext);
nsresult LeaveLink(nsPresContext* aPresContext);
/**
* Take two text nodes and append the second to the first.

Просмотреть файл

@ -1,106 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* 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/
*
* 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.
*
* The Original Code is Mozilla Communicator client code.
*
* 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.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* 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"),
* 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 MPL, 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 MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsIDocumentViewerPrint_h___
#define nsIDocumentViewerPrint_h___
#include "nsISupports.h"
class nsIPresContext;
class nsIPrintSettings;
class nsPrintObject;
class nsISelection;
class nsIPresShell;
class nsIDocument;
class nsStyleSet;
class nsIContent;
class nsIWebShell;
// {D0B7F354-D575-43fd-903D-5AA35A193EDA}
#define NS_IDOCUMENT_VIEWER_PRINT_IID \
{ 0xd0b7f354, 0xd575, 0x43fd, { 0x90, 0x3d, 0x5a, 0xa3, 0x5a, 0x19, 0x3e, 0xda } }
/**
* A DocumentViewerPrint is an INTERNAL Interface mainly used for interaction
* between the DocumentViewer and the PrintEngine, although other objects may
* use to find out if printing or print preview is currently underway
*/
class nsIDocumentViewerPrint : public nsISupports
{
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOCUMENT_VIEWER_PRINT_IID)
virtual void SetIsPrinting(PRBool aIsPrinting) = 0;
virtual PRBool GetIsPrinting() = 0;
virtual void SetIsPrintPreview(PRBool aIsPrintPreview) = 0;
virtual PRBool GetIsPrintPreview() = 0;
virtual PRBool GetIsCreatingPrintPreview() = 0;
// The style set returned by CreateStyleSet is in the middle of an
// update batch so that the caller can add sheets to it if needed.
// Callers should call EndUpdate() on it when ready to use.
virtual nsresult CreateStyleSet(nsIDocument* aDocument, nsStyleSet** aStyleSet) = 0;
virtual nsresult GetDocumentSelection(nsISelection **aSelection,
nsIPresShell * aPresShell = nsnull) = 0;
virtual void IncrementDestroyRefCount() = 0;
virtual void ReturnToGalleyPresentation() = 0;
virtual void InstallNewPresentation() = 0;
virtual void OnDonePrinting() = 0;
};
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIDOCUMENTVIEWERPRINT \
virtual void SetIsPrinting(PRBool aIsPrinting); \
virtual PRBool GetIsPrinting(); \
virtual void SetIsPrintPreview(PRBool aIsPrintPreview); \
virtual PRBool GetIsPrintPreview(); \
virtual PRBool GetIsCreatingPrintPreview(); \
virtual nsresult CreateStyleSet(nsIDocument* aDocument, nsStyleSet** aStyleSet); \
virtual nsresult GetDocumentSelection(nsISelection **aSelection, nsIPresShell * aPresShell = nsnull); \
virtual void IncrementDestroyRefCount(); \
virtual void ReturnToGalleyPresentation(); \
virtual void InstallNewPresentation(); \
virtual void OnDonePrinting();
#endif /* nsIDocumentViewerPrint_h___ */

Просмотреть файл

@ -56,7 +56,7 @@
#include "nsIEventQueue.h"
#include "nsNetUtil.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsIPresShell.h"
#include "nsGUIEvent.h"
#include "nsDummyLayoutRequest.h"
@ -603,7 +603,7 @@ class ImageEvent : public PLEvent,
public nsDummyLayoutRequest
{
public:
ImageEvent(nsIPresContext* aPresContext, nsIContent* aContent,
ImageEvent(nsPresContext* aPresContext, nsIContent* aContent,
const nsAString& aMessage, nsILoadGroup *aLoadGroup)
: nsDummyLayoutRequest(nsnull),
mPresContext(aPresContext),
@ -618,7 +618,7 @@ public:
MOZ_COUNT_DTOR(ImageEvent);
}
nsCOMPtr<nsIPresContext> mPresContext;
nsCOMPtr<nsPresContext> mPresContext;
nsCOMPtr<nsIContent> mContent;
nsString mMessage;
nsCOMPtr<nsILoadGroup> mLoadGroup;
@ -687,7 +687,7 @@ nsImageLoadingContent::FireEvent(const nsAString& aEventType)
nsIPresShell *shell = document->GetShellAt(0);
NS_ENSURE_TRUE(shell, NS_ERROR_FAILURE);
nsCOMPtr<nsIPresContext> presContext;
nsCOMPtr<nsPresContext> presContext;
shell->GetPresContext(getter_AddRefs(presContext));
NS_ENSURE_TRUE(presContext, NS_ERROR_FAILURE);

Просмотреть файл

@ -1,167 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* 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/
*
* 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.
*
* The Original Code is mozilla.org code.
*
* 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.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* 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"),
* 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 MPL, 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 MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsPagePrintTimer.h"
#include "nsPrintEngine.h"
#include "nsIContentViewer.h"
#include "nsIServiceManager.h"
NS_IMPL_ISUPPORTS1(nsPagePrintTimer, nsITimerCallback)
nsPagePrintTimer::nsPagePrintTimer() :
mDocViewerPrint(nsnull),
mPresContext(nsnull),
mPrintSettings(nsnull),
mDelay(0)
{
}
nsPagePrintTimer::~nsPagePrintTimer()
{
if (mTimer) {
mTimer->Cancel();
}
mPrintEngine->SetIsPrinting(PR_FALSE); // this will notify the DV also
nsCOMPtr<nsIContentViewer> cv(do_QueryInterface(mDocViewerPrint));
if (cv) {
cv->Destroy();
}
}
nsresult
nsPagePrintTimer::StartTimer(PRBool aUseDelay)
{
nsresult result;
mTimer = do_CreateInstance("@mozilla.org/timer;1", &result);
if (NS_FAILED(result)) {
NS_WARNING("unable to start the timer");
} else {
mTimer->InitWithCallback(this, aUseDelay?mDelay:0, nsITimer::TYPE_ONE_SHOT);
}
return result;
}
// nsITimerCallback
NS_IMETHODIMP
nsPagePrintTimer::Notify(nsITimer *timer)
{
if (mPresContext && mDocViewerPrint) {
PRPackedBool initNewTimer = PR_TRUE;
// Check to see if we are done
// donePrinting will be true if it completed successfully or
// if the printing was cancelled
PRBool inRange;
PRBool donePrinting = mPrintEngine->PrintPage(mPresContext, mPrintSettings, mPrintObj, inRange);
if (donePrinting) {
// now clean up print or print the next webshell
if (mPrintEngine->DonePrintingPages(mPrintObj, NS_OK)) {
initNewTimer = PR_FALSE;
}
}
Stop();
if (initNewTimer) {
nsresult result = StartTimer(inRange);
if (NS_FAILED(result)) {
donePrinting = PR_TRUE; // had a failure.. we are finished..
mPrintEngine->SetIsPrinting(PR_FALSE);
}
}
}
return NS_OK;
}
void
nsPagePrintTimer::Init(nsPrintEngine* aPrintEngine,
nsIDocumentViewerPrint* aDocViewerPrint,
nsIPresContext* aPresContext,
nsIPrintSettings* aPrintSettings,
nsPrintObject* aPO,
PRUint32 aDelay)
{
mPrintEngine = aPrintEngine;
mDocViewerPrint = aDocViewerPrint;
mPresContext = aPresContext;
mPrintSettings = aPrintSettings;
mPrintObj = aPO;
mDelay = aDelay;
}
nsresult
nsPagePrintTimer::Start(nsPrintEngine* aPrintEngine,
nsIDocumentViewerPrint* aDocViewerPrint,
nsIPresContext* aPresContext,
nsIPrintSettings* aPrintSettings,
nsPrintObject* aPO,
PRUint32 aDelay)
{
Init(aPrintEngine, aDocViewerPrint, aPresContext, aPrintSettings, aPO, aDelay);
return StartTimer(PR_FALSE);
}
void
nsPagePrintTimer::Stop()
{
if (mTimer) {
mTimer->Cancel();
mTimer = nsnull;
}
}
nsresult NS_NewPagePrintTimer(nsPagePrintTimer **aResult)
{
NS_PRECONDITION(aResult, "null param");
nsPagePrintTimer* result = new nsPagePrintTimer;
if (!result) {
*aResult = nsnull;
return NS_ERROR_OUT_OF_MEMORY;
}
NS_ADDREF(result);
*aResult = result;
return NS_OK;
}

Просмотреть файл

@ -1,102 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* 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/
*
* 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.
*
* The Original Code is mozilla.org code.
*
* 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.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* 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"),
* 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 MPL, 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 MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsPagePrintTimer_h___
#define nsPagePrintTimer_h___
// Timer Includes
#include "nsITimer.h"
#include "nsITimelineService.h"
// Interfaces
#include "nsIDocumentViewerPrint.h"
#include "nsIPresContext.h"
#include "nsIPrintSettings.h"
// Other Includes
#include "nsPrintObject.h"
#include "nsRect.h"
class nsPrintEngine;
//---------------------------------------------------
//-- Page Timer Class
//---------------------------------------------------
class nsPagePrintTimer : public nsITimerCallback
{
public:
NS_DECL_ISUPPORTS
nsPagePrintTimer();
virtual ~nsPagePrintTimer();
// nsITimerCallback
NS_DECL_NSITIMERCALLBACK
// Other Methods
nsresult StartTimer(PRBool aUseDelay = PR_TRUE);
void Init(nsPrintEngine* aPrintEngine,
nsIDocumentViewerPrint* aDocViewerPrint,
nsIPresContext* aPresContext,
nsIPrintSettings* aPrintSettings,
nsPrintObject* aPO,
PRUint32 aDelay);
nsresult Start(nsPrintEngine* aPrintEngine,
nsIDocumentViewerPrint* aDocViewerPrint,
nsIPresContext* aPresContext,
nsIPrintSettings* aPrintSettings,
nsPrintObject* aPO,
PRUint32 aDelay);
void Stop();
private:
nsPrintEngine* mPrintEngine;
nsCOMPtr<nsIDocumentViewerPrint> mDocViewerPrint;
nsIPresContext* mPresContext;
nsCOMPtr<nsIPrintSettings> mPrintSettings;
nsCOMPtr<nsITimer> mTimer;
PRUint32 mDelay;
nsPrintObject * mPrintObj;
};
nsresult
NS_NewPagePrintTimer(nsPagePrintTimer **aResult);
#endif /* nsPagePrintTimer_h___ */

Просмотреть файл

@ -1,183 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* 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/
*
* 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.
*
* The Original Code is mozilla.org code.
*
* 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.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* 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"),
* 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 MPL, 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 MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsPrintData_h___
#define nsPrintData_h___
#include "nsPrintObject.h"
// Interfaces
#include "nsIDeviceContext.h"
#include "nsIDocument.h"
#include "nsIDOMWindow.h"
#include "nsIObserver.h"
#include "nsIPrintProgress.h"
#include "nsIPrintProgressParams.h"
#include "nsIPrintOptions.h"
#include "nsIPrintSettings.h"
#include "nsIWebProgressListener.h"
#include "nsIPrintSession.h"
// Other Includes
#include "nsPrintPreviewListener.h"
#include "nsIDocShellTreeNode.h"
// Classes
class nsIPageSequenceFrame;
class nsPagePrintTimer;
// Special Interfaces
#include "nsIDocumentViewer.h"
#include "nsIDocumentViewerPrint.h"
//---------------------------------------------------
//-- Object for Caching the Presentation
//---------------------------------------------------
class CachedPresentationObj
{
public:
CachedPresentationObj(nsIPresShell* aShell, nsIPresContext* aPC,
nsIViewManager* aVM, nsIWidget* aW):
mWindow(aW), mViewManager(aVM), mPresShell(aShell), mPresContext(aPC)
{
}
// The order here is important because the order of destruction is the
// reverse of the order listed here, and the view manager must outlive
// the pres shell.
nsCOMPtr<nsIWidget> mWindow;
nsCOMPtr<nsIViewManager> mViewManager;
nsCOMPtr<nsIPresShell> mPresShell;
nsCOMPtr<nsIPresContext> mPresContext;
};
//------------------------------------------------------------------------
// nsPrintData Class
//
// mPreparingForPrint - indicates that we have started Printing but
// have not gone to the timer to start printing the pages. It gets turned
// off right before we go to the timer.
//
// mDocWasToBeDestroyed - Gets set when "someone" tries to unload the document
// while we were prparing to Print. This typically happens if a user starts
// to print while a page is still loading. If they start printing and pause
// at the print dialog and then the page comes in, we then abort printing
// because the document is no longer stable.
//
//------------------------------------------------------------------------
class nsPrintData {
public:
typedef enum {eIsPrinting, eIsPrintPreview } ePrintDataType;
// This enum tells indicates what the default should be for the title
// if the title from the document is null
enum eDocTitleDefault {
eDocTitleDefNone,
eDocTitleDefBlank,
eDocTitleDefURLDoc
};
nsPrintData(ePrintDataType aType);
~nsPrintData(); // non-virtual
// Listener Helper Methods
void OnEndPrinting();
void OnStartPrinting();
static void DoOnProgressChange(nsVoidArray& aListeners,
PRInt32 aProgess,
PRInt32 aMaxProgress,
PRBool aDoStartStop = PR_FALSE,
PRInt32 aFlag = 0);
ePrintDataType mType; // the type of data this is (Printing or Print Preview)
nsCOMPtr<nsIDeviceContext> mPrintDC;
nsIView *mPrintView;
FILE *mDebugFilePtr; // a file where information can go to when printing
nsPrintObject * mPrintObject;
nsPrintObject * mSelectedPO;
nsVoidArray mPrintProgressListeners;
nsCOMPtr<nsIWebProgressListener> mPrintProgressListener;
nsCOMPtr<nsIPrintProgress> mPrintProgress;
nsCOMPtr<nsIPrintProgressParams> mPrintProgressParams;
PRBool mShowProgressDialog; // means we should try to show it
PRPackedBool mProgressDialogIsShown; // means it is already being shown
nsCOMPtr<nsIDOMWindow> mCurrentFocusWin; // cache a pointer to the currently focused window
nsVoidArray* mPrintDocList;
nsCOMPtr<nsIDeviceContext> mPrintDocDC;
nsCOMPtr<nsIDOMWindow> mPrintDocDW;
PRPackedBool mIsIFrameSelected;
PRPackedBool mIsParentAFrameSet;
PRPackedBool mPrintingAsIsSubDoc;
PRPackedBool mOnStartSent;
PRPackedBool mIsAborted; // tells us the document is being aborted
PRPackedBool mPreparingForPrint; // see comments above
PRPackedBool mDocWasToBeDestroyed; // see comments above
PRBool mShrinkToFit;
PRInt16 mPrintFrameType;
PRInt32 mNumPrintableDocs;
PRInt32 mNumDocsPrinted;
PRInt32 mNumPrintablePages;
PRInt32 mNumPagesPrinted;
float mShrinkRatio;
float mOrigDCScale;
float mOrigTextZoom;
float mOrigZoom;
nsCOMPtr<nsIPrintSession> mPrintSession;
nsCOMPtr<nsIPrintSettings> mPrintSettings;
nsCOMPtr<nsIPrintOptions> mPrintOptions;
nsPrintPreviewListener* mPPEventListeners;
PRUnichar* mBrandName; // needed as a substitute name for a document
nsPagePrintTimer* mPagePrintTimer;
nsIPageSequenceFrame* mPageSeqFrame;
private:
nsPrintData() {}
nsPrintData& operator=(const nsPrintData& aOther); // not implemented
};
#endif /* nsPrintData_h___ */

Просмотреть файл

@ -318,7 +318,7 @@ nsresult nsPrintEngine::Initialize(nsIDocumentViewer* aDocViewer,
nsISupports* aContainer,
nsIDocument* aDocument,
nsIDeviceContext* aDevContext,
nsIPresContext* aPresContext,
nsPresContext* aPresContext,
nsIWidget* aWindow,
nsIWidget* aParentWidget,
FILE* aDebugFile)
@ -370,7 +370,7 @@ nsPrintEngine::Cancelled()
//-------------------------------------------------------
void
nsPrintEngine::CachePresentation(nsIPresShell* aShell,
nsIPresContext* aPC,
nsPresContext* aPC,
nsIViewManager* aVM,
nsIWidget* aW)
{
@ -381,7 +381,7 @@ nsPrintEngine::CachePresentation(nsIPresShell* aShell,
//-------------------------------------------------------
void
nsPrintEngine::GetCachedPresentation(nsCOMPtr<nsIPresShell>& aShell,
nsCOMPtr<nsIPresContext>& aPC,
nsCOMPtr<nsPresContext>& aPC,
nsCOMPtr<nsIViewManager>& aVM,
nsCOMPtr<nsIWidget>& aW)
{
@ -394,7 +394,7 @@ nsPrintEngine::GetCachedPresentation(nsCOMPtr<nsIPresShell>& aShell,
//------------------------------------------------------------
void
nsPrintEngine::GetNewPresentation(nsCOMPtr<nsIPresShell>& aShell,
nsCOMPtr<nsIPresContext>& aPC,
nsCOMPtr<nsPresContext>& aPC,
nsCOMPtr<nsIViewManager>& aVM,
nsCOMPtr<nsIWidget>& aW)
{
@ -541,10 +541,10 @@ static int RemoveFilesInDir(const char * aDir);
static void GetDocTitleAndURL(nsPrintObject* aPO, char *& aDocStr, char *& aURLStr);
static void DumpPrintObjectsTree(nsPrintObject * aPO, int aLevel, FILE* aFD);
static void DumpPrintObjectsList(nsVoidArray * aDocList);
static void RootFrameList(nsIPresContext* aPresContext, FILE* out, PRInt32 aIndent);
static void RootFrameList(nsPresContext* aPresContext, FILE* out, PRInt32 aIndent);
static void DumpViews(nsIDocShell* aDocShell, FILE* out);
static void DumpLayoutData(char* aTitleStr, char* aURLStr,
nsIPresContext* aPresContext,
nsPresContext* aPresContext,
nsIDeviceContext * aDC, nsIFrame * aRootFrame,
nsIWebShell * aWebShell, FILE* aFD);
#endif
@ -2561,9 +2561,9 @@ nsPrintEngine::ReflowPrintObject(nsPrintObject * aPO, PRBool aDoCalcShrink)
// create the PresContext
PRBool containerIsSet = PR_FALSE;
aPO->mPresContext = new nsIPresContext(mIsCreatingPrintPreview ?
nsIPresContext::eContext_PrintPreview:
nsIPresContext::eContext_Print);
aPO->mPresContext = new nsPresContext(mIsCreatingPrintPreview ?
nsPresContext::eContext_PrintPreview:
nsPresContext::eContext_Print);
NS_ENSURE_TRUE(aPO->mPresContext, NS_ERROR_OUT_OF_MEMORY);
aPO->mPresContext->SetPrintSettings(mPrt->mPrintSettings);
@ -3064,7 +3064,7 @@ nsPrintEngine::DoPrint(nsPrintObject * aPO, PRBool aDoSyncPrinting, PRBool& aDon
nsIWebShell* webShell = aPO->mWebShell.get();
nsIPresShell* poPresShell = aPO->mPresShell;
nsIPresContext* poPresContext = aPO->mPresContext;
nsPresContext* poPresContext = aPO->mPresContext;
nsIView* poRootView = aPO->mRootView;
NS_ASSERTION(webShell, "The WebShell can't be NULL!");
@ -3304,7 +3304,7 @@ nsPrintEngine::DoPrint(nsPrintObject * aPO, PRBool aDoSyncPrinting, PRBool& aDon
return NS_ERROR_FAILURE;
}
if (poPresContext->Type() != nsIPresContext::eContext_PrintPreview) {
if (poPresContext->Type() != nsPresContext::eContext_PrintPreview) {
nscoord sheight = seqFrame->GetSize().height;
nsRect r = poRootView->GetBounds();
@ -3407,7 +3407,7 @@ nsPrintEngine::ElipseLongString(PRUnichar *& aStr, const PRUint32 aLen, PRBool a
//-------------------------------------------------------
PRBool
nsPrintEngine::PrintPage(nsIPresContext* aPresContext,
nsPrintEngine::PrintPage(nsPresContext* aPresContext,
nsIPrintSettings* aPrintSettings,
nsPrintObject* aPO,
PRBool& aInRange)
@ -3618,7 +3618,7 @@ nsPrintEngine::DoProgressForSeparateFrames()
* Find by checking content's tag type
*/
nsIFrame *
nsPrintEngine::FindFrameByType(nsIPresContext* aPresContext,
nsPrintEngine::FindFrameByType(nsPresContext* aPresContext,
nsIFrame * aParentFrame,
nsIAtom * aType,
nsRect& aRect,
@ -3652,7 +3652,7 @@ nsPrintEngine::FindFrameByType(nsIPresContext* aPresContext,
* Find by checking frames type
*/
nsresult
nsPrintEngine::FindSelectionBoundsWithList(nsIPresContext* aPresContext,
nsPrintEngine::FindSelectionBoundsWithList(nsPresContext* aPresContext,
nsIRenderingContext& aRC,
nsIAtom* aList,
nsIFrame * aParentFrame,
@ -3698,7 +3698,7 @@ nsPrintEngine::FindSelectionBoundsWithList(nsIPresContext* aPresContext,
//-------------------------------------------------------
// Find the Frame that is XMost
nsresult
nsPrintEngine::FindSelectionBounds(nsIPresContext* aPresContext,
nsPrintEngine::FindSelectionBounds(nsPresContext* aPresContext,
nsIRenderingContext& aRC,
nsIFrame * aParentFrame,
nsRect& aRect,
@ -3729,7 +3729,7 @@ nsPrintEngine::FindSelectionBounds(nsIPresContext* aPresContext,
*/
nsresult
nsPrintEngine::GetPageRangeForSelection(nsIPresShell * aPresShell,
nsIPresContext* aPresContext,
nsPresContext* aPresContext,
nsIRenderingContext& aRC,
nsISelection* aSelection,
nsIPageSequenceFrame* aPageSeqFrame,
@ -4471,7 +4471,7 @@ nsPrintEngine::FinishPrintPreview()
// Turning off the scaling of twips so any of the UI scrollbars
// will not get scaled
if (mPresContext->Type() == nsIPresContext::eContext_PrintPreview) {
if (mPresContext->Type() == nsPresContext::eContext_PrintPreview) {
mPresContext->SetScalingOfTwips(PR_FALSE);
mDeviceContext->SetCanonicalPixelScale(mPrtPreview->mOrigDCScale);
}
@ -4488,7 +4488,7 @@ nsPrintEngine::FinishPrintPreview()
/*=============== Timer Related Code ======================*/
nsresult
nsPrintEngine::StartPagePrintTimer(nsIPresContext * aPresContext,
nsPrintEngine::StartPagePrintTimer(nsPresContext * aPresContext,
nsIPrintSettings* aPrintSettings,
nsPrintObject* aPOect,
PRUint32 aDelay)
@ -4660,7 +4660,7 @@ int RemoveFilesInDir(const char * aDir)
/** ---------------------------------------------------
* Dumps Frames for Printing
*/
static void RootFrameList(nsIPresContext* aPresContext, FILE* out, PRInt32 aIndent)
static void RootFrameList(nsPresContext* aPresContext, FILE* out, PRInt32 aIndent)
{
if (!aPresContext || !out)
return;
@ -4682,7 +4682,7 @@ static void RootFrameList(nsIPresContext* aPresContext, FILE* out, PRInt32 aInde
* Dumps Frames for Printing
*/
static void DumpFrames(FILE* out,
nsIPresContext* aPresContext,
nsPresContext* aPresContext,
nsIRenderingContext * aRendContext,
nsIFrame * aFrame,
PRInt32 aLevel)
@ -4764,7 +4764,7 @@ DumpViews(nsIDocShell* aDocShell, FILE* out)
*/
void DumpLayoutData(char* aTitleStr,
char* aURLStr,
nsIPresContext* aPresContext,
nsPresContext* aPresContext,
nsIDeviceContext * aDC,
nsIFrame * aRootFrame,
nsIWebShell * aWebShell,
@ -4777,7 +4777,7 @@ void DumpLayoutData(char* aTitleStr,
}
#ifdef NS_PRINT_PREVIEW
if (aPresContext->Type() == nsIPresContext::eContext_PrintPreview) {
if (aPresContext->Type() == nsPresContext::eContext_PrintPreview) {
return;
}
#endif

Просмотреть файл

@ -1,408 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* 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/
*
* 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.
*
* The Original Code is mozilla.org code.
*
* 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.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* 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"),
* 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 MPL, 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 MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsPrintEngine_h___
#define nsPrintEngine_h___
#include "nsCOMPtr.h"
#include "nsPrintObject.h"
#include "nsPrintData.h"
// Interfaces
#include "nsIDeviceContext.h"
#include "nsIDocument.h"
#include "nsIDOMWindow.h"
#include "nsIObserver.h"
#include "nsIPrintProgress.h"
#include "nsIPrintProgressParams.h"
#include "nsIPrintOptions.h"
#include "nsIPrintSettings.h"
#include "nsIWebProgressListener.h"
#include "nsISelectionListener.h"
// Other Includes
#include "nsPrintPreviewListener.h"
#include "nsIDocShellTreeNode.h"
// Classes
class nsIPageSequenceFrame;
class nsPagePrintTimer;
// Special Interfaces
#include "nsIWebBrowserPrint.h"
#include "nsIDocumentViewer.h"
#include "nsIDocumentViewerPrint.h"
#ifdef MOZ_LAYOUTDEBUG
#include "nsIDebugObject.h"
#endif
//------------------------------------------------------------------------
// nsPrintEngine Class
//
// mPreparingForPrint - indicates that we have started Printing but
// have not gone to the timer to start printing the pages. It gets turned
// off right before we go to the timer.
//
// mDocWasToBeDestroyed - Gets set when "someone" tries to unload the document
// while we were prparing to Print. This typically happens if a user starts
// to print while a page is still loading. If they start printing and pause
// at the print dialog and then the page comes in, we then abort printing
// because the document is no longer stable.
//
//------------------------------------------------------------------------
class nsPrintEngine : public nsIWebBrowserPrint, public nsIObserver
{
public:
//NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
// nsISupports interface...
NS_DECL_ISUPPORTS
// nsIWebBrowserPrint
NS_DECL_NSIWEBBROWSERPRINT
// nsIObserver
NS_DECL_NSIOBSERVER
// This enum tells indicates what the default should be for the title
// if the title from the document is null
enum eDocTitleDefault {
eDocTitleDefNone,
eDocTitleDefBlank,
eDocTitleDefURLDoc
};
nsPrintEngine();
virtual ~nsPrintEngine();
void Destroy();
void DestroyPrintingData();
nsresult Initialize(nsIDocumentViewer* aDocViewer,
nsIDocumentViewerPrint* aDocViewerPrint,
nsISupports* aContainer,
nsIDocument* aDocument,
nsIDeviceContext* aDevContext,
nsIPresContext* aPresContext,
nsIWidget* aWindow,
nsIWidget* aParentWidget,
FILE* aDebugFile);
nsresult GetSeqFrameAndCountPages(nsIFrame*& aSeqFrame, PRInt32& aCount);
PRBool IsOldPrintPreviewPres()
{
return mOldPrtPreview != nsnull;
}
//
// The following three methods are used for printing...
//
nsresult DocumentReadyForPrinting();
nsresult GetSelectionDocument(nsIDeviceContextSpec * aDevSpec,
nsIDocument ** aNewDoc);
nsresult SetupToPrintContent(nsIDeviceContext* aDContext,
nsIDOMWindow* aCurrentFocusedDOMWin);
nsresult EnablePOsForPrinting();
nsPrintObject* FindSmallestSTF();
PRBool PrintDocContent(nsPrintObject* aPO, nsresult& aStatus);
nsresult DoPrint(nsPrintObject * aPO, PRBool aDoSyncPrinting,
PRBool& aDonePrinting);
void SetPrintAsIs(nsPrintObject* aPO, PRBool aAsIs = PR_TRUE);
enum ePrintFlags {
eSetPrintFlag = 1U,
eSetHiddenFlag = 2U
};
void SetPrintPO(nsPrintObject* aPO, PRBool aPrint,
PRBool aIsHidden = PR_FALSE,
PRUint32 aFlags = eSetPrintFlag);
void TurnScriptingOn(PRBool aDoTurnOn);
PRBool CheckDocumentForPPCaching();
void InstallPrintPreviewListener();
// nsIDocumentViewerPrint Printing Methods
PRBool PrintPage(nsIPresContext* aPresContext,
nsIPrintSettings* aPrintSettings,
nsPrintObject* aPOect, PRBool& aInRange);
PRBool DonePrintingPages(nsPrintObject* aPO, nsresult aResult);
//---------------------------------------------------------------------
void BuildDocTree(nsIDocShellTreeNode * aParentNode,
nsVoidArray * aDocList,
nsPrintObject * aPO);
nsresult ReflowDocList(nsPrintObject * aPO, PRBool aSetPixelScale,
PRBool aDoCalcShrink);
void SetClipRect(nsPrintObject* aPO,
const nsRect& aClipRect,
nscoord aOffsetX,
nscoord aOffsetY,
PRBool aDoingSetClip);
nsresult ReflowPrintObject(nsPrintObject * aPO, PRBool aDoCalcShrink);
nsresult CalcPageFrameLocation(nsIPresShell * aPresShell,
nsPrintObject* aPO);
nsPrintObject * FindPrintObjectByWS(nsPrintObject* aPO, nsIWebShell * aWebShell);
void MapContentForPO(nsPrintObject* aRootObject,
nsIPresShell* aPresShell,
nsIContent* aContent);
void MapContentToWebShells(nsPrintObject* aRootPO, nsPrintObject* aPO);
void CheckForChildFrameSets(nsPrintObject* aPO);
nsresult MapSubDocFrameLocations(nsPrintObject* aPO);
void CalcNumPrintableDocsAndPages(PRInt32& aNumDocs, PRInt32& aNumPages);
void DoProgressForAsIsFrames();
void DoProgressForSeparateFrames();
void ShowPrintProgress(PRBool aIsForPrinting, PRBool& aDoNotify);
nsresult CleanupOnFailure(nsresult aResult, PRBool aIsPrinting);
nsresult FinishPrintPreview();
static void CloseProgressDialog(nsIWebProgressListener* aWebProgressListener);
void SetDocAndURLIntoProgress(nsPrintObject* aPO,
nsIPrintProgressParams* aParams);
void ElipseLongString(PRUnichar *& aStr, const PRUint32 aLen, PRBool aDoFront);
nsresult CheckForPrinters(nsIPrintOptions* aPrintOptions,
nsIPrintSettings* aPrintSettings);
void CleanupDocTitleArray(PRUnichar**& aArray, PRInt32& aCount);
void CheckForHiddenFrameSetFrames();
PRBool IsThereARangeSelection(nsIDOMWindow * aDOMWin);
//---------------------------------------------------------------------
// Timer Methods
nsresult StartPagePrintTimer(nsIPresContext * aPresContext,
nsIPrintSettings* aPrintSettings,
nsPrintObject* aPO,
PRUint32 aDelay);
PRBool IsWindowsInOurSubTree(nsIDOMWindow * aDOMWindow);
PRBool IsParentAFrameSet(nsIWebShell * aParent);
PRBool IsThereAnIFrameSelected(nsIWebShell* aWebShell,
nsIDOMWindow* aDOMWin,
PRPackedBool& aIsParentFrameSet);
nsPrintObject* FindPrintObjectByDOMWin(nsPrintObject* aParentObject,
nsIDOMWindow* aDOMWin);
// get the currently infocus frame for the document viewer
already_AddRefed<nsIDOMWindow> FindFocusedDOMWindow();
//---------------------------------------------------------------------
// Static Methods
//---------------------------------------------------------------------
static void GetDocumentTitleAndURL(nsIDocument* aDoc,
PRUnichar** aTitle,
PRUnichar** aURLStr);
static void GetDisplayTitleAndURL(nsPrintObject* aPO,
nsIPrintSettings* aPrintSettings,
const PRUnichar* aBrandName,
PRUnichar** aTitle,
PRUnichar** aURLStr,
eDocTitleDefault aDefType = eDocTitleDefNone);
static void ShowPrintErrorDialog(nsresult printerror,
PRBool aIsPrinting = PR_TRUE);
static void GetPresShellAndRootContent(nsIDocShell * aDocShell,
nsIPresShell** aPresShell,
nsIContent** aContent);
static PRBool HasFramesetChild(nsIContent* aContent);
PRBool CheckBeforeDestroy();
nsresult Cancelled();
nsresult ShowDocList(PRBool aShow);
void GetNewPresentation(nsCOMPtr<nsIPresShell>& aShell,
nsCOMPtr<nsIPresContext>& aPC,
nsCOMPtr<nsIViewManager>& aVM,
nsCOMPtr<nsIWidget>& aW);
// CachedPresentationObj is used to cache the presentation
// so we can bring it back later
PRBool HasCachedPres()
{
return mIsCachingPresentation && mCachedPresObj;
}
PRBool IsCachingPres()
{
return mIsCachingPresentation;
}
void SetCacheOldPres(PRBool aDoCache)
{
mIsCachingPresentation = aDoCache;
}
void CachePresentation(nsIPresShell* aShell, nsIPresContext* aPC,
nsIViewManager* aVM, nsIWidget* aW);
void GetCachedPresentation(nsCOMPtr<nsIPresShell>& aShell,
nsCOMPtr<nsIPresContext>& aPC,
nsCOMPtr<nsIViewManager>& aVM,
nsCOMPtr<nsIWidget>& aW);
static nsIPresShell* GetPresShellFor(nsIDocShell* aDocShell);
void SetDialogParent(nsIDOMWindow* aDOMWin)
{
mDialogParentWin = aDOMWin;
}
// These calls also update the DocViewer
void SetIsPrinting(PRBool aIsPrinting);
PRBool GetIsPrinting()
{
return mIsDoingPrinting;
}
void SetIsPrintPreview(PRBool aIsPrintPreview);
PRBool GetIsPrintPreview()
{
return mIsDoingPrintPreview;
}
void SetIsCreatingPrintPreview(PRBool aIsCreatingPrintPreview)
{
mIsCreatingPrintPreview = aIsCreatingPrintPreview;
}
PRBool GetIsCreatingPrintPreview()
{
return mIsCreatingPrintPreview;
}
#ifdef MOZ_LAYOUTDEBUG
static nsresult TestRuntimeErrorCondition(PRInt16 aRuntimeID,
nsresult aCurrentErrorCode,
nsresult aNewErrorCode);
static PRBool IsDoingRuntimeTesting();
static void InitializeTestRuntimeError();
protected:
static PRBool mIsDoingRuntimeTesting;
static nsCOMPtr<nsIDebugObject> mLayoutDebugObj; // always de-referenced with the destructor
#endif
protected:
void FirePrintCompletionEvent();
nsresult ShowDocListInternal(nsPrintObject* aPO, PRBool aShow);
nsresult GetSeqFrameAndCountPagesInternal(nsPrintObject* aPO,
nsIFrame*& aSeqFrame,
PRInt32& aCount);
static nsresult FindSelectionBoundsWithList(nsIPresContext* aPresContext,
nsIRenderingContext& aRC,
nsIAtom* aList,
nsIFrame * aParentFrame,
nsRect& aRect,
nsIFrame *& aStartFrame,
nsRect& aStartRect,
nsIFrame *& aEndFrame,
nsRect& aEndRect);
static nsresult FindSelectionBounds(nsIPresContext* aPresContext,
nsIRenderingContext& aRC,
nsIFrame * aParentFrame,
nsRect& aRect,
nsIFrame *& aStartFrame,
nsRect& aStartRect,
nsIFrame *& aEndFrame,
nsRect& aEndRect);
static nsresult GetPageRangeForSelection(nsIPresShell * aPresShell,
nsIPresContext* aPresContext,
nsIRenderingContext& aRC,
nsISelection* aSelection,
nsIPageSequenceFrame* aPageSeqFrame,
nsIFrame** aStartFrame,
PRInt32& aStartPageNum,
nsRect& aStartRect,
nsIFrame** aEndFrame,
PRInt32& aEndPageNum,
nsRect& aEndRect);
static nsIFrame * FindFrameByType(nsIPresContext* aPresContext,
nsIFrame * aParentFrame,
nsIAtom * aType,
nsRect& aRect,
nsRect& aChildRect);
// Static memeber variables
PRBool mIsCreatingPrintPreview;
PRBool mIsDoingPrinting;
nsIDocumentViewerPrint* mDocViewerPrint; // [WEAK] it owns me!
nsIDocumentViewer* mDocViewer; // [WEAK] it owns me!
nsISupports* mContainer; // [WEAK] it owns me!
nsIDeviceContext* mDeviceContext; // not ref counted
nsIPresContext* mPresContext; // not ref counted
nsCOMPtr<nsIWidget> mWindow;
nsPrintData* mPrt;
nsPagePrintTimer* mPagePrintTimer;
nsIPageSequenceFrame* mPageSeqFrame;
// Print Preview
PRBool mIsDoingPrintPreview; // per DocumentViewer
nsCOMPtr<nsIWidget> mParentWidget;
nsPrintData* mPrtPreview;
nsPrintData* mOldPrtPreview;
nsCOMPtr<nsIDocument> mDocument;
nsCOMPtr<nsIDOMWindow> mDialogParentWin;
PRBool mIsCachingPresentation;
CachedPresentationObj* mCachedPresObj;
FILE* mDebugFile;
private:
nsPrintEngine& operator=(const nsPrintEngine& aOther); // not implemented
};
#ifdef MOZ_LAYOUTDEBUG
#define INIT_RUNTIME_ERROR_CHECKING() nsPrintEngine::InitializeTestRuntimeError();
#define CHECK_RUNTIME_ERROR_CONDITION(_name, _currerr, _newerr) \
if (nsPrintEngine::IsDoingRuntimeTesting()) { \
_currerr = nsPrintEngine::TestRuntimeErrorCondition(_name, _currerr, _newerr); \
}
#else
#define CHECK_RUNTIME_ERROR_CONDITION(_name, _currerr, _newerr)
#define INIT_RUNTIME_ERROR_CHECKING()
#endif
#endif /* nsPrintEngine_h___ */

Просмотреть файл

@ -1,122 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* 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/
*
* 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.
*
* The Original Code is mozilla.org code.
*
* 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.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* 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"),
* 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 MPL, 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 MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsPrintObject_h___
#define nsPrintObject_h___
// Interfaces
#include "nsCOMPtr.h"
#include "nsAutoPtr.h"
#include "nsIContent.h"
#include "nsIPresContext.h"
#include "nsIPresShell.h"
#include "nsStyleSet.h"
#include "nsIViewManager.h"
#include "nsIWebShell.h"
#include "nsIDocShell.h"
#include "nsIDocument.h"
#include "nsIWidget.h"
// Other Includes
#include "nsRect.h"
// nsPrintObject Document Type
enum PrintObjectType {eDoc = 0, eFrame = 1, eIFrame = 2, eFrameSet = 3};
//---------------------------------------------------
//-- nsPrintObject Class
//---------------------------------------------------
class nsPrintObject
{
public:
nsPrintObject();
~nsPrintObject(); // non-virtual
// Methods
nsresult Init(nsIWebShell* aWebShell);
PRBool IsPrintable() { return !mDontPrint; }
void DestroyPresentation();
// Data Members
nsCOMPtr<nsIWebShell> mWebShell;
nsCOMPtr<nsIDocShell> mDocShell;
nsCOMPtr<nsIPresShell> mDisplayPresShell;
nsCOMPtr<nsIPresContext> mDisplayPresContext;
nsCOMPtr<nsIDocument> mDocument;
PrintObjectType mFrameType;
nsCOMPtr<nsIPresContext> mPresContext;
nsStyleSet *mStyleSet;
nsCOMPtr<nsIPresShell> mPresShell;
nsCOMPtr<nsIViewManager> mViewManager;
nsCOMPtr<nsIWidget> mWindow;
nsIView *mRootView;
nsIContent *mContent;
nsIFrame *mSeqFrame;
nsIFrame *mPageFrame;
PRInt32 mPageNum;
nsRect mRect;
nsRect mReflowRect;
nsVoidArray mKids;
nsPrintObject* mParent;
PRPackedBool mHasBeenPrinted;
PRPackedBool mDontPrint;
PRPackedBool mPrintAsIs;
PRPackedBool mSkippedPageEject;
PRPackedBool mSharedPresShell;
PRPackedBool mIsHidden; // Indicates PO is hidden, not reflowed, not shown
nsRect mClipRect;
PRUint16 mImgAnimationMode;
PRUnichar* mDocTitle;
PRUnichar* mDocURL;
float mShrinkRatio;
nscoord mXMost;
private:
nsPrintObject& operator=(const nsPrintObject& aOther); // not implemented
};
#endif /* nsPrintObject_h___ */

Просмотреть файл

@ -80,19 +80,19 @@ public:
mNext->Destroy(mNext->mRuleNode->mPresContext);
}
void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
void* operator new(size_t sz, nsPresContext* aContext) CPP_THROW_NEW {
return aContext->AllocateFromShell(sz);
};
void operator delete(void* aPtr) {} // Does nothing. The arena will free us up when the rule tree
// dies.
void Destroy(nsIPresContext* aContext) {
void Destroy(nsPresContext* aContext) {
this->~nsRuleList();
aContext->FreeToShell(sizeof(nsRuleList), this);
}
// Destroy this node, but not its rule node or the rest of the list.
nsRuleList* DestroySelf(nsIPresContext* aContext) {
nsRuleList* DestroySelf(nsPresContext* aContext) {
nsRuleList *next = mNext;
MOZ_COUNT_DTOR(nsRuleList); // hack
aContext->FreeToShell(sizeof(nsRuleList), this);
@ -189,7 +189,7 @@ nsString& Unquote(nsString& aString)
nscoord CalcLength(const nsCSSValue& aValue,
const nsFont* aFont,
nsStyleContext* aStyleContext,
nsIPresContext* aPresContext,
nsPresContext* aPresContext,
PRBool& aInherited)
{
NS_ASSERTION(aValue.IsLengthUnit(), "not a length unit");
@ -260,7 +260,7 @@ nscoord CalcLength(const nsCSSValue& aValue,
static PRBool SetCoord(const nsCSSValue& aValue, nsStyleCoord& aCoord,
const nsStyleCoord& aParentCoord,
PRInt32 aMask, nsStyleContext* aStyleContext,
nsIPresContext* aPresContext, PRBool& aInherited)
nsPresContext* aPresContext, PRBool& aInherited)
{
PRBool result = PR_TRUE;
if (aValue.GetUnit() == eCSSUnit_Null) {
@ -310,7 +310,7 @@ static PRBool SetCoord(const nsCSSValue& aValue, nsStyleCoord& aCoord,
}
static PRBool SetColor(const nsCSSValue& aValue, const nscolor aParentColor,
nsIPresContext* aPresContext, nscolor& aResult, PRBool& aInherited)
nsPresContext* aPresContext, nscolor& aResult, PRBool& aInherited)
{
PRBool result = PR_FALSE;
nsCSSUnit unit = aValue.GetUnit();
@ -365,7 +365,7 @@ static PRBool SetColor(const nsCSSValue& aValue, const nscolor aParentColor,
// Overloaded new operator. Initializes the memory to 0 and relies on an arena
// (which comes from the presShell) to perform the allocation.
void*
nsRuleNode::operator new(size_t sz, nsIPresContext* aPresContext) CPP_THROW_NEW
nsRuleNode::operator new(size_t sz, nsPresContext* aPresContext) CPP_THROW_NEW
{
// Check the recycle list first.
return aPresContext->AllocateFromShell(sz);
@ -384,14 +384,14 @@ nsRuleNode::Destroy()
mPresContext->FreeToShell(sizeof(nsRuleNode), this);
}
nsRuleNode* nsRuleNode::CreateRootNode(nsIPresContext* aPresContext)
nsRuleNode* nsRuleNode::CreateRootNode(nsPresContext* aPresContext)
{
return new (aPresContext) nsRuleNode(aPresContext, nsnull, nsnull);
}
nsILanguageAtomService* nsRuleNode::gLangService = nsnull;
nsRuleNode::nsRuleNode(nsIPresContext* aContext, nsIStyleRule* aRule, nsRuleNode* aParent)
nsRuleNode::nsRuleNode(nsPresContext* aContext, nsIStyleRule* aRule, nsRuleNode* aParent)
: mPresContext(aContext),
mParent(aParent),
mRule(aRule),
@ -1375,7 +1375,7 @@ nsRuleNode::WalkRuleTree(const nsStyleStructID aSID,
}
static PRBool
IsChrome(nsIPresContext* aPresContext)
IsChrome(nsPresContext* aPresContext)
{
PRBool isChrome = PR_FALSE;
nsCOMPtr<nsISupports> container = aPresContext->GetContainer();
@ -1620,7 +1620,7 @@ nsRuleNode::AdjustLogicalBoxProp(nsStyleContext* aContext,
}
/* static */ void
nsRuleNode::SetFont(nsIPresContext* aPresContext, nsStyleContext* aContext,
nsRuleNode::SetFont(nsPresContext* aPresContext, nsStyleContext* aContext,
nscoord aMinFontSize, PRBool aUseDocumentFonts,
PRBool aIsGeneric, const nsRuleDataFont& aFontData,
const nsFont& aDefaultFont, const nsStyleFont* aParentFont,
@ -1873,7 +1873,7 @@ nsRuleNode::SetFont(nsIPresContext* aPresContext, nsStyleContext* aContext,
// up to the root where default values come from the presentation context)
// - re-apply cascading rules from there without caching intermediate values
/* static */ void
nsRuleNode::SetGenericFont(nsIPresContext* aPresContext,
nsRuleNode::SetGenericFont(nsPresContext* aPresContext,
nsStyleContext* aContext,
const nsRuleDataFont& aFontData,
PRUint8 aGenericFontID, nscoord aMinFontSize,
@ -4300,7 +4300,7 @@ nsRuleNode::ComputeColumnData(nsStyleStruct* aStartStruct,
#ifdef MOZ_SVG
static void
SetSVGPaint(const nsCSSValue& aValue, const nsStyleSVGPaint& parentPaint,
nsIPresContext* aPresContext, nsStyleSVGPaint& aResult, PRBool& aInherited)
nsPresContext* aPresContext, nsStyleSVGPaint& aResult, PRBool& aInherited)
{
if (aValue.GetUnit() == eCSSUnit_Inherit) {
aResult = parentPaint;
@ -4326,7 +4326,7 @@ SetSVGOpacity(const nsCSSValue& aValue, float parentOpacity, float& opacity, PRB
static void
SetSVGLength(const nsCSSValue& aValue, float parentLength, float& length,
nsStyleContext* aContext, nsIPresContext* aPresContext, PRBool& aInherited)
nsStyleContext* aContext, nsPresContext* aPresContext, PRBool& aInherited)
{
nsStyleCoord coord;
PRBool dummy;

Просмотреть файл

@ -82,7 +82,7 @@ static NS_DEFINE_CID(kFrameTraversalCID, NS_FRAMETRAVERSAL_CID);
#include "nsContentUtils.h"
//included for desired x position;
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsIPresShell.h"
#include "nsICaret.h"
@ -194,7 +194,7 @@ public:
NS_DECL_NSISELECTIONPRIVATE
// utility methods for scrolling the selection into view
nsresult GetPresContext(nsIPresContext **aPresContext);
nsresult GetPresContext(nsPresContext **aPresContext);
nsresult GetPresShell(nsIPresShell **aPresShell);
nsresult GetRootScrollableView(nsIScrollableView **aScrollableView);
nsresult GetFrameToScrolledViewOffsets(nsIScrollableView *aScrollableView, nsIFrame *aFrame, nscoord *aXOffset, nscoord *aYOffset);
@ -207,7 +207,7 @@ public:
nsresult AddItem(nsIDOMRange *aRange);
nsresult RemoveItem(nsIDOMRange *aRange);
nsresult Clear(nsIPresContext* aPresContext);
nsresult Clear(nsPresContext* aPresContext);
// methods for convenience. Note, these don't addref
nsIDOMNode* FetchAnchorNode(); //where did the selection begin
PRInt32 FetchAnchorOffset();
@ -237,13 +237,13 @@ public:
NS_IMETHOD GetOriginalAnchorPoint(nsIDOMNode **aNode, PRInt32 *aOffset);
NS_IMETHOD LookUpSelection(nsIContent *aContent, PRInt32 aContentOffset, PRInt32 aContentLength,
SelectionDetails **aReturnDetails, SelectionType aType, PRBool aSlowCheck);
NS_IMETHOD Repaint(nsIPresContext* aPresContext);
NS_IMETHOD Repaint(nsPresContext* aPresContext);
nsresult StartAutoScrollTimer(nsIPresContext *aPresContext, nsIView *aView, nsPoint& aPoint, PRUint32 aDelay);
nsresult StartAutoScrollTimer(nsPresContext *aPresContext, nsIView *aView, nsPoint& aPoint, PRUint32 aDelay);
nsresult StopAutoScrollTimer();
nsresult DoAutoScrollView(nsIPresContext *aPresContext, nsIView *aView, nsPoint& aPoint, PRBool aScrollParentViews);
nsresult ScrollPointIntoClipView(nsIPresContext *aPresContext, nsIView *aView, nsPoint& aPoint, PRBool *aDidScroll);
nsresult ScrollPointIntoView(nsIPresContext *aPresContext, nsIView *aView, nsPoint& aPoint, PRBool aScrollParentViews, PRBool *aDidScroll);
nsresult DoAutoScrollView(nsPresContext *aPresContext, nsIView *aView, nsPoint& aPoint, PRBool aScrollParentViews);
nsresult ScrollPointIntoClipView(nsPresContext *aPresContext, nsIView *aView, nsPoint& aPoint, PRBool *aDidScroll);
nsresult ScrollPointIntoView(nsPresContext *aPresContext, nsIView *aView, nsPoint& aPoint, PRBool aScrollParentViews, PRBool *aDidScroll);
nsresult GetViewAncestorOffset(nsIView *aView, nsIView *aAncestorView, nscoord *aXOffset, nscoord *aYOffset);
nsresult GetClosestScrollableView(nsIView *aView, nsIScrollableView **aScrollableView);
@ -258,8 +258,8 @@ private:
void setAnchorFocusRange(PRInt32 aIndex); //pass in index into FrameSelection
NS_IMETHOD selectFrames(nsIPresContext* aPresContext, nsIContentIterator *aInnerIter, nsIContent *aContent, nsIDOMRange *aRange, nsIPresShell *aPresShell, PRBool aFlags);
NS_IMETHOD selectFrames(nsIPresContext* aPresContext, nsIDOMRange *aRange, PRBool aSelect);
NS_IMETHOD selectFrames(nsPresContext* aPresContext, nsIContentIterator *aInnerIter, nsIContent *aContent, nsIDOMRange *aRange, nsIPresShell *aPresShell, PRBool aFlags);
NS_IMETHOD selectFrames(nsPresContext* aPresContext, nsIDOMRange *aRange, PRBool aSelect);
nsresult getTableCellLocationFromRange(nsIDOMRange *aRange, PRInt32 *aSelectionType, PRInt32 *aRow, PRInt32 *aCol);
nsresult addTableCellRange(nsIDOMRange *aRange, PRBool *aDidAddRange);
@ -316,12 +316,12 @@ public:
NS_IMETHOD ShutDown();
NS_IMETHOD HandleTextEvent(nsGUIEvent *aGUIEvent);
NS_IMETHOD HandleKeyEvent(nsIPresContext* aPresContext, nsGUIEvent *aGuiEvent);
NS_IMETHOD HandleKeyEvent(nsPresContext* aPresContext, nsGUIEvent *aGuiEvent);
NS_IMETHOD HandleClick(nsIContent *aNewFocus, PRUint32 aContentOffset, PRUint32 aContentEndOffset,
PRBool aContinueSelection, PRBool aMultipleSelection,PRBool aHint);
NS_IMETHOD HandleDrag(nsIPresContext *aPresContext, nsIFrame *aFrame, nsPoint& aPoint);
NS_IMETHOD HandleDrag(nsPresContext *aPresContext, nsIFrame *aFrame, nsPoint& aPoint);
NS_IMETHOD HandleTableSelection(nsIContent *aParentContent, PRInt32 aContentOffset, PRInt32 aTarget, nsMouseEvent *aMouseEvent);
NS_IMETHOD StartAutoScrollTimer(nsIPresContext *aPresContext, nsIView *aView, nsPoint& aPoint, PRUint32 aDelay);
NS_IMETHOD StartAutoScrollTimer(nsPresContext *aPresContext, nsIView *aView, nsPoint& aPoint, PRUint32 aDelay);
NS_IMETHOD StopAutoScrollTimer();
NS_IMETHOD EnableFrameNotification(PRBool aEnable){mNotifyFrames = aEnable; return NS_OK;}
NS_IMETHOD LookUpSelection(nsIContent *aContent, PRInt32 aContentOffset, PRInt32 aContentLength,
@ -334,7 +334,7 @@ public:
NS_IMETHOD GetSelection(SelectionType aType, nsISelection **aDomSelection);
NS_IMETHOD ScrollSelectionIntoView(SelectionType aType, SelectionRegion aRegion, PRBool aIsSynchronous);
NS_IMETHOD RepaintSelection(nsIPresContext* aPresContext, SelectionType aType);
NS_IMETHOD RepaintSelection(nsPresContext* aPresContext, SelectionType aType);
NS_IMETHOD GetFrameForNodeOffset(nsIContent *aNode, PRInt32 aOffset, HINT aHint, nsIFrame **aReturnFrame, PRInt32 *aReturnOffset);
NS_IMETHOD CommonPageMove(PRBool aForward, PRBool aExtend, nsIScrollableView *aScrollableView, nsIFrameSelection *aFrameSel);
@ -357,14 +357,14 @@ public:
NS_IMETHOD GetLimiter(nsIContent **aLimiterContent);
NS_IMETHOD SetMouseDoubleDown(PRBool aDoubleDown);
NS_IMETHOD GetMouseDoubleDown(PRBool *aDoubleDown);
NS_IMETHOD GetPrevNextBidiLevels(nsIPresContext *aPresContext,
NS_IMETHOD GetPrevNextBidiLevels(nsPresContext *aPresContext,
nsIContent *aNode,
PRUint32 aContentOffset,
nsIFrame **aPrevFrame,
nsIFrame **aNextFrame,
PRUint8 *aPrevLevel,
PRUint8 *aNextLevel);
NS_IMETHOD GetFrameFromLevel(nsIPresContext *aPresContext,
NS_IMETHOD GetFrameFromLevel(nsPresContext *aPresContext,
nsIFrame *aFrameIn,
nsDirection aDirection,
PRUint8 aBidiLevel,
@ -387,17 +387,17 @@ private:
NS_IMETHOD TakeFocus(nsIContent *aNewFocus, PRUint32 aContentOffset, PRUint32 aContentEndOffset,
PRBool aContinueSelection, PRBool aMultipleSelection);
void BidiLevelFromMove(nsIPresContext* aContext,
void BidiLevelFromMove(nsPresContext* aContext,
nsIPresShell* aPresShell,
nsIContent *aNode,
PRUint32 aContentOffset,
PRUint32 aKeycode);
void BidiLevelFromClick(nsIContent *aNewFocus, PRUint32 aContentOffset);
#ifdef VISUALSELECTION
NS_IMETHOD VisualSelectFrames(nsIPresContext* aContext,
NS_IMETHOD VisualSelectFrames(nsPresContext* aContext,
nsIFrame* aCurrentFrame,
nsPeekOffsetStruct aPos);
NS_IMETHOD VisualSequence(nsIPresContext *aPresContext,
NS_IMETHOD VisualSequence(nsPresContext *aPresContext,
nsIFrame* aSelectFrame,
nsIFrame* aCurrentFrame,
nsPeekOffsetStruct* aPos,
@ -407,7 +407,7 @@ private:
PRInt32 aOffset,
PRInt32 aEdge,
PRBool aMultipleSelection);
NS_IMETHOD SelectLines(nsIPresContext *aPresContext,
NS_IMETHOD SelectLines(nsPresContext *aPresContext,
nsDirection aSelectionDirection,
nsIDOMNode *aAnchorNode,
nsIFrame* aAnchorFrame,
@ -443,8 +443,8 @@ private:
void SetDesiredX(nscoord aX); //set the mDesiredX
nsresult GetRootForContentSubtree(nsIContent *aContent, nsIContent **aParent);
nsresult GetGlobalViewOffsetsFromFrame(nsIPresContext *aPresContext, nsIFrame *aFrame, nscoord *offsetX, nscoord *offsetY);
nsresult ConstrainFrameAndPointToAnchorSubtree(nsIPresContext *aPresContext, nsIFrame *aFrame, nsPoint& aPoint, nsIFrame **aRetFrame, nsPoint& aRetPoint);
nsresult GetGlobalViewOffsetsFromFrame(nsPresContext *aPresContext, nsIFrame *aFrame, nscoord *offsetX, nscoord *offsetY);
nsresult ConstrainFrameAndPointToAnchorSubtree(nsPresContext *aPresContext, nsIFrame *aFrame, nsPoint& aPoint, nsIFrame **aRetFrame, nsPoint& aRetPoint);
PRUint32 GetBatching(){return mBatching;}
PRBool GetNotifyFrames(){return mNotifyFrames;}
@ -561,7 +561,7 @@ public:
mTimer->Cancel();
}
nsresult Start(nsIPresContext *aPresContext, nsIView *aView, nsPoint &aPoint)
nsresult Start(nsPresContext *aPresContext, nsIView *aView, nsPoint &aPoint)
{
mView = aView;
mPresContext = aPresContext;
@ -625,7 +625,7 @@ private:
nsTypedSelection *mSelection;
nsCOMPtr<nsITimer> mTimer;
nsIView *mView;
nsIPresContext *mPresContext;
nsPresContext *mPresContext;
nsPoint mPoint;
PRUint32 mDelay;
};
@ -964,7 +964,7 @@ nsSelection::FetchDesiredX(nscoord &aDesiredX) //the x position requested by the
return NS_OK;
}
nsCOMPtr<nsIPresContext> context;
nsCOMPtr<nsPresContext> context;
nsresult result = mTracker->GetPresContext(getter_AddRefs(context));
if (NS_FAILED(result))
return result;
@ -1060,7 +1060,7 @@ nsSelection::GetRootForContentSubtree(nsIContent *aContent, nsIContent **aParent
}
nsresult
nsSelection::GetGlobalViewOffsetsFromFrame(nsIPresContext *aPresContext, nsIFrame *aFrame, nscoord *offsetX, nscoord *offsetY)
nsSelection::GetGlobalViewOffsetsFromFrame(nsPresContext *aPresContext, nsIFrame *aFrame, nscoord *offsetX, nscoord *offsetY)
{
//
// The idea here is to figure out what the offset of aFrame's view
@ -1101,7 +1101,7 @@ nsSelection::GetGlobalViewOffsetsFromFrame(nsIPresContext *aPresContext, nsIFram
}
nsresult
nsSelection::ConstrainFrameAndPointToAnchorSubtree(nsIPresContext *aPresContext, nsIFrame *aFrame, nsPoint& aPoint, nsIFrame **aRetFrame, nsPoint& aRetPoint)
nsSelection::ConstrainFrameAndPointToAnchorSubtree(nsPresContext *aPresContext, nsIFrame *aFrame, nsPoint& aPoint, nsIFrame **aRetFrame, nsPoint& aRetPoint)
{
//
// The whole point of this method is to return a frame and point that
@ -1360,7 +1360,7 @@ nsSelection::HandleTextEvent(nsGUIEvent *aGUIEvent)
nsresult
nsSelection::MoveCaret(PRUint32 aKeycode, PRBool aContinue, nsSelectionAmount aAmount)
{
nsCOMPtr<nsIPresContext> context;
nsCOMPtr<nsPresContext> context;
nsresult result = mTracker->GetPresContext(getter_AddRefs(context));
if (NS_FAILED(result) || !context)
return result?result:NS_ERROR_FAILURE;
@ -1566,7 +1566,7 @@ nsSelection::MoveCaret(PRUint32 aKeycode, PRBool aContinue, nsSelectionAmount aA
* focus DomNode, it is invalid? The answer now is yes.
*/
NS_IMETHODIMP
nsSelection::HandleKeyEvent(nsIPresContext* aPresContext, nsGUIEvent *aGuiEvent)
nsSelection::HandleKeyEvent(nsPresContext* aPresContext, nsGUIEvent *aGuiEvent)
{
if (!aGuiEvent)
return NS_ERROR_NULL_POINTER;
@ -1709,7 +1709,7 @@ FindLineContaining(nsIFrame* aFrame, nsIFrame** aBlock, PRInt32* aLine)
}
NS_IMETHODIMP
nsSelection::VisualSequence(nsIPresContext *aPresContext,
nsSelection::VisualSequence(nsPresContext *aPresContext,
nsIFrame* aSelectFrame,
nsIFrame* aCurrentFrame,
nsPeekOffsetStruct* aPos,
@ -1778,7 +1778,7 @@ nsSelection::SelectToEdge(nsIFrame *aFrame, nsIContent *aContent, PRInt32 aOffse
}
NS_IMETHODIMP
nsSelection::SelectLines(nsIPresContext *aPresContext,
nsSelection::SelectLines(nsPresContext *aPresContext,
nsDirection aSelectionDirection,
nsIDOMNode *aAnchorNode,
nsIFrame* aAnchorFrame,
@ -1881,7 +1881,7 @@ nsSelection::SelectLines(nsIPresContext *aPresContext,
}
NS_IMETHODIMP
nsSelection::VisualSelectFrames(nsIPresContext *aPresContext,
nsSelection::VisualSelectFrames(nsPresContext *aPresContext,
nsIFrame* aCurrentFrame,
nsPeekOffsetStruct aPos)
{
@ -2082,7 +2082,7 @@ nsSelection::VisualSelectFrames(nsIPresContext *aPresContext,
#endif // VISUALSELECTION
NS_IMETHODIMP
nsSelection::GetPrevNextBidiLevels(nsIPresContext *aPresContext,
nsSelection::GetPrevNextBidiLevels(nsPresContext *aPresContext,
nsIContent *aNode,
PRUint32 aContentOffset,
nsIFrame **aPrevFrame,
@ -2253,7 +2253,7 @@ nsSelection::GetPrevNextBidiLevels(nsIPresContext *aPresContext,
}
NS_IMETHODIMP nsSelection::GetFrameFromLevel(nsIPresContext *aPresContext,
NS_IMETHODIMP nsSelection::GetFrameFromLevel(nsPresContext *aPresContext,
nsIFrame *aFrameIn,
nsDirection aDirection,
PRUint8 aBidiLevel,
@ -2344,7 +2344,7 @@ nsSelection::MaintainSelection()
* @param aContentOffset is the new caret position, as an offset into aNode
* @param aKeycode is the keyboard event that moved the caret to the new position
*/
void nsSelection::BidiLevelFromMove(nsIPresContext* aContext,
void nsSelection::BidiLevelFromMove(nsPresContext* aContext,
nsIPresShell* aPresShell,
nsIContent *aNode,
PRUint32 aContentOffset,
@ -2392,7 +2392,7 @@ void nsSelection::BidiLevelFromMove(nsIPresContext* aContext,
*/
void nsSelection::BidiLevelFromClick(nsIContent *aNode, PRUint32 aContentOffset)
{
nsCOMPtr<nsIPresContext> context;
nsCOMPtr<nsPresContext> context;
nsresult result = mTracker->GetPresContext(getter_AddRefs(context));
if (NS_FAILED(result) || !context)
return;
@ -2497,7 +2497,7 @@ nsSelection::HandleClick(nsIContent *aNewFocus, PRUint32 aContentOffset,
}
NS_IMETHODIMP
nsSelection::HandleDrag(nsIPresContext *aPresContext, nsIFrame *aFrame, nsPoint& aPoint)
nsSelection::HandleDrag(nsPresContext *aPresContext, nsIFrame *aFrame, nsPoint& aPoint)
{
if (!aPresContext || !aFrame)
return NS_ERROR_NULL_POINTER;
@ -2572,7 +2572,7 @@ nsSelection::HandleDrag(nsIPresContext *aPresContext, nsIFrame *aFrame, nsPoint&
}
NS_IMETHODIMP
nsSelection::StartAutoScrollTimer(nsIPresContext *aPresContext, nsIView *aView, nsPoint& aPoint, PRUint32 aDelay)
nsSelection::StartAutoScrollTimer(nsPresContext *aPresContext, nsIView *aView, nsPoint& aPoint, PRUint32 aDelay)
{
PRInt8 index = GetIndexFromSelectionType(nsISelectionController::SELECTION_NORMAL);
return mDomSelections[index]->StartAutoScrollTimer(aPresContext, aView, aPoint, aDelay);
@ -2647,7 +2647,7 @@ nsSelection::TakeFocus(nsIContent *aNewFocus, PRUint32 aContentOffset,
//if we are no longer inside same table ,cell then switch to table selection mode.
// BUT only do this in an editor
nsCOMPtr<nsIPresContext> presContext;
nsCOMPtr<nsPresContext> presContext;
nsresult result = mTracker->GetPresContext(getter_AddRefs(presContext));
if (NS_FAILED(result) || !presContext)
return result?result:NS_ERROR_FAILURE;
@ -2807,7 +2807,7 @@ nsSelection::ScrollSelectionIntoView(SelectionType aType, SelectionRegion aRegio
}
NS_IMETHODIMP
nsSelection::RepaintSelection(nsIPresContext* aPresContext, SelectionType aType)
nsSelection::RepaintSelection(nsPresContext* aPresContext, SelectionType aType)
{
PRInt8 index = GetIndexFromSelectionType(aType);
if (index < 0)
@ -2960,7 +2960,7 @@ nsSelection::CommonPageMove(PRBool aForward,
return result;
nsRect viewRect = clipView->GetBounds();
nsCOMPtr<nsIPresContext> context;
nsCOMPtr<nsPresContext> context;
result = mTracker->GetPresContext(getter_AddRefs(context));
if (NS_FAILED(result))
@ -4720,7 +4720,7 @@ nsTypedSelection::RemoveItem(nsIDOMRange *aItem)
nsresult
nsTypedSelection::Clear(nsIPresContext* aPresContext)
nsTypedSelection::Clear(nsPresContext* aPresContext)
{
setAnchorFocusRange(-1);
// Get an iterator
@ -4831,7 +4831,7 @@ nsTypedSelection::GetPrimaryFrameForFocusNode(nsIFrame **aReturnFrame, PRInt32 *
//select all content children of aContent
NS_IMETHODIMP
nsTypedSelection::selectFrames(nsIPresContext* aPresContext,
nsTypedSelection::selectFrames(nsPresContext* aPresContext,
nsIContentIterator *aInnerIter,
nsIContent *aContent,
nsIDOMRange *aRange,
@ -4926,7 +4926,7 @@ nsTypedSelection::selectFrames(nsIPresContext* aPresContext,
//the idea of this helper method is to select, deselect "top to bottom" traversing through the frames
NS_IMETHODIMP
nsTypedSelection::selectFrames(nsIPresContext* aPresContext, nsIDOMRange *aRange, PRBool aFlags)
nsTypedSelection::selectFrames(nsPresContext* aPresContext, nsIDOMRange *aRange, PRBool aFlags)
{
if (!mFrameSelection)
return NS_OK;//nothing to do
@ -5137,7 +5137,7 @@ nsTypedSelection::LookUpSelection(nsIContent *aContent, PRInt32 aContentOffset,
}
NS_IMETHODIMP
nsTypedSelection::Repaint(nsIPresContext* aPresContext)
nsTypedSelection::Repaint(nsPresContext* aPresContext)
{
PRInt32 arrCount = mRangeArray.Count();
@ -5225,7 +5225,7 @@ nsTypedSelection::GetCachedFrameOffset(nsIFrame *aFrame, PRInt32 inOffset, nsPoi
}
nsresult
nsTypedSelection::StartAutoScrollTimer(nsIPresContext *aPresContext, nsIView *aView, nsPoint& aPoint, PRUint32 aDelay)
nsTypedSelection::StartAutoScrollTimer(nsPresContext *aPresContext, nsIView *aView, nsPoint& aPoint, PRUint32 aDelay)
{
nsresult result;
if (!mFrameSelection)
@ -5308,7 +5308,7 @@ nsTypedSelection::GetClosestScrollableView(nsIView *aView, nsIScrollableView **a
}
nsresult
nsTypedSelection::ScrollPointIntoClipView(nsIPresContext *aPresContext, nsIView *aView, nsPoint& aPoint, PRBool *aDidScroll)
nsTypedSelection::ScrollPointIntoClipView(nsPresContext *aPresContext, nsIView *aView, nsPoint& aPoint, PRBool *aDidScroll)
{
nsresult result;
@ -5470,7 +5470,7 @@ nsTypedSelection::ScrollPointIntoClipView(nsIPresContext *aPresContext, nsIView
}
nsresult
nsTypedSelection::ScrollPointIntoView(nsIPresContext *aPresContext, nsIView *aView, nsPoint& aPoint, PRBool aScrollParentViews, PRBool *aDidScroll)
nsTypedSelection::ScrollPointIntoView(nsPresContext *aPresContext, nsIView *aView, nsPoint& aPoint, PRBool aScrollParentViews, PRBool *aDidScroll)
{
if (!aPresContext || !aView || !aDidScroll)
return NS_ERROR_NULL_POINTER;
@ -5603,7 +5603,7 @@ nsTypedSelection::ScrollPointIntoView(nsIPresContext *aPresContext, nsIView *aVi
}
nsresult
nsTypedSelection::DoAutoScrollView(nsIPresContext *aPresContext, nsIView *aView, nsPoint& aPoint, PRBool aScrollParentViews)
nsTypedSelection::DoAutoScrollView(nsPresContext *aPresContext, nsIView *aView, nsPoint& aPoint, PRBool aScrollParentViews)
{
if (!aPresContext || !aView)
return NS_ERROR_NULL_POINTER;
@ -5685,7 +5685,7 @@ nsTypedSelection::RemoveAllRanges()
{
if (!mFrameSelection)
return NS_OK;//nothing to do
nsCOMPtr<nsIPresContext> presContext;
nsCOMPtr<nsPresContext> presContext;
GetPresContext(getter_AddRefs(presContext));
@ -5732,7 +5732,7 @@ nsTypedSelection::AddRange(nsIDOMRange* aRange)
}
setAnchorFocusRange(count -1);
nsCOMPtr<nsIPresContext> presContext;
nsCOMPtr<nsPresContext> presContext;
GetPresContext(getter_AddRefs(presContext));
selectFrames(presContext, aRange, PR_TRUE);
@ -5750,7 +5750,7 @@ nsTypedSelection::RemoveRange(nsIDOMRange* aRange)
return NS_ERROR_INVALID_ARG;
RemoveItem(aRange);
nsCOMPtr<nsIPresContext> presContext;
nsCOMPtr<nsPresContext> presContext;
GetPresContext(getter_AddRefs(presContext));
selectFrames(presContext, aRange, PR_FALSE);
if (aRange == mAnchorFocusRange.get())
@ -5784,7 +5784,7 @@ nsTypedSelection::Collapse(nsIDOMNode* aParentNode, PRInt32 aOffset)
// Delete all of the current ranges
if (NS_FAILED(SetOriginalAnchorPoint(aParentNode,aOffset)))
return NS_ERROR_FAILURE; //???
nsCOMPtr<nsIPresContext> presContext;
nsCOMPtr<nsPresContext> presContext;
GetPresContext(getter_AddRefs(presContext));
Clear(presContext);
@ -6340,7 +6340,7 @@ nsTypedSelection::Extend(nsIDOMNode* aParentNode, PRInt32 aOffset)
if (result2 == 0) //not selecting anywhere
return NS_OK;
nsCOMPtr<nsIPresContext> presContext;
nsCOMPtr<nsPresContext> presContext;
GetPresContext(getter_AddRefs(presContext));
if ((result1 == 0 && result3 < 0) || (result1 <= 0 && result2 < 0)){//a1,2 a,1,2
//select from 1 to 2 unless they are collapsed
@ -6710,7 +6710,7 @@ nsTypedSelection::ContainsNode(nsIDOMNode* aNode, PRBool aRecursive, PRBool* aYe
nsresult
nsTypedSelection::GetPresContext(nsIPresContext **aPresContext)
nsTypedSelection::GetPresContext(nsPresContext **aPresContext)
{
if (!mFrameSelection)
return NS_ERROR_FAILURE;//nothing to do
@ -6741,7 +6741,7 @@ nsTypedSelection::GetPresShell(nsIPresShell **aPresShell)
if (!tracker)
return NS_ERROR_NULL_POINTER;
nsCOMPtr<nsIPresContext> presContext;
nsCOMPtr<nsPresContext> presContext;
rv = tracker->GetPresContext(getter_AddRefs(presContext));
@ -6833,7 +6833,7 @@ nsTypedSelection::GetFrameToScrolledViewOffsets(nsIScrollableView *aScrollableVi
if (!tracker)
return NS_ERROR_NULL_POINTER;
nsCOMPtr<nsIPresContext> presContext;
nsCOMPtr<nsPresContext> presContext;
tracker->GetPresContext(getter_AddRefs(presContext));
aFrame->GetOffsetFromView(presContext, offset, &closestView);
@ -6875,7 +6875,7 @@ nsTypedSelection::GetPointFromOffset(nsIFrame *aFrame, PRInt32 aContentOffset, n
if (!tracker)
return NS_ERROR_NULL_POINTER;
nsCOMPtr<nsIPresContext> presContext;
nsCOMPtr<nsPresContext> presContext;
rv = tracker->GetPresContext(getter_AddRefs(presContext));
@ -7000,7 +7000,7 @@ nsTypedSelection::GetSelectionRegionRectAndScrollableView(SelectionRegion aRegio
// Get the frame's scrollable view.
//
nsCOMPtr<nsIPresContext> presContext;
nsCOMPtr<nsPresContext> presContext;
result = GetPresContext(getter_AddRefs(presContext));
@ -7547,7 +7547,7 @@ nsTypedSelection::SelectionLanguageChange(PRBool aLangRTL)
PRInt32 frameStart, frameEnd;
focusFrame->GetOffsets(frameStart, frameEnd);
nsCOMPtr<nsIPresContext> context;
nsCOMPtr<nsPresContext> context;
PRUint8 levelBefore, levelAfter;
result = GetPresContext(getter_AddRefs(context));
if (NS_FAILED(result) || !context)

Просмотреть файл

@ -39,7 +39,7 @@
#include "nsStyleConsts.h"
#include "nsString.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsIStyleRule.h"
#include "nsISupportsArray.h"
#include "nsCRT.h"
@ -65,7 +65,7 @@
nsStyleContext::nsStyleContext(nsStyleContext* aParent,
nsIAtom* aPseudoTag,
nsRuleNode* aRuleNode,
nsIPresContext* aPresContext)
nsPresContext* aPresContext)
: mParent((nsStyleContext*)aParent),
mChild(nsnull),
mEmptyChild(nsnull),
@ -92,7 +92,7 @@ nsStyleContext::~nsStyleContext()
{
NS_ASSERTION((nsnull == mChild) && (nsnull == mEmptyChild), "destructing context with children");
nsIPresContext *presContext = mRuleNode->GetPresContext();
nsPresContext *presContext = mRuleNode->GetPresContext();
presContext->PresShell()->StyleSet()->
NotifyStyleContextDestroyed(presContext, this);
@ -288,7 +288,7 @@ nsStyleContext::GetUniqueStyleData(const nsStyleStructID& aSID)
return NS_CONST_CAST(nsStyleStruct*, current);
nsStyleStruct* result;
nsIPresContext *presContext = PresContext();
nsPresContext *presContext = PresContext();
switch (aSID) {
#define UNIQUE_CASE(c_) \
@ -334,7 +334,7 @@ nsStyleContext::SetStyle(nsStyleStructID aSID, nsStyleStruct* aStruct)
char* resetOrInherit = NS_REINTERPRET_CAST(char*,
*NS_REINTERPRET_CAST(void**, resetOrInheritSlot));
if (!resetOrInherit) {
nsIPresContext *presContext = mRuleNode->GetPresContext();
nsPresContext *presContext = mRuleNode->GetPresContext();
if (mCachedStyleData.IsReset(aSID)) {
mCachedStyleData.mResetData = new (presContext) nsResetStyleData;
resetOrInherit = NS_REINTERPRET_CAST(char*, mCachedStyleData.mResetData);
@ -350,7 +350,7 @@ nsStyleContext::SetStyle(nsStyleStructID aSID, nsStyleStruct* aStruct)
}
void
nsStyleContext::ApplyStyleFixups(nsIPresContext* aPresContext)
nsStyleContext::ApplyStyleFixups(nsPresContext* aPresContext)
{
// See if we have any text decorations.
// First see if our parent has text decorations. If our parent does, then we inherit the bit.
@ -402,7 +402,7 @@ nsStyleContext::ApplyStyleFixups(nsIPresContext* aPresContext)
}
void
nsStyleContext::ClearStyleData(nsIPresContext* aPresContext)
nsStyleContext::ClearStyleData(nsPresContext* aPresContext)
{
// First we need to clear out all of our style data.
if (mCachedStyleData.mResetData || mCachedStyleData.mInheritedData)
@ -622,7 +622,7 @@ static void IndentBy(FILE* out, PRInt32 aIndent) {
while (--aIndent >= 0) fputs(" ", out);
}
// virtual
void nsStyleContext::DumpRegressionData(nsIPresContext* aPresContext, FILE* out, PRInt32 aIndent)
void nsStyleContext::DumpRegressionData(nsPresContext* aPresContext, FILE* out, PRInt32 aIndent)
{
nsAutoString str;
@ -886,7 +886,7 @@ void nsStyleContext::DumpRegressionData(nsIPresContext* aPresContext, FILE* out,
// Overloaded new operator. Initializes the memory to 0 and relies on an arena
// (which comes from the presShell) to perform the allocation.
void*
nsStyleContext::operator new(size_t sz, nsIPresContext* aPresContext) CPP_THROW_NEW
nsStyleContext::operator new(size_t sz, nsPresContext* aPresContext) CPP_THROW_NEW
{
// Check the recycle list first.
return aPresContext->AllocateFromShell(sz);
@ -898,7 +898,7 @@ void
nsStyleContext::Destroy()
{
// Get the pres context from our rule node.
nsCOMPtr<nsIPresContext> presContext = mRuleNode->GetPresContext();
nsCOMPtr<nsPresContext> presContext = mRuleNode->GetPresContext();
// Call our destructor.
this->~nsStyleContext();
@ -912,7 +912,7 @@ already_AddRefed<nsStyleContext>
NS_NewStyleContext(nsStyleContext* aParentContext,
nsIAtom* aPseudoTag,
nsRuleNode* aRuleNode,
nsIPresContext* aPresContext)
nsPresContext* aPresContext)
{
nsStyleContext* context = new (aPresContext) nsStyleContext(aParentContext, aPseudoTag,
aRuleNode, aPresContext);

Просмотреть файл

@ -62,7 +62,7 @@ nsStyleSet::nsStyleSet()
}
nsresult
nsStyleSet::Init(nsIPresContext *aPresContext)
nsStyleSet::Init(nsPresContext *aPresContext)
{
if (!gQuirkURI) {
static const char kQuirk_href[] = "resource://gre/res/quirk.css";
@ -301,7 +301,7 @@ nsStyleSet::EnableQuirkStyleSheet(PRBool aEnable)
}
struct RulesMatchingData : public ElementRuleProcessorData {
RulesMatchingData(nsIPresContext* aPresContext,
RulesMatchingData(nsPresContext* aPresContext,
nsIContent* aContent,
nsRuleWalker* aRuleWalker)
: ElementRuleProcessorData(aPresContext, aContent, aRuleWalker),
@ -327,7 +327,7 @@ EnumRulesMatching(nsIStyleRuleProcessor* aProcessor, void* aData)
* |aParentContext| could itself be a shared context.)
*/
already_AddRefed<nsStyleContext>
nsStyleSet::GetContext(nsIPresContext* aPresContext,
nsStyleSet::GetContext(nsPresContext* aPresContext,
nsStyleContext* aParentContext,
nsIAtom* aPseudoTag)
{
@ -507,7 +507,7 @@ nsStyleSet::WalkRuleProcessors(nsIStyleRuleProcessor::EnumFunc aFunc,
(*aFunc)(mRuleProcessors[eOverrideSheet], aData);
}
PRBool nsStyleSet::BuildDefaultStyleData(nsIPresContext* aPresContext)
PRBool nsStyleSet::BuildDefaultStyleData(nsPresContext* aPresContext)
{
NS_ASSERTION(!mDefaultStyleData.mResetData &&
!mDefaultStyleData.mInheritedData,
@ -545,7 +545,7 @@ nsStyleSet::ResolveStyleFor(nsIContent* aContent,
nsStyleContext* aParentContext)
{
nsStyleContext* result = nsnull;
nsIPresContext* presContext = PresContext();
nsPresContext* presContext = PresContext();
NS_ASSERTION(aContent, "must have content");
NS_ASSERTION(aContent->IsContentOfType(nsIContent::eELEMENT),
@ -575,7 +575,7 @@ already_AddRefed<nsStyleContext>
nsStyleSet::ResolveStyleForNonElement(nsStyleContext* aParentContext)
{
nsStyleContext* result = nsnull;
nsIPresContext *presContext = PresContext();
nsPresContext *presContext = PresContext();
if (presContext) {
if (mRuleProcessors[eAgentSheet] ||
@ -596,7 +596,7 @@ nsStyleSet::ResolveStyleForNonElement(nsStyleContext* aParentContext)
struct PseudoRulesMatchingData : public PseudoRuleProcessorData {
PseudoRulesMatchingData(nsIPresContext* aPresContext,
PseudoRulesMatchingData(nsPresContext* aPresContext,
nsIContent* aParentContent,
nsIAtom* aPseudoTag,
nsICSSPseudoComparator* aComparator,
@ -625,7 +625,7 @@ nsStyleSet::ResolvePseudoStyleFor(nsIContent* aParentContent,
nsICSSPseudoComparator* aComparator)
{
nsStyleContext* result = nsnull;
nsIPresContext *presContext = PresContext();
nsPresContext *presContext = PresContext();
NS_ASSERTION(aPseudoTag, "must have pseudo tag");
NS_ASSERTION(!aParentContent ||
@ -660,7 +660,7 @@ nsStyleSet::ProbePseudoStyleFor(nsIContent* aParentContent,
nsStyleContext* aParentContext)
{
nsStyleContext* result = nsnull;
nsIPresContext *presContext = PresContext();
nsPresContext *presContext = PresContext();
NS_ASSERTION(aPseudoTag, "must have pseudo tag");
NS_ASSERTION(!aParentContent ||
@ -707,14 +707,14 @@ nsStyleSet::ProbePseudoStyleFor(nsIContent* aParentContent,
}
void
nsStyleSet::BeginShutdown(nsIPresContext* aPresContext)
nsStyleSet::BeginShutdown(nsPresContext* aPresContext)
{
mInShutdown = 1;
mRoots.Clear(); // no longer valid, since we won't keep it up to date
}
void
nsStyleSet::Shutdown(nsIPresContext* aPresContext)
nsStyleSet::Shutdown(nsPresContext* aPresContext)
{
delete mRuleWalker;
mRuleWalker = nsnull;
@ -728,7 +728,7 @@ nsStyleSet::Shutdown(nsIPresContext* aPresContext)
static const PRInt32 kGCInterval = 1000;
void
nsStyleSet::NotifyStyleContextDestroyed(nsIPresContext* aPresContext,
nsStyleSet::NotifyStyleContextDestroyed(nsPresContext* aPresContext,
nsStyleContext* aStyleContext)
{
if (mInShutdown)
@ -761,7 +761,7 @@ nsStyleSet::NotifyStyleContextDestroyed(nsIPresContext* aPresContext,
}
void
nsStyleSet::ClearStyleData(nsIPresContext* aPresContext)
nsStyleSet::ClearStyleData(nsPresContext* aPresContext)
{
mRuleTree->ClearStyleData();
@ -771,7 +771,7 @@ nsStyleSet::ClearStyleData(nsIPresContext* aPresContext)
}
already_AddRefed<nsStyleContext>
nsStyleSet::ReParentStyleContext(nsIPresContext* aPresContext,
nsStyleSet::ReParentStyleContext(nsPresContext* aPresContext,
nsStyleContext* aStyleContext,
nsStyleContext* aNewParentContext)
{
@ -799,7 +799,7 @@ nsStyleSet::ReParentStyleContext(nsIPresContext* aPresContext,
}
struct StatefulData : public StateRuleProcessorData {
StatefulData(nsIPresContext* aPresContext,
StatefulData(nsPresContext* aPresContext,
nsIContent* aContent, PRInt32 aStateMask)
: StateRuleProcessorData(aPresContext, aContent, aStateMask),
mMedium(aPresContext->Medium()),
@ -821,7 +821,7 @@ static PRBool SheetHasStatefulStyle(nsIStyleRuleProcessor* aProcessor,
// Test if style is dependent on content state
nsReStyleHint
nsStyleSet::HasStateDependentStyle(nsIPresContext* aPresContext,
nsStyleSet::HasStateDependentStyle(nsPresContext* aPresContext,
nsIContent* aContent,
PRInt32 aStateMask)
{
@ -844,7 +844,7 @@ nsStyleSet::HasStateDependentStyle(nsIPresContext* aPresContext,
}
struct AttributeData : public AttributeRuleProcessorData {
AttributeData(nsIPresContext* aPresContext,
AttributeData(nsPresContext* aPresContext,
nsIContent* aContent, nsIAtom* aAttribute, PRInt32 aModType)
: AttributeRuleProcessorData(aPresContext, aContent, aAttribute, aModType),
mMedium(aPresContext->Medium()),
@ -866,7 +866,7 @@ SheetHasAttributeStyle(nsIStyleRuleProcessor* aProcessor, void *aData)
// Test if style is dependent on content state
nsReStyleHint
nsStyleSet::HasAttributeDependentStyle(nsIPresContext* aPresContext,
nsStyleSet::HasAttributeDependentStyle(nsPresContext* aPresContext,
nsIContent* aContent,
nsIAtom* aAttribute,
PRInt32 aModType)

Просмотреть файл

@ -60,14 +60,14 @@ class nsStyleSet
// Initialize the object. You must check the return code and not use
// the nsStyleSet if Init() fails.
nsresult Init(nsIPresContext *aPresContext);
nsresult Init(nsPresContext *aPresContext);
// For getting the cached default data in case we hit out-of-memory.
// To be used only by nsRuleNode.
nsCachedStyleData* DefaultStyleData() { return &mDefaultStyleData; }
// clear out all of the computed style data
void ClearStyleData(nsIPresContext *aPresContext);
void ClearStyleData(nsPresContext *aPresContext);
// enable / disable the Quirk style sheet
void EnableQuirkStyleSheet(PRBool aEnable);
@ -107,30 +107,30 @@ class nsStyleSet
// Begin ignoring style context destruction, to avoid lots of unnecessary
// work on document teardown.
void BeginShutdown(nsIPresContext* aPresContext);
void BeginShutdown(nsPresContext* aPresContext);
// Free all of the data associated with this style set.
void Shutdown(nsIPresContext* aPresContext);
void Shutdown(nsPresContext* aPresContext);
// Notification that a style context is being destroyed.
void NotifyStyleContextDestroyed(nsIPresContext* aPresContext,
void NotifyStyleContextDestroyed(nsPresContext* aPresContext,
nsStyleContext* aStyleContext);
// Get a new style context that lives in a different parent
// The new context will be the same as the old if the new parent is the
// same as the old parent.
already_AddRefed<nsStyleContext>
ReParentStyleContext(nsIPresContext* aPresContext,
ReParentStyleContext(nsPresContext* aPresContext,
nsStyleContext* aStyleContext,
nsStyleContext* aNewParentContext);
// Test if style is dependent on content state
nsReStyleHint HasStateDependentStyle(nsIPresContext* aPresContext,
nsReStyleHint HasStateDependentStyle(nsPresContext* aPresContext,
nsIContent* aContent,
PRInt32 aStateMask);
// Test if style is dependent on the presence of an attribute.
nsReStyleHint HasAttributeDependentStyle(nsIPresContext* aPresContext,
nsReStyleHint HasAttributeDependentStyle(nsPresContext* aPresContext,
nsIContent* aContent,
nsIAtom* aAttribute,
PRInt32 aModType);
@ -190,7 +190,7 @@ class nsStyleSet
nsStyleSet& operator=(const nsStyleSet& aCopy);
// Returns false on out-of-memory.
PRBool BuildDefaultStyleData(nsIPresContext* aPresContext);
PRBool BuildDefaultStyleData(nsPresContext* aPresContext);
// Update the rule processor list after a change to the style sheet list.
nsresult GatherRuleProcessors(sheetType aType);
@ -222,11 +222,11 @@ class nsStyleSet
void WalkRuleProcessors(nsIStyleRuleProcessor::EnumFunc aFunc,
RuleProcessorData* aData);
already_AddRefed<nsStyleContext> GetContext(nsIPresContext* aPresContext,
already_AddRefed<nsStyleContext> GetContext(nsPresContext* aPresContext,
nsStyleContext* aParentContext,
nsIAtom* aPseudoTag);
nsIPresContext* PresContext() { return mRuleTree->GetPresContext(); }
nsPresContext* PresContext() { return mRuleTree->GetPresContext(); }
static nsIURI *gQuirkURI;

Просмотреть файл

@ -42,7 +42,7 @@
#include "nsISupports.h"
#include "nsVoidArray.h"
class nsIPresContext;
class nsPresContext;
class nsIDOMEventListener;
class nsIScriptContext;
class nsIDOMEventTarget;
@ -130,7 +130,7 @@ public:
* Event flags live in nsGUIEvent.h
* @param an event listener
*/
NS_IMETHOD HandleEvent(nsIPresContext* aPresContext,
NS_IMETHOD HandleEvent(nsPresContext* aPresContext,
nsEvent* aEvent,
nsIDOMEvent** aDOMEvent,
nsIDOMEventTarget* aCurrentTarget,
@ -142,7 +142,7 @@ public:
* (used rarely in the situation where methods on the event need to be
* invoked prior to the processing of the event).
*/
NS_IMETHOD CreateEvent(nsIPresContext* aPresContext,
NS_IMETHOD CreateEvent(nsPresContext* aPresContext,
nsEvent* aEvent,
const nsAString& aEventType,
nsIDOMEvent** aDOMEvent) = 0;

Просмотреть файл

@ -43,7 +43,7 @@
#include "nsVoidArray.h"
class nsIContent;
class nsIPresContext;
class nsPresContext;
class nsIDOMEvent;
class nsIFrame;
class nsIView;
@ -66,13 +66,13 @@ public:
NS_IMETHOD Init() = 0;
NS_IMETHOD PreHandleEvent(nsIPresContext* aPresContext,
NS_IMETHOD PreHandleEvent(nsPresContext* aPresContext,
nsEvent *aEvent,
nsIFrame* aTargetFrame,
nsEventStatus* aStatus,
nsIView* aView) = 0;
NS_IMETHOD PostHandleEvent(nsIPresContext* aPresContext,
NS_IMETHOD PostHandleEvent(nsPresContext* aPresContext,
nsEvent *aEvent,
nsIFrame* aTargetFrame,
nsEventStatus* aStatus,
@ -83,7 +83,7 @@ public:
NS_IMETHOD SetCurrentEvent(nsEvent *aEvent) = 0;
NS_IMETHOD GetCurrentEvent(nsEvent **aEvent) = 0; // 0 if none
NS_IMETHOD SetPresContext(nsIPresContext* aPresContext) = 0;
NS_IMETHOD SetPresContext(nsPresContext* aPresContext) = 0;
NS_IMETHOD ClearFrameRefs(nsIFrame* aFrame) = 0;
NS_IMETHOD GetEventTarget(nsIFrame **aFrame) = 0;

Просмотреть файл

@ -41,7 +41,7 @@
#include "nsEvent.h"
#include "nsISupports.h"
class nsIPresContext;
class nsPresContext;
/*
* Event listener manager interface.
@ -72,10 +72,10 @@ public:
nsresult
NS_NewDOMUIEvent(nsIDOMEvent** aInstancePtrResult,
nsIPresContext* aPresContext, const nsAString& aEventType,
nsPresContext* aPresContext, const nsAString& aEventType,
nsEvent *aEvent);
nsresult
NS_NewDOMMutationEvent(nsIDOMEvent** aResult, nsIPresContext* aPresContext,
NS_NewDOMMutationEvent(nsIDOMEvent** aResult, nsPresContext* aPresContext,
nsEvent* aEvent);
#endif // nsIPrivateDOMEvent_h__

Просмотреть файл

@ -146,7 +146,7 @@ nsDOMEvent::operator delete(void* aPtr)
nsDOMEvent::nsDOMEvent(nsIPresContext* aPresContext, nsEvent* aEvent,
nsDOMEvent::nsDOMEvent(nsPresContext* aPresContext, nsEvent* aEvent,
const nsAString& aEventType)
{
@ -1554,7 +1554,7 @@ const char* nsDOMEvent::GetEventName(PRUint32 aEventType)
nsresult
NS_NewDOMUIEvent(nsIDOMEvent** aInstancePtrResult,
nsIPresContext* aPresContext, const nsAString& aEventType,
nsPresContext* aPresContext, const nsAString& aEventType,
nsEvent *aEvent)
{
nsDOMEvent* it = new nsDOMEvent(aPresContext, aEvent, aEventType);

Просмотреть файл

@ -51,7 +51,7 @@
#include "nsIDOMEvent.h"
#include "nsCOMPtr.h"
#include "nsIDOMEventTarget.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsPoint.h"
#include "nsGUIEvent.h"
@ -127,7 +127,7 @@ public:
eDOMEvents_DOMFocusOut
};
nsDOMEvent(nsIPresContext* aPresContext, nsEvent* aEvent,
nsDOMEvent(nsPresContext* aPresContext, nsEvent* aEvent,
const nsAString& aEventType);
virtual ~nsDOMEvent();
@ -222,7 +222,7 @@ protected:
nsPoint GetScreenPoint();
nsEvent* mEvent;
nsCOMPtr<nsIPresContext> mPresContext;
nsCOMPtr<nsPresContext> mPresContext;
nsCOMPtr<nsIDOMEventTarget> mTarget;
nsCOMPtr<nsIDOMEventTarget> mCurrentTarget;
nsCOMPtr<nsIDOMEventTarget> mOriginalTarget;

Просмотреть файл

@ -41,7 +41,7 @@
#include "nsMutationEvent.h"
#include "nsContentUtils.h"
class nsIPresContext;
class nsPresContext;
class nsDOMMutationEvent : public nsDOMEvent, public nsIDOMMutationEvent
{
@ -50,13 +50,13 @@ class nsDOMMutationEvent : public nsDOMEvent, public nsIDOMMutationEvent
NS_DECL_ISUPPORTS_INHERITED
nsDOMMutationEvent(nsIPresContext* aPresContext,
nsDOMMutationEvent(nsPresContext* aPresContext,
nsEvent* aEvent);
~nsDOMMutationEvent();
};
nsDOMMutationEvent::nsDOMMutationEvent(nsIPresContext* aPresContext,
nsDOMMutationEvent::nsDOMMutationEvent(nsPresContext* aPresContext,
nsEvent* aEvent)
:nsDOMEvent(aPresContext, aEvent, NS_LITERAL_STRING("MutationEvents"))
{
@ -170,7 +170,7 @@ nsDOMMutationEvent::InitMutationEvent(const nsAString& aTypeArg, PRBool aCanBubb
}
nsresult NS_NewDOMMutationEvent(nsIDOMEvent** aInstancePtrResult,
nsIPresContext* aPresContext,
nsPresContext* aPresContext,
nsEvent *aEvent)
{
nsDOMMutationEvent* it = new nsDOMMutationEvent(aPresContext, aEvent);

Просмотреть файл

@ -1521,7 +1521,7 @@ nsEventListenerManager::HandleEventSubType(nsListenerStruct* aListenerStruct,
* @param an event listener
*/
nsresult nsEventListenerManager::HandleEvent(nsIPresContext* aPresContext,
nsresult nsEventListenerManager::HandleEvent(nsPresContext* aPresContext,
nsEvent* aEvent,
nsIDOMEvent** aDOMEvent,
nsIDOMEventTarget* aCurrentTarget,
@ -1620,7 +1620,7 @@ nsresult nsEventListenerManager::HandleEvent(nsIPresContext* aPresContext,
*/
NS_IMETHODIMP
nsEventListenerManager::CreateEvent(nsIPresContext* aPresContext,
nsEventListenerManager::CreateEvent(nsPresContext* aPresContext,
nsEvent* aEvent,
const nsAString& aEventType,
nsIDOMEvent** aDOMEvent)
@ -1886,7 +1886,7 @@ nsEventListenerManager::DispatchEvent(nsIDOMEvent* aEvent, PRBool *_retval)
}
// Retrieve the context
nsCOMPtr<nsIPresContext> aPresContext;
nsCOMPtr<nsPresContext> aPresContext;
shell->GetPresContext(getter_AddRefs(aPresContext));
return aPresContext->EventStateManager()->DispatchNewEvent(mTarget, aEvent,
@ -1965,7 +1965,7 @@ nsEventListenerManager::GetSystemEventGroup(nsIDOMEventGroup **aGroup)
}
nsresult
nsEventListenerManager::FixContextMenuEvent(nsIPresContext* aPresContext,
nsEventListenerManager::FixContextMenuEvent(nsPresContext* aPresContext,
nsIDOMEventTarget* aCurrentTarget,
nsEvent* aEvent,
nsIDOMEvent** aDOMEvent)
@ -2025,7 +2025,7 @@ nsEventListenerManager::FixContextMenuEvent(nsIPresContext* aPresContext,
}
void nsEventListenerManager::GetCoordinatesFor(nsIDOMElement *aCurrentEl,
nsIPresContext *aPresContext,
nsPresContext *aPresContext,
nsIPresShell *aPresShell,
nsPoint& aTargetPt)
{

Просмотреть файл

@ -138,14 +138,14 @@ public:
NS_IMETHOD CaptureEvent(PRInt32 aEventTypes);
NS_IMETHOD ReleaseEvent(PRInt32 aEventTypes);
NS_IMETHOD HandleEvent(nsIPresContext* aPresContext,
NS_IMETHOD HandleEvent(nsPresContext* aPresContext,
nsEvent* aEvent,
nsIDOMEvent** aDOMEvent,
nsIDOMEventTarget* aCurrentTarget,
PRUint32 aFlags,
nsEventStatus* aEventStatus);
NS_IMETHOD CreateEvent(nsIPresContext* aPresContext,
NS_IMETHOD CreateEvent(nsPresContext* aPresContext,
nsEvent* aEvent,
const nsAString& aEventType,
nsIDOMEvent** aDOMEvent);
@ -216,11 +216,11 @@ protected:
nsresult FlipCaptureBit(PRInt32 aEventTypes, PRBool aInitCapture);
nsVoidArray* GetListenersByType(EventArrayType aType, nsHashKey* aKey, PRBool aCreate);
EventArrayType GetTypeForIID(const nsIID& aIID);
nsresult FixContextMenuEvent(nsIPresContext* aPresContext,
nsresult FixContextMenuEvent(nsPresContext* aPresContext,
nsIDOMEventTarget* aCurrentTarget,
nsEvent* aEvent,
nsIDOMEvent** aDOMEvent);
void GetCoordinatesFor(nsIDOMElement *aCurrentEl, nsIPresContext *aPresContext,
void GetCoordinatesFor(nsIDOMElement *aCurrentEl, nsPresContext *aPresContext,
nsIPresShell *aPresShell, nsPoint& aTargetPt);
nsresult GetDOM2EventGroup(nsIDOMEventGroup** aGroup);

Просмотреть файл

@ -45,7 +45,7 @@
#include "nsIDocument.h"
#include "nsIFrame.h"
#include "nsIWidget.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsIPresShell.h"
#include "nsDOMEvent.h"
#include "nsHTMLAtoms.h"
@ -140,7 +140,7 @@ static NS_DEFINE_CID(kLookAndFeelCID, NS_LOOKANDFEEL_CID);
nsIContent * gLastFocusedContent = 0; // Strong reference
nsIDocument * gLastFocusedDocument = 0; // Strong reference
nsIPresContext* gLastFocusedPresContext = 0; // Weak reference
nsPresContext* gLastFocusedPresContext = 0; // Weak reference
enum nsTextfieldSelectModel {
eTextfieldSelect_unset = -1,
@ -423,7 +423,7 @@ SetFrameExternalReference(nsIFrame* aFrame)
}
NS_IMETHODIMP
nsEventStateManager::PreHandleEvent(nsIPresContext* aPresContext,
nsEventStateManager::PreHandleEvent(nsPresContext* aPresContext,
nsEvent *aEvent,
nsIFrame* aTargetFrame,
nsEventStatus* aStatus,
@ -597,7 +597,7 @@ nsEventStateManager::PreHandleEvent(nsIPresContext* aPresContext,
if (doc) {
nsIPresShell *shell = doc->GetShellAt(0);
if (shell) {
nsCOMPtr<nsIPresContext> oldPresContext;
nsCOMPtr<nsPresContext> oldPresContext;
shell->GetPresContext(getter_AddRefs(oldPresContext));
nsCOMPtr<nsIEventStateManager> esm;
@ -731,7 +731,7 @@ nsEventStateManager::PreHandleEvent(nsIPresContext* aPresContext,
if (doc) {
nsIPresShell *shell = doc->GetShellAt(0);
if (shell) {
nsCOMPtr<nsIPresContext> oldPresContext;
nsCOMPtr<nsPresContext> oldPresContext;
shell->GetPresContext(getter_AddRefs(oldPresContext));
nsCOMPtr<nsIEventStateManager> esm =
@ -821,7 +821,7 @@ nsEventStateManager::PreHandleEvent(nsIPresContext* aPresContext,
if (shell) {
if (focusedElement) {
nsCOMPtr<nsIContent> focusContent = do_QueryInterface(focusedElement);
nsCOMPtr<nsIPresContext> context;
nsCOMPtr<nsPresContext> context;
shell->GetPresContext(getter_AddRefs(context));
focusContent->SetFocus(context);
}
@ -886,7 +886,7 @@ nsEventStateManager::PreHandleEvent(nsIPresContext* aPresContext,
if (gLastFocusedContent) {
nsIPresShell *shell = gLastFocusedDocument->GetShellAt(0);
if (shell) {
nsCOMPtr<nsIPresContext> oldPresContext;
nsCOMPtr<nsPresContext> oldPresContext;
shell->GetPresContext(getter_AddRefs(oldPresContext));
nsCOMPtr<nsIDOMElement> focusedElement;
@ -965,7 +965,7 @@ nsEventStateManager::PreHandleEvent(nsIPresContext* aPresContext,
// 0 -- childCount - 1 stands for the child docShell's offset
// which bubbles up the access key handling
void
nsEventStateManager::HandleAccessKey(nsIPresContext* aPresContext,
nsEventStateManager::HandleAccessKey(nsPresContext* aPresContext,
nsKeyEvent *aEvent,
nsEventStatus* aStatus,
PRInt32 aChildOffset,
@ -1076,7 +1076,7 @@ nsEventStateManager::HandleAccessKey(nsIPresContext* aPresContext,
nsCOMPtr<nsIDocShellTreeItem> subShellItem;
nsCOMPtr<nsIPresShell> subPS;
nsCOMPtr<nsIPresContext> subPC;
nsCOMPtr<nsPresContext> subPC;
docShell->GetChildAt(counter, getter_AddRefs(subShellItem));
nsCOMPtr<nsIDocShell> subDS = do_QueryInterface(subShellItem);
@ -1121,7 +1121,7 @@ nsEventStateManager::HandleAccessKey(nsIPresContext* aPresContext,
docShell->GetChildOffset(&myOffset);
nsCOMPtr<nsIPresShell> parentPS;
nsCOMPtr<nsIPresContext> parentPC;
nsCOMPtr<nsPresContext> parentPC;
parentDS->GetPresShell(getter_AddRefs(parentPS));
NS_ASSERTION(parentPS, "Our PresShell exists but the parent's does not?");
@ -1150,7 +1150,7 @@ nsEventStateManager::HandleAccessKey(nsIPresContext* aPresContext,
// a drag.
//
void
nsEventStateManager::CreateClickHoldTimer(nsIPresContext* inPresContext,
nsEventStateManager::CreateClickHoldTimer(nsPresContext* inPresContext,
nsGUIEvent* inMouseDownEvent)
{
// just to be anal (er, safe)
@ -1363,7 +1363,7 @@ nsEventStateManager::FireContextClick()
// want to cancel the drag gesture if the context-click event is handled.
//
void
nsEventStateManager::BeginTrackingDragGesture(nsIPresContext* aPresContext,
nsEventStateManager::BeginTrackingDragGesture(nsPresContext* aPresContext,
nsGUIEvent* inDownEvent,
nsIFrame* inDownFrame)
{
@ -1405,7 +1405,7 @@ nsEventStateManager::StopTrackingDragGesture()
//
void
nsEventStateManager::GetSelection(nsIFrame* inFrame,
nsIPresContext* inPresContext,
nsPresContext* inPresContext,
nsIFrameSelection** outSelection)
{
*outSelection = nsnull;
@ -1448,7 +1448,7 @@ nsEventStateManager::GetSelection(nsIFrame* inFrame,
// Do we need to do anything about this? Let's wait and see.
//
void
nsEventStateManager::GenerateDragGesture(nsIPresContext* aPresContext,
nsEventStateManager::GenerateDragGesture(nsPresContext* aPresContext,
nsGUIEvent *aEvent)
{
NS_WARN_IF_FALSE(aPresContext, "This shouldn't happen.");
@ -1574,7 +1574,7 @@ nsEventStateManager::ChangeTextSize(PRInt32 change)
nsIPresShell *presShell = doc->GetShellAt(0);
if(!presShell) return NS_ERROR_FAILURE;
nsCOMPtr<nsIPresContext> presContext;
nsCOMPtr<nsPresContext> presContext;
presShell->GetPresContext(getter_AddRefs(presContext));
if(!presContext) return NS_ERROR_FAILURE;
@ -1633,7 +1633,7 @@ nsEventStateManager::DoScrollTextsize(nsIFrame *aTargetFrame,
//
nsresult
nsEventStateManager::DoScrollText(nsIPresContext* aPresContext,
nsEventStateManager::DoScrollText(nsPresContext* aPresContext,
nsIFrame* aTargetFrame,
nsInputEvent* aEvent,
PRInt32 aNumLines,
@ -1786,7 +1786,7 @@ nsEventStateManager::DoScrollText(nsIPresContext* aPresContext,
if (passToParent) {
nsresult rv;
nsIFrame* newFrame = nsnull;
nsCOMPtr<nsIPresContext> newPresContext;
nsCOMPtr<nsPresContext> newPresContext;
rv = GetParentScrollingView(aEvent, aPresContext, newFrame,
*getter_AddRefs(newPresContext));
@ -1802,9 +1802,9 @@ nsEventStateManager::DoScrollText(nsIPresContext* aPresContext,
nsresult
nsEventStateManager::GetParentScrollingView(nsInputEvent *aEvent,
nsIPresContext* aPresContext,
nsPresContext* aPresContext,
nsIFrame* &targetOuterFrame,
nsIPresContext* &presCtxOuter)
nsPresContext* &presCtxOuter)
{
targetOuterFrame = nsnull;
@ -1849,7 +1849,7 @@ nsEventStateManager::GetParentScrollingView(nsInputEvent *aEvent,
}
NS_IMETHODIMP
nsEventStateManager::PostHandleEvent(nsIPresContext* aPresContext,
nsEventStateManager::PostHandleEvent(nsPresContext* aPresContext,
nsEvent *aEvent,
nsIFrame* aTargetFrame,
nsEventStatus* aStatus,
@ -2284,7 +2284,7 @@ nsEventStateManager::PostHandleEvent(nsIPresContext* aPresContext,
}
NS_IMETHODIMP
nsEventStateManager::SetPresContext(nsIPresContext* aPresContext)
nsEventStateManager::SetPresContext(nsPresContext* aPresContext)
{
if (aPresContext == nsnull) {
// A pres context is going away. Make sure we do cleanup.
@ -2366,7 +2366,7 @@ nsEventStateManager::CheckDisabled(nsIContent* aContent)
}
void
nsEventStateManager::UpdateCursor(nsIPresContext* aPresContext,
nsEventStateManager::UpdateCursor(nsPresContext* aPresContext,
nsEvent* aEvent, nsIFrame* aTargetFrame,
nsEventStatus* aStatus)
{
@ -2532,7 +2532,7 @@ nsEventStateManager::AfterDispatchEvent()
}
void
nsEventStateManager::DispatchMouseEvent(nsIPresContext* aPresContext,
nsEventStateManager::DispatchMouseEvent(nsPresContext* aPresContext,
nsGUIEvent* aEvent, PRUint32 aMessage,
nsIContent* aTargetContent,
nsIFrame*& aTargetFrame,
@ -2577,7 +2577,7 @@ nsEventStateManager::DispatchMouseEvent(nsIPresContext* aPresContext,
void
nsEventStateManager::MaybeDispatchMouseEventToIframe(
nsIPresContext* aPresContext, nsGUIEvent* aEvent, PRUint32 aMessage)
nsPresContext* aPresContext, nsGUIEvent* aEvent, PRUint32 aMessage)
{
// Check to see if we're an IFRAME and if so dispatch the given event
// (mouseover / mouseout) to the IFRAME element above us. This will result
@ -2614,7 +2614,7 @@ nsEventStateManager::MaybeDispatchMouseEventToIframe(
void
nsEventStateManager::GenerateMouseEnterExit(nsIPresContext* aPresContext,
nsEventStateManager::GenerateMouseEnterExit(nsPresContext* aPresContext,
nsGUIEvent* aEvent)
{
// Hold onto old target content through the event and reset after.
@ -2731,7 +2731,7 @@ nsEventStateManager::GenerateMouseEnterExit(nsIPresContext* aPresContext,
}
void
nsEventStateManager::GenerateDragDropEnterExit(nsIPresContext* aPresContext,
nsEventStateManager::GenerateDragDropEnterExit(nsPresContext* aPresContext,
nsGUIEvent* aEvent)
{
//Hold onto old target content through the event and reset after.
@ -2863,7 +2863,7 @@ nsEventStateManager::GenerateDragDropEnterExit(nsIPresContext* aPresContext,
}
nsresult
nsEventStateManager::SetClickCount(nsIPresContext* aPresContext,
nsEventStateManager::SetClickCount(nsPresContext* aPresContext,
nsMouseEvent *aEvent,
nsEventStatus* aStatus)
{
@ -2921,7 +2921,7 @@ nsEventStateManager::SetClickCount(nsIPresContext* aPresContext,
}
nsresult
nsEventStateManager::CheckForAndDispatchClick(nsIPresContext* aPresContext,
nsEventStateManager::CheckForAndDispatchClick(nsPresContext* aPresContext,
nsMouseEvent *aEvent,
nsEventStatus* aStatus)
{
@ -3037,7 +3037,7 @@ PrintDocTree(nsIDocShellTreeNode * aParentNode, int aLevel)
parentAsItem->GetItemType(&type);
nsCOMPtr<nsIPresShell> presShell;
parentAsDocShell->GetPresShell(getter_AddRefs(presShell));
nsCOMPtr<nsIPresContext> presContext;
nsCOMPtr<nsPresContext> presContext;
parentAsDocShell->GetPresContext(getter_AddRefs(presContext));
nsCOMPtr<nsIDocument> doc;
presShell->GetDocument(getter_AddRefs(doc));
@ -3332,7 +3332,7 @@ nsEventStateManager::ShiftFocusInternal(PRBool aForward, nsIContent* aStart)
nsIContent *docContent = parent_doc->FindContentForSubDocument(mDocument);
nsCOMPtr<nsIPresContext> parentPC;
nsCOMPtr<nsPresContext> parentPC;
parentShell->GetPresContext(getter_AddRefs(parentPC));
nsIEventStateManager *parentESM = parentPC->EventStateManager();
@ -3977,7 +3977,7 @@ nsEventStateManager::SetContentState(nsIContent *aContent, PRInt32 aState)
}
nsresult
nsEventStateManager::SendFocusBlur(nsIPresContext* aPresContext,
nsEventStateManager::SendFocusBlur(nsPresContext* aPresContext,
nsIContent *aContent,
PRBool aEnsureWindowHasFocus)
{
@ -4023,7 +4023,7 @@ nsEventStateManager::SendFocusBlur(nsIPresContext* aPresContext,
if (shell) {
kungFuDeathGrip = shell->GetViewManager();
nsCOMPtr<nsIPresContext> oldPresContext;
nsCOMPtr<nsPresContext> oldPresContext;
shell->GetPresContext(getter_AddRefs(oldPresContext));
//fire blur
@ -4421,7 +4421,7 @@ nsEventStateManager::DispatchNewEvent(nsISupports* aTarget, nsIDOMEvent* aEvent,
}
void
nsEventStateManager::EnsureDocument(nsIPresContext* aPresContext)
nsEventStateManager::EnsureDocument(nsPresContext* aPresContext)
{
if (!mDocument)
EnsureDocument(aPresContext->PresShell());
@ -4435,7 +4435,7 @@ nsEventStateManager::EnsureDocument(nsIPresShell* aPresShell)
}
void
nsEventStateManager::FlushPendingEvents(nsIPresContext* aPresContext)
nsEventStateManager::FlushPendingEvents(nsPresContext* aPresContext)
{
NS_PRECONDITION(nsnull != aPresContext, "nsnull ptr");
nsIPresShell *shell = aPresContext->GetPresShell();
@ -5068,7 +5068,7 @@ nsEventStateManager::TabIntoDocument(nsIDocShell* aDocShell,
else {
aDocShell->SetHasFocus(PR_FALSE);
nsCOMPtr<nsIPresContext> pc;
nsCOMPtr<nsPresContext> pc;
aDocShell->GetPresContext(getter_AddRefs(pc));
if (pc) {
nsIEventStateManager *docESM = pc->EventStateManager();

Просмотреть файл

@ -89,7 +89,7 @@ public:
* PostHandleEvent. Any centralized event processing which must occur before
* DOM or frame event handling should occur here as well.
*/
NS_IMETHOD PreHandleEvent(nsIPresContext* aPresContext,
NS_IMETHOD PreHandleEvent(nsPresContext* aPresContext,
nsEvent *aEvent,
nsIFrame* aTargetFrame,
nsEventStatus* aStatus,
@ -100,7 +100,7 @@ public:
* also contain any centralized event processing which must occur after
* DOM and frame processing.
*/
NS_IMETHOD PostHandleEvent(nsIPresContext* aPresContext,
NS_IMETHOD PostHandleEvent(nsPresContext* aPresContext,
nsEvent *aEvent,
nsIFrame* aTargetFrame,
nsEventStatus* aStatus,
@ -111,7 +111,7 @@ public:
NS_IMETHOD SetCurrentEvent(nsEvent *aEvent)
{ mCurrentEvent = aEvent; return NS_OK; }
NS_IMETHOD SetPresContext(nsIPresContext* aPresContext);
NS_IMETHOD SetPresContext(nsPresContext* aPresContext);
NS_IMETHOD ClearFrameRefs(nsIFrame* aFrame);
NS_IMETHOD GetEventTarget(nsIFrame **aFrame);
@ -149,22 +149,22 @@ public:
protected:
friend class CurrentEventShepherd;
void UpdateCursor(nsIPresContext* aPresContext, nsEvent* aEvent, nsIFrame* aTargetFrame, nsEventStatus* aStatus);
void UpdateCursor(nsPresContext* aPresContext, nsEvent* aEvent, nsIFrame* aTargetFrame, nsEventStatus* aStatus);
/**
* Turn a GUI mouse event into a mouse event targeted at the specified
* content and frame. This will fix the frame if it goes away during the
* event, as well.
*/
void DispatchMouseEvent(nsIPresContext* aPresContext,
void DispatchMouseEvent(nsPresContext* aPresContext,
nsGUIEvent* aEvent, PRUint32 aMessage,
nsIContent* aTargetContent,
nsIFrame*& aTargetFrame,
nsIContent* aRelatedContent);
void MaybeDispatchMouseEventToIframe(nsIPresContext* aPresContext, nsGUIEvent* aEvent, PRUint32 aMessage);
void GenerateMouseEnterExit(nsIPresContext* aPresContext, nsGUIEvent* aEvent);
void GenerateDragDropEnterExit(nsIPresContext* aPresContext, nsGUIEvent* aEvent);
nsresult SetClickCount(nsIPresContext* aPresContext, nsMouseEvent *aEvent, nsEventStatus* aStatus);
nsresult CheckForAndDispatchClick(nsIPresContext* aPresContext, nsMouseEvent *aEvent, nsEventStatus* aStatus);
void MaybeDispatchMouseEventToIframe(nsPresContext* aPresContext, nsGUIEvent* aEvent, PRUint32 aMessage);
void GenerateMouseEnterExit(nsPresContext* aPresContext, nsGUIEvent* aEvent);
void GenerateDragDropEnterExit(nsPresContext* aPresContext, nsGUIEvent* aEvent);
nsresult SetClickCount(nsPresContext* aPresContext, nsMouseEvent *aEvent, nsEventStatus* aStatus);
nsresult CheckForAndDispatchClick(nsPresContext* aPresContext, nsMouseEvent *aEvent, nsEventStatus* aStatus);
PRBool ChangeFocus(nsIContent* aFocus, PRInt32 aFocusedWith);
nsresult GetNextTabbableContent(nsIContent* aRootContent,
nsIContent* aStartContent,
@ -176,11 +176,11 @@ protected:
void TabIndexFrom(nsIContent *aFrom, PRInt32 *aOutIndex);
PRInt32 GetNextTabIndex(nsIContent* aParent, PRBool foward);
nsresult SendFocusBlur(nsIPresContext* aPresContext, nsIContent *aContent, PRBool aEnsureWindowHasFocus);
nsresult SendFocusBlur(nsPresContext* aPresContext, nsIContent *aContent, PRBool aEnsureWindowHasFocus);
PRBool CheckDisabled(nsIContent* aContent);
void EnsureDocument(nsIPresShell* aPresShell);
void EnsureDocument(nsIPresContext* aPresContext);
void FlushPendingEvents(nsIPresContext* aPresContext);
void EnsureDocument(nsPresContext* aPresContext);
void FlushPendingEvents(nsPresContext* aPresContext);
nsIFocusController* GetFocusControllerForDocument(nsIDocument* aDocument);
typedef enum {
@ -188,7 +188,7 @@ protected:
eAccessKeyProcessingUp,
eAccessKeyProcessingDown
} ProcessingAccessKeyState;
void HandleAccessKey(nsIPresContext* aPresContext, nsKeyEvent* aEvent, nsEventStatus* aStatus, PRInt32 aChildOffset, ProcessingAccessKeyState aAccessKeyState);
void HandleAccessKey(nsPresContext* aPresContext, nsKeyEvent* aEvent, nsEventStatus* aStatus, PRInt32 aChildOffset, ProcessingAccessKeyState aAccessKeyState);
//---------------------------------------------
// DocShell Focus Traversal Methods
@ -210,10 +210,10 @@ protected:
// These functions are for mousewheel scrolling
nsIScrollableView* GetNearestScrollingView(nsIView* aView);
nsresult GetParentScrollingView(nsInputEvent* aEvent,
nsIPresContext* aPresContext,
nsPresContext* aPresContext,
nsIFrame* &targetOuterFrame,
nsIPresContext* &presCtxOuter);
nsresult DoScrollText(nsIPresContext* aPresContext,
nsPresContext* &presCtxOuter);
nsresult DoScrollText(nsPresContext* aPresContext,
nsIFrame* aTargetFrame,
nsInputEvent* aEvent,
PRInt32 aNumLines,
@ -227,9 +227,9 @@ protected:
// end mousewheel functions
// routines for the d&d gesture tracking state machine
void BeginTrackingDragGesture ( nsIPresContext* aPresContext, nsGUIEvent* inDownEvent, nsIFrame* inDownFrame ) ;
void BeginTrackingDragGesture ( nsPresContext* aPresContext, nsGUIEvent* inDownEvent, nsIFrame* inDownFrame ) ;
void StopTrackingDragGesture ( ) ;
void GenerateDragGesture ( nsIPresContext* aPresContext, nsGUIEvent *aEvent ) ;
void GenerateDragGesture ( nsPresContext* aPresContext, nsGUIEvent *aEvent ) ;
PRBool IsTrackingDragGesture ( ) const { return mIsTrackingDragGesture; }
PRBool mSuppressFocusChange; // Used only for Ender text fields to suppress a focus firing on mouse down
@ -241,7 +241,7 @@ protected:
// Return the location of the caret
nsresult GetDocSelectionLocation(nsIContent **startContent, nsIContent **endContent, nsIFrame **startFrame, PRUint32 *startOffset);
void GetSelection ( nsIFrame* inFrame, nsIPresContext* inPresContext, nsIFrameSelection** outSelection ) ;
void GetSelection ( nsIFrame* inFrame, nsPresContext* inPresContext, nsIFrameSelection** outSelection ) ;
// To be called before and after you fire an event, to update booleans and
// such
@ -287,7 +287,7 @@ protected:
nsCOMPtr<nsIContent> mFirstMouseOverEventElement;
nsCOMPtr<nsIContent> mFirstMouseOutEventElement;
nsIPresContext* mPresContext; // Not refcnted
nsPresContext* mPresContext; // Not refcnted
nsCOMPtr<nsIDocument> mDocument; // Doesn't necessarily need to be owner
PRUint32 mLClickCount;
@ -322,7 +322,7 @@ protected:
#ifdef CLICK_HOLD_CONTEXT_MENUS
enum { kClickHoldDelay = 500 } ; // 500ms == 1/2 second
void CreateClickHoldTimer ( nsIPresContext* aPresContext, nsGUIEvent* inMouseDownEvent ) ;
void CreateClickHoldTimer ( nsPresContext* aPresContext, nsGUIEvent* inMouseDownEvent ) ;
void KillClickHoldTimer ( ) ;
void FireContextClick ( ) ;
static void sClickHoldCallback ( nsITimer* aTimer, void* aESM ) ;
@ -332,7 +332,7 @@ protected:
// things because we're alerted to when they are going away in ClearFrameRefs().
nsPoint mEventPoint, mEventRefPoint;
nsIWidget* mEventDownWidget; // [WEAK]
nsIPresContext* mEventPresContext; // [WEAK]
nsPresContext* mEventPresContext; // [WEAK]
nsCOMPtr<nsITimer> mClickHoldTimer;
#endif

Просмотреть файл

@ -39,7 +39,7 @@
#include "nsISupports.h"
class nsIDOMHTMLFormElement;
class nsIPresContext;
class nsPresContext;
class nsIPresState;
class nsIContent;
class nsString;

Просмотреть файл

@ -43,7 +43,7 @@ class nsACString;
class nsIURI;
class nsIInputStream;
class nsIHTMLContent;
class nsIPresContext;
class nsPresContext;
class nsIContent;
class nsIFormControl;
class nsIDOMHTMLElement;
@ -83,7 +83,7 @@ public:
* @param aRequest (out param) the Request for the submission
*/
virtual nsresult SubmitTo(nsIURI* aActionURL, const nsAString& aTarget,
nsIContent* aSource, nsIPresContext* aPresContext,
nsIContent* aSource, nsPresContext* aPresContext,
nsIDocShell** aDocShell,
nsIRequest** aRequest) = 0;
@ -130,7 +130,7 @@ public:
* @param aFormSubmission the form submission object (out param)
*/
nsresult GetSubmissionFromForm(nsIHTMLContent* aForm,
nsIPresContext* aPresContext,
nsPresContext* aPresContext,
nsIFormSubmission** aFormSubmission);

Просмотреть файл

@ -42,7 +42,7 @@
class nsString;
class nsIFrame;
class nsIStyleRule;
class nsIPresContext;
class nsPresContext;
class nsMappedAttributes;
class nsIURI;
struct nsRuleData;

Просмотреть файл

@ -39,7 +39,7 @@
interface nsIContent;
interface nsIDOMHTMLOptionElement;
interface nsIPresContext;
interface nsPresContext;
interface nsIPresState;
/**

Просмотреть файл

@ -38,7 +38,7 @@
#include "nsIFormSubmission.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsCOMPtr.h"
#include "nsIForm.h"
#include "nsILinkHandler.h"
@ -112,7 +112,7 @@ public:
// nsIFormSubmission
//
virtual nsresult SubmitTo(nsIURI* aActionURI, const nsAString& aTarget,
nsIContent* aSource, nsIPresContext* aPresContext,
nsIContent* aSource, nsPresContext* aPresContext,
nsIDocShell** aDocShell, nsIRequest** aRequest);
/**
@ -196,7 +196,7 @@ public:
* @param aEncoder the returned encoder [OUT]
*/
static nsresult GetEncoder(nsIHTMLContent* aForm,
nsIPresContext* aPresContext,
nsPresContext* aPresContext,
const nsACString& aCharset,
nsISaveAsCharset** aEncoder);
/**
@ -1151,7 +1151,7 @@ SendJSWarning(nsIHTMLContent* aContent,
nsresult
GetSubmissionFromForm(nsIHTMLContent* aForm,
nsIPresContext* aPresContext,
nsPresContext* aPresContext,
nsIFormSubmission** aFormSubmission)
{
nsresult rv = NS_OK;
@ -1225,7 +1225,7 @@ GetSubmissionFromForm(nsIHTMLContent* aForm,
nsresult
nsFormSubmission::SubmitTo(nsIURI* aActionURI, const nsAString& aTarget,
nsIContent* aSource, nsIPresContext* aPresContext,
nsIContent* aSource, nsPresContext* aPresContext,
nsIDocShell** aDocShell, nsIRequest** aRequest)
{
nsresult rv;
@ -1327,7 +1327,7 @@ nsFormSubmission::GetSubmitCharset(nsIHTMLContent* aForm,
// static
nsresult
nsFormSubmission::GetEncoder(nsIHTMLContent* aForm,
nsIPresContext* aPresContext,
nsPresContext* aPresContext,
const nsACString& aCharset,
nsISaveAsCharset** aEncoder)
{

Просмотреть файл

@ -79,7 +79,7 @@
#include "nsIScrollableViewProvider.h"
#include "nsRange.h"
#include "nsIPresShell.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsIDocShell.h"
#include "nsIView.h"
#include "nsIViewManager.h"
@ -596,7 +596,7 @@ nsGenericHTMLElement::GetOffsetRect(nsRect& aRect, nsIContent** aOffsetParent)
}
// Get the Presentation Context from the Shell
nsCOMPtr<nsIPresContext> context;
nsCOMPtr<nsPresContext> context;
presShell->GetPresContext(getter_AddRefs(context));
if (!context) {
@ -970,7 +970,7 @@ nsGenericHTMLElement::GetScrollInfo(nsIScrollableView **aScrollableView,
}
// Get the presentation context
nsCOMPtr<nsIPresContext> presContext;
nsCOMPtr<nsPresContext> presContext;
presShell->GetPresContext(getter_AddRefs(presContext));
if (!presContext) {
return;
@ -1357,7 +1357,7 @@ IsArea(nsIContent *aContent)
}
nsresult
nsGenericHTMLElement::HandleDOMEventForAnchors(nsIPresContext* aPresContext,
nsGenericHTMLElement::HandleDOMEventForAnchors(nsPresContext* aPresContext,
nsEvent* aEvent,
nsIDOMEvent** aDOMEvent,
PRUint32 aFlags,
@ -2359,7 +2359,7 @@ nsGenericHTMLElement::RestoreFormControlState(nsIHTMLContent* aContent,
// XXX This creates a dependency between content and frames
nsresult
nsGenericHTMLElement::GetPresContext(nsIHTMLContent* aContent,
nsIPresContext** aPresContext)
nsPresContext** aPresContext)
{
// Get the document
nsIDocument* doc = aContent->GetDocument();
@ -3589,7 +3589,7 @@ nsGenericHTMLFrameElement::SetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
}
NS_IMETHODIMP
nsGenericHTMLFrameElement::HandleChromeEvent(nsIPresContext* aPresContext,
nsGenericHTMLFrameElement::HandleChromeEvent(nsPresContext* aPresContext,
nsEvent* aEvent,
nsIDOMEvent** aDOMEvent,
PRUint32 aFlags,
@ -3603,7 +3603,7 @@ nsGenericHTMLFrameElement::HandleChromeEvent(nsIPresContext* aPresContext,
void
nsGenericHTMLElement::SetElementFocus(PRBool aDoFocus)
{
nsCOMPtr<nsIPresContext> presContext;
nsCOMPtr<nsPresContext> presContext;
GetPresContext(this, getter_AddRefs(presContext));
if (!presContext)
return;
@ -3638,7 +3638,7 @@ nsGenericHTMLElement::Focus()
}
void
nsGenericHTMLElement::RemoveFocus(nsIPresContext *aPresContext)
nsGenericHTMLElement::RemoveFocus(nsPresContext *aPresContext)
{
if (!aPresContext)
return;
@ -3688,7 +3688,7 @@ nsGenericHTMLElement::RegUnRegAccessKey(PRBool aDoReg)
}
// We have an access key, so get the ESM from the pres context.
nsCOMPtr<nsIPresContext> presContext;
nsCOMPtr<nsPresContext> presContext;
GetPresContext(this, getter_AddRefs(presContext));
if (presContext) {

Просмотреть файл

@ -189,14 +189,14 @@ public:
virtual void DumpContent(FILE* out, PRInt32 aIndent,PRBool aDumpAll) const;
#endif
virtual PRBool IsContentOfType(PRUint32 aFlags) const;
virtual void RemoveFocus(nsIPresContext *aPresContext);
virtual void RemoveFocus(nsPresContext *aPresContext);
virtual PRBool IsFocusable(PRInt32 *aTabIndex = nsnull);
/**
* Standard anchor HandleDOMEvent, used by A, AREA and LINK (parameters
* are the same as HandleDOMEvent)
*/
nsresult HandleDOMEventForAnchors(nsIPresContext* aPresContext,
nsresult HandleDOMEventForAnchors(nsPresContext* aPresContext,
nsEvent* aEvent,
nsIDOMEvent** aDOMEvent,
PRUint32 aFlags,
@ -629,7 +629,7 @@ public:
* @param aPresContext the presentation context [OUT]
*/
static nsresult GetPresContext(nsIHTMLContent* aContent,
nsIPresContext** aPresContext);
nsPresContext** aPresContext);
// Form Helper Routines
/**

Просмотреть файл

@ -48,7 +48,7 @@
#include "nsILink.h"
#include "nsHTMLAtoms.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsIEventStateManager.h"
#include "nsIURL.h"
#include "nsIEventStateManager.h"
@ -101,10 +101,10 @@ public:
virtual void SetDocument(nsIDocument* aDocument, PRBool aDeep,
PRBool aCompileEventHandlers);
virtual void SetFocus(nsIPresContext* aPresContext);
virtual void SetFocus(nsPresContext* aPresContext);
virtual PRBool IsFocusable(PRBool *aTabIndex = nsnull);
virtual nsresult HandleDOMEvent(nsIPresContext* aPresContext,
virtual nsresult HandleDOMEvent(nsPresContext* aPresContext,
nsEvent* aEvent, nsIDOMEvent** aDOMEvent,
PRUint32 aFlags,
nsEventStatus* aEventStatus);
@ -205,7 +205,7 @@ nsHTMLAnchorElement::Focus()
}
void
nsHTMLAnchorElement::SetFocus(nsIPresContext* aPresContext)
nsHTMLAnchorElement::SetFocus(nsPresContext* aPresContext)
{
if (!aPresContext) {
return;
@ -262,7 +262,7 @@ nsHTMLAnchorElement::IsFocusable(PRInt32 *aTabIndex)
}
nsresult
nsHTMLAnchorElement::HandleDOMEvent(nsIPresContext* aPresContext,
nsHTMLAnchorElement::HandleDOMEvent(nsPresContext* aPresContext,
nsEvent* aEvent,
nsIDOMEvent** aDOMEvent,
PRUint32 aFlags,

Просмотреть файл

@ -41,7 +41,7 @@
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsIDocument.h"
#include "nsLayoutAtoms.h"

Просмотреть файл

@ -44,7 +44,7 @@
#include "nsIPresShell.h"
#include "nsHTMLAtoms.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsIEventStateManager.h"
#include "nsIURL.h"
#include "nsNetUtil.h"
@ -83,11 +83,11 @@ public:
NS_IMETHOD SetLinkState(nsLinkState aState);
NS_IMETHOD GetHrefURI(nsIURI** aURI);
virtual nsresult HandleDOMEvent(nsIPresContext* aPresContext,
virtual nsresult HandleDOMEvent(nsPresContext* aPresContext,
nsEvent* aEvent, nsIDOMEvent** aDOMEvent,
PRUint32 aFlags,
nsEventStatus* aEventStatus);
virtual void SetFocus(nsIPresContext* aPresContext);
virtual void SetFocus(nsPresContext* aPresContext);
virtual void SetDocument(nsIDocument* aDocument, PRBool aDeep,
PRBool aCompileEventHandlers);
@ -165,7 +165,7 @@ nsHTMLAreaElement::SetTarget(const nsAString& aValue)
}
nsresult
nsHTMLAreaElement::HandleDOMEvent(nsIPresContext* aPresContext,
nsHTMLAreaElement::HandleDOMEvent(nsPresContext* aPresContext,
nsEvent* aEvent,
nsIDOMEvent** aDOMEvent,
PRUint32 aFlags,
@ -176,7 +176,7 @@ nsHTMLAreaElement::HandleDOMEvent(nsIPresContext* aPresContext,
}
void
nsHTMLAreaElement::SetFocus(nsIPresContext* aPresContext)
nsHTMLAreaElement::SetFocus(nsPresContext* aPresContext)
{
if (!aPresContext)
return;

Просмотреть файл

@ -40,7 +40,7 @@
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsMappedAttributes.h"
#include "nsRuleData.h"

Просмотреть файл

@ -43,7 +43,7 @@
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsIPresShell.h"
#include "nsIDocument.h"
#include "nsIHTMLDocument.h"
@ -334,7 +334,7 @@ nsHTMLBodyElement::Get##func_(nsAString& aColor) \
if (NS_CONTENT_ATTR_NOT_THERE == \
GetAttr(kNameSpaceID_None, nsHTMLAtoms::attr_, color)) { \
\
nsCOMPtr<nsIPresContext> presContext; \
nsCOMPtr<nsPresContext> presContext; \
GetPresContext(this, getter_AddRefs(presContext)); \
\
if (presContext) { \

Просмотреть файл

@ -43,7 +43,7 @@
#include "nsHTMLAtoms.h"
#include "nsIPresShell.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsIFormControl.h"
#include "nsIForm.h"
#include "nsIFormSubmission.h"
@ -97,7 +97,7 @@ public:
nsIContent* aSubmitElement);
// nsIContent overrides...
virtual void SetFocus(nsIPresContext* aPresContext);
virtual void SetFocus(nsPresContext* aPresContext);
virtual PRBool IsFocusable(PRInt32 *aTabIndex = nsnull);
virtual PRBool ParseAttribute(nsIAtom* aAttribute,
const nsAString& aValue,
@ -105,7 +105,7 @@ public:
NS_IMETHOD AttributeToString(nsIAtom* aAttribute,
const nsHTMLValue& aValue,
nsAString& aResult) const;
virtual nsresult HandleDOMEvent(nsIPresContext* aPresContext,
virtual nsresult HandleDOMEvent(nsPresContext* aPresContext,
nsEvent* aEvent, nsIDOMEvent** aDOMEvent,
PRUint32 aFlags,
nsEventStatus* aEventStatus);
@ -203,7 +203,7 @@ nsHTMLButtonElement::Click()
if (mDocument) {
nsIPresShell *shell = doc->GetShellAt(0);
if (shell) {
nsCOMPtr<nsIPresContext> context;
nsCOMPtr<nsPresContext> context;
shell->GetPresContext(getter_AddRefs(context));
if (context) {
nsEventStatus status = nsEventStatus_eIgnore;
@ -232,7 +232,7 @@ nsHTMLButtonElement::IsFocusable(PRInt32 *aTabIndex)
}
void
nsHTMLButtonElement::SetFocus(nsIPresContext* aPresContext)
nsHTMLButtonElement::SetFocus(nsPresContext* aPresContext)
{
if (!aPresContext)
return;
@ -295,7 +295,7 @@ nsHTMLButtonElement::AttributeToString(nsIAtom* aAttribute,
}
nsresult
nsHTMLButtonElement::HandleDOMEvent(nsIPresContext* aPresContext,
nsHTMLButtonElement::HandleDOMEvent(nsPresContext* aPresContext,
nsEvent* aEvent,
nsIDOMEvent** aDOMEvent,
PRUint32 aFlags,

Просмотреть файл

@ -40,7 +40,7 @@
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
class nsHTMLModElement : public nsGenericHTMLElement,

Просмотреть файл

@ -40,7 +40,7 @@
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsMappedAttributes.h"
// XXX support missing nav attributes? gutter, cols, width

Просмотреть файл

@ -41,7 +41,7 @@
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsIForm.h"
#include "nsIFormControl.h"

Просмотреть файл

@ -42,7 +42,7 @@
#include "nsHTMLAtoms.h"
#include "nsIDeviceContext.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsMappedAttributes.h"
#include "nsCSSStruct.h"
#include "nsRuleData.h"

Просмотреть файл

@ -47,7 +47,7 @@
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsIDocument.h"
#include "nsIPresShell.h"
#include "nsIFrame.h"
@ -164,7 +164,7 @@ public:
NS_IMETHOD AttributeToString(nsIAtom* aAttribute,
const nsHTMLValue& aValue,
nsAString& aResult) const;
virtual nsresult HandleDOMEvent(nsIPresContext* aPresContext,
virtual nsresult HandleDOMEvent(nsPresContext* aPresContext,
nsEvent* aEvent, nsIDOMEvent** aDOMEvent,
PRUint32 aFlags,
nsEventStatus* aEventStatus);
@ -199,7 +199,7 @@ public:
PRInt32* retval);
protected:
nsresult DoSubmitOrReset(nsIPresContext* aPresContext,
nsresult DoSubmitOrReset(nsPresContext* aPresContext,
nsEvent* aEvent,
PRInt32 aMessage);
nsresult DoReset();
@ -215,7 +215,7 @@ protected:
* @param aPresContext the presentation context
* @param aEvent the DOM event that was passed to us for the submit
*/
nsresult DoSubmit(nsIPresContext* aPresContext, nsEvent* aEvent);
nsresult DoSubmit(nsPresContext* aPresContext, nsEvent* aEvent);
/**
* Prepare the submission object (called by DoSubmit)
@ -224,7 +224,7 @@ protected:
* @param aFormSubmission the submission object
* @param aEvent the DOM event that was passed to us for the submit
*/
nsresult BuildSubmission(nsIPresContext* aPresContext,
nsresult BuildSubmission(nsPresContext* aPresContext,
nsCOMPtr<nsIFormSubmission>& aFormSubmission,
nsEvent* aEvent);
/**
@ -233,7 +233,7 @@ protected:
* @param aPresContext the presentation context
* @param aFormSubmission the submission object
*/
nsresult SubmitSubmission(nsIPresContext* aPresContext,
nsresult SubmitSubmission(nsPresContext* aPresContext,
nsIFormSubmission* aFormSubmission);
/**
* Walk over the form elements and call SubmitNamesValues() on them to get
@ -564,7 +564,7 @@ nsHTMLFormElement::Submit()
{
// Send the submit event
nsresult rv = NS_OK;
nsCOMPtr<nsIPresContext> presContext;
nsCOMPtr<nsPresContext> presContext;
GetPresContext(this, getter_AddRefs(presContext));
if (presContext) {
if (mPendingSubmission) {
@ -585,7 +585,7 @@ nsHTMLFormElement::Reset()
{
// Send the reset event
nsresult rv = NS_OK;
nsCOMPtr<nsIPresContext> presContext;
nsCOMPtr<nsPresContext> presContext;
GetPresContext(this, getter_AddRefs(presContext));
if (presContext) {
// Calling HandleDOMEvent() directly so that reset() will work even if
@ -669,7 +669,7 @@ nsHTMLFormElement::SetDocument(nsIDocument* aDocument, PRBool aDeep,
nsresult
nsHTMLFormElement::HandleDOMEvent(nsIPresContext* aPresContext,
nsHTMLFormElement::HandleDOMEvent(nsPresContext* aPresContext,
nsEvent* aEvent,
nsIDOMEvent** aDOMEvent,
PRUint32 aFlags,
@ -756,7 +756,7 @@ nsHTMLFormElement::HandleDOMEvent(nsIPresContext* aPresContext,
}
nsresult
nsHTMLFormElement::DoSubmitOrReset(nsIPresContext* aPresContext,
nsHTMLFormElement::DoSubmitOrReset(nsPresContext* aPresContext,
nsEvent* aEvent,
PRInt32 aMessage)
{
@ -804,7 +804,7 @@ nsHTMLFormElement::DoReset()
}
nsresult
nsHTMLFormElement::DoSubmit(nsIPresContext* aPresContext, nsEvent* aEvent)
nsHTMLFormElement::DoSubmit(nsPresContext* aPresContext, nsEvent* aEvent)
{
NS_ASSERTION(!mIsSubmitting, "Either two people are trying to submit or the "
"previous submit was not properly cancelled by the DocShell");
@ -841,7 +841,7 @@ nsHTMLFormElement::DoSubmit(nsIPresContext* aPresContext, nsEvent* aEvent)
}
nsresult
nsHTMLFormElement::BuildSubmission(nsIPresContext* aPresContext,
nsHTMLFormElement::BuildSubmission(nsPresContext* aPresContext,
nsCOMPtr<nsIFormSubmission>& aFormSubmission,
nsEvent* aEvent)
{
@ -873,7 +873,7 @@ nsHTMLFormElement::BuildSubmission(nsIPresContext* aPresContext,
}
nsresult
nsHTMLFormElement::SubmitSubmission(nsIPresContext* aPresContext,
nsHTMLFormElement::SubmitSubmission(nsPresContext* aPresContext,
nsIFormSubmission* aFormSubmission)
{
nsresult rv;
@ -1207,7 +1207,7 @@ nsHTMLFormElement::FlushPendingSubmission()
//
// preform the submission with the stored pending submission
//
nsCOMPtr<nsIPresContext> presContext;
nsCOMPtr<nsPresContext> presContext;
GetPresContext(this, getter_AddRefs(presContext));
SubmitSubmission(presContext, mPendingSubmission);

Просмотреть файл

@ -40,7 +40,7 @@
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsIFrameSetElement.h"
#include "nsIHTMLDocument.h"
#include "nsIDocument.h"

Просмотреть файл

@ -41,7 +41,7 @@
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsMappedAttributes.h"
#include "nsRuleData.h"

Просмотреть файл

@ -40,7 +40,7 @@
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
class nsHTMLHeadElement : public nsGenericHTMLElement,

Просмотреть файл

@ -40,7 +40,7 @@
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsMappedAttributes.h"
#include "nsRuleData.h"

Просмотреть файл

@ -40,7 +40,7 @@
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsIDocument.h"

Просмотреть файл

@ -38,7 +38,7 @@
#include "nsIHTMLContent.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsIPresShell.h"
#include "nsIDocument.h"
#include "nsMappedAttributes.h"

Просмотреть файл

@ -42,7 +42,7 @@
#include "nsImageLoadingContent.h"
#include "nsHTMLAtoms.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsIPresShell.h"
#include "nsMappedAttributes.h"
#include "nsIJSNativeInitializer.h"
@ -126,7 +126,7 @@ public:
nsChangeHint& aHint) const;
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
virtual nsresult HandleDOMEvent(nsIPresContext* aPresContext,
virtual nsresult HandleDOMEvent(nsPresContext* aPresContext,
nsEvent* aEvent, nsIDOMEvent** aDOMEvent,
PRUint32 aFlags,
nsEventStatus* aEventStatus);
@ -270,7 +270,7 @@ nsHTMLImageElement::GetXY()
}
// Get the Presentation Context from the Shell
nsCOMPtr<nsIPresContext> context;
nsCOMPtr<nsPresContext> context;
presShell->GetPresContext(getter_AddRefs(context));
if (!context) {
@ -355,7 +355,7 @@ nsHTMLImageElement::GetWidthHeight()
size.height -= margin.top + margin.bottom;
size.width -= margin.left + margin.right;
nsCOMPtr<nsIPresContext> context;
nsCOMPtr<nsPresContext> context;
GetPresContext(this, getter_AddRefs(context));
if (context) {
@ -509,7 +509,7 @@ nsHTMLImageElement::GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapR
nsresult
nsHTMLImageElement::HandleDOMEvent(nsIPresContext* aPresContext,
nsHTMLImageElement::HandleDOMEvent(nsPresContext* aPresContext,
nsEvent* aEvent, nsIDOMEvent** aDOMEvent,
PRUint32 aFlags,
nsEventStatus* aEventStatus)

Просмотреть файл

@ -55,7 +55,7 @@
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsMappedAttributes.h"
#include "nsIFormControl.h"
#include "nsIForm.h"
@ -174,7 +174,7 @@ public:
virtual PRBool AllowDrop();
// nsIContent
virtual void SetFocus(nsIPresContext* aPresContext);
virtual void SetFocus(nsPresContext* aPresContext);
virtual PRBool IsFocusable(PRInt32 *aTabIndex = nsnull);
virtual PRBool ParseAttribute(nsIAtom* aAttribute,
@ -188,7 +188,7 @@ public:
nsChangeHint& aHint) const;
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
virtual nsresult HandleDOMEvent(nsIPresContext* aPresContext,
virtual nsresult HandleDOMEvent(nsPresContext* aPresContext,
nsEvent* aEvent, nsIDOMEvent** aDOMEvent,
PRUint32 aFlags,
nsEventStatus* aEventStatus);
@ -248,7 +248,7 @@ protected:
nsresult GetSelectionRange(PRInt32* aSelectionStart, PRInt32* aSelectionEnd);
//Helper method
#ifdef ACCESSIBILITY
nsresult FireEventForAccessibility(nsIPresContext* aPresContext,
nsresult FireEventForAccessibility(nsPresContext* aPresContext,
const nsAString& aEventType);
#endif
@ -273,7 +273,7 @@ protected:
void AfterSetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
const nsAString* aValue, PRBool aNotify);
void SelectAll(nsIPresContext* aPresContext);
void SelectAll(nsPresContext* aPresContext);
PRBool IsImage() const
{
nsAutoString tmp;
@ -316,7 +316,7 @@ protected:
* MaybeSubmitForm looks for a submit input or a single text control
* and submits the form if either is present.
*/
nsresult MaybeSubmitForm(nsIPresContext* aPresContext);
nsresult MaybeSubmitForm(nsPresContext* aPresContext);
nsCOMPtr<nsIControllers> mControllers;
@ -702,7 +702,7 @@ nsHTMLInputElement::SetValueInternal(const nsAString& aValue,
}
// If the frame owns the value, set the value in the frame
if (frameOwnsValue) {
nsCOMPtr<nsIPresContext> presContext;
nsCOMPtr<nsPresContext> presContext;
GetPresContext(this, getter_AddRefs(presContext));
formControlFrame->SetProperty(presContext, nsHTMLAtoms::value, aValue);
return NS_OK;
@ -902,7 +902,7 @@ nsHTMLInputElement::GetRadioGroupContainer()
}
nsresult
nsHTMLInputElement::MaybeSubmitForm(nsIPresContext* aPresContext)
nsHTMLInputElement::MaybeSubmitForm(nsPresContext* aPresContext)
{
if (!mForm) {
// Nothing to do here.
@ -979,7 +979,7 @@ nsHTMLInputElement::SetCheckedInternal(PRBool aChecked, PRBool aNotify)
//
nsIFrame* frame = GetPrimaryFrame(PR_FALSE);
if (frame) {
nsCOMPtr<nsIPresContext> presContext;
nsCOMPtr<nsPresContext> presContext;
GetPresContext(this, getter_AddRefs(presContext));
if (mType == NS_FORM_INPUT_CHECKBOX) {
@ -1014,7 +1014,7 @@ nsHTMLInputElement::FireOnChange()
//
// Since the value is changing, send out an onchange event (bug 23571)
//
nsCOMPtr<nsIPresContext> presContext;
nsCOMPtr<nsPresContext> presContext;
GetPresContext(this, getter_AddRefs(presContext));
nsEventStatus status = nsEventStatus_eIgnore;
nsEvent event(NS_FORM_CHANGE);
@ -1038,7 +1038,7 @@ nsHTMLInputElement::Focus()
}
void
nsHTMLInputElement::SetFocus(nsIPresContext* aPresContext)
nsHTMLInputElement::SetFocus(nsPresContext* aPresContext)
{
if (!aPresContext)
return;
@ -1099,7 +1099,7 @@ nsHTMLInputElement::Select()
// XXX Bug? We have to give the input focus before contents can be
// selected
nsCOMPtr<nsIPresContext> presContext;
nsCOMPtr<nsPresContext> presContext;
GetPresContext(this, getter_AddRefs(presContext));
// If the window is not active, do not allow the select to bring the
@ -1160,7 +1160,7 @@ nsHTMLInputElement::Select()
}
void
nsHTMLInputElement::SelectAll(nsIPresContext* aPresContext)
nsHTMLInputElement::SelectAll(nsPresContext* aPresContext)
{
nsIFormControlFrame* formControlFrame = GetFormControlFrame(PR_TRUE);
@ -1196,7 +1196,7 @@ nsHTMLInputElement::Click()
mType == NS_FORM_INPUT_IMAGE)) {
nsCOMPtr<nsIDocument> doc = mDocument; // Strong in case the event kills it
nsCOMPtr<nsIPresContext> context;
nsCOMPtr<nsPresContext> context;
nsIPresShell *shell = doc->GetShellAt(0);
@ -1221,7 +1221,7 @@ nsHTMLInputElement::Click()
}
nsresult
nsHTMLInputElement::HandleDOMEvent(nsIPresContext* aPresContext,
nsHTMLInputElement::HandleDOMEvent(nsPresContext* aPresContext,
nsEvent* aEvent,
nsIDOMEvent** aDOMEvent,
PRUint32 aFlags,
@ -2035,7 +2035,7 @@ nsHTMLInputElement::GetPhonetic(nsAString& aPhonetic)
#ifdef ACCESSIBILITY
nsresult
nsHTMLInputElement::FireEventForAccessibility(nsIPresContext* aPresContext,
nsHTMLInputElement::FireEventForAccessibility(nsPresContext* aPresContext,
const nsAString& aEventType)
{
nsCOMPtr<nsIDOMEvent> event;

Просмотреть файл

@ -40,7 +40,7 @@
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsMappedAttributes.h"
#include "nsRuleData.h"

Просмотреть файл

@ -42,7 +42,7 @@
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsIFormControl.h"
#include "nsIForm.h"
#include "nsIDOMHTMLDocument.h"
@ -85,11 +85,11 @@ public:
// nsIContent
virtual void SetDocument(nsIDocument* aDocument, PRBool aDeep,
PRBool aCompileEventHandlers);
virtual nsresult HandleDOMEvent(nsIPresContext* aPresContext,
virtual nsresult HandleDOMEvent(nsPresContext* aPresContext,
nsEvent* aEvent, nsIDOMEvent** aDOMEvent,
PRUint32 aFlags,
nsEventStatus* aEventStatus);
virtual void SetFocus(nsIPresContext* aContext);
virtual void SetFocus(nsPresContext* aContext);
nsresult SetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
const nsAString& aValue, PRBool aNotify)
{
@ -177,7 +177,7 @@ nsHTMLLabelElement::SetDocument(nsIDocument* aDocument, PRBool aDeep,
}
static PRBool
EventTargetIn(nsIPresContext *aPresContext, nsEvent *aEvent,
EventTargetIn(nsPresContext *aPresContext, nsEvent *aEvent,
nsIContent *aChild, nsIContent *aStop)
{
nsCOMPtr<nsIContent> c;
@ -199,7 +199,7 @@ EventTargetIn(nsIPresContext *aPresContext, nsEvent *aEvent,
}
nsresult
nsHTMLLabelElement::HandleDOMEvent(nsIPresContext* aPresContext,
nsHTMLLabelElement::HandleDOMEvent(nsPresContext* aPresContext,
nsEvent* aEvent,
nsIDOMEvent** aDOMEvent,
PRUint32 aFlags,
@ -259,7 +259,7 @@ nsHTMLLabelElement::HandleDOMEvent(nsIPresContext* aPresContext,
}
void
nsHTMLLabelElement::SetFocus(nsIPresContext* aContext)
nsHTMLLabelElement::SetFocus(nsPresContext* aContext)
{
// Since we don't have '-moz-user-focus: normal', the only time
// |SetFocus| will be called is when the accesskey is activated.

Просмотреть файл

@ -41,7 +41,7 @@
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsIForm.h"
#include "nsIFormControl.h"

Просмотреть файл

@ -42,7 +42,7 @@
#include "nsILink.h"
#include "nsHTMLAtoms.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsIDOMStyleSheet.h"
#include "nsIStyleSheet.h"
#include "nsIStyleSheetLinkingElement.h"
@ -102,7 +102,7 @@ public:
virtual nsresult UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aAttribute,
PRBool aNotify);
virtual nsresult HandleDOMEvent(nsIPresContext* aPresContext,
virtual nsresult HandleDOMEvent(nsPresContext* aPresContext,
nsEvent* aEvent, nsIDOMEvent** aDOMEvent,
PRUint32 aFlags,
nsEventStatus* aEventStatus);
@ -275,7 +275,7 @@ nsHTMLLinkElement::UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aAttribute,
}
nsresult
nsHTMLLinkElement::HandleDOMEvent(nsIPresContext* aPresContext,
nsHTMLLinkElement::HandleDOMEvent(nsPresContext* aPresContext,
nsEvent* aEvent,
nsIDOMEvent** aDOMEvent,
PRUint32 aFlags,

Просмотреть файл

@ -40,7 +40,7 @@
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsContentList.h"
#include "nsIDocument.h"
#include "nsIHTMLDocument.h"

Просмотреть файл

@ -40,7 +40,7 @@
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
class nsHTMLMetaElement : public nsGenericHTMLElement,

Просмотреть файл

@ -42,7 +42,7 @@
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsMappedAttributes.h"
#include "nsRuleData.h"

Просмотреть файл

@ -40,7 +40,7 @@
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsIFrame.h"
#include "nsIFormControlFrame.h"
@ -80,7 +80,7 @@ public:
PRBool aDeepSetDocument);
virtual nsresult RemoveChildAt(PRUint32 aIndex, PRBool aNotify);
virtual nsresult HandleDOMEvent(nsIPresContext* aPresContext,
virtual nsresult HandleDOMEvent(nsPresContext* aPresContext,
nsEvent* aEvent, nsIDOMEvent** aDOMEvent,
PRUint32 aFlags,
nsEventStatus* aEventStatus);
@ -128,7 +128,7 @@ NS_IMPL_STRING_ATTR(nsHTMLOptGroupElement, Label, label)
nsresult
nsHTMLOptGroupElement::HandleDOMEvent(nsIPresContext* aPresContext,
nsHTMLOptGroupElement::HandleDOMEvent(nsPresContext* aPresContext,
nsEvent* aEvent,
nsIDOMEvent** aDOMEvent,
PRUint32 aFlags,

Просмотреть файл

@ -45,7 +45,7 @@
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsIFormControl.h"
#include "nsIForm.h"
#include "nsIDOMText.h"

Просмотреть файл

@ -40,7 +40,7 @@
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsMappedAttributes.h"
#include "nsRuleData.h"

Просмотреть файл

@ -40,7 +40,7 @@
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsMappedAttributes.h"
#include "nsRuleData.h"
#include "nsCSSStruct.h"

Просмотреть файл

@ -40,7 +40,7 @@
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsITextContent.h"
#include "nsIDocument.h"
#include "nsIScriptLoader.h"
@ -551,7 +551,7 @@ nsHTMLScriptElement::ScriptAvailable(nsresult aResult,
const nsAString& aScript)
{
if (!aIsInline && NS_FAILED(aResult)) {
nsCOMPtr<nsIPresContext> presContext;
nsCOMPtr<nsPresContext> presContext;
GetPresContext(this, getter_AddRefs(presContext));
nsEventStatus status = nsEventStatus_eIgnore;
@ -587,7 +587,7 @@ nsHTMLScriptElement::ScriptEvaluated(nsresult aResult,
{
nsresult rv = NS_OK;
if (!aIsInline) {
nsCOMPtr<nsIPresContext> presContext;
nsCOMPtr<nsPresContext> presContext;
GetPresContext(this, getter_AddRefs(presContext));
nsEventStatus status = nsEventStatus_eIgnore;

Просмотреть файл

@ -47,7 +47,7 @@
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsStyleConsts.h"
#include "nsIPresContext.h"
#include "nsPresContext.h"
#include "nsMappedAttributes.h"
#include "nsIForm.h"
#include "nsIFormSubmission.h"
@ -217,12 +217,12 @@ public:
PRBool aDeepSetDocument);
virtual nsresult RemoveChildAt(PRUint32 aIndex, PRBool aNotify);
virtual nsresult HandleDOMEvent(nsIPresContext* aPresContext,
virtual nsresult HandleDOMEvent(nsPresContext* aPresContext,
nsEvent* aEvent, nsIDOMEvent** aDOMEvent,
PRUint32 aFlags,
nsEventStatus* aEventStatus);
virtual void SetFocus(nsIPresContext* aPresContext);
virtual void SetFocus(nsPresContext* aPresContext);
virtual PRBool IsFocusable(PRInt32 *aTabIndex = nsnull);
// Overriden nsIFormControl methods
@ -284,7 +284,7 @@ protected:
* @param aNotify whether to notify the style system and such
*/
void OnOptionSelected(nsISelectControlFrame* aSelectFrame,
nsIPresContext* aPresContext,
nsPresContext* aPresContext,
PRInt32 aIndex,
PRBool aSelected,
PRBool aNotify);
@ -530,7 +530,7 @@ nsHTMLSelectElement::InsertOptionsIntoList(nsIContent* aOptions,
// get into the right state once it's created.
nsISelectControlFrame* selectFrame = GetSelectFrame();
nsCOMPtr<nsIPresContext> presContext;
nsCOMPtr<nsPresContext> presContext;
if (selectFrame) {
GetPresContext(this, getter_AddRefs(presContext));
}
@ -619,7 +619,7 @@ nsHTMLSelectElement::RemoveOptionsFromList(nsIContent* aOptions,
// Tell the widget we removed the options
nsISelectControlFrame* selectFrame = GetSelectFrame();
if (selectFrame) {
nsCOMPtr<nsIPresContext> presContext;
nsCOMPtr<nsPresContext> presContext;
GetPresContext(this, getter_AddRefs(presContext));
for (int i = aListIndex; i < aListIndex + numRemoved; ++i) {
selectFrame->RemoveOption(presContext, i);
@ -1153,7 +1153,7 @@ nsHTMLSelectElement::IsOptionSelectedByIndex(PRInt32 aIndex)
void
nsHTMLSelectElement::OnOptionSelected(nsISelectControlFrame* aSelectFrame,
nsIPresContext* aPresContext,
nsPresContext* aPresContext,
PRInt32 aIndex,
PRBool aSelected,
PRBool aNotify)
@ -1263,7 +1263,7 @@ nsHTMLSelectElement::SetOptionsSelectedByIndex(PRInt32 aStartIndex,
nsISelectControlFrame *selectFrame = nsnull;
PRBool did_get_frame = PR_FALSE;
nsCOMPtr<nsIPresContext> presContext;
nsCOMPtr<nsPresContext> presContext;
GetPresContext(this, getter_AddRefs(presContext));
if (aIsSelected) {
@ -1597,7 +1597,7 @@ nsHTMLSelectElement::Focus()
}
void
nsHTMLSelectElement::SetFocus(nsIPresContext* aPresContext)
nsHTMLSelectElement::SetFocus(nsPresContext* aPresContext)
{
if (!aPresContext)
return;
@ -1772,7 +1772,7 @@ nsHTMLSelectElement::GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMap
nsresult
nsHTMLSelectElement::HandleDOMEvent(nsIPresContext* aPresContext,
nsHTMLSelectElement::HandleDOMEvent(nsPresContext* aPresContext,
nsEvent* aEvent,
nsIDOMEvent** aDOMEvent,
PRUint32 aFlags,

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше