1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:47:44 +00:00

Meta+LibHTTP through LibWeb: Make clang-format-10 clean

This commit is contained in:
Ben Wiederhake 2020-09-18 09:49:51 +02:00 committed by Andreas Kling
parent ede5dbd7b3
commit 08f9bc26a6
65 changed files with 297 additions and 273 deletions

View file

@ -72,7 +72,6 @@ TextEditor::TextEditor(Type type)
}); });
m_automatic_selection_scroll_timer->stop(); m_automatic_selection_scroll_timer->stop();
create_actions(); create_actions();
} }
TextEditor::~TextEditor() TextEditor::~TextEditor()

View file

@ -37,7 +37,8 @@
namespace JS { namespace JS {
static Value parse_simplified_iso8601(const String& iso_8601) { static Value parse_simplified_iso8601(const String& iso_8601)
{
// Date.parse() is allowed to accept many formats. We strictly only accept things matching // Date.parse() is allowed to accept many formats. We strictly only accept things matching
// http://www.ecma-international.org/ecma-262/#sec-date-time-string-format // http://www.ecma-international.org/ecma-262/#sec-date-time-string-format
GenericLexer lexer(iso_8601); GenericLexer lexer(iso_8601);

View file

@ -32,6 +32,7 @@ namespace JS {
class DatePrototype final : public Object { class DatePrototype final : public Object {
JS_OBJECT(DatePrototype, Object); JS_OBJECT(DatePrototype, Object);
public: public:
explicit DatePrototype(GlobalObject&); explicit DatePrototype(GlobalObject&);
virtual void initialize(GlobalObject&) override; virtual void initialize(GlobalObject&) override;

View file

@ -56,7 +56,7 @@ Error::~Error()
: Error(#ClassName, message, prototype) \ : Error(#ClassName, message, prototype) \
{ \ { \
} \ } \
ClassName::~ClassName() { } \ ClassName::~ClassName() { }
JS_ENUMERATE_ERROR_SUBCLASSES JS_ENUMERATE_ERROR_SUBCLASSES
#undef __JS_ENUMERATE #undef __JS_ENUMERATE

View file

@ -157,7 +157,6 @@
M(BadArgCountAtLeastOne, "%s() needs at least one argument") \ M(BadArgCountAtLeastOne, "%s() needs at least one argument") \
M(BadArgCountMany, "%s() needs %s arguments") M(BadArgCountMany, "%s() needs %s arguments")
namespace JS { namespace JS {
class ErrorType { class ErrorType {
@ -167,7 +166,10 @@ public:
JS_ENUMERATE_ERROR_TYPES(__ENUMERATE_JS_ERROR) JS_ENUMERATE_ERROR_TYPES(__ENUMERATE_JS_ERROR)
#undef __ENUMERATE_JS_ERROR #undef __ENUMERATE_JS_ERROR
const char* message() const { return m_message; }; const char* message() const
{
return m_message;
}
private: private:
explicit ErrorType(const char* message) explicit ErrorType(const char* message)
@ -179,4 +181,3 @@ private:
}; };
} }

View file

@ -78,7 +78,6 @@ private:
Object* m_##snake_name##_prototype { nullptr }; Object* m_##snake_name##_prototype { nullptr };
JS_ENUMERATE_ITERATOR_PROTOTYPES JS_ENUMERATE_ITERATOR_PROTOTYPES
#undef __JS_ENUMERATE #undef __JS_ENUMERATE
}; };
template<typename ConstructorType> template<typename ConstructorType>

View file

@ -33,10 +33,12 @@
namespace JS { namespace JS {
static const u8 max_precision_for_radix[37] = { static const u8 max_precision_for_radix[37] = {
// clang-format off
0, 0, 52, 32, 26, 22, 20, 18, 17, 16, 0, 0, 52, 32, 26, 22, 20, 18, 17, 16,
15, 15, 14, 14, 13, 13, 13, 12, 12, 12, 15, 15, 14, 14, 13, 13, 13, 12, 12, 12,
12, 11, 11, 11, 11, 11, 11, 10, 10, 10, 12, 11, 11, 11, 11, 11, 11, 10, 10, 10,
10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
// clang-format on
}; };
static char digits[] = "0123456789abcdefghijklmnopqrstuvwxyz"; static char digits[] = "0123456789abcdefghijklmnopqrstuvwxyz";

View file

@ -26,8 +26,8 @@
#pragma once #pragma once
#include <AK/Types.h>
#include <AK/LogStream.h> #include <AK/LogStream.h>
#include <AK/Types.h>
namespace JS { namespace JS {

View file

@ -32,7 +32,6 @@
#include <LibJS/Runtime/RegExpObject.h> #include <LibJS/Runtime/RegExpObject.h>
#include <LibJS/Runtime/Value.h> #include <LibJS/Runtime/Value.h>
namespace JS { namespace JS {
RegExpObject* RegExpObject::create(GlobalObject& global_object, String content, String flags) RegExpObject* RegExpObject::create(GlobalObject& global_object, String content, String flags)

View file

@ -25,8 +25,8 @@
*/ */
#include <AK/Utf8View.h> #include <AK/Utf8View.h>
#include <LibJS/Runtime/StringIterator.h>
#include <LibJS/Runtime/GlobalObject.h> #include <LibJS/Runtime/GlobalObject.h>
#include <LibJS/Runtime/StringIterator.h>
namespace JS { namespace JS {

View file

@ -25,11 +25,11 @@
*/ */
#include <AK/StringBuilder.h> #include <AK/StringBuilder.h>
#include <LibJS/Runtime/StringIterator.h>
#include <LibJS/Runtime/StringIteratorPrototype.h>
#include <LibJS/Runtime/Error.h> #include <LibJS/Runtime/Error.h>
#include <LibJS/Runtime/GlobalObject.h> #include <LibJS/Runtime/GlobalObject.h>
#include <LibJS/Runtime/IteratorOperations.h> #include <LibJS/Runtime/IteratorOperations.h>
#include <LibJS/Runtime/StringIterator.h>
#include <LibJS/Runtime/StringIteratorPrototype.h>
namespace JS { namespace JS {

View file

@ -32,8 +32,8 @@
#include <LibJS/Runtime/Error.h> #include <LibJS/Runtime/Error.h>
#include <LibJS/Runtime/GlobalObject.h> #include <LibJS/Runtime/GlobalObject.h>
#include <LibJS/Runtime/PrimitiveString.h> #include <LibJS/Runtime/PrimitiveString.h>
#include <LibJS/Runtime/StringObject.h>
#include <LibJS/Runtime/StringIterator.h> #include <LibJS/Runtime/StringIterator.h>
#include <LibJS/Runtime/StringObject.h>
#include <LibJS/Runtime/StringPrototype.h> #include <LibJS/Runtime/StringPrototype.h>
#include <LibJS/Runtime/Value.h> #include <LibJS/Runtime/Value.h>
#include <string.h> #include <string.h>

View file

@ -34,7 +34,6 @@
namespace JS { namespace JS {
SymbolObject* SymbolObject::create(GlobalObject& global_object, Symbol& primitive_symbol) SymbolObject* SymbolObject::create(GlobalObject& global_object, Symbol& primitive_symbol)
{ {
return global_object.heap().allocate<SymbolObject>(global_object, primitive_symbol, *global_object.symbol_prototype()); return global_object.heap().allocate<SymbolObject>(global_object, primitive_symbol, *global_object.symbol_prototype());

View file

@ -28,7 +28,10 @@
#include <math.h> #include <math.h>
#define EXPECT_CLOSE(a, b) { EXPECT(fabs(a - b) < 0.000001); } #define EXPECT_CLOSE(a, b) \
{ \
EXPECT(fabs(a - b) < 0.000001); \
}
TEST_CASE(trig) TEST_CASE(trig)
{ {

View file

@ -34,7 +34,10 @@ namespace Markdown {
class Paragraph final : public Block { class Paragraph final : public Block {
public: public:
explicit Paragraph(Text&& text) : m_text(move(text)) {} explicit Paragraph(Text&& text)
: m_text(move(text))
{
}
virtual ~Paragraph() override { } virtual ~Paragraph() override { }
virtual String render_to_html() const override; virtual String render_to_html() const override;

View file

@ -34,6 +34,7 @@ namespace Markdown {
class Text final { class Text final {
AK_MAKE_NONCOPYABLE(Text); AK_MAKE_NONCOPYABLE(Text);
public: public:
struct Style { struct Style {
bool emph { false }; bool emph { false };

View file

@ -83,8 +83,7 @@ static int create_thread(void* (*entry)(void*), void* argument, PthreadAttrImpl*
return syscall(SC_create_thread, pthread_create_helper, thread_params); return syscall(SC_create_thread, pthread_create_helper, thread_params);
} }
[[noreturn]] [[noreturn]] static void exit_thread(void* code)
static void exit_thread(void* code)
{ {
syscall(SC_exit_thread, code); syscall(SC_exit_thread, code);
ASSERT_NOT_REACHED(); ASSERT_NOT_REACHED();

View file

@ -78,8 +78,14 @@ int pthread_setschedparam(pthread_t thread, int policy, const struct sched_param
#define PTHREAD_MUTEX_NORMAL 0 #define PTHREAD_MUTEX_NORMAL 0
#define PTHREAD_MUTEX_RECURSIVE 1 #define PTHREAD_MUTEX_RECURSIVE 1
#define PTHREAD_MUTEX_DEFAULT PTHREAD_MUTEX_NORMAL #define PTHREAD_MUTEX_DEFAULT PTHREAD_MUTEX_NORMAL
#define PTHREAD_MUTEX_INITIALIZER { 0, 0, 0, PTHREAD_MUTEX_DEFAULT } #define PTHREAD_MUTEX_INITIALIZER \
#define PTHREAD_COND_INITIALIZER { 0, 0, CLOCK_MONOTONIC } { \
0, 0, 0, PTHREAD_MUTEX_DEFAULT \
}
#define PTHREAD_COND_INITIALIZER \
{ \
0, 0, CLOCK_MONOTONIC \
}
int pthread_key_create(pthread_key_t* key, void (*destructor)(void*)); int pthread_key_create(pthread_key_t* key, void (*destructor)(void*));
int pthread_key_delete(pthread_key_t key); int pthread_key_delete(pthread_key_t key);

View file

@ -24,10 +24,10 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#include <LibThread/BackgroundAction.h>
#include <LibThread/Thread.h>
#include <LibThread/Lock.h>
#include <AK/Queue.h> #include <AK/Queue.h>
#include <LibThread/BackgroundAction.h>
#include <LibThread/Lock.h>
#include <LibThread/Thread.h>
static LibThread::Lockable<Queue<Function<void()>>>* s_all_actions; static LibThread::Lockable<Queue<Function<void()>>>* s_all_actions;
static LibThread::Thread* s_background_thread; static LibThread::Thread* s_background_thread;

View file

@ -27,9 +27,9 @@
#include <LibWeb/Bindings/CharacterDataWrapper.h> #include <LibWeb/Bindings/CharacterDataWrapper.h>
#include <LibWeb/Bindings/CommentWrapper.h> #include <LibWeb/Bindings/CommentWrapper.h>
#include <LibWeb/Bindings/DocumentWrapper.h>
#include <LibWeb/Bindings/DocumentFragmentWrapper.h> #include <LibWeb/Bindings/DocumentFragmentWrapper.h>
#include <LibWeb/Bindings/DocumentTypeWrapper.h> #include <LibWeb/Bindings/DocumentTypeWrapper.h>
#include <LibWeb/Bindings/DocumentWrapper.h>
#include <LibWeb/Bindings/HTMLAnchorElementWrapper.h> #include <LibWeb/Bindings/HTMLAnchorElementWrapper.h>
#include <LibWeb/Bindings/HTMLAreaElementWrapper.h> #include <LibWeb/Bindings/HTMLAreaElementWrapper.h>
#include <LibWeb/Bindings/HTMLAudioElementWrapper.h> #include <LibWeb/Bindings/HTMLAudioElementWrapper.h>

View file

@ -29,10 +29,10 @@
#include <LibGfx/Palette.h> #include <LibGfx/Palette.h>
#include <LibWeb/CSS/StyleValue.h> #include <LibWeb/CSS/StyleValue.h>
#include <LibWeb/DOM/Document.h> #include <LibWeb/DOM/Document.h>
#include <LibWeb/InProcessWebView.h>
#include <LibWeb/Loader/LoadRequest.h> #include <LibWeb/Loader/LoadRequest.h>
#include <LibWeb/Loader/ResourceLoader.h> #include <LibWeb/Loader/ResourceLoader.h>
#include <LibWeb/Page/Frame.h> #include <LibWeb/Page/Frame.h>
#include <LibWeb/InProcessWebView.h>
namespace Web::CSS { namespace Web::CSS {

View file

@ -51,11 +51,11 @@
#include <LibWeb/HTML/HTMLHtmlElement.h> #include <LibWeb/HTML/HTMLHtmlElement.h>
#include <LibWeb/HTML/HTMLScriptElement.h> #include <LibWeb/HTML/HTMLScriptElement.h>
#include <LibWeb/HTML/HTMLTitleElement.h> #include <LibWeb/HTML/HTMLTitleElement.h>
#include <LibWeb/InProcessWebView.h>
#include <LibWeb/Layout/LayoutDocument.h> #include <LibWeb/Layout/LayoutDocument.h>
#include <LibWeb/Layout/LayoutTreeBuilder.h> #include <LibWeb/Layout/LayoutTreeBuilder.h>
#include <LibWeb/Origin.h> #include <LibWeb/Origin.h>
#include <LibWeb/Page/Frame.h> #include <LibWeb/Page/Frame.h>
#include <LibWeb/InProcessWebView.h>
#include <LibWeb/SVG/TagNames.h> #include <LibWeb/SVG/TagNames.h>
#include <stdio.h> #include <stdio.h>

View file

@ -27,9 +27,9 @@
#pragma once #pragma once
#include <AK/FlyString.h> #include <AK/FlyString.h>
#include <LibWeb/DOM/Element.h>
#include <LibWeb/DOM/NonElementParentNode.h> #include <LibWeb/DOM/NonElementParentNode.h>
#include <LibWeb/DOM/ParentNode.h> #include <LibWeb/DOM/ParentNode.h>
#include <LibWeb/DOM/Element.h>
namespace Web::DOM { namespace Web::DOM {

View file

@ -29,18 +29,18 @@
#include <LibWeb/HTML/HTMLAnchorElement.h> #include <LibWeb/HTML/HTMLAnchorElement.h>
#include <LibWeb/HTML/HTMLAreaElement.h> #include <LibWeb/HTML/HTMLAreaElement.h>
#include <LibWeb/HTML/HTMLAudioElement.h> #include <LibWeb/HTML/HTMLAudioElement.h>
#include <LibWeb/HTML/HTMLBRElement.h>
#include <LibWeb/HTML/HTMLBaseElement.h> #include <LibWeb/HTML/HTMLBaseElement.h>
#include <LibWeb/HTML/HTMLBlinkElement.h> #include <LibWeb/HTML/HTMLBlinkElement.h>
#include <LibWeb/HTML/HTMLBodyElement.h> #include <LibWeb/HTML/HTMLBodyElement.h>
#include <LibWeb/HTML/HTMLBRElement.h>
#include <LibWeb/HTML/HTMLButtonElement.h> #include <LibWeb/HTML/HTMLButtonElement.h>
#include <LibWeb/HTML/HTMLCanvasElement.h> #include <LibWeb/HTML/HTMLCanvasElement.h>
#include <LibWeb/HTML/HTMLDListElement.h>
#include <LibWeb/HTML/HTMLDataElement.h> #include <LibWeb/HTML/HTMLDataElement.h>
#include <LibWeb/HTML/HTMLDataListElement.h> #include <LibWeb/HTML/HTMLDataListElement.h>
#include <LibWeb/HTML/HTMLDetailsElement.h> #include <LibWeb/HTML/HTMLDetailsElement.h>
#include <LibWeb/HTML/HTMLDialogElement.h> #include <LibWeb/HTML/HTMLDialogElement.h>
#include <LibWeb/HTML/HTMLDivElement.h> #include <LibWeb/HTML/HTMLDivElement.h>
#include <LibWeb/HTML/HTMLDListElement.h>
#include <LibWeb/HTML/HTMLEmbedElement.h> #include <LibWeb/HTML/HTMLEmbedElement.h>
#include <LibWeb/HTML/HTMLFieldSetElement.h> #include <LibWeb/HTML/HTMLFieldSetElement.h>
#include <LibWeb/HTML/HTMLFontElement.h> #include <LibWeb/HTML/HTMLFontElement.h>
@ -54,9 +54,9 @@
#include <LibWeb/HTML/HTMLIFrameElement.h> #include <LibWeb/HTML/HTMLIFrameElement.h>
#include <LibWeb/HTML/HTMLImageElement.h> #include <LibWeb/HTML/HTMLImageElement.h>
#include <LibWeb/HTML/HTMLInputElement.h> #include <LibWeb/HTML/HTMLInputElement.h>
#include <LibWeb/HTML/HTMLLIElement.h>
#include <LibWeb/HTML/HTMLLabelElement.h> #include <LibWeb/HTML/HTMLLabelElement.h>
#include <LibWeb/HTML/HTMLLegendElement.h> #include <LibWeb/HTML/HTMLLegendElement.h>
#include <LibWeb/HTML/HTMLLIElement.h>
#include <LibWeb/HTML/HTMLLinkElement.h> #include <LibWeb/HTML/HTMLLinkElement.h>
#include <LibWeb/HTML/HTMLMapElement.h> #include <LibWeb/HTML/HTMLMapElement.h>
#include <LibWeb/HTML/HTMLMarqueeElement.h> #include <LibWeb/HTML/HTMLMarqueeElement.h>
@ -64,8 +64,8 @@
#include <LibWeb/HTML/HTMLMetaElement.h> #include <LibWeb/HTML/HTMLMetaElement.h>
#include <LibWeb/HTML/HTMLMeterElement.h> #include <LibWeb/HTML/HTMLMeterElement.h>
#include <LibWeb/HTML/HTMLModElement.h> #include <LibWeb/HTML/HTMLModElement.h>
#include <LibWeb/HTML/HTMLObjectElement.h>
#include <LibWeb/HTML/HTMLOListElement.h> #include <LibWeb/HTML/HTMLOListElement.h>
#include <LibWeb/HTML/HTMLObjectElement.h>
#include <LibWeb/HTML/HTMLOptGroupElement.h> #include <LibWeb/HTML/HTMLOptGroupElement.h>
#include <LibWeb/HTML/HTMLOptionElement.h> #include <LibWeb/HTML/HTMLOptionElement.h>
#include <LibWeb/HTML/HTMLOutputElement.h> #include <LibWeb/HTML/HTMLOutputElement.h>
@ -87,11 +87,11 @@
#include <LibWeb/HTML/HTMLTableElement.h> #include <LibWeb/HTML/HTMLTableElement.h>
#include <LibWeb/HTML/HTMLTableRowElement.h> #include <LibWeb/HTML/HTMLTableRowElement.h>
#include <LibWeb/HTML/HTMLTableSectionElement.h> #include <LibWeb/HTML/HTMLTableSectionElement.h>
#include <LibWeb/HTML/HTMLTextAreaElement.h>
#include <LibWeb/HTML/HTMLTemplateElement.h> #include <LibWeb/HTML/HTMLTemplateElement.h>
#include <LibWeb/HTML/HTMLTextAreaElement.h>
#include <LibWeb/HTML/HTMLTimeElement.h> #include <LibWeb/HTML/HTMLTimeElement.h>
#include <LibWeb/HTML/HTMLTrackElement.h>
#include <LibWeb/HTML/HTMLTitleElement.h> #include <LibWeb/HTML/HTMLTitleElement.h>
#include <LibWeb/HTML/HTMLTrackElement.h>
#include <LibWeb/HTML/HTMLUListElement.h> #include <LibWeb/HTML/HTMLUListElement.h>
#include <LibWeb/HTML/HTMLUnknownElement.h> #include <LibWeb/HTML/HTMLUnknownElement.h>
#include <LibWeb/HTML/HTMLVideoElement.h> #include <LibWeb/HTML/HTMLVideoElement.h>
@ -244,8 +244,7 @@ NonnullRefPtr<Element> create_element(Document& document, const FlyString& tag_n
if (lowercase_tag_name.is_one_of( 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, 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 // 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::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)); return adopt(*new HTML::HTMLElement(document, lowercase_tag_name));
if (lowercase_tag_name == SVG::TagNames::svg) if (lowercase_tag_name == SVG::TagNames::svg)
return adopt(*new SVG::SVGSVGElement(document, lowercase_tag_name)); return adopt(*new SVG::SVGSVGElement(document, lowercase_tag_name));

View file

@ -32,8 +32,10 @@ namespace Web::DOM {
class ParentNode : public Node { class ParentNode : public Node {
public: public:
template<typename F> void for_each_child(F) const; template<typename F>
template<typename F> void for_each_child(F); void for_each_child(F) const;
template<typename F>
void for_each_child(F);
RefPtr<Element> query_selector(const StringView&); RefPtr<Element> query_selector(const StringView&);
NonnullRefPtrVector<Element> query_selector_all(const StringView&); NonnullRefPtrVector<Element> query_selector_all(const StringView&);

View file

@ -34,7 +34,10 @@ namespace TagNames {
ENUMERATE_HTML_TAGS ENUMERATE_HTML_TAGS
#undef __ENUMERATE_HTML_TAG #undef __ENUMERATE_HTML_TAG
// clang-format off
// FIXME: clang-format gets confused here. Why?
[[gnu::constructor]] static void initialize() [[gnu::constructor]] static void initialize()
// clang-format off
{ {
static bool s_initialized = false; static bool s_initialized = false;
if (s_initialized) if (s_initialized)

View file

@ -34,7 +34,10 @@ namespace AttributeNames {
ENUMERATE_HTML_ATTRIBUTES ENUMERATE_HTML_ATTRIBUTES
#undef __ENUMERATE_HTML_ATTRIBUTE #undef __ENUMERATE_HTML_ATTRIBUTE
// clang-format off
// FIXME: clang-format gets confused here. Why?
[[gnu::constructor]] static void initialize() [[gnu::constructor]] static void initialize()
// clang-format off
{ {
static bool s_initialized = false; static bool s_initialized = false;
if (s_initialized) if (s_initialized)

View file

@ -37,7 +37,8 @@ public:
HTMLFieldSetElement(DOM::Document&, const FlyString& local_name); HTMLFieldSetElement(DOM::Document&, const FlyString& local_name);
virtual ~HTMLFieldSetElement() override; virtual ~HTMLFieldSetElement() override;
const String& type() const { const String& type() const
{
static String fieldset = "fieldset"; static String fieldset = "fieldset";
return fieldset; return fieldset;
} }

View file

@ -27,8 +27,8 @@
#include <AK/StringBuilder.h> #include <AK/StringBuilder.h>
#include <LibWeb/HTML/HTMLFormElement.h> #include <LibWeb/HTML/HTMLFormElement.h>
#include <LibWeb/HTML/HTMLInputElement.h> #include <LibWeb/HTML/HTMLInputElement.h>
#include <LibWeb/Page/Frame.h>
#include <LibWeb/InProcessWebView.h> #include <LibWeb/InProcessWebView.h>
#include <LibWeb/Page/Frame.h>
#include <LibWeb/URLEncoder.h> #include <LibWeb/URLEncoder.h>
namespace Web::HTML { namespace Web::HTML {

View file

@ -37,7 +37,8 @@ public:
HTMLOutputElement(DOM::Document&, const FlyString& local_name); HTMLOutputElement(DOM::Document&, const FlyString& local_name);
virtual ~HTMLOutputElement() override; virtual ~HTMLOutputElement() override;
const String& type() const { const String& type() const
{
static String output = "output"; static String output = "output";
return output; return output;
} }

View file

@ -28,8 +28,8 @@
#include <LibJS/Interpreter.h> #include <LibJS/Interpreter.h>
#include <LibJS/Parser.h> #include <LibJS/Parser.h>
#include <LibWeb/DOM/Document.h> #include <LibWeb/DOM/Document.h>
#include <LibWeb/HTML/HTMLScriptElement.h>
#include <LibWeb/DOM/Text.h> #include <LibWeb/DOM/Text.h>
#include <LibWeb/HTML/HTMLScriptElement.h>
#include <LibWeb/Loader/ResourceLoader.h> #include <LibWeb/Loader/ResourceLoader.h>
namespace Web::HTML { namespace Web::HTML {

View file

@ -37,7 +37,8 @@ public:
HTMLTextAreaElement(DOM::Document&, const FlyString& local_name); HTMLTextAreaElement(DOM::Document&, const FlyString& local_name);
virtual ~HTMLTextAreaElement() override; virtual ~HTMLTextAreaElement() override;
const String& type() const { const String& type() const
{
static String textarea = "textarea"; static String textarea = "textarea";
return textarea; return textarea;
} }

View file

@ -30,10 +30,10 @@
#include <LibGfx/Font.h> #include <LibGfx/Font.h>
#include <LibGfx/StylePainter.h> #include <LibGfx/StylePainter.h>
#include <LibWeb/DOM/Document.h> #include <LibWeb/DOM/Document.h>
#include <LibWeb/InProcessWebView.h>
#include <LibWeb/Layout/LayoutDocument.h> #include <LibWeb/Layout/LayoutDocument.h>
#include <LibWeb/Layout/LayoutFrame.h> #include <LibWeb/Layout/LayoutFrame.h>
#include <LibWeb/Page/Frame.h> #include <LibWeb/Page/Frame.h>
#include <LibWeb/InProcessWebView.h>
//#define DEBUG_HIGHLIGHT_FOCUSED_FRAME //#define DEBUG_HIGHLIGHT_FOCUSED_FRAME

View file

@ -26,8 +26,8 @@
#pragma once #pragma once
#include <LibWeb/Layout/LayoutReplaced.h>
#include <LibWeb/HTML/HTMLIFrameElement.h> #include <LibWeb/HTML/HTMLIFrameElement.h>
#include <LibWeb/Layout/LayoutReplaced.h>
namespace Web { namespace Web {

View file

@ -30,9 +30,9 @@
#include <LibGfx/Font.h> #include <LibGfx/Font.h>
#include <LibGfx/StylePainter.h> #include <LibGfx/StylePainter.h>
#include <LibWeb/DOM/Document.h> #include <LibWeb/DOM/Document.h>
#include <LibWeb/InProcessWebView.h>
#include <LibWeb/Layout/LayoutWidget.h> #include <LibWeb/Layout/LayoutWidget.h>
#include <LibWeb/Page/Frame.h> #include <LibWeb/Page/Frame.h>
#include <LibWeb/InProcessWebView.h>
namespace Web { namespace Web {

View file

@ -25,9 +25,9 @@
*/ */
#include <AK/Utf8View.h> #include <AK/Utf8View.h>
#include <LibWeb/Layout/LayoutBox.h>
#include <LibWeb/Layout/LayoutNode.h> #include <LibWeb/Layout/LayoutNode.h>
#include <LibWeb/Layout/LayoutText.h> #include <LibWeb/Layout/LayoutText.h>
#include <LibWeb/Layout/LayoutBox.h>
#include <LibWeb/Layout/LineBox.h> #include <LibWeb/Layout/LineBox.h>
#include <ctype.h> #include <ctype.h>

View file

@ -27,8 +27,8 @@
#pragma once #pragma once
#include <AK/Weakable.h> #include <AK/Weakable.h>
#include <LibGfx/Rect.h>
#include <LibGfx/Forward.h> #include <LibGfx/Forward.h>
#include <LibGfx/Rect.h>
#include <LibWeb/Forward.h> #include <LibWeb/Forward.h>
namespace Web { namespace Web {

View file

@ -24,9 +24,9 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#include <LibWeb/InProcessWebView.h>
#include <LibWeb/Page/Frame.h> #include <LibWeb/Page/Frame.h>
#include <LibWeb/Page/Page.h> #include <LibWeb/Page/Page.h>
#include <LibWeb/InProcessWebView.h>
namespace Web { namespace Web {

View file

@ -112,7 +112,8 @@ Vector<PathInstruction> PathDataParser::parse()
return m_instructions; return m_instructions;
} }
void PathDataParser::parse_drawto() { void PathDataParser::parse_drawto()
{
if (match('M') || match('m')) { if (match('M') || match('m')) {
parse_moveto(); parse_moveto();
} else if (match('Z') || match('z')) { } else if (match('Z') || match('z')) {
@ -617,8 +618,7 @@ void SVGPathElement::paint(Gfx::Painter& painter, const SVGPaintingContext& cont
if (absolute) { if (absolute) {
path.quadratic_bezier_curve_to(control_point, end_point); path.quadratic_bezier_curve_to(control_point, end_point);
} } else {
else {
path.quadratic_bezier_curve_to(control_point, end_point + last_point); path.quadratic_bezier_curve_to(control_point, end_point + last_point);
} }

View file

@ -113,7 +113,6 @@ public:
private: private:
Vector<PathInstruction> m_instructions; Vector<PathInstruction> m_instructions;
Gfx::FloatPoint m_previous_control_point = {}; Gfx::FloatPoint m_previous_control_point = {};
}; };
} }

View file

@ -28,9 +28,9 @@
#include <LibWeb/CSS/StyleResolver.h> #include <LibWeb/CSS/StyleResolver.h>
#include <LibWeb/DOM/Document.h> #include <LibWeb/DOM/Document.h>
#include <LibWeb/DOM/Event.h> #include <LibWeb/DOM/Event.h>
#include <LibWeb/Layout/LayoutSVG.h>
#include <LibWeb/SVG/SVGPathElement.h> #include <LibWeb/SVG/SVGPathElement.h>
#include <LibWeb/SVG/SVGSVGElement.h> #include <LibWeb/SVG/SVGSVGElement.h>
#include <LibWeb/Layout/LayoutSVG.h>
#include <ctype.h> #include <ctype.h>
namespace Web::SVG { namespace Web::SVG {

View file

@ -32,7 +32,10 @@ namespace Web::SVG::TagNames {
ENUMERATE_SVG_TAGS ENUMERATE_SVG_TAGS
#undef __ENUMERATE_SVG_TAG #undef __ENUMERATE_SVG_TAG
// clang-format off
// FIXME: clang-format gets confused here. Why?
[[gnu::constructor]] static void initialize() [[gnu::constructor]] static void initialize()
// clang-format off
{ {
static bool s_initialized = false; static bool s_initialized = false;
if (s_initialized) if (s_initialized)

View file

@ -32,7 +32,7 @@ namespace Web::SVG::TagNames {
#define ENUMERATE_SVG_GRAPHICS_TAGS \ #define ENUMERATE_SVG_GRAPHICS_TAGS \
__ENUMERATE_SVG_TAG(svg) \ __ENUMERATE_SVG_TAG(svg) \
__ENUMERATE_SVG_TAG(path) \ __ENUMERATE_SVG_TAG(path)
#define ENUMERATE_SVG_TAGS \ #define ENUMERATE_SVG_TAGS \
ENUMERATE_SVG_GRAPHICS_TAGS ENUMERATE_SVG_GRAPHICS_TAGS

View file

@ -39,4 +39,3 @@ struct URLQueryParam {
String urlencode(const Vector<URLQueryParam>&); String urlencode(const Vector<URLQueryParam>&);
} }