1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-24 21:57:35 +00:00

LibWeb: Remove debug spam about getting a 2D canvas context

This commit is contained in:
Andreas Kling 2020-03-25 09:54:46 +01:00
parent 9ee7142227
commit 05311782d7
2 changed files with 0 additions and 4 deletions

View file

@ -41,9 +41,7 @@ HTMLCanvasElementWrapper::HTMLCanvasElementWrapper(HTMLCanvasElement& element)
{
put_native_function("getContext", [this](JS::Object*, const Vector<JS::Value>& arguments) -> JS::Value {
if (arguments.size() >= 1) {
dbg() << "Calling getContext on " << node().tag_name();
auto* context = node().get_context(arguments[0].to_string());
dbg() << "getContext got 2D context=" << context;
return wrap(heap(), *context);
}
return JS::js_undefined();

View file

@ -74,10 +74,8 @@ RefPtr<LayoutNode> HTMLCanvasElement::create_layout_node(const StyleProperties*
CanvasRenderingContext2D* HTMLCanvasElement::get_context(String type)
{
ASSERT(type.to_lowercase() == "2d");
dbg() << "get_context with m_context=" << m_context.ptr();
if (!m_context)
m_context = CanvasRenderingContext2D::create(*this);
dbg() << "get_context returning m_context=" << m_context.ptr();
return m_context;
}