-
-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
web-html+dom: Started implementing tree construction.
- Loading branch information
1 parent
6912873
commit 5d0d6b0
Showing
15 changed files
with
495 additions
and
264 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#pragma once | ||
|
||
#include "node.h" | ||
|
||
namespace Web::Dom { | ||
|
||
struct CharacterData : public Dom::Node { | ||
String data; | ||
}; | ||
|
||
} // namespace Web::Dom |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#pragma once | ||
|
||
#include "character-data.h" | ||
|
||
namespace Web::Dom { | ||
|
||
struct Comment : public CharacterData { | ||
virtual NodeType nodeType() override { | ||
return NodeType::COMMENT_NODE; | ||
} | ||
}; | ||
|
||
} // namespace Web::Dom |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#pragma once | ||
|
||
#include "node.h" | ||
|
||
namespace Web::Dom { | ||
|
||
struct DocumentType : public Node { | ||
String name; | ||
String publicId; | ||
String systemId; | ||
|
||
virtual NodeType nodeType() override { | ||
return NodeType::DOCUMENT_TYPE_NODE; | ||
} | ||
}; | ||
|
||
} // namespace Web::Dom |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#pragma once | ||
|
||
#include "node.h" | ||
|
||
namespace Web::Dom { | ||
|
||
enum struct QuirkMode { | ||
NO, | ||
LIMITED, | ||
YES | ||
}; | ||
|
||
struct Document : public Node { | ||
QuirkMode quirkMode{QuirkMode::NO}; | ||
|
||
virtual NodeType nodeType() override { | ||
return NodeType::DOCUMENT_NODE; | ||
} | ||
}; | ||
|
||
} // namespace Web::Dom |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#pragma once | ||
|
||
#include "node.h" | ||
|
||
namespace Web::Dom { | ||
|
||
struct Element : public Node { | ||
virtual NodeType nodeType() override { | ||
return NodeType::ELEMENT_NODE; | ||
} | ||
}; | ||
|
||
} // namespace Web::Dom |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#pragma once | ||
|
||
#include "character-data.h" | ||
|
||
namespace Web::Dom { | ||
|
||
struct Text : public CharacterData { | ||
virtual NodeType nodeType() override { | ||
return NodeType::TEXT_NODE; | ||
} | ||
}; | ||
|
||
} // namespace Web::Dom |
Oops, something went wrong.