Bug 1728714. Use IsRootContentDocumentCrossProcess in nsLayoutUtils::CalculateBasicFrameMetrics. r=botond
authorTimothy Nikkel <tnikkel@gmail.com>
Fri, 03 Sep 2021 01:40:09 +0000
changeset 590870 66dda811958d5faaff50eaf7b72347df9b9f23cb
parent 590869 3634785345fe6391e073ebf19e3f7ce031a43511
child 590871 a2e3f75c73a599ae365f626aceae99f78a4c5725
push id38758
push userccozmuta@mozilla.com
push dateFri, 03 Sep 2021 09:36:50 +0000
treeherdermozilla-central@a954692bd4c5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbotond
bugs1728714
milestone93.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1728714. Use IsRootContentDocumentCrossProcess in nsLayoutUtils::CalculateBasicFrameMetrics. r=botond This is odd code (that I probably wrote): it's appears to be designed to handle in process, zoomable, root content documents where the ancestor chrome document(s) can have non-1 resolution. I think the important thing here is that the root scroll frame of the RootContentDocumentCrossProcess gets a resolution of 1, otherwise we use the cumulativeResolution of the current presshell. Differential Revision: https://phabricator.services.mozilla.com/D124305
layout/base/nsLayoutUtils.cpp
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -2816,17 +2816,17 @@ FrameMetrics nsLayoutUtils::CalculateBas
   metrics.SetZoom(deviceScale * cumulativeResolution * layerToParentLayerScale);
 
   // Only the size of the composition bounds is relevant to the
   // displayport calculation, not its origin.
   nsSize compositionSize =
       nsLayoutUtils::CalculateCompositionSizeForFrame(frame);
   LayoutDeviceToParentLayerScale2D compBoundsScale;
   if (frame == presShell->GetRootScrollFrame() &&
-      presContext->IsRootContentDocument()) {
+      presContext->IsRootContentDocumentCrossProcess()) {
     if (presContext->GetParentPresContext()) {
       float res = presContext->GetParentPresContext()
                       ->PresShell()
                       ->GetCumulativeResolution();
       compBoundsScale =
           LayoutDeviceToParentLayerScale2D(LayoutDeviceToParentLayerScale(res));
     }
   } else {