mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 07:15:46 +00:00
Bug 1724808. Take into account ancestor documents in other processes' resolution when pre-decoding images. r=hiro
Depends on D122212 Differential Revision: https://phabricator.services.mozilla.com/D122213
This commit is contained in:
parent
50cee5c326
commit
423dd4a3bd
@ -90,6 +90,7 @@
|
||||
|
||||
#include "mozilla/dom/Link.h"
|
||||
#include "mozilla/dom/HTMLAnchorElement.h"
|
||||
#include "mozilla/dom/BrowserChild.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
@ -1064,6 +1065,12 @@ void nsImageFrame::MaybeDecodeForPredictedSize() {
|
||||
presShell->GetCumulativeResolution() *
|
||||
nsLayoutUtils::GetTransformToAncestorScaleExcludingAnimated(this));
|
||||
|
||||
// If we are in a remote browser, then apply scaling from ancestor browsers
|
||||
if (BrowserChild* browserChild = BrowserChild::GetFrom(presShell)) {
|
||||
resolutionToScreen.xScale *= browserChild->GetEffectsInfo().mScaleX;
|
||||
resolutionToScreen.yScale *= browserChild->GetEffectsInfo().mScaleY;
|
||||
}
|
||||
|
||||
// ...and this frame's content box...
|
||||
const nsPoint offset =
|
||||
GetOffsetToCrossDoc(nsLayoutUtils::GetReferenceFrame(this));
|
||||
|
Loading…
Reference in New Issue
Block a user