| <!DOCTYPE html> |
| <!-- |
| | This is a specific regression test to ensure a DOM tree leaf with no transform does not cause |
| | a crash when accessed |
| --> |
| <html> |
| <head> |
| <style> |
| body { |
| font-family: Roboto; |
| background-color: #FF0000; |
| } |
| .content { |
| width: 200px; |
| height: 200px; |
| transform: scale(0.5); |
| background-color: #00FF00; |
| } |
| .content-content { |
| width: 100px; |
| height: 100px; |
| transform: scale(0.5); |
| background-color: #FF0000; |
| } |
| .content-with-no-transform { |
| width: 50px; |
| height: 50px; |
| background-color: #0000FF; |
| } |
| </style> |
| <script> |
| if (window.testRunner) { |
| window.testRunner.waitUntilDone(); |
| } |
| |
| function runTest() { |
| var error = ""; |
| var target= document.getElementById("target"); |
| if (target.scrollWidth != 200) { |
| error += "\nValue of: scrollWdith" |
| + "\n Actual: " + target.scrollWidth |
| + "\nExpected: " + 200; |
| |
| }; |
| 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 class="content" id="target"> |
| <div class="content-content"> |
| <div class="content-with-no-transform"></div> |
| </div> |
| </div> |
| </body> |
| </html> |