File tree Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -188,6 +188,7 @@ - (nonnull TabController*)createNewTab:(Web::HTML::ActivateTab)activate_tab
188
188
}
189
189
190
190
[self .managed_tabs addObject: controller];
191
+ [controller onCreateNewTab ];
191
192
return controller;
192
193
}
193
194
Original file line number Diff line number Diff line change @@ -35,11 +35,14 @@ struct TabSettings {
35
35
36
36
- (void )onTitleChange : (ByteString const &)title ;
37
37
38
+ - (void )onCreateNewTab ;
39
+
38
40
- (void )navigateBack : (id )sender ;
39
41
- (void )navigateForward : (id )sender ;
40
42
- (void )reload : (id )sender ;
41
43
- (void )clearHistory ;
42
44
45
+ - (void )setPopupBlocking : (BOOL )block_popups ;
43
46
- (void )debugRequest : (ByteString const &)request argument : (ByteString const &)argument ;
44
47
45
48
- (void )focusLocationToolbarItem ;
Original file line number Diff line number Diff line change @@ -139,6 +139,11 @@ - (void)onTitleChange:(ByteString const&)title
139
139
m_title = title;
140
140
}
141
141
142
+ - (void )onCreateNewTab
143
+ {
144
+ [self setPopupBlocking: m_settings.block_popups];
145
+ }
146
+
142
147
- (void )zoomIn : (id )sender
143
148
{
144
149
[[[self tab ] web_view ] zoomIn ];
@@ -348,7 +353,12 @@ - (void)toggleScripting:(id)sender
348
353
- (void )togglePopupBlocking : (id )sender
349
354
{
350
355
m_settings.block_popups = !m_settings.block_popups ;
351
- [self debugRequest: " block-pop-ups" argument: m_settings.block_popups ? " on" : " off" ];
356
+ [self setPopupBlocking: m_settings.block_popups];
357
+ }
358
+
359
+ - (void )setPopupBlocking : (BOOL )block_popups
360
+ {
361
+ [self debugRequest: " block-pop-ups" argument: block_popups ? " on" : " off" ];
352
362
}
353
363
354
364
- (void )toggleSameOriginPolicy : (id )sender
You can’t perform that action at this time.
0 commit comments