Skip to content

Commit

Permalink
Remove incorrect comments in HTMLCanvasElement
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=159229

Reviewed by Sam Weinig.

These comments are wrong.

* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::probablySupportsContext):
(WebCore::HTMLCanvasElement::getContext): Deleted.

Canonical link: https://commits.webkit.org/177339@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@202592 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
grorg committed Jun 28, 2016
1 parent 16073b5 commit b45d541
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
13 changes: 13 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,16 @@
2016-06-28 Dean Jackson <dino@apple.com>

Remove incorrect comments in HTMLCanvasElement
https://bugs.webkit.org/show_bug.cgi?id=159229

Reviewed by Sam Weinig.

These comments are wrong.

* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::probablySupportsContext):
(WebCore::HTMLCanvasElement::getContext): Deleted.

2016-06-28 Geoffrey Garen <ggaren@apple.com>

CrashTracer beneath JSC::MarkedBlock::specializedSweep
Expand Down
13 changes: 1 addition & 12 deletions Source/WebCore/html/HTMLCanvasElement.cpp
Expand Up @@ -206,14 +206,6 @@ static inline size_t maxActivePixelMemory()

CanvasRenderingContext* HTMLCanvasElement::getContext(const String& type, CanvasContextAttributes* attrs)
{
// A Canvas can either be "2D" or "webgl" but never both. If you request a 2D canvas and the existing
// context is already 2D, just return that. If the existing context is WebGL, then destroy it
// before creating a new 2D context. Vice versa when requesting a WebGL canvas. Requesting a
// context with any other type string will destroy any existing context.

// FIXME: The code depends on the context not going away once created, to prevent JS from
// seeing a dangling pointer. So for now we will disallow the context from being changed
// once it is created. https://bugs.webkit.org/show_bug.cgi?id=117095
if (is2dType(type)) {
if (m_context && !m_context->is2d())
return nullptr;
Expand Down Expand Up @@ -271,11 +263,8 @@ CanvasRenderingContext* HTMLCanvasElement::getContext(const String& type, Canvas

bool HTMLCanvasElement::probablySupportsContext(const String& type, CanvasContextAttributes*)
{
// FIXME: Provide implementation that accounts for attributes. Bugzilla bug 117093
// FIXME: Provide implementation that accounts for attributes.
// https://bugs.webkit.org/show_bug.cgi?id=117093

// FIXME: The code depends on the context not going away once created (as getContext
// is implemented under this assumption) https://bugs.webkit.org/show_bug.cgi?id=117095
if (is2dType(type))
return !m_context || m_context->is2d();

Expand Down

0 comments on commit b45d541

Please sign in to comment.