backout 69277e48526c (Bug 839865) due to reftest orange on a CLOSED TREE

This commit is contained in:
Daniel Holbert 2013-02-11 17:29:48 -08:00
parent 63ce885d99
commit 50f4b40153
7 changed files with 17 additions and 29 deletions

View File

@ -106,9 +106,9 @@ nsSVGAFrame::AttributeChanged(int32_t aNameSpaceID,
{
if (aNameSpaceID == kNameSpaceID_None &&
aAttribute == nsGkAtoms::transform) {
// Don't invalidate or update bounds (the layers code does that).
nsSVGUtils::InvalidateBounds(this, false);
nsSVGUtils::ScheduleReflowSVG(this);
NotifySVGChanged(TRANSFORM_CHANGED);
SchedulePaint();
}
return NS_OK;

View File

@ -100,15 +100,12 @@ nsSVGForeignObjectFrame::AttributeChanged(int32_t aNameSpaceID,
// XXXjwatt: why mark intrinsic widths dirty? can't we just use eResize?
RequestReflow(nsIPresShell::eStyleChange);
} else if (aAttribute == nsGkAtoms::x ||
aAttribute == nsGkAtoms::y) {
aAttribute == nsGkAtoms::y ||
aAttribute == nsGkAtoms::transform) {
// make sure our cached transform matrix gets (lazily) updated
mCanvasTM = nullptr;
nsSVGUtils::InvalidateBounds(this, false);
nsSVGUtils::ScheduleReflowSVG(this);
} else if (aAttribute == nsGkAtoms::transform) {
// Don't invalidate or update bounds (the layers code does that).
SchedulePaint();
mCanvasTM = nullptr;
} else if (aAttribute == nsGkAtoms::viewBox ||
aAttribute == nsGkAtoms::preserveAspectRatio) {
nsSVGUtils::InvalidateBounds(this);

View File

@ -93,9 +93,9 @@ nsSVGGFrame::AttributeChanged(int32_t aNameSpaceID,
{
if (aNameSpaceID == kNameSpaceID_None &&
aAttribute == nsGkAtoms::transform) {
// Don't invalidate or update bounds (the layers code does that).
nsSVGUtils::InvalidateBounds(this, false);
nsSVGUtils::ScheduleReflowSVG(this);
NotifySVGChanged(TRANSFORM_CHANGED);
SchedulePaint();
}
return NS_OK;

View File

@ -190,8 +190,7 @@ nsSVGImageFrame::AttributeChanged(int32_t aNameSpaceID,
return NS_OK;
}
else if (aAttribute == nsGkAtoms::preserveAspectRatio) {
// Don't invalidate or update bounds (the layers code does that).
SchedulePaint();
nsSVGUtils::InvalidateBounds(this);
return NS_OK;
}
}

View File

@ -197,23 +197,17 @@ nsSVGInnerSVGFrame::AttributeChanged(int32_t aNameSpaceID,
// make sure our cached transform matrix gets (lazily) updated
mCanvasTM = nullptr;
nsSVGUtils::InvalidateBounds(this, false);
nsSVGUtils::ScheduleReflowSVG(this);
nsSVGUtils::NotifyChildrenOfSVGChange(
this, aAttribute == nsGkAtoms::viewBox ?
TRANSFORM_CHANGED | COORD_CONTEXT_CHANGED : TRANSFORM_CHANGED);
if (aAttribute == nsGkAtoms::x || aAttribute == nsGkAtoms::y) {
nsSVGUtils::InvalidateBounds(this, false);
nsSVGUtils::ScheduleReflowSVG(this);
} else if (aAttribute == nsGkAtoms::transform) {
// Don't invalidate or update bounds (the layers code does that).
SchedulePaint();
} else if (aAttribute == nsGkAtoms::viewBox ||
(aAttribute == nsGkAtoms::preserveAspectRatio &&
content->HasViewBoxOrSyntheticViewBox())) {
if (aAttribute == nsGkAtoms::viewBox ||
(aAttribute == nsGkAtoms::preserveAspectRatio &&
content->HasViewBoxOrSyntheticViewBox())) {
content->ChildrenOnlyTransformChanged();
// SchedulePaint sets a global state flag so we only need to call it once
// (on ourself is fine), not once on each child (despite bug 828240).
SchedulePaint();
}
}
}

View File

@ -108,12 +108,10 @@ nsSVGPathGeometryFrame::AttributeChanged(int32_t aNameSpaceID,
{
if (aNameSpaceID == kNameSpaceID_None &&
(static_cast<nsSVGPathGeometryElement*>
(mContent)->AttributeDefinesGeometry(aAttribute))) {
(mContent)->AttributeDefinesGeometry(aAttribute) ||
aAttribute == nsGkAtoms::transform)) {
nsSVGUtils::InvalidateBounds(this, false);
nsSVGUtils::ScheduleReflowSVG(this);
} else if (aAttribute == nsGkAtoms::transform) {
// Don't invalidate or update bounds (the layers code does that).
SchedulePaint();
}
return NS_OK;
}

View File

@ -54,9 +54,9 @@ nsSVGTextFrame::AttributeChanged(int32_t aNameSpaceID,
return NS_OK;
if (aAttribute == nsGkAtoms::transform) {
// Don't invalidate or update bounds (the layers code does that).
nsSVGUtils::InvalidateBounds(this, false);
nsSVGUtils::ScheduleReflowSVG(this);
NotifySVGChanged(TRANSFORM_CHANGED);
SchedulePaint();
} else if (aAttribute == nsGkAtoms::x ||
aAttribute == nsGkAtoms::y ||
aAttribute == nsGkAtoms::dx ||