mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +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
Notes:
sideshowbarker
2024-07-16 18:03:21 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/1ffe0d3590 Pull-request: https://github.com/SerenityOS/serenity/pull/20836 Reviewed-by: https://github.com/ADKaster ✅
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…
Reference in a new issue