layout/reftests/bugs/495385-2f.xhtml

Wed, 31 Dec 2014 13:27:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 13:27:57 +0100
branch
TOR_BUG_3246
changeset 6
8bccb770b82d
permissions
-rw-r--r--

Ignore runtime configuration files generated during quality assurance.

     1 <html xmlns="http://www.w3.org/1999/xhtml">
     2 <head>
     3 <!-- Test that suppression works (or is turned off) for XBL content -->
     4 <bindings xmlns="http://www.mozilla.org/xbl">
     5   <binding id="before">
     6     <content>Hello<children/></content>
     7   </binding>
     8   <binding id="after">
     9     <content><children/>Kitty</content>
    10   </binding>
    11   <binding id="empty1">
    12     <content><div xmlns="http://www.w3.org/1999/xhtml">Hello</div><children/></content>
    13   </binding>
    14   <binding id="empty2">
    15     <content><children/><div xmlns="http://www.w3.org/1999/xhtml">Kitty</div></content>
    16     <implementation>
    17       <constructor>
    18         // We used to do this in an onload handler, but getAnonymousNodes is no
    19         // longer accessible to content, and we can't use SpecialPowers in
    20         // reftests. So we enable XBL scopes and take advantage of the fact that XBL
    21         // scopes can access these functions. We apply this binding
    22         // programatically to make absolutely sure this constructor runs after all the
    23         // other bindings have been set up.
    24         document.body.offsetHeight;
    25         document.getAnonymousNodes(document.getElementById("d3"))[0].style.display = 'inline';
    26         document.getAnonymousNodes(document.getElementById("d4"))[2].style.display = 'inline';
    27       </constructor>
    28     </implementation>
    29   </binding>
    30 </bindings>
    31 <style>
    32 body > div { border:1px solid black; margin:1em;
    33              font-family:sans-serif; letter-spacing:2px; }
    34 #d1 { -moz-binding:url(#before); }
    35 #d2 { -moz-binding:url(#after); }
    36 #d3 { -moz-binding:url(#empty1); }
    37 </style>
    38 <script>
    39 function loaded() {
    40   document.getElementById('d4').style.MozBinding = "url(#empty2)";
    41 }
    42 </script>
    43 </head>
    44 <body onload="loaded()">
    45   <div id="d1"> <span>Kitty</span></div>
    46   <div id="d2"><span>Hello</span> </div>
    47   <div id="d3"> <span>Kitty</span></div>
    48   <div id="d4"><span>Hello</span> </div>
    49 </body>
    50 </html>

mercurial