Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Impressum frame_visibility_in_iframe.html   Sprache: HTML

 

 products/Sources/formale Sprachen/C/Firefox/layout/generic/test/frame_visibility_in_iframe.html


<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Video element visibility in iframe</title>
</head>
<body>
<div style="width: 100%; height: calc(100vh - 100px);"></div>
<div style="height: 100px; overflow: scroll;">
  <!-- Must be larger than the IntersectionObserver margin used in DOMIntersectionObserver::ComputeInputForIframeThrottling -->
  <div style="width: 100%; height: 800px;"></div>
  <iframe id="iframe" style="height: 100px; border: none;"></iframe>
</div>
<script>
const add_task = window.opener.add_task;
const SimpleTest = window.opener.SimpleTest;
const original_finish = window.opener.SimpleTest.finish;

// add_task calls SimpleTest.finish() when it finished, we want to close this
// window before SimpleTest.finish() gets called.
SimpleTest.finish = function finish() {
  self.close();
  original_finish();
}

add_task(async () => {
  const iframe = document.getElementById("iframe");
  await new Promise(resolve => {
    iframe.addEventListener("load", () => { resolve(); }, { once: true });
    iframe.src = "http://example.org/tests/layout/generic/test/frame_visibility_in_iframe_child.html";
  });

  await SpecialPowers.spawn(iframe, [], async () => {
    // With layout.visibility.min-recompute-interval-ms=0 value, flushing layout
    // and waiting two frames would be sufficient to make sure at least one
    // RebuildApproximateFrameVisibility call was done. This would avoid the
    // situation we consider the video element is invisible without doing any
    // frame visibility tracking stuff.
    content.document.documentElement.getBoundingClientRect();
    await new Promise(resolve => content.window.requestAnimationFrame(resolve));
    await new Promise(resolve => content.window.requestAnimationFrame(resolve));
  });

  await SpecialPowers.spawn(iframe, [], async () => {
    const video = content.document.querySelector("video");
    Assert.ok(!SpecialPowers.wrap(video).isInViewPort,
              "The video element should not be in the viewport");
  });
});
</script>
</body>
</html>

Messung V0.5 in Prozent
C=95 H=96 G=95

¤ Dauer der Verarbeitung: 0.14 Sekunden  (vorverarbeitet am  2026-09-28) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1126864
#Domains=1897691
 




Quellcode-Bibliothek  | Datei:   | Haftungsausschluß  | Download des  |   | © 2026 JDD |