mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Bug 1860041 - Make sure frameloader is initialized after lazy-loading if there's a frame. r=CanadaHonk
Differential Revision: https://phabricator.services.mozilla.com/D191750
This commit is contained in:
parent
1d67199ec6
commit
0cc6566d47
@ -13,7 +13,7 @@
|
||||
#include "mozilla/MappedDeclarationsBuilder.h"
|
||||
#include "mozilla/NullPrincipal.h"
|
||||
#include "mozilla/StaticPrefs_dom.h"
|
||||
#include "nsAttrValueInlines.h"
|
||||
#include "nsSubDocumentFrame.h"
|
||||
#include "nsError.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsSandboxFlags.h"
|
||||
@ -363,6 +363,9 @@ void HTMLIFrameElement::StopLazyLoading() {
|
||||
LoadSrc();
|
||||
|
||||
mLazyLoadState.Clear();
|
||||
if (nsSubDocumentFrame* ourFrame = do_QueryFrame(GetPrimaryFrame())) {
|
||||
ourFrame->ResetFrameLoader(nsSubDocumentFrame::RetainPaintData::No);
|
||||
}
|
||||
}
|
||||
|
||||
void HTMLIFrameElement::NodeInfoChanged(Document* aOldDoc) {
|
||||
|
@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="reftest-wait">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="match" href="iframe-loading-lazy-in-viewport-ref.html">
|
||||
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1860041">
|
||||
</head>
|
||||
<body>
|
||||
<iframe loading="lazy" src="data:text/html,PASS" onload="document.documentElement.className = ''"></iframe>
|
||||
<script>
|
||||
document.querySelector("iframe").getBoundingClientRect();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,2 @@
|
||||
<!DOCTYPE html>
|
||||
<iframe src="data:text/html,PASS"></iframe>
|
Loading…
Reference in New Issue
Block a user