mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 08:22:45 +00:00 
			
		
		
		
	 c02820759b
			
		
	
	
		c02820759b
		
	
	
	
	
		
			
			Before this change we were ignoring nested paintables inside inline paintable during hit-testing, but now we recurse into subtree. Fixes https://github.com/SerenityOS/serenity/issues/22927
		
			
				
	
	
		
			49 lines
		
	
	
	
		
			1.3 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			49 lines
		
	
	
	
		
			1.3 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| var __outputElement = null;
 | |
| let __alreadyCalledTest = false;
 | |
| function __preventMultipleTestFunctions() {
 | |
|     if (__alreadyCalledTest) {
 | |
|         throw new Error("You must only call test() or asyncTest() once per page");
 | |
|     }
 | |
|     __alreadyCalledTest = true;
 | |
| }
 | |
| 
 | |
| if (globalThis.internals === undefined) {
 | |
|     internals = {
 | |
|         signalTextTestIsDone: function () {},
 | |
|     };
 | |
| }
 | |
| 
 | |
| function println(s) {
 | |
|     __outputElement.appendChild(document.createTextNode(s + "\n"));
 | |
| }
 | |
| 
 | |
| function printElement(e) {
 | |
|     let element_string = `<${e.nodeName} `;
 | |
|     if (e.id) element_string += `id="${e.id}" `;
 | |
|     element_string += ">";
 | |
|     println(element_string);
 | |
| }
 | |
| 
 | |
| document.addEventListener("DOMContentLoaded", function () {
 | |
|     __outputElement = document.createElement("pre");
 | |
|     __outputElement.setAttribute("id", "out");
 | |
|     document.body.appendChild(__outputElement);
 | |
| });
 | |
| 
 | |
| function test(f) {
 | |
|     __preventMultipleTestFunctions();
 | |
|     document.addEventListener("DOMContentLoaded", f);
 | |
|     window.addEventListener("load", () => {
 | |
|         internals.signalTextTestIsDone();
 | |
|     });
 | |
| }
 | |
| 
 | |
| function asyncTest(f) {
 | |
|     const done = () => {
 | |
|         __preventMultipleTestFunctions();
 | |
|         internals.signalTextTestIsDone();
 | |
|     };
 | |
|     document.addEventListener("DOMContentLoaded", () => {
 | |
|         f(done);
 | |
|     });
 | |
| }
 |