Bug 227107 - [SVG2] SVGGraphicsElement.getBBox does not take an optional SVGBoundingBoxOptions
Summary: [SVG2] SVGGraphicsElement.getBBox does not take an optional SVGBoundingBoxOpt...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks: 191292
  Show dependency treegraph
 
Reported: 2021-06-16 19:52 PDT by zyscoder@gmail.com
Modified: 2021-06-23 23:20 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.