mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:47: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];
|
[super drawRect:rect];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)viewDidMoveToWindow
|
||||||
|
{
|
||||||
|
[super viewDidMoveToWindow];
|
||||||
|
[self handleResize];
|
||||||
|
}
|
||||||
|
|
||||||
- (void)viewDidEndLiveResize
|
- (void)viewDidEndLiveResize
|
||||||
{
|
{
|
||||||
[super viewDidEndLiveResize];
|
[super viewDidEndLiveResize];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue