1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-23 18:55:08 +00:00

TextEditor: Replace InProcessWebView with OutOfProcessWebView

This commit is contained in:
Linus Groh 2020-10-08 21:12:10 +01:00 committed by Andreas Kling
parent 9f3789cdc7
commit f6af2d747e
4 changed files with 6 additions and 5 deletions

View file

@ -25,7 +25,7 @@
"name": "editor" "name": "editor"
}, },
{ {
"class": "Web::InProcessWebView", "class": "Web::OutOfProcessWebView",
"name": "webview", "name": "webview",
"visible": false "visible": false
} }

View file

@ -56,7 +56,7 @@
#include <LibGUI/ToolBarContainer.h> #include <LibGUI/ToolBarContainer.h>
#include <LibGfx/Font.h> #include <LibGfx/Font.h>
#include <LibMarkdown/Document.h> #include <LibMarkdown/Document.h>
#include <LibWeb/InProcessWebView.h> #include <LibWeb/OutOfProcessWebView.h>
#include <string.h> #include <string.h>
TextEditorWidget::TextEditorWidget() TextEditorWidget::TextEditorWidget()
@ -85,7 +85,7 @@ TextEditorWidget::TextEditorWidget()
update_title(); update_title();
}; };
m_page_view = static_cast<Web::InProcessWebView&>(*find_descendant_by_name("webview")); m_page_view = static_cast<Web::OutOfProcessWebView&>(*find_descendant_by_name("webview"));
m_page_view->on_link_hover = [this](auto& url) { m_page_view->on_link_hover = [this](auto& url) {
if (url.is_valid()) if (url.is_valid())
m_statusbar->set_text(url.to_string()); m_statusbar->set_text(url.to_string());

View file

@ -106,7 +106,7 @@ private:
RefPtr<GUI::Action> m_ini_highlight; RefPtr<GUI::Action> m_ini_highlight;
RefPtr<GUI::Action> m_shell_highlight; RefPtr<GUI::Action> m_shell_highlight;
RefPtr<Web::InProcessWebView> m_page_view; RefPtr<Web::OutOfProcessWebView> m_page_view;
GUI::ActionGroup font_actions; GUI::ActionGroup font_actions;

View file

@ -148,6 +148,7 @@ namespace Web {
class EventHandler; class EventHandler;
class Frame; class Frame;
class FrameLoader; class FrameLoader;
class InProcessWebView;
class LayoutBlock; class LayoutBlock;
class LayoutButton; class LayoutButton;
class LayoutCheckBox; class LayoutCheckBox;
@ -159,9 +160,9 @@ class LineBox;
class LineBoxFragment; class LineBoxFragment;
class LoadRequest; class LoadRequest;
class Origin; class Origin;
class OutOfProcessWebView;
class Page; class Page;
class PageClient; class PageClient;
class InProcessWebView;
class PaintContext; class PaintContext;
class Resource; class Resource;
class ResourceLoader; class ResourceLoader;