1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 19:47:34 +00:00

Everywhere: Run clang-format

This commit is contained in:
Idan Horowitz 2022-04-01 20:58:27 +03:00 committed by Linus Groh
parent 0376c127f6
commit 086969277e
1665 changed files with 8479 additions and 8479 deletions

View file

@ -45,7 +45,7 @@ void paint_border(PaintContext& context, BorderEdge edge, Gfx::FloatRect const&
{
auto rect = a_rect.to_rounded<float>();
const auto& border_data = [&] {
auto const& border_data = [&] {
switch (edge) {
case BorderEdge::Top:
return borders_data.top;
@ -71,7 +71,7 @@ void paint_border(PaintContext& context, BorderEdge edge, Gfx::FloatRect const&
Gfx::FloatPoint p2;
};
auto points_for_edge = [](BorderEdge edge, const Gfx::FloatRect& rect) -> Points {
auto points_for_edge = [](BorderEdge edge, Gfx::FloatRect const& rect) -> Points {
switch (edge) {
case BorderEdge::Top:
return { rect.top_left(), rect.top_right() };

View file

@ -35,7 +35,7 @@ Layout::FormAssociatedLabelableNode& LabelablePaintable::layout_box()
return static_cast<Layout::FormAssociatedLabelableNode&>(PaintableBox::layout_box());
}
LabelablePaintable::DispatchEventOfSameName LabelablePaintable::handle_mousedown(Badge<EventHandler>, const Gfx::IntPoint&, unsigned button, unsigned)
LabelablePaintable::DispatchEventOfSameName LabelablePaintable::handle_mousedown(Badge<EventHandler>, Gfx::IntPoint const&, unsigned button, unsigned)
{
if (button != GUI::MouseButton::Primary || !layout_box().dom_node().enabled())
return DispatchEventOfSameName::No;
@ -46,7 +46,7 @@ LabelablePaintable::DispatchEventOfSameName LabelablePaintable::handle_mousedown
return DispatchEventOfSameName::Yes;
}
LabelablePaintable::DispatchEventOfSameName LabelablePaintable::handle_mouseup(Badge<EventHandler>, const Gfx::IntPoint& position, unsigned button, unsigned)
LabelablePaintable::DispatchEventOfSameName LabelablePaintable::handle_mouseup(Badge<EventHandler>, Gfx::IntPoint const& position, unsigned button, unsigned)
{
if (!m_tracking_mouse || button != GUI::MouseButton::Primary || !layout_box().dom_node().enabled())
return DispatchEventOfSameName::No;
@ -61,7 +61,7 @@ LabelablePaintable::DispatchEventOfSameName LabelablePaintable::handle_mouseup(B
return DispatchEventOfSameName::Yes;
}
LabelablePaintable::DispatchEventOfSameName LabelablePaintable::handle_mousemove(Badge<EventHandler>, const Gfx::IntPoint& position, unsigned, unsigned)
LabelablePaintable::DispatchEventOfSameName LabelablePaintable::handle_mousemove(Badge<EventHandler>, Gfx::IntPoint const& position, unsigned, unsigned)
{
if (!m_tracking_mouse || !layout_box().dom_node().enabled())
return DispatchEventOfSameName::No;

View file

@ -64,12 +64,12 @@ public:
// When these methods return true, the DOM event with the same name will be
// dispatch at the mouse_event_target if it returns a valid DOM::Node, or
// the layout node's associated DOM node if it doesn't.
virtual DispatchEventOfSameName handle_mousedown(Badge<EventHandler>, const Gfx::IntPoint&, unsigned button, unsigned modifiers);
virtual DispatchEventOfSameName handle_mouseup(Badge<EventHandler>, const Gfx::IntPoint&, unsigned button, unsigned modifiers);
virtual DispatchEventOfSameName handle_mousemove(Badge<EventHandler>, const Gfx::IntPoint&, unsigned buttons, unsigned modifiers);
virtual DispatchEventOfSameName handle_mousedown(Badge<EventHandler>, Gfx::IntPoint const&, unsigned button, unsigned modifiers);
virtual DispatchEventOfSameName handle_mouseup(Badge<EventHandler>, Gfx::IntPoint const&, unsigned button, unsigned modifiers);
virtual DispatchEventOfSameName handle_mousemove(Badge<EventHandler>, Gfx::IntPoint const&, unsigned buttons, unsigned modifiers);
virtual DOM::Node* mouse_event_target() const { return nullptr; }
virtual bool handle_mousewheel(Badge<EventHandler>, const Gfx::IntPoint&, unsigned buttons, unsigned modifiers, int wheel_delta_x, int wheel_delta_y);
virtual bool handle_mousewheel(Badge<EventHandler>, Gfx::IntPoint const&, unsigned buttons, unsigned modifiers, int wheel_delta_x, int wheel_delta_y);
Layout::Node const& layout_node() const { return m_layout_node; }
Layout::Node& layout_node() { return const_cast<Layout::Node&>(m_layout_node); }

View file

@ -43,7 +43,7 @@ PaintableWithLines::~PaintableWithLines()
{
}
void PaintableBox::set_offset(const Gfx::FloatPoint& offset)
void PaintableBox::set_offset(Gfx::FloatPoint const& offset)
{
m_offset = offset;
// FIXME: This const_cast is gross.
@ -527,7 +527,7 @@ Optional<HitTestResult> PaintableBox::hit_test(Gfx::FloatPoint const& position,
return {};
}
Optional<HitTestResult> PaintableWithLines::hit_test(const Gfx::FloatPoint& position, HitTestType type) const
Optional<HitTestResult> PaintableWithLines::hit_test(Gfx::FloatPoint const& position, HitTestType type) const
{
if (!layout_box().children_are_inline())
return PaintableBox::hit_test(position, type);

View file

@ -163,7 +163,7 @@ public:
virtual void paint(PaintContext&, PaintPhase) const override;
virtual bool wants_mouse_events() const override { return false; }
virtual bool handle_mousewheel(Badge<EventHandler>, const Gfx::IntPoint&, unsigned buttons, unsigned modifiers, int wheel_delta_x, int wheel_delta_y) override;
virtual bool handle_mousewheel(Badge<EventHandler>, Gfx::IntPoint const&, unsigned buttons, unsigned modifiers, int wheel_delta_x, int wheel_delta_y) override;
virtual Optional<HitTestResult> hit_test(Gfx::FloatPoint const&, HitTestType) const override;

View file

@ -18,7 +18,7 @@ public:
StackingContext(Layout::Box&, StackingContext* parent);
StackingContext* parent() { return m_parent; }
const StackingContext* parent() const { return m_parent; }
StackingContext const* parent() const { return m_parent; }
enum class StackingContextPaintPhase {
BackgroundAndBorders,

View file

@ -36,7 +36,7 @@ DOM::Node* TextPaintable::mouse_event_target() const
return nullptr;
}
TextPaintable::DispatchEventOfSameName TextPaintable::handle_mousedown(Badge<EventHandler>, const Gfx::IntPoint& position, unsigned button, unsigned)
TextPaintable::DispatchEventOfSameName TextPaintable::handle_mousedown(Badge<EventHandler>, Gfx::IntPoint const& position, unsigned button, unsigned)
{
auto* label = layout_node().first_ancestor_of_type<Layout::Label>();
if (!label)
@ -46,7 +46,7 @@ TextPaintable::DispatchEventOfSameName TextPaintable::handle_mousedown(Badge<Eve
return DispatchEventOfSameName::Yes;
}
TextPaintable::DispatchEventOfSameName TextPaintable::handle_mouseup(Badge<EventHandler>, const Gfx::IntPoint& position, unsigned button, unsigned)
TextPaintable::DispatchEventOfSameName TextPaintable::handle_mouseup(Badge<EventHandler>, Gfx::IntPoint const& position, unsigned button, unsigned)
{
auto* label = layout_node().first_ancestor_of_type<Layout::Label>();
if (!label)
@ -57,7 +57,7 @@ TextPaintable::DispatchEventOfSameName TextPaintable::handle_mouseup(Badge<Event
return DispatchEventOfSameName::Yes;
}
TextPaintable::DispatchEventOfSameName TextPaintable::handle_mousemove(Badge<EventHandler>, const Gfx::IntPoint& position, unsigned button, unsigned)
TextPaintable::DispatchEventOfSameName TextPaintable::handle_mousemove(Badge<EventHandler>, Gfx::IntPoint const& position, unsigned button, unsigned)
{
auto* label = layout_node().first_ancestor_of_type<Layout::Label>();
if (!label)

View file

@ -18,9 +18,9 @@ public:
virtual bool wants_mouse_events() const override;
virtual DOM::Node* mouse_event_target() const override;
virtual DispatchEventOfSameName handle_mousedown(Badge<EventHandler>, const Gfx::IntPoint&, unsigned button, unsigned modifiers) override;
virtual DispatchEventOfSameName handle_mouseup(Badge<EventHandler>, const Gfx::IntPoint&, unsigned button, unsigned modifiers) override;
virtual DispatchEventOfSameName handle_mousemove(Badge<EventHandler>, const Gfx::IntPoint&, unsigned button, unsigned modifiers) override;
virtual DispatchEventOfSameName handle_mousedown(Badge<EventHandler>, Gfx::IntPoint const&, unsigned button, unsigned modifiers) override;
virtual DispatchEventOfSameName handle_mouseup(Badge<EventHandler>, Gfx::IntPoint const&, unsigned button, unsigned modifiers) override;
virtual DispatchEventOfSameName handle_mousemove(Badge<EventHandler>, Gfx::IntPoint const&, unsigned button, unsigned modifiers) override;
private:
explicit TextPaintable(Layout::TextNode const&);