That was only possible in legacy WebKit that we no longer support. The code can be simplified a bit.
Created attachment 372550 [details]
Comment on attachment 372550 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=372550&action=review
Wow, this survived a really long time.
> + Rename PlatformWidget as PlatformViewWidget to avoid conflict with PlatformWidget defined in WebCore.
Perhaps you hit a unified build issue? WebCore::PlatformWidget and WebKit::PlatformWidget are not the same and should not conflict except when a source file that is using namespace WebCore; gets unified into another source file that isn't expecting it.
Anyway, this change is harmless and I think we can skirt the owner rules if it's a build issue.
Those ifdefs are usually defined outside the namespace, because Namespace::GtkWidget doesn't exist, for example. It has worked so far because we were using GtkWidget in both places.
Committed r246669: <https://trac.webkit.org/changeset/246669>