Skip to content

Commit

Permalink
fix tests?
Browse files Browse the repository at this point in the history
  • Loading branch information
mallexxx committed Apr 12, 2024
1 parent 92c8032 commit 71fe933
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions DuckDuckGo/Tab/View/WebView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -392,12 +392,17 @@ extension NSTrackingArea {

@objc private dynamic func swizzled_init(rect: NSRect, options: NSTrackingArea.Options, owner: AnyObject?, userInfo: NSDictionary) -> AnyObject? {
var owner = owner
var trackingAreaSuppressor: TrackingAreaSuppressor?
if owner?.className == "WKMouseTrackingObserver" {
let helper = TrackingAreaSuppressor(owner: owner)
self.trackingAreaSuppressor = helper
owner = helper
trackingAreaSuppressor = TrackingAreaSuppressor(owner: owner)
owner = trackingAreaSuppressor
}

defer {
if let trackingAreaSuppressor {
self.trackingAreaSuppressor = trackingAreaSuppressor
}
}
return self.swizzled_init(rect: rect, options: options, owner: owner, userInfo: userInfo) /* call original */
}

Expand Down

0 comments on commit 71fe933

Please sign in to comment.