mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 700240 - Print nsSVGEffects types. r=roc
This commit is contained in:
parent
4c0194acc2
commit
0f4f45950d
@ -64,6 +64,8 @@
|
||||
#include "BasicLayers.h"
|
||||
#include "nsBoxFrame.h"
|
||||
#include "nsViewportFrame.h"
|
||||
#include "nsSVGEffects.h"
|
||||
#include "nsSVGClipPathFrame.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::layers;
|
||||
@ -2998,3 +3000,44 @@ bool nsDisplaySVGEffects::TryMerge(nsDisplayListBuilder* aBuilder, nsDisplayItem
|
||||
other->mBounds + other->mEffectsFrame->GetOffsetTo(mEffectsFrame));
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef MOZ_DUMP_PAINTING
|
||||
void
|
||||
nsDisplaySVGEffects::PrintEffects(FILE* aOutput)
|
||||
{
|
||||
nsIFrame* firstFrame =
|
||||
nsLayoutUtils::GetFirstContinuationOrSpecialSibling(mEffectsFrame);
|
||||
nsSVGEffects::EffectProperties effectProperties =
|
||||
nsSVGEffects::GetEffectProperties(firstFrame);
|
||||
bool isOK = true;
|
||||
nsSVGClipPathFrame *clipPathFrame = effectProperties.GetClipPathFrame(&isOK);
|
||||
bool first = true;
|
||||
fprintf(aOutput, " effects=(");
|
||||
if (mEffectsFrame->GetStyleDisplay()->mOpacity != 1.0f) {
|
||||
first = false;
|
||||
fprintf(aOutput, "opacity(%f)", mEffectsFrame->GetStyleDisplay()->mOpacity);
|
||||
}
|
||||
if (clipPathFrame) {
|
||||
if (!first) {
|
||||
fprintf(aOutput, ", ");
|
||||
}
|
||||
fprintf(aOutput, "clip(%s)", clipPathFrame->IsTrivial() ? "trivial" : "non-trivial");
|
||||
first = false;
|
||||
}
|
||||
if (effectProperties.GetFilterFrame(&isOK)) {
|
||||
if (!first) {
|
||||
fprintf(aOutput, ", ");
|
||||
}
|
||||
fprintf(aOutput, "filter");
|
||||
first = false;
|
||||
}
|
||||
if (effectProperties.GetMaskFrame(&isOK)) {
|
||||
if (!first) {
|
||||
fprintf(aOutput, ", ");
|
||||
}
|
||||
fprintf(aOutput, "mask");
|
||||
}
|
||||
fprintf(aOutput, ")");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -2052,6 +2052,10 @@ public:
|
||||
|
||||
nsIFrame* GetEffectsFrame() { return mEffectsFrame; }
|
||||
|
||||
#ifdef MOZ_DUMP_PAINTING
|
||||
void PrintEffects(FILE* aOutput);
|
||||
#endif
|
||||
|
||||
private:
|
||||
nsIFrame* mEffectsFrame;
|
||||
// relative to mEffectsFrame
|
||||
|
@ -207,6 +207,9 @@ PrintDisplayListTo(nsDisplayListBuilder* aBuilder, const nsDisplayList& aList,
|
||||
fprintf(aOutput, " layer=%p", layer);
|
||||
}
|
||||
}
|
||||
if (i->GetType() == nsDisplayItem::TYPE_SVG_EFFECTS) {
|
||||
(static_cast<nsDisplaySVGEffects*>(i))->PrintEffects(aOutput);
|
||||
}
|
||||
fputc('\n', aOutput);
|
||||
if (list) {
|
||||
PrintDisplayListTo(aBuilder, *list, aIndent + 4, aOutput);
|
||||
|
Loading…
Reference in New Issue
Block a user