mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 13:27:35 +00:00
Ladybird: Explicitly handle setting the AppKit web view's first viewport
We were relying on TabController setting the web view's initial viewport in [TabController windowDidResize], which has been triggered when the Tab is first created. However, it turns out that only happens due to the toolbar being added to the Tab window, causing a resize event. When the web view is embedded in a window without a toolbar, this resize event is not triggered. Therefore, we must set the viewport ourselves when the web view is added to a window.
This commit is contained in:
parent
b9b2274078
commit
1ffe0d3590
1 changed files with 6 additions and 0 deletions
|
@ -907,6 +907,12 @@ static void copy_text_to_clipboard(StringView text)
|
|||
[super drawRect:rect];
|
||||
}
|
||||
|
||||
- (void)viewDidMoveToWindow
|
||||
{
|
||||
[super viewDidMoveToWindow];
|
||||
[self handleResize];
|
||||
}
|
||||
|
||||
- (void)viewDidEndLiveResize
|
||||
{
|
||||
[super viewDidEndLiveResize];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue