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
This commit is contained in:
Jonathan Watt 2019-06-06 11:05:38 -07:00
Родитель af1b0f2a42
Коммит 4dcb61db3b
2 изменённых файлов: 11 добавлений и 11 удалений

Просмотреть файл

@ -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<URLAndReferrerInfo> paintServerURL =
ResolveURLUsingLocalRef(frame, (svgStyle->*aPaint).GetPaintServer());
RefPtr<URLAndReferrerInfo> 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;
}

Просмотреть файл

@ -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