tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

1862277-1.html (2221B)


      1 <html class="reftest-wait">
      2 <style>
      3 .hide {
      4 display: none;
      5 }
      6 </style>
      7 
      8 <!--
      9 Need an svg element that references a clippath that is display none (so that we don't use the clip path).
     10 Then make the clippath no longer display none (and do it without touching the clippath itself, ie make an
     11 ancestor no longer display none).
     12 We should now draw the clip path, but the bug made us not invalidate.
     13 Then we can make things worse using retained display list partial updates by marking a frame modified
     14 that is affected by the clip path a couple times. The retained display list won't have the nsDisplayMask
     15 container, but the modified display list will have the nsDisplayMask, this will confuse merging when the
     16 same item appears inside two different containers.
     17 
     18 Note that we image.testing.decode-sync.enabled=false for this test because sync decoding triggers extra
     19 invalidation which "fixes" this bug before it gets a chance to appear. Bug 1866411 tracks this.
     20 -->
     21 
     22 <div style="width: 40px; height: 40px;">
     23   <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" style="width: 100%; height: 100%;">
     24      <defs id="thedefs" class="hide">
     25         <clipPath id="aclip">
     26            <rect width="10" height="10" x="0" y="0"></rect>
     27         </clipPath>
     28      </defs>
     29      <g clip-path="url(#aclip)">
     30      	<rect width="23" height="23" x="0" y="1" fill="rgb(0,255,0)"></rect>
     31      	<rect id="therect" width="1" height="1" x="0" y="0" fill="rgb(255,0,0)"></rect>
     32      </g>
     33   </svg>
     34 </div>
     35 
     36 
     37 <script>
     38 
     39 function finish() {
     40 document.documentElement.className = "";
     41 }
     42 
     43 function TweakSmall() {
     44 let therect = document.getElementById("therect");
     45 therect.setAttributeNS(null, "fill", "rgb(254,0,0)");
     46 requestAnimationFrame(TweakSmall2);
     47 }
     48 
     49 function TweakSmall2() {
     50 let therect = document.getElementById("therect");
     51 therect.setAttributeNS(null, "fill", "rgb(253,0,0)");
     52 requestAnimationFrame(finish);
     53 }
     54 
     55 function DisplaySomeClip() {
     56 document.getElementById("thedefs").className.baseVal = "";
     57 requestAnimationFrame(TweakSmall);
     58 }
     59 
     60 function start() {
     61 requestAnimationFrame(DisplaySomeClip);
     62 
     63 }
     64 
     65 window.addEventListener("MozReftestInvalidate", start);
     66 //window.onload = start;
     67 </script>
     68 
     69 </html>