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

Quelle  test_shape_outside_CORS.html   Sprache: HTML

 
 products/Sources/formale Sprachen/C/Firefox/layout/style/test/test_shape_outside_CORS.html


<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Test: shape-outside with a CORS violation</title>
<link rel="author" title="Brad Werth" href="mailto:bwerth@mozilla.com"/>
<link rel="help" href="https://drafts.csswg.org/css-shapes/#shape-outside-property"/>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" href="/tests/SimpleTest/test.css"/>

<style>
.container {
  clear: both;
  width: 500px;
}
.shaper {
  width: 50px;
  height: 50px;
  float: left;
  background-color: green;
}
.shapeAllow {
  shape-outside: url("support/1x1-transparent.png");
}
.shapeRefuse {
  shape-outside: url("http://example.com/layout/style/test/support/1x1-transparent.png");
}
.sibling {
  display: inline-block;
}
</style>

<script>
SimpleTest.waitForExplicitFinish();

function runTests() {
  let divAllow = document.getElementById("allow");
  let divAllowSib = divAllow.nextElementSibling;
  ok(divAllowSib.getBoundingClientRect().left == divAllow.getBoundingClientRect().left,
     "Test 1: Sibling should be at same left offset as div (shape-outside should be allowed), and onload should only fire after layout is complete.");

  let divRefuse = document.getElementById("refuse");
  let divRefuseSib = divRefuse.nextElementSibling;
  ok(divRefuseSib.getBoundingClientRect().left != divRefuse.getBoundingClientRect().left,
     "Test 2: Sibling should be at different left offset from div (shape-outside should be refused).");

  SimpleTest.finish();
}
</script>
</head>
<body onload="runTests()">
  <div class="container">
    <div id="allow" class="shaper shapeAllow"></div><div class="sibling">allow (image is blank, so text is flush left)</div>
  </div>
  <div class="container">
    <div id="refuse" class="shaper shapeRefuse"></div><div class="sibling">refuse (image unread, so text is moved to box edge)</div>
  </div>
</body>
</html>

Messung V0.5
C=98 H=98 G=97

¤ Dauer der Verarbeitung: 0.13 Sekunden  (vorverarbeitet)  ¤

*© 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.