mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 11:17:35 +00:00
Everywhere: Replace a bundle of dbg with dbgln.
These changes are arbitrarily divided into multiple commits to make it easier to find potentially introduced bugs with git bisect.
This commit is contained in:
parent
6b7602d33b
commit
adbb8d62d1
6 changed files with 18 additions and 18 deletions
|
@ -34,11 +34,11 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#define PARSE_ASSERT(x) \
|
||||
if (!(x)) { \
|
||||
dbg() << "CSS PARSER ASSERTION FAILED: " << #x; \
|
||||
dbg() << "At character# " << index << " in CSS: _" << css << "_"; \
|
||||
ASSERT_NOT_REACHED(); \
|
||||
#define PARSE_ASSERT(x) \
|
||||
if (!(x)) { \
|
||||
dbgln("CSS PARSER ASSERTION FAILED: {}", #x); \
|
||||
dbgln("At character# {} in CSS: _{}_", index, css); \
|
||||
ASSERT_NOT_REACHED(); \
|
||||
}
|
||||
|
||||
#define PARSE_ERROR() \
|
||||
|
@ -764,7 +764,7 @@ public:
|
|||
|
||||
auto property_id = CSS::property_id_from_string(property_name);
|
||||
if (property_id == CSS::PropertyID::Invalid) {
|
||||
dbg() << "CSSParser: Unrecognized property '" << property_name << "'";
|
||||
dbgln("CSSParser: Unrecognized property '{}'", property_name);
|
||||
}
|
||||
auto value = parse_css_value(m_context, property_value, property_id);
|
||||
if (!value)
|
||||
|
|
|
@ -492,7 +492,7 @@ static void set_property_expanding_shorthands(StyleProperties& style, CSS::Prope
|
|||
}
|
||||
return;
|
||||
}
|
||||
dbg() << "Unsure what to do with CSS margin value '" << value.to_string() << "'";
|
||||
dbgln("Unsure what to do with CSS margin value '{}'", value.to_string());
|
||||
return;
|
||||
}
|
||||
return;
|
||||
|
@ -544,7 +544,7 @@ static void set_property_expanding_shorthands(StyleProperties& style, CSS::Prope
|
|||
}
|
||||
return;
|
||||
}
|
||||
dbg() << "Unsure what to do with CSS padding value '" << value.to_string() << "'";
|
||||
dbgln("Unsure what to do with CSS padding value '{}'", value.to_string());
|
||||
return;
|
||||
}
|
||||
return;
|
||||
|
|
|
@ -73,13 +73,13 @@ void XMLHttpRequest::open(const String& method, const String& url)
|
|||
void XMLHttpRequest::send()
|
||||
{
|
||||
URL request_url = m_window->document().complete_url(m_url);
|
||||
dbg() << "XHR send from " << m_window->document().url() << " to " << request_url;
|
||||
dbgln("XHR send from {} to {}", m_window->document().url(), request_url);
|
||||
|
||||
// TODO: Add support for preflight requests to support CORS requests
|
||||
Origin request_url_origin = Origin(request_url.protocol(), request_url.host(), request_url.port());
|
||||
|
||||
if (!m_window->document().origin().is_same(request_url_origin)) {
|
||||
dbg() << "XHR failed to load: Same-Origin Policy violation: " << m_window->document().url() << " may not load " << request_url;
|
||||
dbgln("XHR failed to load: Same-Origin Policy violation: {} may not load {}", m_window->document().url(), request_url);
|
||||
auto weak_this = make_weak_ptr();
|
||||
if (!weak_this)
|
||||
return;
|
||||
|
@ -102,7 +102,7 @@ void XMLHttpRequest::send()
|
|||
[weak_this = make_weak_ptr()](auto& error) {
|
||||
if (!weak_this)
|
||||
return;
|
||||
dbg() << "XHR failed to load: " << error;
|
||||
dbgln("XHR failed to load: {}", error);
|
||||
const_cast<XMLHttpRequest&>(*weak_this).set_ready_state(ReadyState::Done);
|
||||
const_cast<XMLHttpRequest&>(*weak_this).dispatch_event(DOM::Event::create(HTML::EventNames::error));
|
||||
});
|
||||
|
|
|
@ -113,19 +113,19 @@ void CanvasRenderingContext2D::draw_image(const HTMLImageElement& image_element,
|
|||
|
||||
void CanvasRenderingContext2D::scale(float sx, float sy)
|
||||
{
|
||||
dbg() << "CanvasRenderingContext2D::scale(): " << sx << ", " << sy;
|
||||
dbgln("CanvasRenderingContext2D::scale({}, {})", sx, sy);
|
||||
m_transform.scale(sx, sy);
|
||||
}
|
||||
|
||||
void CanvasRenderingContext2D::translate(float tx, float ty)
|
||||
{
|
||||
dbg() << "CanvasRenderingContext2D::translate(): " << tx << ", " << ty;
|
||||
dbgln("CanvasRenderingContext2D::translate({}, {})", tx, ty);
|
||||
m_transform.translate(tx, ty);
|
||||
}
|
||||
|
||||
void CanvasRenderingContext2D::rotate(float radians)
|
||||
{
|
||||
dbg() << "CanvasRenderingContext2D::rotate(): " << radians;
|
||||
dbgln("CanvasRenderingContext2D::rotate({})", radians);
|
||||
m_transform.rotate_radians(radians);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue