| <!DOCTYPE html> |
| <html dir="rtl"> |
| <!-- |
| | Absolute positioned grandchildren in the containing block are included in |
| | the scrolling area. |
| | https://www.w3.org/TR/cssom-view-1/#extension-to-the-element-interface |
| | https://www.w3.org/TR/cssom-view-1/#scrolling-area |
| --> |
| <head> |
| <style> |
| body { |
| font-family: Roboto; |
| font-size: 16px; |
| background-color: #FF0000; |
| } |
| |
| .overflow-scroll { |
| width: 150px; |
| height: 150px; |
| overflow: scroll; |
| position: relative; |
| background-color: #808080; |
| } |
| |
| .content-static { |
| width: 200px; |
| height: 200px; |
| background-color: #00FF00; |
| } |
| |
| .content-positioned { |
| width: 50px; |
| height: 50px; |
| position: absolute; |
| background-color: #0000FF; |
| } |
| </style> |
| <script> |
| if (window.testRunner) { |
| window.testRunner.waitUntilDone(); |
| } |
| |
| function runTest() { |
| var error = ""; |
| var scroller = document.getElementById("scroller"); |
| if (scroller.scrollWidth != 200) { |
| error += "\nValue of: scrollWidth" |
| + "\n Actual: " + scroller.scrollWidth |
| + "\nExpected: " + 200; |
| } |
| if (scroller.scrollHeight != 250) { |
| error += "\nValue of: scrollHeight" |
| + "\n Actual: " + scroller.scrollHeight |
| + "\nExpected: " + 250; |
| } |
| return error; |
| } |
| |
| window.onload = function() { |
| var error = runTest(); |
| if (error) { |
| console.log("FAIL" + error); |
| } else { |
| document.body.style.backgroundColor = "rgba(0,0,0,0)"; |
| } |
| |
| if (window.testRunner) { |
| window.testRunner.notifyDone(); |
| } |
| } |
| </script> |
| </head> |
| <body> |
| <div id="scroller" class="overflow-scroll"> |
| <div class="content-static"> |
| <div class="content-positioned" style="transform: translateY(0px)"></div> |
| <div class="content-positioned" style="transform: translateY(100px)"></div> |
| <div class="content-positioned" style="transform: translateY(200px)"></div> |
| </div> |
| </div> |
| </body> |
| </html> |