mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 15:46:33 +00:00
LibWeb: Convert a bunch of dbg() to dbgln()
This commit is contained in:
parent
4714b04d32
commit
0a3b834346
Notes:
sideshowbarker
2024-07-19 00:00:24 +09:00
Author: https://github.com/awesomekling
Commit: 0a3b834346
12 changed files with 31 additions and 38 deletions
|
@ -80,11 +80,11 @@ static Gfx::IntSize bitmap_size_for_canvas(const HTMLCanvasElement& canvas)
|
|||
area *= height;
|
||||
|
||||
if (area.has_overflow()) {
|
||||
dbg() << "Refusing to create " << width << "x" << height << " canvas (overflow)";
|
||||
dbgln("Refusing to create {}x{} canvas (overflow)", width, height);
|
||||
return {};
|
||||
}
|
||||
if (area.value() > max_canvas_area) {
|
||||
dbg() << "Refusing to create " << width << "x" << height << " canvas (exceeds maximum size)";
|
||||
dbgln("Refusing to create {}x{} canvas (exceeds maximum size)", width, height);
|
||||
return {};
|
||||
}
|
||||
return Gfx::IntSize(width, height);
|
||||
|
|
|
@ -50,14 +50,14 @@ void HTMLFormElement::submit_form(RefPtr<HTMLElement> submitter, bool from_submi
|
|||
return;
|
||||
|
||||
if (action().is_null()) {
|
||||
dbg() << "Unsupported form action ''";
|
||||
dbgln("Unsupported form action ''");
|
||||
return;
|
||||
}
|
||||
|
||||
auto effective_method = method().to_lowercase();
|
||||
|
||||
if (effective_method == "dialog") {
|
||||
dbg() << "Failed to submit form: Unsupported form method '" << method() << "'";
|
||||
dbgln("Failed to submit form: Unsupported form method '{}'", method());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -97,21 +97,21 @@ void HTMLFormElement::submit_form(RefPtr<HTMLElement> submitter, bool from_submi
|
|||
URL url(document().complete_url(action()));
|
||||
|
||||
if (!url.is_valid()) {
|
||||
dbg() << "Failed to submit form: Invalid URL: " << action();
|
||||
dbgln("Failed to submit form: Invalid URL: {}", action());
|
||||
return;
|
||||
}
|
||||
|
||||
if (url.protocol() == "file") {
|
||||
if (document().url().protocol() != "file") {
|
||||
dbg() << "Failed to submit form: Security violation: " << document().url() << " may not submit to " << url;
|
||||
dbgln("Failed to submit form: Security violation: {} may not submit to {}", document().url(), url);
|
||||
return;
|
||||
}
|
||||
if (effective_method != "get") {
|
||||
dbg() << "Failed to submit form: Unsupported form method '" << method() << "' for URL: " << url;
|
||||
dbgln("Failed to submit form: Unsupported form method '{}' for URL: {}", method(), url);
|
||||
return;
|
||||
}
|
||||
} else if (url.protocol() != "http" && url.protocol() != "https") {
|
||||
dbg() << "Failed to submit form: Unsupported protocol for URL: " << url;
|
||||
dbgln("Failed to submit form: Unsupported protocol for URL: {}", url);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ HTMLImageElement::HTMLImageElement(DOM::Document& document, const QualifiedName&
|
|||
};
|
||||
|
||||
m_image_loader.on_fail = [this] {
|
||||
dbg() << "HTMLImageElement: Resource did fail: " << this->src();
|
||||
dbgln("HTMLImageElement: Resource did fail: {}", src());
|
||||
this->document().update_layout();
|
||||
dispatch_event(DOM::Event::create(EventNames::error));
|
||||
};
|
||||
|
|
|
@ -130,7 +130,7 @@ void HTMLScriptElement::prepare_script(Badge<HTMLDocumentParser>)
|
|||
url,
|
||||
[this, url](auto data, auto&) {
|
||||
if (data.is_null()) {
|
||||
dbg() << "HTMLScriptElement: Failed to load " << url;
|
||||
dbgln("HTMLScriptElement: Failed to load {}", url);
|
||||
return;
|
||||
}
|
||||
m_script_source = String::copy(data);
|
||||
|
|
|
@ -38,7 +38,7 @@ RefPtr<ImageData> ImageData::create_with_size(JS::GlobalObject& global_object, i
|
|||
if (width > 16384 || height > 16384)
|
||||
return nullptr;
|
||||
|
||||
dbg() << "Creating ImageData with " << width << "x" << height;
|
||||
dbgln("Creating ImageData with {}x{}", width, height);
|
||||
|
||||
auto* data = JS::Uint8ClampedArray::create(global_object, width * height * 4);
|
||||
if (!data)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue