I'm not going to be able to finish this, so someone else is going to need to polish this off. This compiles all of open source WebKit. I haven't tested iOS.
Created attachment 237001 [details]
Created attachment 237002 [details]
Comment on attachment 237002 [details]
This needs to be landed in pieces.
1) Land all the parts of this that add in or remove WEBCORE_EXPORT. Except possibly for the ones in npruntime_impl.h since that is an imported header file that we generally wish not to modify. Maybe that’s not a big deal any more, but that feels like an open question to me at this time.
2) Construct the smallest possible “throw the switch” patch, *not* the full “clean up all the remnants” version. Run the nm command before and after this patch to make a diff. If the diff is acceptable, then land that patch.
3) Follow up with the cleanup patch that removes all the remnants of the old system. This step includes deleting the actual export files, and even the sort-export-file script and the code we recently added to check-webkit-style to invoke it.
Someone should come up with another patch for the next piece of (1). As long as it only adds a macro that has no effect, I think it can be a huge patch and we need only review it to make sure we don’t accidentally include other changes.
Someone with access to the iOS build needs to take it from here. I do not plan to land this myself. Tim?
Landed a big piece of the patch as http://trac.webkit.org/changeset/173176
Didn’t touch WebCoreSystemInterface.h because WEBCORE_EXPORT is defined as empty string, not extern, so it wouldn’t handle those declarations properly.
Also didn’t touch npruntime_impl.h yet, because I am not sure that’s truly an internal WebCore header used only by WebKit; the naming of the header implies that it’s somehow a public header shared with other browsers that implement the Netscape Plug-in API, but I suspect that is not true. Might be nice to rename this header to reduce confusion on that point.
This broke bindings tests.
bindings tests fixed in http://trac.webkit.org/changeset/173182
Thanks for fixing that. I should not have overlooked the bindings tests!
Created attachment 243741 [details]
Bring the state of WEBCORE_EXPORT annotations closer to what the exports file specifies
This patch brings the state of what’s exported when not using the exports file closer to what’s currently being exported. It avoids touching the two headers that Darin was concerned about, npruntime_impl.h and WebCoreSystemInterface.h, instead adjusting the visibility in the implementation files.
The only missing symbols after this patch are ones coming from generated files.
Attachment 243741 [details] did not pass style-queue:
ERROR: Source/WebCore/platform/SuddenTermination.h:36: Code inside a namespace should not be indented. [whitespace/indent] 
ERROR: Source/WebCore/bridge/npruntime.cpp:41: Bad include order. Mixing system and custom headers. [build/include_order] 
ERROR: Source/WebCore/bridge/NP_jsobject.cpp:49: Bad include order. Mixing system and custom headers. [build/include_order] 
ERROR: Source/WebCore/platform/graphics/mac/ColorMac.h:42: Code inside a namespace should not be indented. [whitespace/indent] 
Total errors found: 4 in 55 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Committed attachment 243741 [details] as <http://trac.webkit.org/r177739>.
This was finished in https://bugs.webkit.org/show_bug.cgi?id=141491