Bug 227107

Summary: [SVG2] SVGGraphicsElement.getBBox does not take an optional SVGBoundingBoxOptions
Product: WebKit Reporter: zyscoder <zyscoder>
Component: SVGAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: ahmad.saleem792, sabouhallawa, sam, webkit-bug-importer, zimmermann
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Linux   
Bug Depends on:    
Bug Blocks: 191292    

Description zyscoder@gmail.com 2021-06-16 19:52:44 PDT
Steps to reproduce:

(1) Open a tab and navigate to https://outlook.live.com/;
(2) Open Devtools and run the following code in the Console:
```
document.getElementsByTagName('svg')[0].getBBox(true);
```
Actual results:

This code would be evaluated successfully without throwing any exceptions.

Expected results:

As https://svgwg.org/svg2-draft/types.html#__svg__SVGGraphicsElement__getBBox says, the getBBox method asks an SVGBoundingBoxOptions type value as its parameter. Checking for the type of param should be added and this code should throw a TypeError exception, like what Firefox does.
Firefox: `SVGGraphicsElement.getBBox: Argument 1 can't be converted to a dictionary.`
Comment 1 Radar WebKit Bug Importer 2021-06-23 19:53:15 PDT
<rdar://problem/79706355>
Comment 2 Said Abou-Hallawa 2021-06-23 23:18:49 PDT
SVGGraphicsElement is a new interface which was introduced in SVG2. It was added to WebKit in bug 118178. The current implementation of SVGGraphicsElement.getBBox does not take an optional SVGBoundingBoxOptions argument as the specs state.