|
@@ -48,6 +48,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 <stdio.h>
|
|
#include <stdio.h>
|
|
|
|
|
|
//#define SELECTION_DEBUG
|
|
//#define SELECTION_DEBUG
|
|
@@ -272,6 +273,13 @@ void PageView::reload()
|
|
load(page().main_frame().document()->url());
|
|
load(page().main_frame().document()->url());
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+void PageView::load_html(const StringView& html, const URL& url)
|
|
|
|
+{
|
|
|
|
+ HTMLDocumentParser parser(html, "utf-8");
|
|
|
|
+ parser.run(url);
|
|
|
|
+ set_document(&parser.document());
|
|
|
|
+}
|
|
|
|
+
|
|
bool PageView::load(const URL& url)
|
|
bool PageView::load(const URL& url)
|
|
{
|
|
{
|
|
if (window())
|
|
if (window())
|