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


Quelle  test_unstyled_control_height.html   Sprache: HTML

 
 products/sources/formale Sprachen/C/Firefox/layout/forms/test/test_unstyled_control_height.html


<!doctype html>
<meta charset="utf-8">
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<style>
  #container *, #container2 * {
    white-space: nowrap;
    appearance: none;
  }
  input {
    /* Reduce the width so that container can fit all its children in 600px viewport width. */
    width: 100px;
  }
  /* date by default uses a monospace font, which might have different metrics */
  inputbuttonselect {
    fontMenu;
  }
  .small-font * {
    font-size: 8px !important; /* important to override rule above */
  }
  .no-padding * {
    padding: 0;
  }
</style>

<!-- Each container should fit all its children in the same line to verify every
     child has the same |top|. -->

<div id="container">
  <input>
  <!-- Putting the <input> containing Burmese characters here is just to verify
       our current behavior. They are slightly clipped. So if we fix it by
       making the <input> taller, it's OK to remove it from this test. -->

  <input value="漢字 jpg မြန်မာစာ">
  <input type=date>
  <button>Foo</button>
  <select><option>Foo</option></select>
</div>

<br>
<div id="container2">
  <button>漢字 Foo မြန်မာစာ</button>
  <select><option>漢字 Foo မြန်မာစာ</option></select>
</div>

<script>
function testHeightMatches(id, desc) {
  let commonHeight = null;
  let commonTop = null;
  for (let element of document.querySelectorAll(`#${id} > *`)) {
    let rect = element.getBoundingClientRect();
    if (commonHeight === null) {
      commonHeight = rect.height;
      commonTop = rect.top;
    }
    is(rect.height, commonHeight, `Height of the controls should match for ${element.outerHTML}${desc}`);
    is(rect.top, commonTop, `Top of the controls should match for ${element.outerHTML}${desc}`);
  }
}

for (id of ["container""container2"]) {
  const container = document.getElementById(id);

  testHeightMatches(id, "");

  container.className = "no-padding";

  testHeightMatches(id, " without padding");

  container.className = "small-font";

  testHeightMatches(id, " with an small font");
}
</script>

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

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