зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1919040 - Remove some unneeded transform attr invalidation. r=longsonr
Style invalidation should take care of it. Differential Revision: https://phabricator.services.mozilla.com/D222499
This commit is contained in:
Родитель
fb97ff055b
Коммит
04bedeeb07
|
@ -33,10 +33,6 @@ class SVGAFrame final : public SVGDisplayContainerFrame {
|
|||
nsIFrame* aPrevInFlow) override;
|
||||
#endif
|
||||
|
||||
// nsIFrame:
|
||||
nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
|
||||
int32_t aModType) override;
|
||||
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
nsresult GetFrameName(nsAString& aResult) const override {
|
||||
return MakeFrameName(u"SVGA"_ns, aResult);
|
||||
|
@ -72,17 +68,4 @@ void SVGAFrame::Init(nsIContent* aContent, nsContainerFrame* aParent,
|
|||
}
|
||||
#endif /* DEBUG */
|
||||
|
||||
nsresult SVGAFrame::AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
|
||||
int32_t aModType) {
|
||||
if (aNameSpaceID == kNameSpaceID_None && aAttribute == nsGkAtoms::transform) {
|
||||
// We don't invalidate for transform changes (the layers code does that).
|
||||
// Also note that SVGTransformableElement::GetAttributeChangeHint will
|
||||
// return nsChangeHint_UpdateOverflow for "transform" attribute changes
|
||||
// and cause DoApplyRenderingChangeToTree to make the SchedulePaint call.
|
||||
NotifySVGChanged(TRANSFORM_CHANGED);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -367,17 +367,10 @@ bool SVGClipPathFrame::IsValid() {
|
|||
nsresult SVGClipPathFrame::AttributeChanged(int32_t aNameSpaceID,
|
||||
nsAtom* aAttribute,
|
||||
int32_t aModType) {
|
||||
if (aNameSpaceID == kNameSpaceID_None) {
|
||||
if (aAttribute == nsGkAtoms::transform) {
|
||||
SVGObserverUtils::InvalidateRenderingObservers(this);
|
||||
SVGUtils::NotifyChildrenOfSVGChange(
|
||||
this, ISVGDisplayableFrame::TRANSFORM_CHANGED);
|
||||
}
|
||||
if (aAttribute == nsGkAtoms::clipPathUnits) {
|
||||
SVGObserverUtils::InvalidateRenderingObservers(this);
|
||||
}
|
||||
if (aNameSpaceID == kNameSpaceID_None &&
|
||||
aAttribute == nsGkAtoms::clipPathUnits) {
|
||||
SVGObserverUtils::InvalidateRenderingObservers(this);
|
||||
}
|
||||
|
||||
return SVGContainerFrame::AttributeChanged(aNameSpaceID, aAttribute,
|
||||
aModType);
|
||||
}
|
||||
|
|
|
@ -489,8 +489,7 @@ nsresult SVGOuterSVGFrame::AttributeChanged(int32_t aNameSpaceID,
|
|||
if (aNameSpaceID == kNameSpaceID_None &&
|
||||
!HasAnyStateBits(NS_FRAME_FIRST_REFLOW | NS_FRAME_IS_NONDISPLAY)) {
|
||||
if (aAttribute == nsGkAtoms::viewBox ||
|
||||
aAttribute == nsGkAtoms::preserveAspectRatio ||
|
||||
aAttribute == nsGkAtoms::transform) {
|
||||
aAttribute == nsGkAtoms::preserveAspectRatio) {
|
||||
// make sure our cached transform matrix gets (lazily) updated
|
||||
mCanvasTM = nullptr;
|
||||
|
||||
|
@ -566,8 +565,7 @@ void SVGOuterSVGFrame::NotifyViewportOrTransformChanged(uint32_t aFlags) {
|
|||
FULL_ZOOM_CHANGED)),
|
||||
"Unexpected aFlags value");
|
||||
|
||||
SVGSVGElement* content = static_cast<SVGSVGElement*>(GetContent());
|
||||
|
||||
auto* content = static_cast<SVGSVGElement*>(GetContent());
|
||||
if (aFlags & COORD_CONTEXT_CHANGED) {
|
||||
if (content->HasViewBox()) {
|
||||
// Percentage lengths on children resolve against the viewBox rect so we
|
||||
|
|
|
@ -181,8 +181,7 @@ nsresult SVGViewportFrame::AttributeChanged(int32_t aNameSpaceID,
|
|||
SVGUtils::NotifyChildrenOfSVGChange(this, flags);
|
||||
}
|
||||
|
||||
} else if (aAttribute == nsGkAtoms::transform ||
|
||||
aAttribute == nsGkAtoms::preserveAspectRatio ||
|
||||
} else if (aAttribute == nsGkAtoms::preserveAspectRatio ||
|
||||
aAttribute == nsGkAtoms::viewBox || aAttribute == nsGkAtoms::x ||
|
||||
aAttribute == nsGkAtoms::y) {
|
||||
// make sure our cached transform matrix gets (lazily) updated
|
||||
|
@ -193,11 +192,6 @@ nsresult SVGViewportFrame::AttributeChanged(int32_t aNameSpaceID,
|
|||
? TRANSFORM_CHANGED | COORD_CONTEXT_CHANGED
|
||||
: TRANSFORM_CHANGED);
|
||||
|
||||
// We don't invalidate for transform changes (the layers code does that).
|
||||
// Also note that SVGTransformableElement::GetAttributeChangeHint will
|
||||
// return nsChangeHint_UpdateOverflow for "transform" attribute changes
|
||||
// and cause DoApplyRenderingChangeToTree to make the SchedulePaint call.
|
||||
|
||||
if (aAttribute == nsGkAtoms::x || aAttribute == nsGkAtoms::y) {
|
||||
nsLayoutUtils::PostRestyleEvent(
|
||||
mContent->AsElement(), RestyleHint{0},
|
||||
|
|
Загрузка…
Ссылка в новой задаче