mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 17:22:43 +00:00 
			
		
		
		
	 bf4e2f3e9c
			
		
	
	
		bf4e2f3e9c
		
	
	
	
	
		
			
			Introduces `internals.hitTest(x, y)` that is going to allow us write tests for hit testing :)
		
			
				
	
	
		
			27 lines
		
	
	
	
		
			527 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
	
		
			527 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2023, Andreas Kling <kling@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <LibWeb/Bindings/PlatformObject.h>
 | |
| 
 | |
| namespace Web::Internals {
 | |
| 
 | |
| class Internals final : public Bindings::PlatformObject {
 | |
|     WEB_PLATFORM_OBJECT(Internals, Bindings::PlatformObject);
 | |
| 
 | |
| public:
 | |
|     virtual ~Internals() override;
 | |
| 
 | |
|     void gc();
 | |
|     JS::Object* hit_test(double x, double y);
 | |
| 
 | |
| private:
 | |
|     explicit Internals(JS::Realm&);
 | |
|     virtual void initialize(JS::Realm&) override;
 | |
| };
 | |
| 
 | |
| }
 |