summaryrefslogtreecommitdiff
path: root/Libraries/LibWeb/DOM
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2020-05-20 23:37:29 +0100
committerAndreas Kling <kling@serenityos.org>2020-05-21 01:24:36 +0200
commitabb33d425e177c200fbcf0ffe58bcf9215874010 (patch)
tree080ea78c311eca8fc9620bad18df34a7e90390cc /Libraries/LibWeb/DOM
parent50c0944767f7c7c6d7aea6ebb3991d351700a8e9 (diff)
downloadserenity-abb33d425e177c200fbcf0ffe58bcf9215874010.zip
LibWeb: Let HTMLCanvasElement.getContext() return null for unknown types
Currently we would assert. Also make it case sensitive.
Diffstat (limited to 'Libraries/LibWeb/DOM')
-rw-r--r--Libraries/LibWeb/DOM/HTMLCanvasElement.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Libraries/LibWeb/DOM/HTMLCanvasElement.cpp b/Libraries/LibWeb/DOM/HTMLCanvasElement.cpp
index a37139c6fe..b2fd8b4389 100644
--- a/Libraries/LibWeb/DOM/HTMLCanvasElement.cpp
+++ b/Libraries/LibWeb/DOM/HTMLCanvasElement.cpp
@@ -76,7 +76,7 @@ RefPtr<LayoutNode> HTMLCanvasElement::create_layout_node(const StyleProperties*
CanvasRenderingContext2D* HTMLCanvasElement::get_context(String type)
{
- ASSERT(type.to_lowercase() == "2d");
+ ASSERT(type == "2d");
if (!m_context)
m_context = CanvasRenderingContext2D::create(*this);
return m_context;