mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 23:57:34 +00:00
Ladybird: Allow creating new tabs with plain HTML
This will allow us to internally create a new tab with HTML, to be used by the View Source command.
This commit is contained in:
parent
9c4ce1b80b
commit
a718a1f3a6
10 changed files with 83 additions and 29 deletions
|
@ -100,11 +100,16 @@ struct HideCursor {
|
|||
|
||||
#pragma mark - Public methods
|
||||
|
||||
- (void)load:(URL const&)url
|
||||
- (void)loadURL:(URL const&)url
|
||||
{
|
||||
m_web_view_bridge->load(url);
|
||||
}
|
||||
|
||||
- (void)loadHTML:(StringView)html url:(URL const&)url
|
||||
{
|
||||
m_web_view_bridge->load_html(html, url);
|
||||
}
|
||||
|
||||
- (void)handleResize
|
||||
{
|
||||
[self updateViewportRect:Ladybird::WebViewBridge::ForResize::Yes];
|
||||
|
@ -364,7 +369,7 @@ struct HideCursor {
|
|||
fromTab:[self tab]
|
||||
activateTab:Web::HTML::ActivateTab::Yes];
|
||||
} else {
|
||||
[[self tabController] load:url];
|
||||
[[self tabController] loadURL:url];
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue