Issue #2762 - Remove SVGZoomEvent interface.

Resolves #2762
This commit is contained in:
Moonchild 2025-06-24 12:18:13 +02:00 committed by roytam1
commit 1c8e994b65
17 changed files with 6 additions and 319 deletions

View file

@ -474,7 +474,7 @@ SVGSVGElement::SetZoomAndPan(uint16_t aZoomAndPan, ErrorResult& rv)
}
//----------------------------------------------------------------------
// helper methods for implementing SVGZoomEvent:
// helper methods for implementing SetCurrentScale/Translate
void
SVGSVGElement::SetCurrentScaleTranslate(float s, float x, float y)
@ -498,6 +498,8 @@ SVGSVGElement::SetCurrentScaleTranslate(float s, float x, float y)
// change that caused the event's dispatch, which is *not* necessarily the
// same thing as the values of currentScale and currentTranslate prior to
// their own last change.
//
// TODO: simplify some of this code since SVGZoomEvent was removed.
mPreviousScale = mCurrentScale;
mPreviousTranslate = mCurrentTranslate;
@ -510,10 +512,7 @@ SVGSVGElement::SetCurrentScaleTranslate(float s, float x, float y)
nsCOMPtr<nsIPresShell> presShell = doc->GetShell();
if (presShell && IsRoot()) {
nsEventStatus status = nsEventStatus_eIgnore;
if (mPreviousScale != mCurrentScale) {
InternalSVGZoomEvent svgZoomEvent(true, eSVGZoom);
presShell->HandleDOMEventWithTarget(this, &svgZoomEvent, &status);
} else {
if (mPreviousScale == mCurrentScale) {
WidgetEvent svgScrollEvent(true, eSVGScroll);
presShell->HandleDOMEventWithTarget(this, &svgScrollEvent, &status);
}