Bug 232396

Summary: Disable NETSCAPE_PLUGIN_API at build time on macOS and Windows
Product: WebKit Reporter: Alex Christensen <achristensen>
Component: New BugsAssignee: Alex Christensen <achristensen>
Status: RESOLVED FIXED    
Severity: Normal CC: aroben, benjamin, cdumez, cmarcelo, darin, ews-watchlist, ggaren, mkwst
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
ews-feeder: commit-queue-
Patch
none
Patch ggaren: review+

Description Alex Christensen 2021-10-27 12:24:08 PDT
Disable NETSCAPE_PLUGIN_API at build time on macOS
Comment 1 Alex Christensen 2021-10-27 12:34:28 PDT
Created attachment 442622 [details]
Patch
Comment 2 Darin Adler 2021-10-27 14:58:20 PDT
Comment on attachment 442622 [details]
Patch

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

Looks like there are 10 tests where we have to change expected results or skip or remove the tests.

> Source/WTF/ChangeLog:3
> +        Disable NETSCAPE_PLUGIN_API at build time on macOS

Is it enabled for any other platform, or is this the last one with it on?
Comment 3 Alex Christensen 2021-10-27 16:45:59 PDT
Created attachment 442651 [details]
Patch
Comment 4 Alex Christensen 2021-10-27 17:34:32 PDT
Supported was removed on Linux in https://bugs.webkit.org/show_bug.cgi?id=215503

NPAPI worked on Windows WebKitLegacy last I checked but I am under the impression that that was just for Safari on Windows.  I am under the impression that it is no longer used for anything.

It was never made to work for M1 Macs.
It was never made to work for WebKit2 on Windows.
Comment 5 Alex Christensen 2021-10-27 19:22:09 PDT
Created attachment 442663 [details]
Patch
Comment 6 Alex Christensen 2021-10-27 19:57:34 PDT
Comment on attachment 442663 [details]
Patch

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

> LayoutTests/fast/replaced/pdf-as-embed-with-no-mime-type-is-not-blank.html:-1
> -<!-- webkit-test-runner [ PluginsEnabled=false ] -->

This should load fine.  It looks like some embed loading code is behind NETSCAPE_PLUGIN_API that shouldn't be.
Comment 7 Alex Christensen 2021-10-27 21:28:19 PDT
Created attachment 442671 [details]
Patch
Comment 8 Alex Christensen 2021-10-27 22:19:30 PDT
Created attachment 442675 [details]
Patch
Comment 9 Alex Christensen 2021-10-28 08:41:19 PDT
Created attachment 442708 [details]
Patch
Comment 10 Darin Adler 2021-10-28 09:14:48 PDT
(In reply to Alex Christensen from comment #4)
> NPAPI worked on Windows WebKitLegacy last I checked

Can we turn that off?
Comment 11 Alex Christensen 2021-10-28 11:02:41 PDT
Created attachment 442721 [details]
Patch
Comment 12 Alex Christensen 2021-10-28 13:02:59 PDT
This turns off NPAPI on Windows WebKitLegacy, too.
Comment 13 Alex Christensen 2021-10-28 13:06:36 PDT
Created attachment 442732 [details]
Patch
Comment 14 Geoffrey Garen 2021-10-28 13:10:37 PDT
Comment on attachment 442732 [details]
Patch

r=me
Comment 15 Alex Christensen 2021-10-28 14:21:56 PDT
r285003
Comment 16 Adam Roben (:aroben) 2021-10-30 09:34:42 PDT
(In reply to Alex Christensen from comment #4)
> It was never made to work for WebKit2 on Windows.

I beg to differ! For example, https://bugs.webkit.org/show_bug.cgi?id=60210

It’s nice to see this all go though.
Comment 17 Alex Christensen 2021-10-30 10:44:09 PDT
Well there's a blast from the past!  I take that back.  It wasn't implemented for WebKit2 Windows in recent trunk, but it had been implemented many years ago then removed many years ago.