inactive-fixed-bg-bug1272525.xul 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?xml version="1.0"?>
  2. <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
  3. <!-- Test that a fixed background layer inside an inactive layer tree
  4. is clipped correctly. Here, the inactive layer tree is created by
  5. the SVGEffects display item built for the clip-path on the outer div.
  6. The bug only reproduces in XUL because fixed backgrounds are only
  7. layerized if their animated geometry root is the root frame, but
  8. in HTML there's always an enclosing HTML scroll frame. -->
  9. <style xmlns="http://www.w3.org/1999/xhtml"><![CDATA[
  10. #inner {
  11. width: 100px;
  12. height: 100px;
  13. background: linear-gradient(red, blue) no-repeat fixed;
  14. background-size: 800px 800px;
  15. }
  16. #outer {
  17. margin: 50px 50px 0;
  18. width: 100px;
  19. height: 200px;
  20. clip-path: url(#path);
  21. position: fixed;
  22. }
  23. ]]></style>
  24. <div xmlns="http://www.w3.org/1999/xhtml" id="outer">
  25. <div xmlns="http://www.w3.org/1999/xhtml" id="inner"></div>
  26. </div>
  27. <svg xmlns="http://www.w3.org/2000/svg" height="0">
  28. <defs>
  29. <clipPath id="path" clipPathUnits="objectBoundingBox">
  30. <polygon points="0.25,0.25 0.25,0.75 0.75,0.75 0.75,0.25"/>
  31. </clipPath>
  32. </defs>
  33. </svg>
  34. </window>