Bug 48579
| Summary: | HTML5 Conformance Test failure: approved/canvas/type.prototype.html | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | David Kilzer (:ddkilzer) <ddkilzer> |
| Component: | Canvas | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED CONFIGURATION CHANGED | ||
| Severity: | Normal | CC: | ahollyhock, mdelaney7, pilgrim |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | All | ||
| OS: | All | ||
| URL: | http://test.w3.org/html/tests/approved/canvas/type.prototype.html | ||
| Bug Depends on: | |||
| Bug Blocks: | 48575 | ||
David Kilzer (:ddkilzer)
The approved/canvas/type.prototype.html test fails with WebKit nightly build r70732 run in Safari 5.0.x.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Priyanka
Hi,
I checked this test which is now present in location (Webkit\LayoutTests\canvas\philip\tests\type.prototype.html) and online location http://philip.html5.org/tests/canvas/suite/tests/type.prototype.html
with webkit revision on Windows 7
Last Changed Rev: 95852
Last Changed Date: 2011-09-23 15:56:21 -0400 (Fri, 23 Sep 2011)
This test fails on Safari 5.1 and Firefox but passes on Opera.
The test fails because webkit does not allow the deletion of property "getContext" via script
delete window.HTMLCanvasElement.prototype.getContext;
The reason is - "getContext" has attribute "DontDelete | Function" so it does not permit the script to delete this property.
But I could not find any reference in WHATWG website whether this deletion should be allowed ??
Priyanka
As mentioned in http://www.w3.org/TR/2011/WD-WebIDL-20110927/#interface-prototype-object
"There must exist an interface prototype object for every interface defined, regardless of whether the interface was declared with the [NoInterfaceObject] extended attribute. The interface prototype object for a particular interface has properties that correspond to the attributes and operations defined on that interface
4.5.6. Operations
For each unique identifier of an operation defined on the interface, there must be a corresponding property on the interface prototype object (if it is a regular operation) or the interface object (if it is a static operation),
The property has attributes { [[Writable]]: true, [[Enumerable]]: true, [[Configurable]]: true }.
"
In our case interface : JSHTMLCanvasElement
Priyanka
As mentioned in the latest W3C Web IDL specification
http://www.w3.org/TR/2011/WD-WebIDL-20110927/#interface-prototype-object
"There must exist an interface prototype object for every interface defined, regardless of whether the interface was declared with the [NoInterfaceObject] extended attribute. The interface prototype object for a particular interface has properties that correspond to the attributes and operations defined on that interface
4.5.6. Operations
For each unique identifier of an operation defined on the interface, there must be a corresponding property on the interface prototype object (if it is a regular operation) or the interface object (if it is a static operation).
The property has attributes { [[Writable]]: true, [[Enumerable]]: true, [[Configurable]]: true }."
So in our case the interface : JSHTMLCanvasElement
interface prototype : JSHTMLCanvasElementPrototype
operation : getContext
Correct me if I am wrong, shouldn't getContext be [[Configurable]]: true and hence we should be able to delete the property ??
Priyanka
please ignore this comment - typo
David Kilzer (:ddkilzer)
This appears to be working now with Safari Technology Preview 14 on macOS Sierra.