Bug 1761007 - Fix sizing of WebRenderized SVG images. r=gfx-reviewers,aosmond

The missing line is consistently called after ImageContainer::GetWidth/GetHeight (see TransformContextForPainting for example which would be the equivalent code path for the non-webrenderized case).

This fixes the wptest /density-size-correction/density-corrected-image-svg.html when active svg images are enabled.

Depends on D141846

Differential Revision: https://phabricator.services.mozilla.com/D141847
This commit is contained in:
Nicolas Silva 2022-03-23 20:28:55 +00:00
Родитель fb069da104
Коммит b0457b9551
1 изменённых файлов: 2 добавлений и 0 удалений

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

@ -508,6 +508,8 @@ bool SVGImageFrame::CreateWebRenderCommands(
return true;
}
mImageContainer->GetResolution().ApplyTo(nativeWidth, nativeHeight);
auto preserveAspectRatio = imgElem->mPreserveAspectRatio.GetAnimValue();
uint16_t align = preserveAspectRatio.GetAlign();
uint16_t meetOrSlice = preserveAspectRatio.GetMeetOrSlice();