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

Ladybird: Add IPC call for creating a new child tab

This will be used for choosing a navigable that requires opening a new
tab or new window. Such as calls to window.open(), or specific WebDriver
calls.
This commit is contained in:
Andrew Kaster 2024-01-30 20:05:00 -07:00 committed by Tim Flynn
parent 7245f6f11c
commit 677bdc2a4f
17 changed files with 144 additions and 19 deletions

View file

@ -0,0 +1,34 @@
/*
* Copyright (c) 2024, Andrew Kaster <akaster@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/Optional.h>
#include <AK/Types.h>
#include <LibIPC/Forward.h>
#include <LibWeb/PixelUnits.h>
namespace Web::HTML {
struct WebViewHints {
bool popup = false;
Optional<DevicePixels> width = {};
Optional<DevicePixels> height = {};
Optional<DevicePixels> screen_x = {};
Optional<DevicePixels> screen_y = {};
};
}
namespace IPC {
template<>
ErrorOr<void> encode(Encoder&, Web::HTML::WebViewHints const&);
template<>
ErrorOr<Web::HTML::WebViewHints> decode(Decoder&);
}