Eine aufbereitete Darstellung der Quelle

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

Benutzer

Quelle  file_smilWithTransition.html

  Sprache: HTML
 

 products/Sources/formale Sprachen/C/Firefox/dom/smil/test/file_smilWithTransition.html


<!doctype html>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=1315874
-->

<head>
  <meta charset="utf-8">
  <title>Test SMIL does not trigger CSS Transitions (bug 1315874)</title>
</head>
<body>
<a target="_blank"
  href="https://bugzilla.mozilla.org/show_bug.cgi?id=1315874">Mozilla Bug
  1315874</a>
<svg>
  <rect width="100%" height="100%"
        style="fill: red; transition: fill 10s" id="rect">
    <animate attributeName="fill" to="lime" dur="1s" fill="freeze">
  </rect>
</svg>
<script  type="text/javascript">
  // Bring SimpleTest's function from opener.
  if (opener) {
    var is = opener.is.bind(opener);
    var ok = opener.ok.bind(opener);
    function finish() {
      var o = opener;
      self.close();
      o.SimpleTest.finish();
    }
  }

  window.addEventListener('load', runTests);

  var rect = document.getElementById('rect');
  var svg = document.getElementsByTagName('svg')[0];
  is(getComputedStyle(rect).fill, 'rgb(255, 0, 0)',
     'The initial color should be red.');

  function runTests() {
    waitForFrame().then(function() {
      svg.setCurrentTime(1);
      is(getComputedStyle(rect).fill, 'rgb(0, 255, 0)',
         'The end color should be lime.');

      return waitForAnimationFrames(2);
    }).then(function() {
      var anim = document.getAnimations()[0];
      ok(!anim, 'Transition should not be created by restyling for SMIL');
      finish();
    });
  }

  // Utility methods from testcommon.js
  // For detail, see dom/animation/test/testcommon.js.

  function waitForFrame() {
    return new Promise(function(resolve, reject) {
      requestAnimationFrame(function(time) {
        resolve();
      });
    });
  }

  function waitForAnimationFrames(frameCount) {
    return new Promise(function(resolve, reject) {
      function handleFrame() {
        if (--frameCount <= 0) {
          resolve();
        } else {
          window.requestAnimationFrame(handleFrame);
        }
      }
      window.requestAnimationFrame(handleFrame);
    });
  }
</script>
</pre>
</body>
</html>

Messung V0.5 in Prozent
C=91 H=100 G=95

¤ Dauer der Verarbeitung: 0.27 Sekunden  (vorverarbeitet am  2026-08-25) ¤

*© 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=277311
#Domains=752002