Bug 1766078 - Add a ViewAs overload for casting an untyped ScaleFactors2D to a typed one. r=botond
Please note that ScaleFactors2D is missing operator*=() for now, hence the "resolutionToScreen = resolutionToScreen * X" formula. Differential Revision: https://phabricator.services.mozilla.com/D144883
This commit is contained in:
@@ -1086,10 +1086,9 @@ void nsImageFrame::MaybeDecodeForPredictedSize() {
|
||||
|
||||
// If we are in a remote browser, then apply scaling from ancestor browsers
|
||||
if (BrowserChild* browserChild = BrowserChild::GetFrom(presShell)) {
|
||||
resolutionToScreen.xScale *=
|
||||
browserChild->GetEffectsInfo().mRasterScale.xScale;
|
||||
resolutionToScreen.yScale *=
|
||||
browserChild->GetEffectsInfo().mRasterScale.yScale;
|
||||
resolutionToScreen =
|
||||
resolutionToScreen * ViewAs<ScreenToScreenScale2D>(
|
||||
browserChild->GetEffectsInfo().mRasterScale);
|
||||
}
|
||||
|
||||
// ...and this frame's content box...
|
||||
|
||||
Reference in New Issue
Block a user