mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 16:12:44 +00:00 
			
		
		
		
	LibWeb: Validate arguments when creating DOMPoint from matrix transform
Previously, it was possible to create a DOMPoint from a matrix transform with inconsistent arguments. A TypeError is now thrown in this case.
This commit is contained in:
		
							parent
							
								
									c5d1ec4dea
								
							
						
					
					
						commit
						fe66aeb225
					
				
					 3 changed files with 14 additions and 2 deletions
				
			
		|  | @ -41,7 +41,7 @@ DOMPointReadOnly::~DOMPointReadOnly() = default; | |||
| WebIDL::ExceptionOr<JS::NonnullGCPtr<DOMPoint>> DOMPointReadOnly::matrix_transform(DOMMatrixInit& matrix) const | ||||
| { | ||||
|     // 1. Let matrixObject be the result of invoking create a DOMMatrix from the dictionary matrix.
 | ||||
|     auto matrix_object = TRY(DOMMatrix::create_from_dom_matrix_2d_init(realm(), matrix)); | ||||
|     auto matrix_object = TRY(DOMMatrix::create_from_dom_matrix_init(realm(), matrix)); | ||||
| 
 | ||||
|     // 2. Return the result of invoking transform a point with a matrix, given the current point and matrixObject. The current point does not get modified.
 | ||||
|     return matrix_object->transform_point(*this); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Tim Ledbetter
						Tim Ledbetter