Bug 64945: XML prettyprinting final stage. Implements document.removeBinding and drops the prettyprint binding when the document is modified. Also turn on prettyprinting by default.
r=jkeiser,hyatt,bz sr=rpotts a=asa
This commit is contained in:
@@ -288,6 +288,10 @@ public:
|
|||||||
NS_IMETHOD CancelReflowCommand(nsIFrame* aTargetFrame, nsReflowType* aCmdType) = 0;
|
NS_IMETHOD CancelReflowCommand(nsIFrame* aTargetFrame, nsReflowType* aCmdType) = 0;
|
||||||
NS_IMETHOD CancelAllReflowCommands() = 0;
|
NS_IMETHOD CancelAllReflowCommands() = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Recreates the frames for a node
|
||||||
|
*/
|
||||||
|
NS_IMETHOD RecreateFramesFor(nsIContent* aContent) = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine if it is safe to flush all pending notifications
|
* Determine if it is safe to flush all pending notifications
|
||||||
|
|||||||
@@ -1068,6 +1068,11 @@ public:
|
|||||||
NS_IMETHOD IsSafeToFlush(PRBool& aIsSafeToFlush);
|
NS_IMETHOD IsSafeToFlush(PRBool& aIsSafeToFlush);
|
||||||
NS_IMETHOD FlushPendingNotifications(PRBool aUpdateViews);
|
NS_IMETHOD FlushPendingNotifications(PRBool aUpdateViews);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Recreates the frames for a node
|
||||||
|
*/
|
||||||
|
NS_IMETHOD RecreateFramesFor(nsIContent* aContent);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Post a request to handle a DOM event after Reflow has finished.
|
* Post a request to handle a DOM event after Reflow has finished.
|
||||||
*/
|
*/
|
||||||
@@ -3873,6 +3878,27 @@ PresShell::CancelAllReflowCommands()
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NS_IMETHODIMP
|
||||||
|
PresShell::RecreateFramesFor(nsIContent* aContent)
|
||||||
|
{
|
||||||
|
NS_ENSURE_TRUE(mPresContext, NS_ERROR_FAILURE);
|
||||||
|
|
||||||
|
nsCOMPtr<nsIStyleSet> styleSet;
|
||||||
|
nsresult rv = GetStyleSet(getter_AddRefs(styleSet));
|
||||||
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
||||||
|
nsCOMPtr<nsIStyleFrameConstruction> frameConstruction;
|
||||||
|
rv = styleSet->GetStyleFrameConstruction(getter_AddRefs(frameConstruction));
|
||||||
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
||||||
|
// Don't call RecreateFramesForContent since that is not exported and we want
|
||||||
|
// to keep the number of entrypoints down.
|
||||||
|
|
||||||
|
nsStyleChangeList changeList;
|
||||||
|
changeList.AppendChange(nsnull, aContent, nsChangeHint_ReconstructFrame);
|
||||||
|
return frameConstruction->ProcessRestyledFrames(changeList, mPresContext);
|
||||||
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
PresShell::ClearFrameRefs(nsIFrame* aFrame)
|
PresShell::ClearFrameRefs(nsIFrame* aFrame)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -288,6 +288,10 @@ public:
|
|||||||
NS_IMETHOD CancelReflowCommand(nsIFrame* aTargetFrame, nsReflowType* aCmdType) = 0;
|
NS_IMETHOD CancelReflowCommand(nsIFrame* aTargetFrame, nsReflowType* aCmdType) = 0;
|
||||||
NS_IMETHOD CancelAllReflowCommands() = 0;
|
NS_IMETHOD CancelAllReflowCommands() = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Recreates the frames for a node
|
||||||
|
*/
|
||||||
|
NS_IMETHOD RecreateFramesFor(nsIContent* aContent) = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine if it is safe to flush all pending notifications
|
* Determine if it is safe to flush all pending notifications
|
||||||
|
|||||||
@@ -1068,6 +1068,11 @@ public:
|
|||||||
NS_IMETHOD IsSafeToFlush(PRBool& aIsSafeToFlush);
|
NS_IMETHOD IsSafeToFlush(PRBool& aIsSafeToFlush);
|
||||||
NS_IMETHOD FlushPendingNotifications(PRBool aUpdateViews);
|
NS_IMETHOD FlushPendingNotifications(PRBool aUpdateViews);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Recreates the frames for a node
|
||||||
|
*/
|
||||||
|
NS_IMETHOD RecreateFramesFor(nsIContent* aContent);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Post a request to handle a DOM event after Reflow has finished.
|
* Post a request to handle a DOM event after Reflow has finished.
|
||||||
*/
|
*/
|
||||||
@@ -3873,6 +3878,27 @@ PresShell::CancelAllReflowCommands()
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NS_IMETHODIMP
|
||||||
|
PresShell::RecreateFramesFor(nsIContent* aContent)
|
||||||
|
{
|
||||||
|
NS_ENSURE_TRUE(mPresContext, NS_ERROR_FAILURE);
|
||||||
|
|
||||||
|
nsCOMPtr<nsIStyleSet> styleSet;
|
||||||
|
nsresult rv = GetStyleSet(getter_AddRefs(styleSet));
|
||||||
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
||||||
|
nsCOMPtr<nsIStyleFrameConstruction> frameConstruction;
|
||||||
|
rv = styleSet->GetStyleFrameConstruction(getter_AddRefs(frameConstruction));
|
||||||
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
||||||
|
// Don't call RecreateFramesForContent since that is not exported and we want
|
||||||
|
// to keep the number of entrypoints down.
|
||||||
|
|
||||||
|
nsStyleChangeList changeList;
|
||||||
|
changeList.AppendChange(nsnull, aContent, nsChangeHint_ReconstructFrame);
|
||||||
|
return frameConstruction->ProcessRestyledFrames(changeList, mPresContext);
|
||||||
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
PresShell::ClearFrameRefs(nsIFrame* aFrame)
|
PresShell::ClearFrameRefs(nsIFrame* aFrame)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user