summaryrefslogtreecommitdiff
path: root/Libraries/LibWeb
diff options
context:
space:
mode:
authorBen Wiederhake <BenWiederhake.GitHub@gmx.de>2020-09-18 09:49:51 +0200
committerAndreas Kling <kling@serenityos.org>2020-09-25 21:18:17 +0200
commit08f9bc26a6b279d0f09be13d7305ad8b2f094884 (patch)
tree5091688b83f9ceabc7aeff0daa5c167460832b1f /Libraries/LibWeb
parentede5dbd7b3ec1c7240d6ca2693a5ada307338b4c (diff)
downloadserenity-08f9bc26a6b279d0f09be13d7305ad8b2f094884.zip
Meta+LibHTTP through LibWeb: Make clang-format-10 clean
Diffstat (limited to 'Libraries/LibWeb')
-rw-r--r--Libraries/LibWeb/Bindings/NodeWrapperFactory.cpp2
-rw-r--r--Libraries/LibWeb/CSS/StyleValue.cpp2
-rw-r--r--Libraries/LibWeb/CodeGenerators/WrapperGenerator.cpp2
-rw-r--r--Libraries/LibWeb/DOM/Document.cpp2
-rw-r--r--Libraries/LibWeb/DOM/DocumentFragment.h2
-rw-r--r--Libraries/LibWeb/DOM/ElementFactory.cpp19
-rw-r--r--Libraries/LibWeb/DOM/ParentNode.h6
-rw-r--r--Libraries/LibWeb/DOM/TagNames.cpp3
-rw-r--r--Libraries/LibWeb/HTML/AttributeNames.cpp3
-rw-r--r--Libraries/LibWeb/HTML/HTMLFieldSetElement.h3
-rw-r--r--Libraries/LibWeb/HTML/HTMLFormElement.cpp2
-rw-r--r--Libraries/LibWeb/HTML/HTMLOutputElement.h3
-rw-r--r--Libraries/LibWeb/HTML/HTMLScriptElement.cpp2
-rw-r--r--Libraries/LibWeb/HTML/HTMLTextAreaElement.h3
-rw-r--r--Libraries/LibWeb/HTML/Parser/HTMLTokenizer.cpp42
-rw-r--r--Libraries/LibWeb/Layout/LayoutDocument.cpp2
-rw-r--r--Libraries/LibWeb/Layout/LayoutFrame.cpp2
-rw-r--r--Libraries/LibWeb/Layout/LayoutFrame.h2
-rw-r--r--Libraries/LibWeb/Layout/LayoutPosition.h2
-rw-r--r--Libraries/LibWeb/Layout/LayoutWidget.cpp2
-rw-r--r--Libraries/LibWeb/Layout/LineBox.cpp2
-rw-r--r--Libraries/LibWeb/Layout/LineBoxFragment.h2
-rw-r--r--Libraries/LibWeb/Page/Page.cpp2
-rw-r--r--Libraries/LibWeb/SVG/SVGPathElement.cpp10
-rw-r--r--Libraries/LibWeb/SVG/SVGPathElement.h1
-rw-r--r--Libraries/LibWeb/SVG/SVGSVGElement.cpp2
-rw-r--r--Libraries/LibWeb/SVG/TagNames.cpp5
-rw-r--r--Libraries/LibWeb/SVG/TagNames.h8
-rw-r--r--Libraries/LibWeb/URLEncoder.h1
29 files changed, 75 insertions, 64 deletions
diff --git a/Libraries/LibWeb/Bindings/NodeWrapperFactory.cpp b/Libraries/LibWeb/Bindings/NodeWrapperFactory.cpp
index adebbc6515..38d4ad9265 100644
--- a/Libraries/LibWeb/Bindings/NodeWrapperFactory.cpp
+++ b/Libraries/LibWeb/Bindings/NodeWrapperFactory.cpp
@@ -27,9 +27,9 @@
#include <LibWeb/Bindings/CharacterDataWrapper.h>
#include <LibWeb/Bindings/CommentWrapper.h>
-#include <LibWeb/Bindings/DocumentWrapper.h>
#include <LibWeb/Bindings/DocumentFragmentWrapper.h>
#include <LibWeb/Bindings/DocumentTypeWrapper.h>
+#include <LibWeb/Bindings/DocumentWrapper.h>
#include <LibWeb/Bindings/HTMLAnchorElementWrapper.h>
#include <LibWeb/Bindings/HTMLAreaElementWrapper.h>
#include <LibWeb/Bindings/HTMLAudioElementWrapper.h>
diff --git a/Libraries/LibWeb/CSS/StyleValue.cpp b/Libraries/LibWeb/CSS/StyleValue.cpp
index 952bb8b68e..164670ab39 100644
--- a/Libraries/LibWeb/CSS/StyleValue.cpp
+++ b/Libraries/LibWeb/CSS/StyleValue.cpp
@@ -29,10 +29,10 @@
#include <LibGfx/Palette.h>
#include <LibWeb/CSS/StyleValue.h>
#include <LibWeb/DOM/Document.h>
+#include <LibWeb/InProcessWebView.h>
#include <LibWeb/Loader/LoadRequest.h>
#include <LibWeb/Loader/ResourceLoader.h>
#include <LibWeb/Page/Frame.h>
-#include <LibWeb/InProcessWebView.h>
namespace Web::CSS {
diff --git a/Libraries/LibWeb/CodeGenerators/WrapperGenerator.cpp b/Libraries/LibWeb/CodeGenerators/WrapperGenerator.cpp
index 4d0365b109..fa5e73d09d 100644
--- a/Libraries/LibWeb/CodeGenerators/WrapperGenerator.cpp
+++ b/Libraries/LibWeb/CodeGenerators/WrapperGenerator.cpp
@@ -593,7 +593,7 @@ void generate_implementation(const IDL::Interface& interface)
out() << " return JS::Value(retval);";
} else if (return_type.name == "Uint8ClampedArray") {
out() << " return retval;";
- } else if (return_type.name == "boolean") {
+ } else if (return_type.name == "boolean") {
out() << " return JS::Value(retval);";
} else {
out() << " return wrap(global_object, const_cast<" << return_type.name << "&>(*retval));";
diff --git a/Libraries/LibWeb/DOM/Document.cpp b/Libraries/LibWeb/DOM/Document.cpp
index d4ebfed6de..97aa172646 100644
--- a/Libraries/LibWeb/DOM/Document.cpp
+++ b/Libraries/LibWeb/DOM/Document.cpp
@@ -51,11 +51,11 @@
#include <LibWeb/HTML/HTMLHtmlElement.h>
#include <LibWeb/HTML/HTMLScriptElement.h>
#include <LibWeb/HTML/HTMLTitleElement.h>
+#include <LibWeb/InProcessWebView.h>
#include <LibWeb/Layout/LayoutDocument.h>
#include <LibWeb/Layout/LayoutTreeBuilder.h>
#include <LibWeb/Origin.h>
#include <LibWeb/Page/Frame.h>
-#include <LibWeb/InProcessWebView.h>
#include <LibWeb/SVG/TagNames.h>
#include <stdio.h>
diff --git a/Libraries/LibWeb/DOM/DocumentFragment.h b/Libraries/LibWeb/DOM/DocumentFragment.h
index b067b7e429..cc55f2c168 100644
--- a/Libraries/LibWeb/DOM/DocumentFragment.h
+++ b/Libraries/LibWeb/DOM/DocumentFragment.h
@@ -27,9 +27,9 @@
#pragma once
#include <AK/FlyString.h>
+#include <LibWeb/DOM/Element.h>
#include <LibWeb/DOM/NonElementParentNode.h>
#include <LibWeb/DOM/ParentNode.h>
-#include <LibWeb/DOM/Element.h>
namespace Web::DOM {
diff --git a/Libraries/LibWeb/DOM/ElementFactory.cpp b/Libraries/LibWeb/DOM/ElementFactory.cpp
index a8081cf88d..12d0cfe696 100644
--- a/Libraries/LibWeb/DOM/ElementFactory.cpp
+++ b/Libraries/LibWeb/DOM/ElementFactory.cpp
@@ -29,18 +29,18 @@
#include <LibWeb/HTML/HTMLAnchorElement.h>
#include <LibWeb/HTML/HTMLAreaElement.h>
#include <LibWeb/HTML/HTMLAudioElement.h>
+#include <LibWeb/HTML/HTMLBRElement.h>
#include <LibWeb/HTML/HTMLBaseElement.h>
#include <LibWeb/HTML/HTMLBlinkElement.h>
#include <LibWeb/HTML/HTMLBodyElement.h>
-#include <LibWeb/HTML/HTMLBRElement.h>
#include <LibWeb/HTML/HTMLButtonElement.h>
#include <LibWeb/HTML/HTMLCanvasElement.h>
+#include <LibWeb/HTML/HTMLDListElement.h>
#include <LibWeb/HTML/HTMLDataElement.h>
#include <LibWeb/HTML/HTMLDataListElement.h>
#include <LibWeb/HTML/HTMLDetailsElement.h>
#include <LibWeb/HTML/HTMLDialogElement.h>
#include <LibWeb/HTML/HTMLDivElement.h>
-#include <LibWeb/HTML/HTMLDListElement.h>
#include <LibWeb/HTML/HTMLEmbedElement.h>
#include <LibWeb/HTML/HTMLFieldSetElement.h>
#include <LibWeb/HTML/HTMLFontElement.h>
@@ -54,9 +54,9 @@
#include <LibWeb/HTML/HTMLIFrameElement.h>
#include <LibWeb/HTML/HTMLImageElement.h>
#include <LibWeb/HTML/HTMLInputElement.h>
+#include <LibWeb/HTML/HTMLLIElement.h>
#include <LibWeb/HTML/HTMLLabelElement.h>
#include <LibWeb/HTML/HTMLLegendElement.h>
-#include <LibWeb/HTML/HTMLLIElement.h>
#include <LibWeb/HTML/HTMLLinkElement.h>
#include <LibWeb/HTML/HTMLMapElement.h>
#include <LibWeb/HTML/HTMLMarqueeElement.h>
@@ -64,8 +64,8 @@
#include <LibWeb/HTML/HTMLMetaElement.h>
#include <LibWeb/HTML/HTMLMeterElement.h>
#include <LibWeb/HTML/HTMLModElement.h>
-#include <LibWeb/HTML/HTMLObjectElement.h>
#include <LibWeb/HTML/HTMLOListElement.h>
+#include <LibWeb/HTML/HTMLObjectElement.h>
#include <LibWeb/HTML/HTMLOptGroupElement.h>
#include <LibWeb/HTML/HTMLOptionElement.h>
#include <LibWeb/HTML/HTMLOutputElement.h>
@@ -87,11 +87,11 @@
#include <LibWeb/HTML/HTMLTableElement.h>
#include <LibWeb/HTML/HTMLTableRowElement.h>
#include <LibWeb/HTML/HTMLTableSectionElement.h>
-#include <LibWeb/HTML/HTMLTextAreaElement.h>
#include <LibWeb/HTML/HTMLTemplateElement.h>
+#include <LibWeb/HTML/HTMLTextAreaElement.h>
#include <LibWeb/HTML/HTMLTimeElement.h>
-#include <LibWeb/HTML/HTMLTrackElement.h>
#include <LibWeb/HTML/HTMLTitleElement.h>
+#include <LibWeb/HTML/HTMLTrackElement.h>
#include <LibWeb/HTML/HTMLUListElement.h>
#include <LibWeb/HTML/HTMLUnknownElement.h>
#include <LibWeb/HTML/HTMLVideoElement.h>
@@ -242,10 +242,9 @@ NonnullRefPtr<Element> create_element(Document& document, const FlyString& tag_n
if (lowercase_tag_name == HTML::TagNames::video)
return adopt(*new HTML::HTMLVideoElement(document, lowercase_tag_name));
if (lowercase_tag_name.is_one_of(
- HTML::TagNames::article, HTML::TagNames::section, HTML::TagNames::nav, HTML::TagNames::aside, HTML::TagNames::hgroup, HTML::TagNames::header, HTML::TagNames::footer, HTML::TagNames::address, HTML::TagNames::dt, HTML::TagNames::dd, HTML::TagNames::figure, HTML::TagNames::figcaption, HTML::TagNames::main, HTML::TagNames::em, HTML::TagNames::strong, HTML::TagNames::small, HTML::TagNames::s, HTML::TagNames::cite, HTML::TagNames::dfn, HTML::TagNames::abbr, HTML::TagNames::ruby, HTML::TagNames::rt, HTML::TagNames::rp, HTML::TagNames::code, HTML::TagNames::var, HTML::TagNames::samp, HTML::TagNames::kbd, HTML::TagNames::sub, HTML::TagNames::sup, HTML::TagNames::i, HTML::TagNames::b, HTML::TagNames::u, HTML::TagNames::mark, HTML::TagNames::bdi, HTML::TagNames::bdo, HTML::TagNames::wbr, HTML::TagNames::summary, HTML::TagNames::noscript,
- // Obsolete
- HTML::TagNames::acronym, HTML::TagNames::basefont, HTML::TagNames::big, HTML::TagNames::center, HTML::TagNames::nobr, HTML::TagNames::noembed, HTML::TagNames::noframes, HTML::TagNames::plaintext, HTML::TagNames::rb, HTML::TagNames::rtc, HTML::TagNames::strike, HTML::TagNames::tt)
- )
+ HTML::TagNames::article, HTML::TagNames::section, HTML::TagNames::nav, HTML::TagNames::aside, HTML::TagNames::hgroup, HTML::TagNames::header, HTML::TagNames::footer, HTML::TagNames::address, HTML::TagNames::dt, HTML::TagNames::dd, HTML::TagNames::figure, HTML::TagNames::figcaption, HTML::TagNames::main, HTML::TagNames::em, HTML::TagNames::strong, HTML::TagNames::small, HTML::TagNames::s, HTML::TagNames::cite, HTML::TagNames::dfn, HTML::TagNames::abbr, HTML::TagNames::ruby, HTML::TagNames::rt, HTML::TagNames::rp, HTML::TagNames::code, HTML::TagNames::var, HTML::TagNames::samp, HTML::TagNames::kbd, HTML::TagNames::sub, HTML::TagNames::sup, HTML::TagNames::i, HTML::TagNames::b, HTML::TagNames::u, HTML::TagNames::mark, HTML::TagNames::bdi, HTML::TagNames::bdo, HTML::TagNames::wbr, HTML::TagNames::summary, HTML::TagNames::noscript,
+ // Obsolete
+ HTML::TagNames::acronym, HTML::TagNames::basefont, HTML::TagNames::big, HTML::TagNames::center, HTML::TagNames::nobr, HTML::TagNames::noembed, HTML::TagNames::noframes, HTML::TagNames::plaintext, HTML::TagNames::rb, HTML::TagNames::rtc, HTML::TagNames::strike, HTML::TagNames::tt))
return adopt(*new HTML::HTMLElement(document, lowercase_tag_name));
if (lowercase_tag_name == SVG::TagNames::svg)
return adopt(*new SVG::SVGSVGElement(document, lowercase_tag_name));
diff --git a/Libraries/LibWeb/DOM/ParentNode.h b/Libraries/LibWeb/DOM/ParentNode.h
index 23f0999795..f7648063f2 100644
--- a/Libraries/LibWeb/DOM/ParentNode.h
+++ b/Libraries/LibWeb/DOM/ParentNode.h
@@ -32,8 +32,10 @@ namespace Web::DOM {
class ParentNode : public Node {
public:
- template<typename F> void for_each_child(F) const;
- template<typename F> void for_each_child(F);
+ template<typename F>
+ void for_each_child(F) const;
+ template<typename F>
+ void for_each_child(F);
RefPtr<Element> query_selector(const StringView&);
NonnullRefPtrVector<Element> query_selector_all(const StringView&);
diff --git a/Libraries/LibWeb/DOM/TagNames.cpp b/Libraries/LibWeb/DOM/TagNames.cpp
index 7415a0fa33..13ecc52147 100644
--- a/Libraries/LibWeb/DOM/TagNames.cpp
+++ b/Libraries/LibWeb/DOM/TagNames.cpp
@@ -34,7 +34,10 @@ namespace TagNames {
ENUMERATE_HTML_TAGS
#undef __ENUMERATE_HTML_TAG
+ // clang-format off
+// FIXME: clang-format gets confused here. Why?
[[gnu::constructor]] static void initialize()
+// clang-format off
{
static bool s_initialized = false;
if (s_initialized)
diff --git a/Libraries/LibWeb/HTML/AttributeNames.cpp b/Libraries/LibWeb/HTML/AttributeNames.cpp
index 8fcdd7d944..575b92e789 100644
--- a/Libraries/LibWeb/HTML/AttributeNames.cpp
+++ b/Libraries/LibWeb/HTML/AttributeNames.cpp
@@ -34,7 +34,10 @@ namespace AttributeNames {
ENUMERATE_HTML_ATTRIBUTES
#undef __ENUMERATE_HTML_ATTRIBUTE
+ // clang-format off
+// FIXME: clang-format gets confused here. Why?
[[gnu::constructor]] static void initialize()
+// clang-format off
{
static bool s_initialized = false;
if (s_initialized)
diff --git a/Libraries/LibWeb/HTML/HTMLFieldSetElement.h b/Libraries/LibWeb/HTML/HTMLFieldSetElement.h
index e5ac667d5c..6224c604e1 100644
--- a/Libraries/LibWeb/HTML/HTMLFieldSetElement.h
+++ b/Libraries/LibWeb/HTML/HTMLFieldSetElement.h
@@ -37,7 +37,8 @@ public:
HTMLFieldSetElement(DOM::Document&, const FlyString& local_name);
virtual ~HTMLFieldSetElement() override;
- const String& type() const {
+ const String& type() const
+ {
static String fieldset = "fieldset";
return fieldset;
}
diff --git a/Libraries/LibWeb/HTML/HTMLFormElement.cpp b/Libraries/LibWeb/HTML/HTMLFormElement.cpp
index 22ebc7a546..566c82022c 100644
--- a/Libraries/LibWeb/HTML/HTMLFormElement.cpp
+++ b/Libraries/LibWeb/HTML/HTMLFormElement.cpp
@@ -27,8 +27,8 @@
#include <AK/StringBuilder.h>
#include <LibWeb/HTML/HTMLFormElement.h>
#include <LibWeb/HTML/HTMLInputElement.h>
-#include <LibWeb/Page/Frame.h>
#include <LibWeb/InProcessWebView.h>
+#include <LibWeb/Page/Frame.h>
#include <LibWeb/URLEncoder.h>
namespace Web::HTML {
diff --git a/Libraries/LibWeb/HTML/HTMLOutputElement.h b/Libraries/LibWeb/HTML/HTMLOutputElement.h
index 139d1f028b..792711ba57 100644
--- a/Libraries/LibWeb/HTML/HTMLOutputElement.h
+++ b/Libraries/LibWeb/HTML/HTMLOutputElement.h
@@ -37,7 +37,8 @@ public:
HTMLOutputElement(DOM::Document&, const FlyString& local_name);
virtual ~HTMLOutputElement() override;
- const String& type() const {
+ const String& type() const
+ {
static String output = "output";
return output;
}
diff --git a/Libraries/LibWeb/HTML/HTMLScriptElement.cpp b/Libraries/LibWeb/HTML/HTMLScriptElement.cpp
index 4dc71914dc..21d5ff1124 100644
--- a/Libraries/LibWeb/HTML/HTMLScriptElement.cpp
+++ b/Libraries/LibWeb/HTML/HTMLScriptElement.cpp
@@ -28,8 +28,8 @@
#include <LibJS/Interpreter.h>
#include <LibJS/Parser.h>
#include <LibWeb/DOM/Document.h>
-#include <LibWeb/HTML/HTMLScriptElement.h>
#include <LibWeb/DOM/Text.h>
+#include <LibWeb/HTML/HTMLScriptElement.h>
#include <LibWeb/Loader/ResourceLoader.h>
namespace Web::HTML {
diff --git a/Libraries/LibWeb/HTML/HTMLTextAreaElement.h b/Libraries/LibWeb/HTML/HTMLTextAreaElement.h
index d1c4629570..7dddf76a1b 100644
--- a/Libraries/LibWeb/HTML/HTMLTextAreaElement.h
+++ b/Libraries/LibWeb/HTML/HTMLTextAreaElement.h
@@ -37,7 +37,8 @@ public:
HTMLTextAreaElement(DOM::Document&, const FlyString& local_name);
virtual ~HTMLTextAreaElement() override;
- const String& type() const {
+ const String& type() const
+ {
static String textarea = "textarea";
return textarea;
}
diff --git a/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.cpp b/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.cpp
index ddab59c5c1..a05e198037 100644
--- a/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.cpp
+++ b/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.cpp
@@ -87,24 +87,24 @@ namespace Web::HTML {
} while (0)
#define EMIT_CHARACTER_AND_RECONSUME_IN(code_point, new_state) \
- do { \
+ do { \
m_queued_tokens.enqueue(HTMLToken::make_character(code_point)); \
- will_reconsume_in(State::new_state); \
- m_state = State::new_state; \
- goto new_state; \
+ will_reconsume_in(State::new_state); \
+ m_state = State::new_state; \
+ goto new_state; \
} while (0)
-#define FLUSH_CODEPOINTS_CONSUMED_AS_A_CHARACTER_REFERENCE \
- do { \
- for (auto code_point : m_temporary_buffer) { \
- if (consumed_as_part_of_an_attribute()) { \
+#define FLUSH_CODEPOINTS_CONSUMED_AS_A_CHARACTER_REFERENCE \
+ do { \
+ for (auto code_point : m_temporary_buffer) { \
+ if (consumed_as_part_of_an_attribute()) { \
m_current_token.m_tag.attributes.last().value_builder.append_code_point(code_point); \
- } else { \
- create_new_token(HTMLToken::Type::Character); \
+ } else { \
+ create_new_token(HTMLToken::Type::Character); \
m_current_token.m_comment_or_character.data.append_code_point(code_point); \
- m_queued_tokens.enqueue(m_current_token); \
- } \
- } \
+ m_queued_tokens.enqueue(m_current_token); \
+ } \
+ } \
} while (0)
#define DONT_CONSUME_NEXT_INPUT_CHARACTER \
@@ -159,21 +159,21 @@ namespace Web::HTML {
return m_queued_tokens.dequeue(); \
} while (0)
-#define EMIT_CHARACTER(code_point) \
- do { \
- create_new_token(HTMLToken::Type::Character); \
+#define EMIT_CHARACTER(code_point) \
+ do { \
+ create_new_token(HTMLToken::Type::Character); \
m_current_token.m_comment_or_character.data.append_code_point(code_point); \
- m_queued_tokens.enqueue(m_current_token); \
- return m_queued_tokens.dequeue(); \
+ m_queued_tokens.enqueue(m_current_token); \
+ return m_queued_tokens.dequeue(); \
} while (0)
#define EMIT_CURRENT_CHARACTER \
EMIT_CHARACTER(current_input_character.value());
#define SWITCH_TO_AND_EMIT_CHARACTER(code_point, new_state) \
- do { \
- will_switch_to(State::new_state); \
- m_state = State::new_state; \
+ do { \
+ will_switch_to(State::new_state); \
+ m_state = State::new_state; \
EMIT_CHARACTER(code_point); \
} while (0)
diff --git a/Libraries/LibWeb/Layout/LayoutDocument.cpp b/Libraries/LibWeb/Layout/LayoutDocument.cpp
index c93792b7f9..772ca83df9 100644
--- a/Libraries/LibWeb/Layout/LayoutDocument.cpp
+++ b/Libraries/LibWeb/Layout/LayoutDocument.cpp
@@ -146,7 +146,7 @@ void LayoutDocument::recompute_selection_states()
});
}
-void LayoutDocument::set_selection(const LayoutRange & selection)
+void LayoutDocument::set_selection(const LayoutRange& selection)
{
m_selection = selection;
recompute_selection_states();
diff --git a/Libraries/LibWeb/Layout/LayoutFrame.cpp b/Libraries/LibWeb/Layout/LayoutFrame.cpp
index 7108065460..59dec1ea02 100644
--- a/Libraries/LibWeb/Layout/LayoutFrame.cpp
+++ b/Libraries/LibWeb/Layout/LayoutFrame.cpp
@@ -30,10 +30,10 @@
#include <LibGfx/Font.h>
#include <LibGfx/StylePainter.h>
#include <LibWeb/DOM/Document.h>
+#include <LibWeb/InProcessWebView.h>
#include <LibWeb/Layout/LayoutDocument.h>
#include <LibWeb/Layout/LayoutFrame.h>
#include <LibWeb/Page/Frame.h>
-#include <LibWeb/InProcessWebView.h>
//#define DEBUG_HIGHLIGHT_FOCUSED_FRAME
diff --git a/Libraries/LibWeb/Layout/LayoutFrame.h b/Libraries/LibWeb/Layout/LayoutFrame.h
index 9fdad0f680..09a1e0e332 100644
--- a/Libraries/LibWeb/Layout/LayoutFrame.h
+++ b/Libraries/LibWeb/Layout/LayoutFrame.h
@@ -26,8 +26,8 @@
#pragma once
-#include <LibWeb/Layout/LayoutReplaced.h>
#include <LibWeb/HTML/HTMLIFrameElement.h>
+#include <LibWeb/Layout/LayoutReplaced.h>
namespace Web {
diff --git a/Libraries/LibWeb/Layout/LayoutPosition.h b/Libraries/LibWeb/Layout/LayoutPosition.h
index 7eaf47ec78..fc5fb86e5d 100644
--- a/Libraries/LibWeb/Layout/LayoutPosition.h
+++ b/Libraries/LibWeb/Layout/LayoutPosition.h
@@ -39,7 +39,7 @@ struct LayoutPosition {
class LayoutRange {
public:
- LayoutRange() {}
+ LayoutRange() { }
LayoutRange(const LayoutPosition& start, const LayoutPosition& end)
: m_start(start)
, m_end(end)
diff --git a/Libraries/LibWeb/Layout/LayoutWidget.cpp b/Libraries/LibWeb/Layout/LayoutWidget.cpp
index b4a8d5def5..fe79e0aa67 100644
--- a/Libraries/LibWeb/Layout/LayoutWidget.cpp
+++ b/Libraries/LibWeb/Layout/LayoutWidget.cpp
@@ -30,9 +30,9 @@
#include <LibGfx/Font.h>
#include <LibGfx/StylePainter.h>
#include <LibWeb/DOM/Document.h>
+#include <LibWeb/InProcessWebView.h>
#include <LibWeb/Layout/LayoutWidget.h>
#include <LibWeb/Page/Frame.h>
-#include <LibWeb/InProcessWebView.h>
namespace Web {
diff --git a/Libraries/LibWeb/Layout/LineBox.cpp b/Libraries/LibWeb/Layout/LineBox.cpp
index 5ecaa93d01..bf2840faf8 100644
--- a/Libraries/LibWeb/Layout/LineBox.cpp
+++ b/Libraries/LibWeb/Layout/LineBox.cpp
@@ -25,9 +25,9 @@
*/
#include <AK/Utf8View.h>
+#include <LibWeb/Layout/LayoutBox.h>
#include <LibWeb/Layout/LayoutNode.h>
#include <LibWeb/Layout/LayoutText.h>
-#include <LibWeb/Layout/LayoutBox.h>
#include <LibWeb/Layout/LineBox.h>
#include <ctype.h>
diff --git a/Libraries/LibWeb/Layout/LineBoxFragment.h b/Libraries/LibWeb/Layout/LineBoxFragment.h
index c7ce9a1903..f2c71b4ff9 100644
--- a/Libraries/LibWeb/Layout/LineBoxFragment.h
+++ b/Libraries/LibWeb/Layout/LineBoxFragment.h
@@ -27,8 +27,8 @@
#pragma once
#include <AK/Weakable.h>
-#include <LibGfx/Rect.h>
#include <LibGfx/Forward.h>
+#include <LibGfx/Rect.h>
#include <LibWeb/Forward.h>
namespace Web {
diff --git a/Libraries/LibWeb/Page/Page.cpp b/Libraries/LibWeb/Page/Page.cpp
index e986dd45ba..36e56d50b2 100644
--- a/Libraries/LibWeb/Page/Page.cpp
+++ b/Libraries/LibWeb/Page/Page.cpp
@@ -24,9 +24,9 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <LibWeb/InProcessWebView.h>
#include <LibWeb/Page/Frame.h>
#include <LibWeb/Page/Page.h>
-#include <LibWeb/InProcessWebView.h>
namespace Web {
diff --git a/Libraries/LibWeb/SVG/SVGPathElement.cpp b/Libraries/LibWeb/SVG/SVGPathElement.cpp
index a1a5ab8385..0bcbc218a0 100644
--- a/Libraries/LibWeb/SVG/SVGPathElement.cpp
+++ b/Libraries/LibWeb/SVG/SVGPathElement.cpp
@@ -112,7 +112,8 @@ Vector<PathInstruction> PathDataParser::parse()
return m_instructions;
}
-void PathDataParser::parse_drawto() {
+void PathDataParser::parse_drawto()
+{
if (match('M') || match('m')) {
parse_moveto();
} else if (match('Z') || match('z')) {
@@ -611,14 +612,13 @@ void SVGPathElement::paint(Gfx::Painter& painter, const SVGPaintingContext& cont
auto dx_end_control = last_point.dx_relative_to(m_previous_control_point);
auto dy_end_control = last_point.dy_relative_to(m_previous_control_point);
- auto control_point = Gfx::FloatPoint {last_point.x() + dx_end_control, last_point.y() + dy_end_control};
+ auto control_point = Gfx::FloatPoint { last_point.x() + dx_end_control, last_point.y() + dy_end_control };
- Gfx::FloatPoint end_point = {data[0], data[1]};
+ Gfx::FloatPoint end_point = { data[0], data[1] };
if (absolute) {
path.quadratic_bezier_curve_to(control_point, end_point);
- }
- else {
+ } else {
path.quadratic_bezier_curve_to(control_point, end_point + last_point);
}
diff --git a/Libraries/LibWeb/SVG/SVGPathElement.h b/Libraries/LibWeb/SVG/SVGPathElement.h
index c793cccc58..4091c8e53f 100644
--- a/Libraries/LibWeb/SVG/SVGPathElement.h
+++ b/Libraries/LibWeb/SVG/SVGPathElement.h
@@ -113,7 +113,6 @@ public:
private:
Vector<PathInstruction> m_instructions;
Gfx::FloatPoint m_previous_control_point = {};
-
};
}
diff --git a/Libraries/LibWeb/SVG/SVGSVGElement.cpp b/Libraries/LibWeb/SVG/SVGSVGElement.cpp
index 36898d4bc3..a7391b889e 100644
--- a/Libraries/LibWeb/SVG/SVGSVGElement.cpp
+++ b/Libraries/LibWeb/SVG/SVGSVGElement.cpp
@@ -28,9 +28,9 @@
#include <LibWeb/CSS/StyleResolver.h>
#include <LibWeb/DOM/Document.h>
#include <LibWeb/DOM/Event.h>
+#include <LibWeb/Layout/LayoutSVG.h>
#include <LibWeb/SVG/SVGPathElement.h>
#include <LibWeb/SVG/SVGSVGElement.h>
-#include <LibWeb/Layout/LayoutSVG.h>
#include <ctype.h>
namespace Web::SVG {
diff --git a/Libraries/LibWeb/SVG/TagNames.cpp b/Libraries/LibWeb/SVG/TagNames.cpp
index 56935e35ea..00577803ee 100644
--- a/Libraries/LibWeb/SVG/TagNames.cpp
+++ b/Libraries/LibWeb/SVG/TagNames.cpp
@@ -29,10 +29,13 @@
namespace Web::SVG::TagNames {
#define __ENUMERATE_SVG_TAG(name) FlyString name;
- ENUMERATE_SVG_TAGS
+ENUMERATE_SVG_TAGS
#undef __ENUMERATE_SVG_TAG
+ // clang-format off
+// FIXME: clang-format gets confused here. Why?
[[gnu::constructor]] static void initialize()
+// clang-format off
{
static bool s_initialized = false;
if (s_initialized)
diff --git a/Libraries/LibWeb/SVG/TagNames.h b/Libraries/LibWeb/SVG/TagNames.h
index 9ec972ccba..682d678a4e 100644
--- a/Libraries/LibWeb/SVG/TagNames.h
+++ b/Libraries/LibWeb/SVG/TagNames.h
@@ -30,11 +30,11 @@
namespace Web::SVG::TagNames {
-#define ENUMERATE_SVG_GRAPHICS_TAGS \
- __ENUMERATE_SVG_TAG(svg) \
- __ENUMERATE_SVG_TAG(path) \
+#define ENUMERATE_SVG_GRAPHICS_TAGS \
+ __ENUMERATE_SVG_TAG(svg) \
+ __ENUMERATE_SVG_TAG(path)
-#define ENUMERATE_SVG_TAGS \
+#define ENUMERATE_SVG_TAGS \
ENUMERATE_SVG_GRAPHICS_TAGS
#define __ENUMERATE_SVG_TAG(name) extern FlyString name;
diff --git a/Libraries/LibWeb/URLEncoder.h b/Libraries/LibWeb/URLEncoder.h
index b12cf2e29d..ad8d3d14aa 100644
--- a/Libraries/LibWeb/URLEncoder.h
+++ b/Libraries/LibWeb/URLEncoder.h
@@ -39,4 +39,3 @@ struct URLQueryParam {
String urlencode(const Vector<URLQueryParam>&);
}
-