Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/layout/base/tests/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 1 kB image not shown  

Quelle  test_bug1515822.html   Sprache: HTML

 
 products/Sources/formale Sprachen/C/Firefox/layout/base/tests/test_bug1515822.html


<!DOCTYPE HTML>
<html>
<head>
  <title>Test for Bug 1515822 - restore scroll position for display: contents children</title>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <style>
    #shell {
      display: contents;
    }
    #outer {
      width: 200px;
      height: 200px;
      overflow: scroll;
    }
    #inner {
      width: 400px;
      height: 400px;
      background: linear-gradient(to right bottom, white, black);
    }
  </style>
</head>
<body>
<div id="shell">
  <div id="outer">
    <div id="inner">
    </div>
  </div>
</div>
<script>
const outer = document.querySelector('#outer');

outer.scrollTop = 100;
outer.scrollLeft = 100;
document.body.offsetTop; // flush layout
is(outer.scrollTop, 100, 'scroll position should be moved');
is(outer.scrollLeft, 100, 'scroll position should be moved');

outer.parentElement.style.display = 'none';
document.body.offsetTop; // flush layout
is(outer.scrollTop, 0, 'scroll position should be zero');
is(outer.scrollLeft, 0, 'scroll position should be zero');

outer.parentElement.style.display = "";
document.body.offsetTop; // flush layout
is(outer.scrollTop, 100, 'scroll position should be restored');
is(outer.scrollLeft, 100, 'scroll position should be restored');
</script>

Messung V0.5
C=92 H=99 G=95

¤ Dauer der Verarbeitung: 0.2 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

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.