From 4dcb61db3b0079f850fe73305c1508f196290987 Mon Sep 17 00:00:00 2001 From: Jonathan Watt Date: Thu, 6 Jun 2019 11:05:38 -0700 Subject: [PATCH] Bug 1559096. Rename SVGObserverUtils::GetAndObservePaintServer argument. r=longsonr Differential Revision: https://phabricator.services.mozilla.com/D34851 --HG-- extra : rebase_source : 0a749e4113404983365640c0a9758dd2c73b522b extra : amend_source : e67b5f7daaf3accdb6acd25e1f82d85900c654f3 --- layout/svg/SVGObserverUtils.cpp | 20 ++++++++++---------- layout/svg/SVGObserverUtils.h | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/layout/svg/SVGObserverUtils.cpp b/layout/svg/SVGObserverUtils.cpp index 83d2bbe448a2..3d9b35bb2809 100644 --- a/layout/svg/SVGObserverUtils.cpp +++ b/layout/svg/SVGObserverUtils.cpp @@ -1464,33 +1464,33 @@ Element* SVGObserverUtils::GetAndObserveBackgroundClip(nsIFrame* aFrame) { } nsSVGPaintServerFrame* SVGObserverUtils::GetAndObservePaintServer( - nsIFrame* aTargetFrame, nsStyleSVGPaint nsStyleSVG::*aPaint) { + nsIFrame* aPaintedFrame, nsStyleSVGPaint nsStyleSVG::*aPaint) { // If we're looking at a frame within SVG text, then we need to look up // to find the right frame to get the painting property off. We should at // least look up past a text frame, and if the text frame's parent is the // anonymous block frame, then we look up to its parent (the SVGTextFrame). - nsIFrame* frame = aTargetFrame; - if (frame->GetContent()->IsText()) { - frame = frame->GetParent(); - nsIFrame* grandparent = frame->GetParent(); + nsIFrame* paintedFrame = aPaintedFrame; + if (paintedFrame->GetContent()->IsText()) { + paintedFrame = paintedFrame->GetParent(); + nsIFrame* grandparent = paintedFrame->GetParent(); if (grandparent && grandparent->IsSVGTextFrame()) { - frame = grandparent; + paintedFrame = grandparent; } } - const nsStyleSVG* svgStyle = frame->StyleSVG(); + const nsStyleSVG* svgStyle = paintedFrame->StyleSVG(); if ((svgStyle->*aPaint).Type() != eStyleSVGPaintType_Server) { return nullptr; } - RefPtr paintServerURL = - ResolveURLUsingLocalRef(frame, (svgStyle->*aPaint).GetPaintServer()); + RefPtr paintServerURL = ResolveURLUsingLocalRef( + paintedFrame, (svgStyle->*aPaint).GetPaintServer()); MOZ_ASSERT(aPaint == &nsStyleSVG::mFill || aPaint == &nsStyleSVG::mStroke); PaintingPropertyDescriptor propDesc = (aPaint == &nsStyleSVG::mFill) ? FillProperty() : StrokeProperty(); nsSVGPaintingProperty* property = - GetPaintingProperty(paintServerURL, frame, propDesc); + GetPaintingProperty(paintServerURL, paintedFrame, propDesc); if (!property) { return nullptr; } diff --git a/layout/svg/SVGObserverUtils.h b/layout/svg/SVGObserverUtils.h index 1391a9a71e50..dd8e2f34d921 100644 --- a/layout/svg/SVGObserverUtils.h +++ b/layout/svg/SVGObserverUtils.h @@ -251,7 +251,7 @@ class SVGObserverUtils { * Get the paint server for aPaintedFrame. */ static nsSVGPaintServerFrame* GetAndObservePaintServer( - nsIFrame* aTargetFrame, nsStyleSVGPaint nsStyleSVG::*aPaint); + nsIFrame* aPaintedFrame, nsStyleSVGPaint nsStyleSVG::*aPaint); /** * Get the start/mid/end-markers for the given frame, and add the frame as