diff --git a/ios/brave-ios/Sources/Brave/Frontend/UserContent/UserScripts/Scripts_Dynamic/ScriptHandlers/Paged/ContentBlockerScriptHandler.swift b/ios/brave-ios/Sources/Brave/Frontend/UserContent/UserScripts/Scripts_Dynamic/ScriptHandlers/Paged/ContentBlockerScriptHandler.swift index d90d300303ba..c4f4006dfb47 100644 --- a/ios/brave-ios/Sources/Brave/Frontend/UserContent/UserScripts/Scripts_Dynamic/ScriptHandlers/Paged/ContentBlockerScriptHandler.swift +++ b/ios/brave-ios/Sources/Brave/Frontend/UserContent/UserScripts/Scripts_Dynamic/ScriptHandlers/Paged/ContentBlockerScriptHandler.swift @@ -139,14 +139,15 @@ extension ContentBlockerHelper: TabContentScript { guard !self.blockedRequests.contains(where: { $0.requestURL == requestURL }) else { return } - let info = BlockedRequestInfo( - requestURL: requestURL, - sourceURL: sourceURL, - resourceType: dto.resourceType, - isAggressive: domain.globalBlockAdsAndTrackingLevel.isAggressive, - location: .contentBlocker + self.blockedRequests.append( + .init( + requestURL: requestURL, + sourceURL: sourceURL, + resourceType: dto.resourceType, + isAggressive: domain.globalBlockAdsAndTrackingLevel.isAggressive, + location: .contentBlocker + ) ) - self.blockedRequests.append(info) // Increase global stats (here due to BlocklistName being in Client and BraveGlobalShieldStats being // in BraveShared) diff --git a/ios/brave-ios/Sources/Brave/Frontend/UserContent/UserScripts/Scripts_Dynamic/ScriptHandlers/Paged/RequestBlockingContentScriptHandler.swift b/ios/brave-ios/Sources/Brave/Frontend/UserContent/UserScripts/Scripts_Dynamic/ScriptHandlers/Paged/RequestBlockingContentScriptHandler.swift index 9a9674e3b5c5..c017f21713e0 100644 --- a/ios/brave-ios/Sources/Brave/Frontend/UserContent/UserScripts/Scripts_Dynamic/ScriptHandlers/Paged/RequestBlockingContentScriptHandler.swift +++ b/ios/brave-ios/Sources/Brave/Frontend/UserContent/UserScripts/Scripts_Dynamic/ScriptHandlers/Paged/RequestBlockingContentScriptHandler.swift @@ -115,14 +115,15 @@ class RequestBlockingContentScriptHandler: TabContentScript { BraveGlobalShieldStats.shared.adblock += 1 let stats = tab.contentBlocker.stats tab.contentBlocker.stats = stats.adding(adCount: 1) - let info = BlockedRequestInfo( - requestURL: requestURL, - sourceURL: windowOriginURL, - resourceType: dto.data.resourceType, - isAggressive: domain.globalBlockAdsAndTrackingLevel.isAggressive, - location: .requestBlocking + tab.contentBlocker.blockedRequests.append( + .init( + requestURL: requestURL, + sourceURL: windowOriginURL, + resourceType: dto.data.resourceType, + isAggressive: domain.globalBlockAdsAndTrackingLevel.isAggressive, + location: .requestBlocking + ) ) - tab.contentBlocker.blockedRequests.append(info) } replyHandler(shouldBlock, nil) diff --git a/ui/webui/resources/sources.gni b/ui/webui/resources/sources.gni index 7493bff2b23f..c1fab100145d 100644 --- a/ui/webui/resources/sources.gni +++ b/ui/webui/resources/sources.gni @@ -13,16 +13,22 @@ brave_resources_extra_grdps = [] brave_resources_extra_grdps_deps = [] # ios does not need any static resources -if (!is_ios) { +if (is_ios) { + brave_resources_extra_grdps += [ + "$brave_resources_extra_grdps_path/brave_static_resources.grdp", + "$root_gen_dir/brave/web-ui-leo/leo.grdp", + ] +} else { brave_resources_extra_grdps += [ "$brave_resources_extra_grdps_path/brave_fonts_resources.grdp", "$brave_resources_extra_grdps_path/brave_static_resources.grdp", "$brave_resources_extra_grdps_path/brave_icons_resources.grdp", "$root_gen_dir/brave/web-ui-leo/leo.grdp", ] - brave_resources_extra_grdps_deps += [ "//brave/ui/webui/resources:grdp" ] } +brave_resources_extra_grdps_deps += [ "//brave/ui/webui/resources:grdp" ] + # At the moment, all non-static resources are only required for polymer WebUI. # This could change and, when it does, the `include_polymer` conditional can be removed # here and the one in //brave/ui/webui/resources/BUILD.gn be relied on to only add