| Summary: | Fix Safari-side SafeBrowsing telemetry | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Eliot Hsu <eliothsu> | ||||||
| Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | achristensen, webkit-bug-importer | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | Other | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Attachments: |
|
||||||||
|
Description
Eliot Hsu
2021-12-17 11:35:50 PST
Created attachment 447466 [details]
Patch
Created attachment 447631 [details]
Patch
Comment on attachment 447631 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=447631&action=review > Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm:1801 > if (navigatesFrame && forMainFrameNavigation) { > // The safe browsing warning will be hidden once the next page is shown. > + bool continuingUnsafeLoad = WTF::switchOn(result, > + [] (ContinueUnsafeLoad continueUnsafeLoad) { return continueUnsafeLoad == ContinueUnsafeLoad::Yes; }, > + [] (const URL&) { return false; } > + ); If navigatesFrame is true, then we know that result is ContinueUnsafeLoad::Yes. This check seems unnecessary. > Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm:1806 > + else > + dictionary.set("action"_s, String("redirect to url")); And this seems unreachable. Comment on attachment 447631 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=447631&action=review >> Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm:1801 >> + ); > > If navigatesFrame is true, then we know that result is ContinueUnsafeLoad::Yes. This check seems unnecessary. In the case where the Safe Browsing warning page shows, and the user clicks on the "Learn more..." or "report an error" links instead of "Visit this unsafe website", then `navigatesFrame` and `forMainFrameNavigation` are both true, but `continueUnsafeLoad` is `ContinueUnsafeLoad::No`. Comment on attachment 447631 [details]
Patch
yep, I read it wrong the first time.
Committed r287333 (245479@main): <https://commits.webkit.org/245479@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 447631 [details]. |