Bug 117095
Summary: | HTMLCanvasElement getContext and supportsContext functions assumes that a canvas cannot be changed after creation | ||
---|---|---|---|
Product: | WebKit | Reporter: | Ruth Fong <ruthiecftg> |
Component: | Canvas | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED INVALID | ||
Severity: | Normal | CC: | dino, ian, ruthiecftg, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Ruth Fong
The implementations of getContext and supportsContext (once the patch for bug 70117 is landed) in Source/WebCore/html/HTMLCanvasElement.cpp depends on the assumption that the context does not go away upon creation (to prevent JS form seeing a dangling pointer) and disallows the context from being changed once it is created.
Thus, if a 3d context exists for a <canvas> element (by calling canvas.getsContext('webkit-3d') and supportsContext('2d') is subsequently called on that <canvas> element, then canvas.supportsContext('2d') will return false because a 3d context already exists.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/14037988>
Ian 'Hixie' Hickson
Why is that a bug? Isn't that exactly what the spec requires?
Ruth Fong
(In reply to comment #2)
> Why is that a bug? Isn't that exactly what the spec requires?
Just checked with Dean; you're right.
Dean Jackson
I believe it was me who gave this erroneous suggestion.