зеркало из https://github.com/mozilla/gecko-dev.git
Bug 617539. Remove nsIPresShell_MOZILLA_2_0_BRANCH(2). r=tnikkel
This commit is contained in:
Родитель
9915892247
Коммит
2030c35c8b
|
@ -181,9 +181,7 @@ NotificationController::ScheduleProcessing()
|
|||
bool
|
||||
NotificationController::IsUpdatePending()
|
||||
{
|
||||
nsCOMPtr<nsIPresShell_MOZILLA_2_0_BRANCH2> presShell =
|
||||
do_QueryInterface(mPresShell);
|
||||
return presShell->IsLayoutFlushObserver() ||
|
||||
return mPresShell->IsLayoutFlushObserver() ||
|
||||
mObservingState == eRefreshProcessingForUpdate ||
|
||||
mContentInsertions.Length() != 0 || mNotifications.Length() != 0 ||
|
||||
mTextHash.Count() != 0;
|
||||
|
|
|
@ -3621,10 +3621,8 @@ nsGlobalWindow::SetInnerWidth(PRInt32 aInnerWidth)
|
|||
|
||||
nsRefPtr<nsIPresShell> presShell;
|
||||
mDocShell->GetPresShell(getter_AddRefs(presShell));
|
||||
nsCOMPtr<nsIPresShell_MOZILLA_2_0_BRANCH> presShell20 =
|
||||
do_QueryInterface(presShell);
|
||||
|
||||
if (presShell20 && presShell20->GetIsViewportOverridden())
|
||||
if (presShell && presShell->GetIsViewportOverridden())
|
||||
{
|
||||
nscoord height = 0;
|
||||
nscoord width = 0;
|
||||
|
@ -3690,10 +3688,8 @@ nsGlobalWindow::SetInnerHeight(PRInt32 aInnerHeight)
|
|||
|
||||
nsRefPtr<nsIPresShell> presShell;
|
||||
mDocShell->GetPresShell(getter_AddRefs(presShell));
|
||||
nsCOMPtr<nsIPresShell_MOZILLA_2_0_BRANCH> presShell20 =
|
||||
do_QueryInterface(presShell);
|
||||
|
||||
if (presShell20 && presShell20->GetIsViewportOverridden())
|
||||
if (presShell && presShell->GetIsViewportOverridden())
|
||||
{
|
||||
nscoord height = 0;
|
||||
nscoord width = 0;
|
||||
|
|
|
@ -139,16 +139,8 @@ typedef struct CapturingContentInfo {
|
|||
} CapturingContentInfo;
|
||||
|
||||
#define NS_IPRESSHELL_IID \
|
||||
{ 0xd1978bee, 0x43b9, 0x40de, \
|
||||
{ 0x95, 0x47, 0x85, 0x06, 0x5e, 0x02, 0xec, 0xb4 } }
|
||||
|
||||
#define NS_IPRESSHELL_MOZILLA_2_0_BRANCH_IID \
|
||||
{ 0x4abb9970, 0xd7ce, 0x4c02, \
|
||||
{ 0x8a, 0xdb, 0x42, 0xc6, 0xbd, 0xa8, 0x95, 0xb7 } }
|
||||
|
||||
#define NS_IPRESSHELL_MOZILLA_2_0_BRANCH2_IID \
|
||||
{ 0x5ff6fd00, 0x1ba9, 0x11e0, \
|
||||
{ 0xac, 0x64, 0x08, 0x00, 0x20, 0x0c, 0x9a, 0x66 } }
|
||||
{ 0x3a8030b5, 0x8d2c, 0x4cb3, \
|
||||
{ 0xb5, 0xae, 0xb2, 0x43, 0xa9, 0x28, 0x02, 0x82 } }
|
||||
|
||||
// Constants for ScrollContentIntoView() function
|
||||
#define NS_PRESSHELL_SCROLL_TOP 0
|
||||
|
@ -178,49 +170,6 @@ enum nsRectVisibility {
|
|||
nsRectVisibility_kRightOfViewport
|
||||
};
|
||||
|
||||
class nsIPresShell_MOZILLA_2_0_BRANCH : public nsISupports {
|
||||
public:
|
||||
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IPRESSHELL_MOZILLA_2_0_BRANCH_IID)
|
||||
|
||||
virtual PRBool GetIsViewportOverridden() = 0;
|
||||
|
||||
/**
|
||||
* Add a solid color item to the bottom of aList with frame aFrame and bounds
|
||||
* aBounds. Checks first if this needs to be done by checking if aFrame is a
|
||||
* canvas frame (if the FORCE_DRAW flag is passed then this check is skipped).
|
||||
* aBackstopColor is composed behind the background color of the canvas, it is
|
||||
* transparent by default. The ROOT_CONTENT_DOC_BG flag indicates that this is
|
||||
* the background for the root content document.
|
||||
*/
|
||||
enum {
|
||||
FORCE_DRAW = 0x01,
|
||||
ROOT_CONTENT_DOC_BG = 0x02
|
||||
};
|
||||
virtual nsresult AddCanvasBackgroundColorItem2(nsDisplayListBuilder& aBuilder,
|
||||
nsDisplayList& aList,
|
||||
nsIFrame* aFrame,
|
||||
const nsRect& aBounds,
|
||||
nscolor aBackstopColor = NS_RGBA(0,0,0,0),
|
||||
PRUint32 aFlags = 0) = 0;
|
||||
|
||||
};
|
||||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(nsIPresShell_MOZILLA_2_0_BRANCH,
|
||||
NS_IPRESSHELL_MOZILLA_2_0_BRANCH_IID)
|
||||
|
||||
class nsIPresShell_MOZILLA_2_0_BRANCH2 : public nsISupports {
|
||||
public:
|
||||
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IPRESSHELL_MOZILLA_2_0_BRANCH2_IID)
|
||||
|
||||
/**
|
||||
* Return true if the presshell expects layout flush.
|
||||
*/
|
||||
virtual PRBool IsLayoutFlushObserver() = 0;
|
||||
};
|
||||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(nsIPresShell_MOZILLA_2_0_BRANCH2,
|
||||
NS_IPRESSHELL_MOZILLA_2_0_BRANCH2_IID)
|
||||
|
||||
/**
|
||||
* Presentation shell interface. Presentation shells are the
|
||||
* controlling point for managing the presentation of a document. The
|
||||
|
@ -408,6 +357,16 @@ public:
|
|||
*/
|
||||
virtual NS_HIDDEN_(nsresult) ResizeReflowOverride(nscoord aWidth, nscoord aHeight) = 0;
|
||||
|
||||
/**
|
||||
* Returns true if ResizeReflowOverride has been called.
|
||||
*/
|
||||
virtual PRBool GetIsViewportOverridden() = 0;
|
||||
|
||||
/**
|
||||
* Return true if the presshell expects layout flush.
|
||||
*/
|
||||
virtual PRBool IsLayoutFlushObserver() = 0;
|
||||
|
||||
/**
|
||||
* Reflow the frame model with a reflow reason of eReflowReason_StyleChange
|
||||
*/
|
||||
|
@ -1029,18 +988,24 @@ public:
|
|||
virtual void UpdateCanvasBackground() = 0;
|
||||
|
||||
/**
|
||||
* Add a solid color item to the bottom of aList with frame aFrame and
|
||||
* bounds aBounds. Checks first if this needs to be done by checking if
|
||||
* aFrame is a canvas frame (if aForceDraw is true then this check is
|
||||
* skipped). aBackstopColor is composed behind the background color of
|
||||
* the canvas, it is transparent by default.
|
||||
* Add a solid color item to the bottom of aList with frame aFrame and bounds
|
||||
* aBounds. Checks first if this needs to be done by checking if aFrame is a
|
||||
* canvas frame (if the FORCE_DRAW flag is passed then this check is skipped).
|
||||
* aBackstopColor is composed behind the background color of the canvas, it is
|
||||
* transparent by default. The ROOT_CONTENT_DOC_BG flag indicates that this is
|
||||
* the background for the root content document.
|
||||
*/
|
||||
enum {
|
||||
FORCE_DRAW = 0x01,
|
||||
ROOT_CONTENT_DOC_BG = 0x02
|
||||
};
|
||||
virtual nsresult AddCanvasBackgroundColorItem(nsDisplayListBuilder& aBuilder,
|
||||
nsDisplayList& aList,
|
||||
nsIFrame* aFrame,
|
||||
const nsRect& aBounds,
|
||||
nscolor aBackstopColor = NS_RGBA(0,0,0,0),
|
||||
PRBool aForceDraw = PR_FALSE) = 0;
|
||||
PRUint32 aFlags = 0) = 0;
|
||||
|
||||
|
||||
/**
|
||||
* Add a solid color item to the bottom of aList with frame aFrame and
|
||||
|
@ -1150,27 +1115,6 @@ public:
|
|||
PRBool IgnoringViewportScrolling() const
|
||||
{ return mRenderFlags & STATE_IGNORING_VIEWPORT_SCROLLING; }
|
||||
|
||||
/**
|
||||
* Set up a "displayport", which overrides what everything else thinks
|
||||
* is the visible region of this document with the specified
|
||||
* displayport rect.
|
||||
* @DEPRECATED Use nsLayoutUtils displayport methods
|
||||
*/
|
||||
virtual void SetDisplayPort(const nsRect& aDisplayPort) = 0;
|
||||
PRBool UsingDisplayPort() const
|
||||
{ NS_ABORT_IF_FALSE(false, "UsingDisplayPort is deprecated"); return false; }
|
||||
|
||||
/**
|
||||
* Return the displayport being used. |UsingDisplayPort()| must be
|
||||
* true.
|
||||
* @DEPRECATED Use nsLayoutUtils displayport methods
|
||||
*/
|
||||
nsRect GetDisplayPort()
|
||||
{
|
||||
NS_ABORT_IF_FALSE(false, "GetDisplayPort is deprecated");
|
||||
return nsRect();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a "resolution" for the document, which if not 1.0 will
|
||||
* allocate more or fewer pixels for rescalable content by a factor
|
||||
|
@ -1286,10 +1230,6 @@ protected:
|
|||
// changes in a way that prevents us from being able to (usefully)
|
||||
// re-use old pixels.
|
||||
PRUint32 mRenderFlags;
|
||||
// If displayport rendering has been requested, |UsingDisplayPort()|
|
||||
// is true and |mDisplayPort| defines the "visible rect" we
|
||||
// maintain.
|
||||
nsRect mDisplayPort;
|
||||
|
||||
// Used to force allocation and rendering of proportionally more or
|
||||
// less pixels in the given dimension.
|
||||
|
|
|
@ -699,9 +699,7 @@ class nsAutoCauseReflowNotifier;
|
|||
class PresShell : public nsIPresShell, public nsIViewObserver,
|
||||
public nsStubDocumentObserver,
|
||||
public nsISelectionController, public nsIObserver,
|
||||
public nsSupportsWeakReference,
|
||||
public nsIPresShell_MOZILLA_2_0_BRANCH,
|
||||
public nsIPresShell_MOZILLA_2_0_BRANCH2
|
||||
public nsSupportsWeakReference
|
||||
{
|
||||
public:
|
||||
PresShell();
|
||||
|
@ -954,19 +952,12 @@ public:
|
|||
|
||||
virtual void UpdateCanvasBackground();
|
||||
|
||||
virtual nsresult AddCanvasBackgroundColorItem2(nsDisplayListBuilder& aBuilder,
|
||||
nsDisplayList& aList,
|
||||
nsIFrame* aFrame,
|
||||
const nsRect& aBounds,
|
||||
nscolor aBackstopColor,
|
||||
PRUint32 aFlags);
|
||||
|
||||
virtual nsresult AddCanvasBackgroundColorItem(nsDisplayListBuilder& aBuilder,
|
||||
nsDisplayList& aList,
|
||||
nsIFrame* aFrame,
|
||||
const nsRect& aBounds,
|
||||
nscolor aBackstopColor,
|
||||
PRBool aForceDraw);
|
||||
PRUint32 aFlags);
|
||||
|
||||
virtual nsresult AddPrintPreviewBackgroundItem(nsDisplayListBuilder& aBuilder,
|
||||
nsDisplayList& aList,
|
||||
|
@ -1698,11 +1689,10 @@ PresShell::PresShell()
|
|||
sLiveShells->PutEntry(this);
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS10(PresShell, nsIPresShell, nsIDocumentObserver,
|
||||
NS_IMPL_ISUPPORTS8(PresShell, nsIPresShell, nsIDocumentObserver,
|
||||
nsIViewObserver, nsISelectionController,
|
||||
nsISelectionDisplay, nsIObserver, nsISupportsWeakReference,
|
||||
nsIMutationObserver, nsIPresShell_MOZILLA_2_0_BRANCH,
|
||||
nsIPresShell_MOZILLA_2_0_BRANCH2)
|
||||
nsIMutationObserver)
|
||||
|
||||
PresShell::~PresShell()
|
||||
{
|
||||
|
@ -5783,18 +5773,6 @@ AddCanvasBackgroundColor(const nsDisplayList& aList, nsIFrame* aCanvasFrame,
|
|||
}
|
||||
|
||||
nsresult PresShell::AddCanvasBackgroundColorItem(nsDisplayListBuilder& aBuilder,
|
||||
nsDisplayList& aList,
|
||||
nsIFrame* aFrame,
|
||||
const nsRect& aBounds,
|
||||
nscolor aBackstopColor,
|
||||
PRBool aForceDraw)
|
||||
{
|
||||
return AddCanvasBackgroundColorItem2(aBuilder, aList, aFrame, aBounds,
|
||||
aBackstopColor,
|
||||
aForceDraw ? nsIPresShell_MOZILLA_2_0_BRANCH::FORCE_DRAW : 0);
|
||||
}
|
||||
|
||||
nsresult PresShell::AddCanvasBackgroundColorItem2(nsDisplayListBuilder& aBuilder,
|
||||
nsDisplayList& aList,
|
||||
nsIFrame* aFrame,
|
||||
const nsRect& aBounds,
|
||||
|
@ -5807,7 +5785,7 @@ nsresult PresShell::AddCanvasBackgroundColorItem2(nsDisplayListBuilder& aBuilder
|
|||
// (sub)tree we are painting is a canvas frame that should cover us in all
|
||||
// cases (it will usually be a viewport frame when we have a canvas frame in
|
||||
// the (sub)tree).
|
||||
if (!(aFlags & nsIPresShell_MOZILLA_2_0_BRANCH::FORCE_DRAW) &&
|
||||
if (!(aFlags & nsIPresShell::FORCE_DRAW) &&
|
||||
!nsCSSRendering::IsCanvasFrame(aFrame)) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -5834,7 +5812,7 @@ nsresult PresShell::AddCanvasBackgroundColorItem2(nsDisplayListBuilder& aBuilder
|
|||
|
||||
return aList.AppendNewToBottom(
|
||||
new (&aBuilder) nsDisplaySolidColor(&aBuilder, aFrame, aBounds, bgcolor,
|
||||
!!(aFlags & nsIPresShell_MOZILLA_2_0_BRANCH::ROOT_CONTENT_DOC_BG)));
|
||||
!!(aFlags & nsIPresShell::ROOT_CONTENT_DOC_BG)));
|
||||
}
|
||||
|
||||
static PRBool IsTransparentContainerElement(nsPresContext* aPresContext)
|
||||
|
|
|
@ -391,9 +391,9 @@ nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
// Add the canvas background color to the bottom of the list. This
|
||||
// happens after we've built the list so that AddCanvasBackgroundColorItem
|
||||
// can monkey with the contents if necessary.
|
||||
PRUint32 flags = nsIPresShell_MOZILLA_2_0_BRANCH::FORCE_DRAW;
|
||||
PRUint32 flags = nsIPresShell::FORCE_DRAW;
|
||||
if (presContext->IsRootContentDocument()) {
|
||||
flags |= nsIPresShell_MOZILLA_2_0_BRANCH::ROOT_CONTENT_DOC_BG;
|
||||
flags |= nsIPresShell::ROOT_CONTENT_DOC_BG;
|
||||
}
|
||||
rv = presShell->AddCanvasBackgroundColorItem(
|
||||
*aBuilder, childItems, subdocRootFrame ? subdocRootFrame : this,
|
||||
|
|
Загрузка…
Ссылка в новой задаче