diff --git a/Libraries/LibWeb/Bindings/Wrappable.h b/Libraries/LibWeb/Bindings/Wrappable.h index f0b440145a4..211fc4755a1 100644 --- a/Libraries/LibWeb/Bindings/Wrappable.h +++ b/Libraries/LibWeb/Bindings/Wrappable.h @@ -31,8 +31,7 @@ #include #include -namespace Web { -namespace Bindings { +namespace Web::Bindings { class Wrappable { public: @@ -56,4 +55,3 @@ inline Wrapper* wrap_impl(JS::GlobalObject& global_object, NativeObject& native_ } } -} diff --git a/Libraries/LibWeb/Bindings/Wrapper.h b/Libraries/LibWeb/Bindings/Wrapper.h index b24cadd02e0..c83556605a3 100644 --- a/Libraries/LibWeb/Bindings/Wrapper.h +++ b/Libraries/LibWeb/Bindings/Wrapper.h @@ -31,8 +31,7 @@ #include #include -namespace Web { -namespace Bindings { +namespace Web::Bindings { class Wrapper : public JS::Object @@ -48,4 +47,3 @@ protected: }; } -} diff --git a/Libraries/LibWeb/Bindings/XMLHttpRequestConstructor.cpp b/Libraries/LibWeb/Bindings/XMLHttpRequestConstructor.cpp index e1bb113a74e..6bae08e8985 100644 --- a/Libraries/LibWeb/Bindings/XMLHttpRequestConstructor.cpp +++ b/Libraries/LibWeb/Bindings/XMLHttpRequestConstructor.cpp @@ -33,8 +33,7 @@ #include #include -namespace Web { -namespace Bindings { +namespace Web::Bindings { XMLHttpRequestConstructor::XMLHttpRequestConstructor(JS::GlobalObject& global_object) : NativeFunction(*global_object.function_prototype()) @@ -69,4 +68,3 @@ JS::Value XMLHttpRequestConstructor::construct(JS::Interpreter& interpreter, Fun } } -} diff --git a/Libraries/LibWeb/Bindings/XMLHttpRequestConstructor.h b/Libraries/LibWeb/Bindings/XMLHttpRequestConstructor.h index 5c9b733e735..bff68c67287 100644 --- a/Libraries/LibWeb/Bindings/XMLHttpRequestConstructor.h +++ b/Libraries/LibWeb/Bindings/XMLHttpRequestConstructor.h @@ -28,8 +28,7 @@ #include -namespace Web { -namespace Bindings { +namespace Web::Bindings { class XMLHttpRequestConstructor final : public JS::NativeFunction { public: @@ -46,4 +45,3 @@ private: }; } -} diff --git a/Libraries/LibWeb/Bindings/XMLHttpRequestPrototype.cpp b/Libraries/LibWeb/Bindings/XMLHttpRequestPrototype.cpp index 32dee9d0335..1469a9e9d6b 100644 --- a/Libraries/LibWeb/Bindings/XMLHttpRequestPrototype.cpp +++ b/Libraries/LibWeb/Bindings/XMLHttpRequestPrototype.cpp @@ -32,8 +32,7 @@ #include #include -namespace Web { -namespace Bindings { +namespace Web::Bindings { XMLHttpRequestPrototype::XMLHttpRequestPrototype(JS::GlobalObject& global_object) : Object(*global_object.object_prototype()) @@ -112,4 +111,3 @@ JS_DEFINE_NATIVE_GETTER(XMLHttpRequestPrototype::response_text_getter) } } -} diff --git a/Libraries/LibWeb/Bindings/XMLHttpRequestPrototype.h b/Libraries/LibWeb/Bindings/XMLHttpRequestPrototype.h index 8667825a50d..a8742f1ca9b 100644 --- a/Libraries/LibWeb/Bindings/XMLHttpRequestPrototype.h +++ b/Libraries/LibWeb/Bindings/XMLHttpRequestPrototype.h @@ -28,8 +28,7 @@ #include -namespace Web { -namespace Bindings { +namespace Web::Bindings { class XMLHttpRequestPrototype final : public JS::Object { JS_OBJECT(XMLHttpRequestPrototype, JS::Object); @@ -48,4 +47,3 @@ private: }; } -} diff --git a/Libraries/LibWeb/Bindings/XMLHttpRequestWrapper.cpp b/Libraries/LibWeb/Bindings/XMLHttpRequestWrapper.cpp index 98ae528e951..dedd97313a3 100644 --- a/Libraries/LibWeb/Bindings/XMLHttpRequestWrapper.cpp +++ b/Libraries/LibWeb/Bindings/XMLHttpRequestWrapper.cpp @@ -32,8 +32,7 @@ #include #include -namespace Web { -namespace Bindings { +namespace Web::Bindings { XMLHttpRequestWrapper* wrap(JS::GlobalObject& global_object, XMLHttpRequest& impl) { @@ -61,4 +60,3 @@ const XMLHttpRequest& XMLHttpRequestWrapper::impl() const } } -} diff --git a/Libraries/LibWeb/Bindings/XMLHttpRequestWrapper.h b/Libraries/LibWeb/Bindings/XMLHttpRequestWrapper.h index cf23e15fce2..a961564b60d 100644 --- a/Libraries/LibWeb/Bindings/XMLHttpRequestWrapper.h +++ b/Libraries/LibWeb/Bindings/XMLHttpRequestWrapper.h @@ -28,8 +28,7 @@ #include -namespace Web { -namespace Bindings { +namespace Web::Bindings { class XMLHttpRequestWrapper final : public EventTargetWrapper { public: @@ -46,4 +45,3 @@ private: XMLHttpRequestWrapper* wrap(JS::GlobalObject&, XMLHttpRequest&); } -} diff --git a/Libraries/LibWeb/CSS/StyleSheetList.cpp b/Libraries/LibWeb/CSS/StyleSheetList.cpp index bbda79757ce..ec7bea2c236 100644 --- a/Libraries/LibWeb/CSS/StyleSheetList.cpp +++ b/Libraries/LibWeb/CSS/StyleSheetList.cpp @@ -26,8 +26,7 @@ #include -namespace Web { -namespace CSS { +namespace Web::CSS { void StyleSheetList::add_sheet(NonnullRefPtr sheet) { @@ -40,4 +39,3 @@ StyleSheetList::StyleSheetList(Document& document) } } -} diff --git a/Libraries/LibWeb/CSS/StyleSheetList.h b/Libraries/LibWeb/CSS/StyleSheetList.h index ebccf4dccb3..47fc2ff4ea1 100644 --- a/Libraries/LibWeb/CSS/StyleSheetList.h +++ b/Libraries/LibWeb/CSS/StyleSheetList.h @@ -29,8 +29,7 @@ #include #include -namespace Web { -namespace CSS { +namespace Web::CSS { class StyleSheetList : public RefCounted { public: @@ -51,4 +50,3 @@ private: }; } -} diff --git a/Libraries/LibWeb/CSS/StyleValue.h b/Libraries/LibWeb/CSS/StyleValue.h index 584962eca92..18b2acdeadf 100644 --- a/Libraries/LibWeb/CSS/StyleValue.h +++ b/Libraries/LibWeb/CSS/StyleValue.h @@ -36,13 +36,11 @@ #include #include #include +#include #include -namespace Web { +namespace Web::CSS { -class Document; - -namespace CSS { enum class ValueID { Invalid, VendorSpecificLink, @@ -153,6 +151,8 @@ enum class Float { } +namespace Web { + class StyleValue : public RefCounted { public: virtual ~StyleValue(); diff --git a/Libraries/LibWeb/CodeGenerators/Generate_CSS_PropertyID_cpp.cpp b/Libraries/LibWeb/CodeGenerators/Generate_CSS_PropertyID_cpp.cpp index 7fab48f81d8..4f813fd25ca 100644 --- a/Libraries/LibWeb/CodeGenerators/Generate_CSS_PropertyID_cpp.cpp +++ b/Libraries/LibWeb/CodeGenerators/Generate_CSS_PropertyID_cpp.cpp @@ -61,8 +61,7 @@ int main(int argc, char** argv) out() << "#include "; out() << "#include "; - out() << "namespace Web {"; - out() << "namespace CSS {"; + out() << "namespace Web::CSS {"; out() << "PropertyID property_id_from_string(const StringView& string) {"; @@ -88,7 +87,6 @@ int main(int argc, char** argv) out() << " }"; out() << "}"; out() << "}"; - out() << "}"; return 0; } diff --git a/Libraries/LibWeb/CodeGenerators/Generate_CSS_PropertyID_h.cpp b/Libraries/LibWeb/CodeGenerators/Generate_CSS_PropertyID_h.cpp index 1dbf80d9a30..30ad4d9be27 100644 --- a/Libraries/LibWeb/CodeGenerators/Generate_CSS_PropertyID_h.cpp +++ b/Libraries/LibWeb/CodeGenerators/Generate_CSS_PropertyID_h.cpp @@ -63,8 +63,7 @@ int main(int argc, char** argv) out() << "#include "; out() << "#include "; - out() << "namespace Web {"; - out() << "namespace CSS {"; + out() << "namespace Web::CSS {"; out() << "enum class PropertyID {"; out() << " Invalid,"; @@ -77,7 +76,6 @@ int main(int argc, char** argv) PropertyID property_id_from_string(const StringView&);\n\ const char* string_from_property_id(PropertyID);\n\ }\n\ -}\n\ \n\ namespace AK {\n\ template<>\n\ diff --git a/Libraries/LibWeb/Forward.h b/Libraries/LibWeb/Forward.h index 41ad85d60df..f4adf324561 100644 --- a/Libraries/LibWeb/Forward.h +++ b/Libraries/LibWeb/Forward.h @@ -75,7 +75,9 @@ class Window; class XMLHttpRequest; enum class QuirksMode; -namespace Bindings { +} + +namespace Web::Bindings { class CanvasRenderingContext2DWrapper; class DocumentWrapper; @@ -99,5 +101,3 @@ class XMLHttpRequestPrototype; class XMLHttpRequestWrapper; } - -} diff --git a/Libraries/LibWeb/Parser/CSSParser.h b/Libraries/LibWeb/Parser/CSSParser.h index 25f478c16f2..dc38bb7c744 100644 --- a/Libraries/LibWeb/Parser/CSSParser.h +++ b/Libraries/LibWeb/Parser/CSSParser.h @@ -29,9 +29,7 @@ #include #include -namespace Web { - -namespace CSS { +namespace Web::CSS { class ParsingContext { public: ParsingContext(); @@ -44,6 +42,8 @@ private: }; } +namespace Web { + RefPtr parse_css(const CSS::ParsingContext&, const StringView&); RefPtr parse_css_declaration(const CSS::ParsingContext&, const StringView&); RefPtr parse_css_value(const CSS::ParsingContext&, const StringView&);