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


Quelle  test_root_node_display.html   Sprache: HTML

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


<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=969460
-->

<head>
  <meta charset="utf-8">
  <title>Test for Bug 969460</title>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <script type="text/javascript" src="property_database.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=969460">Mozilla Bug 969460</a>
<p id="display"></p>
<div id="content" style="display: none">
  <div id="float" style="float: left"></div>
</div>
<pre id="test">
<script type="application/javascript">

/** Test for Bug 969460: Test that "display" on the root node is computed
    using the same conversion that we use for display on floated elements **/

function test_display_value(val)
{
  var floatElem = document.getElementById("float");
  floatElem.style.display = val;
  var floatConversion = window.getComputedStyle(floatElem).display;
  floatElem.style.display = "";

  var rootNode = document.documentElement;
  rootNode.style.display = val;
  rootNode.offsetHeight; // (Flush layout, to be sure layout can handle 'val')
  var rootConversion = window.getComputedStyle(rootNode).display;
  rootNode.style.display = "";

  // Special case: "display:list-item" does not get modified by 'float',
  // but the spec allows us to convert it to 'block' on the root node
  // (and we do convert it, so that we don't have to support documents whose
  // root node is a list-item).
  if (val == "list-item") {
    is(floatConversion, val, "'float' shouldn't affect 'display:list-item'");
    is(rootConversion, "block",
       "We traditionally convert '" + val + "' on the root node to " +
       "'display:block' (though if that changes, it's not technically a bug, " +
       "as long as we support it properly).");
} else if (val == "inline list-item" ||
           val == "inline flow-root list-item") {
    is(floatConversion, "list-item""'float' should blockify '" + val + "'");
    is(rootConversion, "block",
       "We traditionally convert '" + val + "' on the root node to " +
       "'display:block' (though if that changes, it's not technically a bug, " +
       "as long as we support it properly).");
  } else if (val == "contents") {
    is(floatConversion, val, "'float' shouldn't affect 'display:contents'");
    is(rootConversion, "block",
       "'display:contents' on the root node computes to block-level per" +
       "http://dev.w3.org/csswg/css-display/#transformations");
  } else {
    is(rootConversion, floatConversion,
       "root node should make 'display:" + val + "' compute to the same " +
       "value that it computes to on a floated element");
  }
}

var displayInfo = gCSSProperties.display;
displayInfo.initial_values.forEach(test_display_value);
displayInfo.other_values.forEach(test_display_value);

</script>
</pre>
</body>
</html>

Messung V0.5
C=94 H=90 G=91

¤ Dauer der Verarbeitung: 0.17 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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge