layout/xul/grid/examples/jumpygrid.xul

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     1 <?xml version="1.0"?> 
     2 <!-- This Source Code Form is subject to the terms of the Mozilla Public
     3    - License, v. 2.0. If a copy of the MPL was not distributed with this
     4    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
     7 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> 
     8 <?xml-stylesheet href="gridsample.css" type="text/css"?> 
    10 <!DOCTYPE window> 
    13 <window orient="vertical" style="border: 2px solid green"
    14         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> 
    16     <script>
    17 	  function flip(child)
    18 	  {
    19 	    var jump = child.getAttribute("jumpy");
    20 		if (jump != "true")
    21 		  child.setAttribute("jumpy","true");
    22 		else
    23  		  child.setAttribute("jumpy","false");
    24 	  }
    26 	</script>
    27     <hbox>
    28 		<grid style="border: 2px solid yellow;">
    29 		   <columns>
    30 		   </columns>
    32 		   <rows>
    33 			 <row>
    34 			   <button label="button" class="jumpy"/>
    35 			   <button label="button" class="jumpy"/>
    36 			   <button label="button" class="jumpy"/>
    37 			   <button label="button" class="jumpy"/>
    38 			   <button label="button" class="jumpy"/>
    39 			 </row>
    40 			 <row>
    41 			   <button label="button" class="jumpy"/>
    42 			   <button label="button" class="jumpy"/>
    43 			   <button label="button" class="jumpy"/>
    44 			   <button label="button" class="jumpy"/>
    45 			   <button label="button" class="jumpy"/>
    46 			 </row>
    47 			 <row>
    48 			   <button label="button" class="jumpy"/>
    49 			   <button label="button" class="jumpy"/>
    50 			   <button label="button" class="jumpy"/>
    51 			   <button label="button" class="jumpy"/>
    52 			   <button label="button" class="jumpy"/>
    53 			 </row>
    54 			 <row>
    55 			   <button label="button" class="jumpy"/>
    56 			   <button label="button" class="jumpy"/>
    57 			   <button label="button" class="jumpy"/>
    58 			   <button label="button" class="jumpy"/>
    59 			   <button label="button" class="jumpy"/>
    60 			 </row>
    61 			 <row>
    62 			   <button label="button" class="jumpy"/>
    63 			   <button label="button" class="jumpy"/>
    64 			   <button label="button" class="jumpy"/>
    65 			   <button label="button" class="jumpy"/>
    66 			   <button label="button" class="jumpy"/>
    67 			 </row>
    68 			 <row>
    69 			   <button label="button" class="jumpy"/>
    70 			   <button label="button" class="jumpy"/>
    71 			   <button label="button" class="jumpy"/>
    72 			   <button label="button" class="jumpy"/>
    73 			   <button label="button" class="jumpy"/>
    74 			 </row>
    76 		   </rows>
    77 		</grid>
    78 		<spacer style="border: 2px solid white;" flex="1"/>
    79     </hbox>
    80 	<spacer style="border: 2px solid white;" flex="1"/>
    82 </window>

mercurial