From 1f51c2b7daf5444467b83bb8b01805227494c125 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 15 Jun 2019 23:41:15 +0200 Subject: [PATCH] LibHTML: Create some subdirectories. --- LibHTML/{ => DOM}/Document.cpp | 6 +++--- LibHTML/{ => DOM}/Document.h | 2 +- LibHTML/{ => DOM}/Element.cpp | 6 +++--- LibHTML/{ => DOM}/Element.h | 2 +- LibHTML/{ => DOM}/Node.cpp | 4 ++-- LibHTML/{ => DOM}/Node.h | 0 LibHTML/{ => DOM}/ParentNode.cpp | 2 +- LibHTML/{ => DOM}/ParentNode.h | 2 +- LibHTML/{ => DOM}/Text.cpp | 4 ++-- LibHTML/{ => DOM}/Text.h | 2 +- LibHTML/Dump.cpp | 10 +++++----- LibHTML/{ => Layout}/LayoutBlock.cpp | 4 ++-- LibHTML/{ => Layout}/LayoutBlock.h | 2 +- LibHTML/{ => Layout}/LayoutDocument.cpp | 2 +- LibHTML/{ => Layout}/LayoutDocument.h | 4 ++-- LibHTML/{ => Layout}/LayoutInline.cpp | 4 ++-- LibHTML/{ => Layout}/LayoutInline.h | 2 +- LibHTML/{ => Layout}/LayoutNode.cpp | 2 +- LibHTML/{ => Layout}/LayoutNode.h | 0 LibHTML/{ => Layout}/LayoutText.cpp | 2 +- LibHTML/{ => Layout}/LayoutText.h | 4 ++-- LibHTML/Makefile | 22 +++++++++++----------- LibHTML/{ => Parser}/Parser.cpp | 6 +++--- LibHTML/{ => Parser}/Parser.h | 2 +- LibHTML/test.cpp | 3 +-- 25 files changed, 49 insertions(+), 50 deletions(-) rename LibHTML/{ => DOM}/Document.cpp (90%) rename LibHTML/{ => DOM}/Document.h (88%) rename LibHTML/{ => DOM}/Element.cpp (92%) rename LibHTML/{ => DOM}/Element.h (97%) rename LibHTML/{ => DOM}/Node.cpp (86%) rename LibHTML/{ => DOM}/Node.h (100%) rename LibHTML/{ => DOM}/ParentNode.cpp (88%) rename LibHTML/{ => DOM}/ParentNode.h (97%) rename LibHTML/{ => DOM}/Text.cpp (74%) rename LibHTML/{ => DOM}/Text.h (90%) rename LibHTML/{ => Layout}/LayoutBlock.cpp (59%) rename LibHTML/{ => Layout}/LayoutBlock.h (86%) rename LibHTML/{ => Layout}/LayoutDocument.cpp (75%) rename LibHTML/{ => Layout}/LayoutDocument.h (82%) rename LibHTML/{ => Layout}/LayoutInline.cpp (60%) rename LibHTML/{ => Layout}/LayoutInline.h (86%) rename LibHTML/{ => Layout}/LayoutNode.cpp (93%) rename LibHTML/{ => Layout}/LayoutNode.h (100%) rename LibHTML/{ => Layout}/LayoutText.cpp (92%) rename LibHTML/{ => Layout}/LayoutText.h (85%) rename LibHTML/{ => Parser}/Parser.cpp (98%) rename LibHTML/{ => Parser}/Parser.h (71%) diff --git a/LibHTML/Document.cpp b/LibHTML/DOM/Document.cpp similarity index 90% rename from LibHTML/Document.cpp rename to LibHTML/DOM/Document.cpp index 721000e38f0..e1ca034b162 100644 --- a/LibHTML/Document.cpp +++ b/LibHTML/DOM/Document.cpp @@ -1,6 +1,6 @@ -#include -#include -#include +#include +#include +#include #include Document::Document() diff --git a/LibHTML/Document.h b/LibHTML/DOM/Document.h similarity index 88% rename from LibHTML/Document.h rename to LibHTML/DOM/Document.h index b06e5cdc9c7..2b2f697f513 100644 --- a/LibHTML/Document.h +++ b/LibHTML/DOM/Document.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include class LayoutNode; diff --git a/LibHTML/Element.cpp b/LibHTML/DOM/Element.cpp similarity index 92% rename from LibHTML/Element.cpp rename to LibHTML/DOM/Element.cpp index 66473fe0c49..d6128cc9f25 100644 --- a/LibHTML/Element.cpp +++ b/LibHTML/DOM/Element.cpp @@ -1,6 +1,6 @@ -#include -#include -#include +#include +#include +#include Element::Element(const String& tag_name) : ParentNode(NodeType::ELEMENT_NODE) diff --git a/LibHTML/Element.h b/LibHTML/DOM/Element.h similarity index 97% rename from LibHTML/Element.h rename to LibHTML/DOM/Element.h index 08a87e7233e..416e59e4240 100644 --- a/LibHTML/Element.h +++ b/LibHTML/DOM/Element.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include class Attribute { diff --git a/LibHTML/Node.cpp b/LibHTML/DOM/Node.cpp similarity index 86% rename from LibHTML/Node.cpp rename to LibHTML/DOM/Node.cpp index b7c4e3747dd..54880e68b4f 100644 --- a/LibHTML/Node.cpp +++ b/LibHTML/DOM/Node.cpp @@ -1,5 +1,5 @@ -#include -#include +#include +#include Node::Node(NodeType type) : m_type(type) diff --git a/LibHTML/Node.h b/LibHTML/DOM/Node.h similarity index 100% rename from LibHTML/Node.h rename to LibHTML/DOM/Node.h diff --git a/LibHTML/ParentNode.cpp b/LibHTML/DOM/ParentNode.cpp similarity index 88% rename from LibHTML/ParentNode.cpp rename to LibHTML/DOM/ParentNode.cpp index 23c46692e79..7eb2a950c8e 100644 --- a/LibHTML/ParentNode.cpp +++ b/LibHTML/DOM/ParentNode.cpp @@ -1,4 +1,4 @@ -#include +#include void ParentNode::append_child(Retained node) { diff --git a/LibHTML/ParentNode.h b/LibHTML/DOM/ParentNode.h similarity index 97% rename from LibHTML/ParentNode.h rename to LibHTML/DOM/ParentNode.h index a28ef494ba6..9bdc1e36686 100644 --- a/LibHTML/ParentNode.h +++ b/LibHTML/DOM/ParentNode.h @@ -1,6 +1,6 @@ #pragma once -#include +#include class ParentNode : public Node { public: diff --git a/LibHTML/Text.cpp b/LibHTML/DOM/Text.cpp similarity index 74% rename from LibHTML/Text.cpp rename to LibHTML/DOM/Text.cpp index c21a0f54b07..1f13e370920 100644 --- a/LibHTML/Text.cpp +++ b/LibHTML/DOM/Text.cpp @@ -1,5 +1,5 @@ -#include -#include +#include +#include Text::Text(const String& data) : Node(NodeType::TEXT_NODE) diff --git a/LibHTML/Text.h b/LibHTML/DOM/Text.h similarity index 90% rename from LibHTML/Text.h rename to LibHTML/DOM/Text.h index 76e7d7bca4f..37742b80632 100644 --- a/LibHTML/Text.h +++ b/LibHTML/DOM/Text.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include class Text final : public Node { public: diff --git a/LibHTML/Dump.cpp b/LibHTML/Dump.cpp index 41f964e299f..21339e39b1d 100644 --- a/LibHTML/Dump.cpp +++ b/LibHTML/Dump.cpp @@ -1,9 +1,9 @@ -#include +#include +#include +#include #include -#include -#include -#include -#include +#include +#include #include void dump_tree(const Node& node) diff --git a/LibHTML/LayoutBlock.cpp b/LibHTML/Layout/LayoutBlock.cpp similarity index 59% rename from LibHTML/LayoutBlock.cpp rename to LibHTML/Layout/LayoutBlock.cpp index 65a94f7d9b0..45191bcbe43 100644 --- a/LibHTML/LayoutBlock.cpp +++ b/LibHTML/Layout/LayoutBlock.cpp @@ -1,5 +1,5 @@ -#include -#include +#include +#include LayoutBlock::LayoutBlock(Element& element) : LayoutNode(&element) diff --git a/LibHTML/LayoutBlock.h b/LibHTML/Layout/LayoutBlock.h similarity index 86% rename from LibHTML/LayoutBlock.h rename to LibHTML/Layout/LayoutBlock.h index e953642d679..3b039c537ea 100644 --- a/LibHTML/LayoutBlock.h +++ b/LibHTML/Layout/LayoutBlock.h @@ -1,6 +1,6 @@ #pragma once -#include +#include class Element; diff --git a/LibHTML/LayoutDocument.cpp b/LibHTML/Layout/LayoutDocument.cpp similarity index 75% rename from LibHTML/LayoutDocument.cpp rename to LibHTML/Layout/LayoutDocument.cpp index 738227c6046..e3ca9a2241c 100644 --- a/LibHTML/LayoutDocument.cpp +++ b/LibHTML/Layout/LayoutDocument.cpp @@ -1,4 +1,4 @@ -#include +#include LayoutDocument::LayoutDocument(const Document& document) : LayoutNode(&document) diff --git a/LibHTML/LayoutDocument.h b/LibHTML/Layout/LayoutDocument.h similarity index 82% rename from LibHTML/LayoutDocument.h rename to LibHTML/Layout/LayoutDocument.h index 3cee3b341e3..370834eb62e 100644 --- a/LibHTML/LayoutDocument.h +++ b/LibHTML/Layout/LayoutDocument.h @@ -1,7 +1,7 @@ #pragma once -#include -#include +#include +#include class LayoutDocument : public LayoutNode { public: diff --git a/LibHTML/LayoutInline.cpp b/LibHTML/Layout/LayoutInline.cpp similarity index 60% rename from LibHTML/LayoutInline.cpp rename to LibHTML/Layout/LayoutInline.cpp index bd9c88acde4..04c1fa12e72 100644 --- a/LibHTML/LayoutInline.cpp +++ b/LibHTML/Layout/LayoutInline.cpp @@ -1,5 +1,5 @@ -#include -#include +#include +#include LayoutInline::LayoutInline(Element& element) : LayoutNode(&element) diff --git a/LibHTML/LayoutInline.h b/LibHTML/Layout/LayoutInline.h similarity index 86% rename from LibHTML/LayoutInline.h rename to LibHTML/Layout/LayoutInline.h index bb8637aecd2..cf3075921f3 100644 --- a/LibHTML/LayoutInline.h +++ b/LibHTML/Layout/LayoutInline.h @@ -1,6 +1,6 @@ #pragma once -#include +#include class Element; diff --git a/LibHTML/LayoutNode.cpp b/LibHTML/Layout/LayoutNode.cpp similarity index 93% rename from LibHTML/LayoutNode.cpp rename to LibHTML/Layout/LayoutNode.cpp index ececf680963..587d8138686 100644 --- a/LibHTML/LayoutNode.cpp +++ b/LibHTML/Layout/LayoutNode.cpp @@ -1,4 +1,4 @@ -#include +#include LayoutNode::LayoutNode(const Node* node) : m_node(node) diff --git a/LibHTML/LayoutNode.h b/LibHTML/Layout/LayoutNode.h similarity index 100% rename from LibHTML/LayoutNode.h rename to LibHTML/Layout/LayoutNode.h diff --git a/LibHTML/LayoutText.cpp b/LibHTML/Layout/LayoutText.cpp similarity index 92% rename from LibHTML/LayoutText.cpp rename to LibHTML/Layout/LayoutText.cpp index 8c1feb5f915..4682220ba2c 100644 --- a/LibHTML/LayoutText.cpp +++ b/LibHTML/Layout/LayoutText.cpp @@ -1,4 +1,4 @@ -#include +#include #include LayoutText::LayoutText(const Text& text) diff --git a/LibHTML/LayoutText.h b/LibHTML/Layout/LayoutText.h similarity index 85% rename from LibHTML/LayoutText.h rename to LibHTML/Layout/LayoutText.h index f9964b29c47..8169dd17c36 100644 --- a/LibHTML/LayoutText.h +++ b/LibHTML/Layout/LayoutText.h @@ -1,7 +1,7 @@ #pragma once -#include -#include +#include +#include class LayoutText : public LayoutNode { public: diff --git a/LibHTML/Makefile b/LibHTML/Makefile index 66b48fd839a..1ff51e33a05 100644 --- a/LibHTML/Makefile +++ b/LibHTML/Makefile @@ -1,17 +1,17 @@ include ../Makefile.common LIBHTML_OBJS = \ - Node.o \ - ParentNode.o \ - Element.o \ - Document.o \ - Text.o \ - Parser.o \ - LayoutNode.o \ - LayoutText.o \ - LayoutBlock.o \ - LayoutInline.o \ - LayoutDocument.o \ + DOM/Node.o \ + DOM/ParentNode.o \ + DOM/Element.o \ + DOM/Document.o \ + DOM/Text.o \ + Parser/Parser.o \ + Layout/LayoutNode.o \ + Layout/LayoutText.o \ + Layout/LayoutBlock.o \ + Layout/LayoutInline.o \ + Layout/LayoutDocument.o \ Dump.o TEST_OBJS = test.o diff --git a/LibHTML/Parser.cpp b/LibHTML/Parser/Parser.cpp similarity index 98% rename from LibHTML/Parser.cpp rename to LibHTML/Parser/Parser.cpp index 53541570ffa..db16fe28b50 100644 --- a/LibHTML/Parser.cpp +++ b/LibHTML/Parser/Parser.cpp @@ -1,6 +1,6 @@ -#include -#include -#include +#include +#include +#include #include #include diff --git a/LibHTML/Parser.h b/LibHTML/Parser/Parser.h similarity index 71% rename from LibHTML/Parser.h rename to LibHTML/Parser/Parser.h index db593dae2d5..453f9833fa7 100644 --- a/LibHTML/Parser.h +++ b/LibHTML/Parser/Parser.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include Retained parse(const String& html); diff --git a/LibHTML/test.cpp b/LibHTML/test.cpp index 7e55b5a869e..56b3305fc55 100644 --- a/LibHTML/test.cpp +++ b/LibHTML/test.cpp @@ -1,7 +1,6 @@ #include #include -#include -#include +#include #include int main(int argc, char** argv)