mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:07:35 +00:00
Browser+WebContent+WebDriver: Move Get/Set Window Rect to WebContent
This also lets us more fully implement the "restore the window" method, which requires we block until the document reaches the "visible" state.
This commit is contained in:
parent
9505928fdb
commit
b57d7e4332
10 changed files with 144 additions and 114 deletions
|
@ -75,20 +75,6 @@ void WebDriverConnection::restore_window()
|
|||
}
|
||||
}
|
||||
|
||||
void WebDriverConnection::set_window_size(Gfx::IntSize const& size)
|
||||
{
|
||||
dbgln_if(WEBDRIVER_DEBUG, "WebDriverConnection: set_window_size {}", size);
|
||||
if (auto browser_window = m_browser_window.strong_ref())
|
||||
browser_window->resize(size);
|
||||
}
|
||||
|
||||
void WebDriverConnection::set_window_position(Gfx::IntPoint const& position)
|
||||
{
|
||||
dbgln_if(WEBDRIVER_DEBUG, "WebDriverConnection: set_window_position {}", position);
|
||||
if (auto browser_window = m_browser_window.strong_ref())
|
||||
browser_window->move_to(position);
|
||||
}
|
||||
|
||||
void WebDriverConnection::maximize_window()
|
||||
{
|
||||
dbgln_if(WEBDRIVER_DEBUG, "WebDriverConnection: maximize_window");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue