Bug 1562503 - Create GeckoMVMContext and ZoomConstraintsClient only for the root top level document. r=botond

browserElement_ScrollEvent.js is affected by this change. Before this change
the document for iframe mozbrowser was not considered as the root content
document, but after this change, it's considered as the root content document.
Given the nature of iframe mozbrowser, I believe it's the right behavior.

The browser mochitest in this commit fails without this change since
the minimum-scale size is used in the out-of-process iframe so that the visual
viewport size gets 3x bigger than the expected size.

Differential Revision: https://phabricator.services.mozilla.com/D36547
This commit is contained in:
Hiroyuki Ikezoe
2019-07-08 22:39:31 +00:00
parent 5137a7b73d
commit 655366e3d9
9 changed files with 115 additions and 9 deletions

View File

@@ -230,7 +230,7 @@ void ZoomConstraintsClient::RefreshZoomConstraints() {
// We only ever create a ZoomConstraintsClient for an RCD, so the RSF of
// the presShell must be the RCD-RSF (if it exists).
MOZ_ASSERT(mPresShell->GetPresContext()->IsRootContentDocument());
MOZ_ASSERT(mPresShell->GetPresContext()->IsRootContentDocumentCrossProcess());
if (nsIScrollableFrame* rcdrsf =
mPresShell->GetRootScrollFrameAsScrollable()) {
ZCC_LOG("Notifying RCD-RSF that it is zoomable: %d\n",