mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-19 23:07:33 +09:00
parent
c91730dc7b
commit
1c8e994b65
17 changed files with 6 additions and 319 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue