mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backout changeset 3a41b53f8ada (bug 539356) because of performance and correctness regressions
This commit is contained in:
parent
7ca323fbe6
commit
2b300e2946
@ -67,22 +67,9 @@ nsSVGForeignObjectFrame::Init(nsIContent* aContent,
|
|||||||
(NS_STATE_SVG_NONDISPLAY_CHILD | NS_STATE_SVG_CLIPPATH_CHILD));
|
(NS_STATE_SVG_NONDISPLAY_CHILD | NS_STATE_SVG_CLIPPATH_CHILD));
|
||||||
AddStateBits(NS_FRAME_FONT_INFLATION_CONTAINER |
|
AddStateBits(NS_FRAME_FONT_INFLATION_CONTAINER |
|
||||||
NS_FRAME_FONT_INFLATION_FLOW_ROOT);
|
NS_FRAME_FONT_INFLATION_FLOW_ROOT);
|
||||||
if (NS_SUCCEEDED(rv) &&
|
|
||||||
!(mState & NS_STATE_SVG_NONDISPLAY_CHILD)) {
|
|
||||||
nsSVGUtils::GetOuterSVGFrame(this)->RegisterForeignObject(this);
|
|
||||||
}
|
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
void nsSVGForeignObjectFrame::DestroyFrom(nsIFrame* aDestructRoot)
|
|
||||||
{
|
|
||||||
// Only unregister if we registered in the first place:
|
|
||||||
if (!(mState & NS_STATE_SVG_NONDISPLAY_CHILD)) {
|
|
||||||
nsSVGUtils::GetOuterSVGFrame(this)->UnregisterForeignObject(this);
|
|
||||||
}
|
|
||||||
nsSVGForeignObjectFrameBase::DestroyFrom(aDestructRoot);
|
|
||||||
}
|
|
||||||
|
|
||||||
nsIAtom *
|
nsIAtom *
|
||||||
nsSVGForeignObjectFrame::GetType() const
|
nsSVGForeignObjectFrame::GetType() const
|
||||||
{
|
{
|
||||||
|
@ -33,7 +33,6 @@ public:
|
|||||||
NS_IMETHOD Init(nsIContent* aContent,
|
NS_IMETHOD Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow);
|
nsIFrame* aPrevInFlow);
|
||||||
virtual void DestroyFrom(nsIFrame* aDestructRoot);
|
|
||||||
NS_IMETHOD AttributeChanged(PRInt32 aNameSpaceID,
|
NS_IMETHOD AttributeChanged(PRInt32 aNameSpaceID,
|
||||||
nsIAtom* aAttribute,
|
nsIAtom* aAttribute,
|
||||||
PRInt32 aModType);
|
PRInt32 aModType);
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
#include "nsIObjectLoadingContent.h"
|
#include "nsIObjectLoadingContent.h"
|
||||||
#include "nsRenderingContext.h"
|
#include "nsRenderingContext.h"
|
||||||
#include "nsStubMutationObserver.h"
|
#include "nsStubMutationObserver.h"
|
||||||
#include "nsSVGForeignObjectFrame.h"
|
|
||||||
#include "nsSVGIntegrationUtils.h"
|
#include "nsSVGIntegrationUtils.h"
|
||||||
#include "nsSVGSVGElement.h"
|
#include "nsSVGSVGElement.h"
|
||||||
#include "nsSVGTextFrame.h"
|
#include "nsSVGTextFrame.h"
|
||||||
@ -80,33 +79,6 @@ nsSVGMutationObserver::AttributeChanged(nsIDocument* aDocument,
|
|||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
// Implementation helpers
|
// Implementation helpers
|
||||||
|
|
||||||
void
|
|
||||||
nsSVGOuterSVGFrame::RegisterForeignObject(nsSVGForeignObjectFrame* aFrame)
|
|
||||||
{
|
|
||||||
NS_ASSERTION(aFrame, "Who on earth is calling us?!");
|
|
||||||
|
|
||||||
if (!mForeignObjectHash.IsInitialized()) {
|
|
||||||
mForeignObjectHash.Init();
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_ASSERTION(!mForeignObjectHash.GetEntry(aFrame),
|
|
||||||
"nsSVGForeignObjectFrame already registered!");
|
|
||||||
|
|
||||||
mForeignObjectHash.PutEntry(aFrame);
|
|
||||||
|
|
||||||
NS_ASSERTION(mForeignObjectHash.GetEntry(aFrame),
|
|
||||||
"Failed to register nsSVGForeignObjectFrame!");
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
nsSVGOuterSVGFrame::UnregisterForeignObject(nsSVGForeignObjectFrame* aFrame)
|
|
||||||
{
|
|
||||||
NS_ASSERTION(aFrame, "Who on earth is calling us?!");
|
|
||||||
NS_ASSERTION(mForeignObjectHash.GetEntry(aFrame),
|
|
||||||
"nsSVGForeignObjectFrame not in registry!");
|
|
||||||
return mForeignObjectHash.RemoveEntry(aFrame);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
nsSVGMutationObserver::UpdateTextFragmentTrees(nsIFrame *aFrame)
|
nsSVGMutationObserver::UpdateTextFragmentTrees(nsIFrame *aFrame)
|
||||||
{
|
{
|
||||||
|
@ -10,8 +10,6 @@
|
|||||||
#include "nsISVGSVGFrame.h"
|
#include "nsISVGSVGFrame.h"
|
||||||
#include "nsSVGContainerFrame.h"
|
#include "nsSVGContainerFrame.h"
|
||||||
|
|
||||||
class nsSVGForeignObjectFrame;
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
// nsSVGOuterSVGFrame class
|
// nsSVGOuterSVGFrame class
|
||||||
|
|
||||||
@ -29,13 +27,6 @@ public:
|
|||||||
NS_DECL_QUERYFRAME
|
NS_DECL_QUERYFRAME
|
||||||
NS_DECL_FRAMEARENA_HELPERS
|
NS_DECL_FRAMEARENA_HELPERS
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
~nsSVGOuterSVGFrame() {
|
|
||||||
NS_ASSERTION(mForeignObjectHash.Count() == 0,
|
|
||||||
"foreignObject(s) still registered!");
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// nsIFrame:
|
// nsIFrame:
|
||||||
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext);
|
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext);
|
||||||
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext);
|
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext);
|
||||||
@ -102,18 +93,6 @@ public:
|
|||||||
// nsSVGContainerFrame methods:
|
// nsSVGContainerFrame methods:
|
||||||
virtual gfxMatrix GetCanvasTM(PRUint32 aFor);
|
virtual gfxMatrix GetCanvasTM(PRUint32 aFor);
|
||||||
|
|
||||||
/* Methods to allow descendant nsSVGForeignObjectFrame frames to register and
|
|
||||||
* unregister themselves with their nearest nsSVGOuterSVGFrame ancestor. This
|
|
||||||
* is temporary until display list based invalidation is impleented for SVG.
|
|
||||||
* Maintaining a list of our foreignObject descendants allows us to search
|
|
||||||
* them for areas that need to be invalidated, without having to also search
|
|
||||||
* the SVG frame tree for foreignObjects. This is important so that bug 539356
|
|
||||||
* does not slow down SVG in general (only foreignObjects, until bug 614732 is
|
|
||||||
* fixed).
|
|
||||||
*/
|
|
||||||
void RegisterForeignObject(nsSVGForeignObjectFrame* aFrame);
|
|
||||||
void UnregisterForeignObject(nsSVGForeignObjectFrame* aFrame);
|
|
||||||
|
|
||||||
virtual bool HasChildrenOnlyTransform(gfxMatrix *aTransform) const;
|
virtual bool HasChildrenOnlyTransform(gfxMatrix *aTransform) const;
|
||||||
|
|
||||||
#ifdef XP_MACOSX
|
#ifdef XP_MACOSX
|
||||||
@ -151,13 +130,6 @@ protected:
|
|||||||
*/
|
*/
|
||||||
bool IsRootOfImage();
|
bool IsRootOfImage();
|
||||||
|
|
||||||
// This is temporary until display list based invalidation is implemented for
|
|
||||||
// SVG.
|
|
||||||
// A hash-set containing our nsSVGForeignObjectFrame descendants. Note we use
|
|
||||||
// a hash-set to avoid the O(N^2) behavior we'd get tearing down an SVG frame
|
|
||||||
// subtree if we were to use a list (see bug 381285 comment 20).
|
|
||||||
nsTHashtable<nsVoidPtrHashKey> mForeignObjectHash;
|
|
||||||
|
|
||||||
nsAutoPtr<gfxMatrix> mCanvasTM;
|
nsAutoPtr<gfxMatrix> mCanvasTM;
|
||||||
|
|
||||||
float mFullZoom;
|
float mFullZoom;
|
||||||
|
Loading…
Reference in New Issue
Block a user