[webkit-reviews] review granted: [Bug 237245] Trigger PDF download in captive portal mode instead of using PDF viewer : [Attachment 455019] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 18 07:18:20 PDT 2022


Chris Dumez <cdumez at apple.com> has granted j_pascoe at apple.com
<j_pascoe at apple.com>'s request for review:
Bug 237245: Trigger PDF download in captive portal mode instead of using PDF
viewer
https://bugs.webkit.org/show_bug.cgi?id=237245

Attachment 455019: Patch

https://bugs.webkit.org/attachment.cgi?id=455019&action=review




--- Comment #10 from Chris Dumez <cdumez at apple.com> ---
Comment on attachment 455019
  --> https://bugs.webkit.org/attachment.cgi?id=455019
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=455019&action=review

r=me with Tim's proposed change.

>> Source/WebKit/UIProcess/WebPageProxy.cpp:5735
>> +	    if (captivePortalMode ==
WebProcessProxy::CaptivePortalMode::Enabled &&
MIMETypeRegistry::isPDFOrPostScriptMIMEType(navigationResponse->response().mime
Type()))
> 
> I'm not sure if this works, but I think you can do:
> 
> ```
> if (process->captivePortalMode() ==
WebProcessProxy::CaptivePortalMode::Enabled)
> ```
> 
> directly, instead of checking through policies. Though I might be wrong :)

I agree with Tim here. His proposal is simpler and I believe it would work
since we would have already switched to a captive-portal-mode process earlier
(during navigation policy decision).


More information about the webkit-reviews mailing list