1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:48:10 +00:00

LibWeb: Move the HTML parser into HTML/Parser/

This commit is contained in:
Andreas Kling 2020-07-28 19:18:23 +02:00
parent a296020e03
commit cc4109c03b
18 changed files with 32 additions and 42 deletions

View file

@ -9,7 +9,10 @@ set(SOURCES
Bindings/XMLHttpRequestConstructor.cpp Bindings/XMLHttpRequestConstructor.cpp
Bindings/XMLHttpRequestPrototype.cpp Bindings/XMLHttpRequestPrototype.cpp
Bindings/XMLHttpRequestWrapper.cpp Bindings/XMLHttpRequestWrapper.cpp
CSS/DefaultStyleSheetSource.cpp
CSS/Length.cpp CSS/Length.cpp
CSS/PropertyID.cpp
CSS/PropertyID.h
CSS/Selector.cpp CSS/Selector.cpp
CSS/SelectorEngine.cpp CSS/SelectorEngine.cpp
CSS/StyleDeclaration.cpp CSS/StyleDeclaration.cpp
@ -65,6 +68,12 @@ set(SOURCES
HTML/HTMLTableRowElement.cpp HTML/HTMLTableRowElement.cpp
HTML/HTMLTitleElement.cpp HTML/HTMLTitleElement.cpp
HTML/ImageData.cpp HTML/ImageData.cpp
HTML/Parser/Entities.cpp
HTML/Parser/HTMLDocumentParser.cpp
HTML/Parser/HTMLToken.cpp
HTML/Parser/HTMLTokenizer.cpp
HTML/Parser/ListOfActiveFormattingElements.cpp
HTML/Parser/StackOfOpenElements.cpp
Layout/BoxModelMetrics.cpp Layout/BoxModelMetrics.cpp
Layout/LayoutBlock.cpp Layout/LayoutBlock.cpp
Layout/LayoutBox.cpp Layout/LayoutBox.cpp
@ -99,25 +108,16 @@ set(SOURCES
PageView.cpp PageView.cpp
Painting/StackingContext.cpp Painting/StackingContext.cpp
Parser/CSSParser.cpp Parser/CSSParser.cpp
Parser/Entities.cpp
Parser/HTMLDocumentParser.cpp
Parser/HTMLToken.cpp
Parser/HTMLTokenizer.cpp
Parser/ListOfActiveFormattingElements.cpp
Parser/StackOfOpenElements.cpp
StylePropertiesModel.cpp
SVG/SVGElement.cpp SVG/SVGElement.cpp
SVG/SVGGeometryElement.cpp SVG/SVGGeometryElement.cpp
SVG/SVGGraphicsElement.cpp SVG/SVGGraphicsElement.cpp
SVG/SVGPathElement.cpp SVG/SVGPathElement.cpp
SVG/SVGSVGElement.cpp SVG/SVGSVGElement.cpp
SVG/TagNames.cpp SVG/TagNames.cpp
StylePropertiesModel.cpp
URLEncoder.cpp URLEncoder.cpp
CSS/PropertyID.h
CSS/PropertyID.cpp
CSS/DefaultStyleSheetSource.cpp
WebContentView.cpp
WebContentClient.cpp WebContentClient.cpp
WebContentView.cpp
) )
set(GENERATED_SOURCES set(GENERATED_SOURCES

View file

@ -41,7 +41,7 @@
#include <LibWeb/Layout/LayoutTableRow.h> #include <LibWeb/Layout/LayoutTableRow.h>
#include <LibWeb/Layout/LayoutTableRowGroup.h> #include <LibWeb/Layout/LayoutTableRowGroup.h>
#include <LibWeb/Layout/LayoutTreeBuilder.h> #include <LibWeb/Layout/LayoutTreeBuilder.h>
#include <LibWeb/Parser/HTMLDocumentParser.h> #include <LibWeb/HTML/Parser/HTMLDocumentParser.h>
namespace Web::DOM { namespace Web::DOM {

View file

@ -37,7 +37,7 @@
#include <LibWeb/Layout/LayoutWidget.h> #include <LibWeb/Layout/LayoutWidget.h>
#include <LibWeb/Loader/ResourceLoader.h> #include <LibWeb/Loader/ResourceLoader.h>
#include <LibWeb/PageView.h> #include <LibWeb/PageView.h>
#include <LibWeb/Parser/HTMLDocumentParser.h> #include <LibWeb/HTML/Parser/HTMLDocumentParser.h>
namespace Web::HTML { namespace Web::HTML {

View file

@ -26,7 +26,7 @@
#include <AK/LogStream.h> #include <AK/LogStream.h>
#include <AK/StringView.h> #include <AK/StringView.h>
#include <LibWeb/Parser/Entities.h> #include <LibWeb/HTML/Parser/Entities.h>
namespace Web { namespace Web {
namespace HTML { namespace HTML {

View file

@ -36,8 +36,8 @@
#include <LibWeb/HTML/HTMLFormElement.h> #include <LibWeb/HTML/HTMLFormElement.h>
#include <LibWeb/HTML/HTMLHeadElement.h> #include <LibWeb/HTML/HTMLHeadElement.h>
#include <LibWeb/HTML/HTMLScriptElement.h> #include <LibWeb/HTML/HTMLScriptElement.h>
#include <LibWeb/Parser/HTMLDocumentParser.h> #include <LibWeb/HTML/Parser/HTMLDocumentParser.h>
#include <LibWeb/Parser/HTMLToken.h> #include <LibWeb/HTML/Parser/HTMLToken.h>
namespace Web::HTML { namespace Web::HTML {

View file

@ -28,9 +28,9 @@
#include <AK/NonnullRefPtrVector.h> #include <AK/NonnullRefPtrVector.h>
#include <LibWeb/DOM/Node.h> #include <LibWeb/DOM/Node.h>
#include <LibWeb/Parser/HTMLTokenizer.h> #include <LibWeb/HTML/Parser/HTMLTokenizer.h>
#include <LibWeb/Parser/ListOfActiveFormattingElements.h> #include <LibWeb/HTML/Parser/ListOfActiveFormattingElements.h>
#include <LibWeb/Parser/StackOfOpenElements.h> #include <LibWeb/HTML/Parser/StackOfOpenElements.h>
namespace Web::HTML { namespace Web::HTML {

View file

@ -24,7 +24,7 @@
* 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/Parser/HTMLToken.h> #include <LibWeb/HTML/Parser/HTMLToken.h>
namespace Web::HTML { namespace Web::HTML {

View file

@ -25,9 +25,9 @@
*/ */
#include <LibTextCodec/Decoder.h> #include <LibTextCodec/Decoder.h>
#include <LibWeb/Parser/Entities.h> #include <LibWeb/HTML/Parser/Entities.h>
#include <LibWeb/Parser/HTMLToken.h> #include <LibWeb/HTML/Parser/HTMLToken.h>
#include <LibWeb/Parser/HTMLTokenizer.h> #include <LibWeb/HTML/Parser/HTMLTokenizer.h>
#include <ctype.h> #include <ctype.h>
namespace Web::HTML { namespace Web::HTML {
@ -2215,12 +2215,7 @@ _StartOfFunction:
return false; return false;
// FIXME: Is there a better way of doing this? // FIXME: Is there a better way of doing this?
return m_temporary_buffer[0] == 's' && return m_temporary_buffer[0] == 's' && m_temporary_buffer[1] == 'c' && m_temporary_buffer[2] == 'r' && m_temporary_buffer[3] == 'i' && m_temporary_buffer[4] == 'p' && m_temporary_buffer[5] == 't';
m_temporary_buffer[1] == 'c' &&
m_temporary_buffer[2] == 'r' &&
m_temporary_buffer[3] == 'i' &&
m_temporary_buffer[4] == 'p' &&
m_temporary_buffer[5] == 't';
}; };
ON_WHITESPACE ON_WHITESPACE
{ {
@ -2366,12 +2361,7 @@ _StartOfFunction:
return false; return false;
// FIXME: Is there a better way of doing this? // FIXME: Is there a better way of doing this?
return m_temporary_buffer[0] == 's' && return m_temporary_buffer[0] == 's' && m_temporary_buffer[1] == 'c' && m_temporary_buffer[2] == 'r' && m_temporary_buffer[3] == 'i' && m_temporary_buffer[4] == 'p' && m_temporary_buffer[5] == 't';
m_temporary_buffer[1] == 'c' &&
m_temporary_buffer[2] == 'r' &&
m_temporary_buffer[3] == 'i' &&
m_temporary_buffer[4] == 'p' &&
m_temporary_buffer[5] == 't';
}; };
ON_WHITESPACE ON_WHITESPACE
{ {

View file

@ -31,7 +31,7 @@
#include <AK/Types.h> #include <AK/Types.h>
#include <AK/Utf8View.h> #include <AK/Utf8View.h>
#include <LibWeb/Forward.h> #include <LibWeb/Forward.h>
#include <LibWeb/Parser/HTMLToken.h> #include <LibWeb/HTML/Parser/HTMLToken.h>
namespace Web::HTML { namespace Web::HTML {

View file

@ -25,7 +25,7 @@
*/ */
#include <LibWeb/DOM/Element.h> #include <LibWeb/DOM/Element.h>
#include <LibWeb/Parser/ListOfActiveFormattingElements.h> #include <LibWeb/HTML/Parser/ListOfActiveFormattingElements.h>
namespace Web::HTML { namespace Web::HTML {

View file

@ -25,8 +25,8 @@
*/ */
#include <LibWeb/DOM/Element.h> #include <LibWeb/DOM/Element.h>
#include <LibWeb/Parser/HTMLDocumentParser.h> #include <LibWeb/HTML/Parser/HTMLDocumentParser.h>
#include <LibWeb/Parser/StackOfOpenElements.h> #include <LibWeb/HTML/Parser/StackOfOpenElements.h>
namespace Web::HTML { namespace Web::HTML {

View file

@ -35,7 +35,7 @@
#include <LibWeb/Loader/FrameLoader.h> #include <LibWeb/Loader/FrameLoader.h>
#include <LibWeb/Loader/ResourceLoader.h> #include <LibWeb/Loader/ResourceLoader.h>
#include <LibWeb/Page.h> #include <LibWeb/Page.h>
#include <LibWeb/Parser/HTMLDocumentParser.h> #include <LibWeb/HTML/Parser/HTMLDocumentParser.h>
namespace Web { namespace Web {

View file

@ -51,7 +51,7 @@
#include <LibWeb/Loader/ResourceLoader.h> #include <LibWeb/Loader/ResourceLoader.h>
#include <LibWeb/PageView.h> #include <LibWeb/PageView.h>
#include <LibWeb/Painting/PaintContext.h> #include <LibWeb/Painting/PaintContext.h>
#include <LibWeb/Parser/HTMLDocumentParser.h> #include <LibWeb/HTML/Parser/HTMLDocumentParser.h>
#include <LibWeb/UIEvents/MouseEvent.h> #include <LibWeb/UIEvents/MouseEvent.h>
#include <stdio.h> #include <stdio.h>

View file

@ -43,7 +43,7 @@
#include <LibJS/Runtime/JSONObject.h> #include <LibJS/Runtime/JSONObject.h>
#include <LibJS/Runtime/MarkedValueList.h> #include <LibJS/Runtime/MarkedValueList.h>
#include <LibWeb/PageView.h> #include <LibWeb/PageView.h>
#include <LibWeb/Parser/HTMLDocumentParser.h> #include <LibWeb/HTML/Parser/HTMLDocumentParser.h>
#include <LibWeb/Loader/ResourceLoader.h> #include <LibWeb/Loader/ResourceLoader.h>
#include <sys/time.h> #include <sys/time.h>