overflow_clip_transform.rml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. <rml>
  2. <head>
  3. <title>Overflow clipping with transform</title>
  4. <link type="text/rcss" href="../style.rcss"/>
  5. <meta name="Description" content="Test clipping behavior with nested overflow and transform applied. The four windows should all look and behave the same." />
  6. <style>
  7. body {
  8. color: #fff;
  9. font-size: 11dp;
  10. background: #111;
  11. overflow: visible;
  12. }
  13. .window {
  14. position: absolute;
  15. top: 100dp;
  16. left: 0dp;
  17. width: 400dp;
  18. height: 200dp;
  19. background: #ccc;
  20. padding: 8dp;
  21. overflow: auto;
  22. }
  23. #window4 {
  24. left: 50dp;
  25. }
  26. #window3 {
  27. left: 550dp;
  28. transform: translate(0dp, 0dp);
  29. }
  30. #window2 {
  31. left: 50dp;
  32. top: 400dp;
  33. transform: translate(0dp, 50dp);
  34. }
  35. #window1 {
  36. left: 550dp;
  37. top: 500dp;
  38. transform: translate(0dp, -50dp);
  39. }
  40. .container {
  41. width: 146dp;
  42. height: 140dp;
  43. overflow: hidden auto;
  44. }
  45. .empty {
  46. width: 50dp;
  47. height: 120dp;
  48. }
  49. p {
  50. height: 20dp;
  51. white-space: nowrap;
  52. line-height: 20dp;
  53. background-color: #999;
  54. padding-left: 5dp;
  55. margin: 0;
  56. }
  57. .move {
  58. top: -20px;
  59. right: 0;
  60. left: 0;
  61. bottom: auto;
  62. height: 20px;
  63. width: auto;
  64. cursor: move;
  65. clip: 1;
  66. }
  67. </style>
  68. </head>
  69. <body>
  70. <div id="window1" class="window">
  71. <handle class="move" move_target="window1"/>
  72. <div class="container">
  73. <p>text 1</p>
  74. <p>text 2</p>
  75. <p>text 3</p>
  76. <p>text 4</p>
  77. <p>text 5</p>
  78. <p>text 6</p>
  79. <p>text 7</p>
  80. <p>text 8</p>
  81. <p>text 8</p>
  82. <p>text 8 text 9 text 10 text 11 text 12 text 13 text 14 text 15</p>
  83. <p>text 16 text 17 text 18 text 19 text 20 text 21 text 22 text 23</p>
  84. <p>text 24</p>
  85. <p>text 25</p>
  86. <p>text 26</p>
  87. <p>text 27</p>
  88. <p>text 28</p>
  89. <p>text 29</p>
  90. <p>text 30</p>
  91. <p>text 31</p>
  92. <p>text 32</p>
  93. <p>text 33</p>
  94. <p>text 34</p>
  95. <p>text 35</p>
  96. </div>
  97. <div class="empty"/>
  98. <handle size_target="window1"/>
  99. </div>
  100. <div id="window2" class="window">
  101. <handle class="move" move_target="window2"/>
  102. <div class="container">
  103. <p>text 1</p>
  104. <p>text 2</p>
  105. <p>text 3</p>
  106. <p>text 4</p>
  107. <p>text 5</p>
  108. <p>text 6</p>
  109. <p>text 7</p>
  110. <p>text 8</p>
  111. <p>text 8</p>
  112. <p>text 8 text 9 text 10 text 11 text 12 text 13 text 14 text 15</p>
  113. <p>text 16 text 17 text 18 text 19 text 20 text 21 text 22 text 23</p>
  114. <p>text 24</p>
  115. <p>text 25</p>
  116. <p>text 26</p>
  117. <p>text 27</p>
  118. <p>text 28</p>
  119. <p>text 29</p>
  120. <p>text 30</p>
  121. <p>text 31</p>
  122. <p>text 32</p>
  123. <p>text 33</p>
  124. <p>text 34</p>
  125. <p>text 35</p>
  126. </div>
  127. <div class="empty"/>
  128. <handle size_target="window2"/>
  129. </div>
  130. <div id="window3" class="window">
  131. <handle class="move" move_target="window3"/>
  132. <div class="container">
  133. <p>text 1</p>
  134. <p>text 2</p>
  135. <p>text 3</p>
  136. <p>text 4</p>
  137. <p>text 5</p>
  138. <p>text 6</p>
  139. <p>text 7</p>
  140. <p>text 8</p>
  141. <p>text 8</p>
  142. <p>text 8 text 9 text 10 text 11 text 12 text 13 text 14 text 15</p>
  143. <p>text 16 text 17 text 18 text 19 text 20 text 21 text 22 text 23</p>
  144. <p>text 24</p>
  145. <p>text 25</p>
  146. <p>text 26</p>
  147. <p>text 27</p>
  148. <p>text 28</p>
  149. <p>text 29</p>
  150. <p>text 30</p>
  151. <p>text 31</p>
  152. <p>text 32</p>
  153. <p>text 33</p>
  154. <p>text 34</p>
  155. <p>text 35</p>
  156. </div>
  157. <div class="empty"/>
  158. <handle size_target="window3"/>
  159. </div>
  160. <div id="window4" class="window">
  161. <handle class="move" move_target="window4"/>
  162. <div class="container">
  163. <p>text 1</p>
  164. <p>text 2</p>
  165. <p>text 3</p>
  166. <p>text 4</p>
  167. <p>text 5</p>
  168. <p>text 6</p>
  169. <p>text 7</p>
  170. <p>text 8</p>
  171. <p>text 8</p>
  172. <p>text 8 text 9 text 10 text 11 text 12 text 13 text 14 text 15</p>
  173. <p>text 16 text 17 text 18 text 19 text 20 text 21 text 22 text 23</p>
  174. <p>text 24</p>
  175. <p>text 25</p>
  176. <p>text 26</p>
  177. <p>text 27</p>
  178. <p>text 28</p>
  179. <p>text 29</p>
  180. <p>text 30</p>
  181. <p>text 31</p>
  182. <p>text 32</p>
  183. <p>text 33</p>
  184. <p>text 34</p>
  185. <p>text 35</p>
  186. </div>
  187. <div class="empty"/>
  188. <handle size_target="window4"/>
  189. </div>
  190. </body>
  191. </rml>