Bug 1612068 - followup: Fix some bits which I forgot to update before landing.

Missed two tests and clang-formatting.

Differential Revision: https://phabricator.services.mozilla.com/D72170
This commit is contained in:
Emilio Cobos Álvarez 2020-04-23 15:46:11 +00:00
Родитель 230cef6455
Коммит 875d92a9ea
5 изменённых файлов: 9 добавлений и 25 удалений

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

@ -258,10 +258,10 @@ already_AddRefed<BrowsingContext> BrowsingContext::CreateDetached(
context->mFields.SetWithoutSyncing<IDX_IsActive>(true);
context->mFields.SetWithoutSyncing<IDX_FullZoom>(
aParent ? aParent->FullZoom() : 1.0f);
context->mFields.SetWithoutSyncing<IDX_TextZoom>(
aParent ? aParent->TextZoom() : 1.0f);
context->mFields.SetWithoutSyncing<IDX_FullZoom>(aParent ? aParent->FullZoom()
: 1.0f);
context->mFields.SetWithoutSyncing<IDX_TextZoom>(aParent ? aParent->TextZoom()
: 1.0f);
const bool allowContentRetargeting =
inherit ? inherit->GetAllowContentRetargetingOnChildren() : true;

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

@ -725,7 +725,6 @@ void nsPresContext::AttachPresShell(mozilla::PresShell* aPresShell) {
UpdateCharSet(doc->GetDocumentCharacterSet());
}
void nsPresContext::RecomputeBrowsingContextDependentData() {
MOZ_ASSERT(mDocument);
dom::Document* doc = mDocument;

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

@ -524,6 +524,7 @@ class nsPresContext : public nsISupports,
UpdateEffectiveTextZoom();
}
void SetFullZoom(float aZoom);
public:
float GetFullZoom() { return mFullZoom; }

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

@ -12,16 +12,9 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=396367
function finish() {
ok(true, "didn't crash");
var docviewer = getdocviewer();
docviewer.textZoom = 1;
top.docShell.browsingContext.textZoom = 1;
SimpleTest.finish();
}
function getdocviewer() {
var docShell = top.docShell;
var docviewer = docShell.contentViewer;
return docviewer;
}
</script>
</head>
<body>
@ -36,8 +29,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=396367
<input>
<script>document.body.setAttribute('style', 'display: -moz-box; overflow: scroll;');</script>
<script>
var docviewer = getdocviewer();
docviewer.textZoom=Math.floor(10*Math.random())/4+0.2;
top.docShell.browsingContext.textZoom = Math.floor(10 * Math.random()) / 4 + 0.2;
document.documentElement.offsetHeight;
setTimeout(finish, 0);
</script>

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

@ -13,16 +13,9 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=396367
function finish() {
ok(true, "didn't crash");
var docviewer = getdocviewer();
docviewer.textZoom = 1;
top.docShell.browsingContext.textZoom = 1;
SimpleTest.finish();
}
function getdocviewer() {
var docShell = top.docShell;
var docviewer = docShell.contentViewer;
return docviewer;
}
</script>
</head>
<body>
@ -41,8 +34,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=396367
<li style="display: table-cell;">
<script>
var docviewer = getdocviewer();
docviewer.textZoom=Math.floor(10*Math.random())/4+0.2;
top.docShell.browsingContext.textZoom = Math.floor(10 * Math.random()) / 4 + 0.2;
document.documentElement.offsetHeight;
setTimeout(finish, 0);
</script>