WebKit Bugzilla
Attachment 349852 Details for
Bug 189636
: Expose XPCServiceMain on a WebProcess object rather than WKProcessPool
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-189636-20180914224605.patch (text/plain), 11.31 KB, created by
Alex Christensen
on 2018-09-14 22:46:06 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Alex Christensen
Created:
2018-09-14 22:46:06 PDT
Size:
11.31 KB
patch
obsolete
>Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 236030) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,33 @@ >+2018-09-14 Alex Christensen <achristensen@webkit.org> >+ >+ Expose XPCServiceMain in a WebProcess header rather than WKProcessPool >+ https://bugs.webkit.org/show_bug.cgi?id=189636 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Fix a few build failures along the way. >+ >+ * PluginProcess/mac/PluginControllerProxyMac.mm: >+ (WebKit::PluginControllerProxy::windowAndViewFramesChanged): >+ (WebKit::PluginControllerProxy::updateLayerHostingContext): >+ * PluginProcess/mac/PluginProcessMac.mm: >+ (WebKit::replacedNSWorkspace_launchApplicationAtURL_options_configuration_error): >+ (WebKit::PluginProcess::platformInitializeProcess): >+ * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h: >+ * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm: >+ (WebKit::XPCServiceMain): >+ (main): >+ * UIProcess/API/Cocoa/WKProcessPool.mm: >+ (+[WKProcessPool _webContentProcessXPCMain]): Deleted. >+ * UIProcess/API/Cocoa/WKProcessPoolPrivate.h: >+ * WebProcess/InjectedBundle/API/c/WKBundle.cpp: >+ (WKWebProcessMain): >+ * WebProcess/InjectedBundle/API/c/WKBundle.h: >+ * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm: >+ (-[WKAccessibilityWebPageObject convertScreenPointToRootView:]): >+ (-[WKAccessibilityWebPageObject accessibilityAttributeValue:]): >+ (-[WKAccessibilityWebPageObject accessibilityHitTest:]): >+ > 2018-09-14 Matt Lewis <jlewis3@apple.com> > > Unreviewed, rolling out r236020. >Index: Source/WebKit/PluginProcess/mac/PluginControllerProxyMac.mm >=================================================================== >--- Source/WebKit/PluginProcess/mac/PluginControllerProxyMac.mm (revision 236017) >+++ Source/WebKit/PluginProcess/mac/PluginControllerProxyMac.mm (working copy) >@@ -37,8 +37,6 @@ > #import <QuartzCore/QuartzCore.h> > #import <WebCore/GraphicsContextCG.h> > >-using namespace WebCore; >- > namespace WebKit { > > void PluginControllerProxy::pluginFocusOrWindowFocusChanged(bool pluginHasFocusAndWindowHasFocus) >@@ -90,7 +88,7 @@ void PluginControllerProxy::platformGeom > [CATransaction commit]; > } > >-void PluginControllerProxy::windowAndViewFramesChanged(const IntRect& windowFrameInScreenCoordinates, const IntRect& viewFrameInWindowCoordinates) >+void PluginControllerProxy::windowAndViewFramesChanged(const WebCore::IntRect& windowFrameInScreenCoordinates, const WebCore::IntRect& viewFrameInWindowCoordinates) > { > m_plugin->windowAndViewFramesChanged(windowFrameInScreenCoordinates, viewFrameInWindowCoordinates); > } >@@ -135,7 +133,7 @@ void PluginControllerProxy::updateLayerH > #endif > } > >- m_layerHostingContext->setColorSpace(sRGBColorSpaceRef()); >+ m_layerHostingContext->setColorSpace(WebCore::sRGBColorSpaceRef()); > m_layerHostingContext->setColorMatchUntaggedContent(true); > > m_layerHostingContext->setRootLayer(platformLayer); >Index: Source/WebKit/PluginProcess/mac/PluginProcessMac.mm >=================================================================== >--- Source/WebKit/PluginProcess/mac/PluginProcessMac.mm (revision 236017) >+++ Source/WebKit/PluginProcess/mac/PluginProcessMac.mm (working copy) >@@ -56,8 +56,6 @@ > #import <wtf/HashSet.h> > #import <wtf/NeverDestroyed.h> > >-using namespace WebCore; >- > const CFStringRef kLSPlugInBundleIdentifierKey = CFSTR("LSPlugInBundleIdentifierKey"); > > // These values were chosen to match default NSURLCache sizes at the time of this writing. >@@ -401,7 +399,7 @@ static NSRunningApplication *replacedNSW > } > } > >- if (PluginProcess::singleton().launchApplicationAtURL(URL(url).string(), arguments)) { >+ if (PluginProcess::singleton().launchApplicationAtURL(WebCore::URL(url).string(), arguments)) { > if (error) > *error = nil; > return nil; >@@ -534,7 +532,7 @@ void PluginProcess::platformInitializePr > initializeCocoaOverrides(); > > bool experimentalPlugInSandboxProfilesEnabled = parameters.extraInitializationData.get("experimental-sandbox-plugin") == "1"; >- RuntimeEnabledFeatures::sharedFeatures().setExperimentalPlugInSandboxProfilesEnabled(experimentalPlugInSandboxProfilesEnabled); >+ WebCore::RuntimeEnabledFeatures::sharedFeatures().setExperimentalPlugInSandboxProfilesEnabled(experimentalPlugInSandboxProfilesEnabled); > > // FIXME: It would be better to proxy SetCursor calls over to the UI process instead of > // allowing plug-ins to change the mouse cursor at any time. >Index: Source/WebKit/Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h >=================================================================== >--- Source/WebKit/Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h (revision 236017) >+++ Source/WebKit/Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h (working copy) >@@ -117,7 +117,7 @@ void XPCServiceInitializer(OSObjectPtr<x > XPCServiceType::singleton().initialize(parameters); > } > >-int XPCServiceMain(); >+int XPCServiceMain(int, const char**); > > void XPCServiceExit(OSObjectPtr<xpc_object_t>&& priorityBoostMessage); > >Index: Source/WebKit/Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm >=================================================================== >--- Source/WebKit/Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm (revision 236017) >+++ Source/WebKit/Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm (working copy) >@@ -92,7 +92,7 @@ static void XPCServiceEventHandler(xpc_c > xpc_connection_resume(peer); > } > >-int XPCServiceMain() >+int XPCServiceMain(int, const char**) > { > #if defined(__i386__) > // FIXME: This should only be done for the 32-bit plug-in XPC service so we rely on the fact that >@@ -160,7 +160,7 @@ int XPCServiceMain() > > } // namespace WebKit > >-int main(int argc, char** argv) >+int main(int argc, const char** argv) > { >- return WebKit::XPCServiceMain(); >+ return WebKit::XPCServiceMain(argc, argv); > } >Index: Source/WebKit/UIProcess/API/Cocoa/WKProcessPool.mm >=================================================================== >--- Source/WebKit/UIProcess/API/Cocoa/WKProcessPool.mm (revision 236017) >+++ Source/WebKit/UIProcess/API/Cocoa/WKProcessPool.mm (working copy) >@@ -40,7 +40,6 @@ > #import "WebCookieManagerProxy.h" > #import "WebProcessMessages.h" > #import "WebProcessPool.h" >-#import "XPCServiceEntryPoint.h" > #import "_WKAutomationDelegate.h" > #import "_WKAutomationSessionInternal.h" > #import "_WKDownloadDelegate.h" >@@ -182,11 +181,6 @@ + (NSURL *)_websiteDataURLForContainerWi > return [url URLByAppendingPathComponent:@"WebsiteData" isDirectory:YES]; > } > >-+ (int)_webContentProcessXPCMain >-{ >- return WebKit::XPCServiceMain(); >-} >- > - (void)_setAllowsSpecificHTTPSCertificate:(NSArray *)certificateChain forHost:(NSString *)host > { > _processPool->allowSpecificHTTPSCertificateForHost(WebKit::WebCertificateInfo::create(WebCore::CertificateInfo((__bridge CFArrayRef)certificateChain)).ptr(), host); >Index: Source/WebKit/UIProcess/API/Cocoa/WKProcessPoolPrivate.h >=================================================================== >--- Source/WebKit/UIProcess/API/Cocoa/WKProcessPoolPrivate.h (revision 236017) >+++ Source/WebKit/UIProcess/API/Cocoa/WKProcessPoolPrivate.h (working copy) >@@ -79,8 +79,6 @@ > > - (void)_registerURLSchemeAsCanDisplayOnlyIfCanRequest:(NSString *)scheme WK_API_AVAILABLE(macosx(10.14), ios(12.0)); > >-+ (int)_webContentProcessXPCMain WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA)); >- > // Test only. Should be called only while no web content processes are running. > - (void)_terminateStorageProcess; > - (void)_terminateNetworkProcess; >Index: Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundle.cpp >=================================================================== >--- Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundle.cpp (revision 236017) >+++ Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundle.cpp (working copy) >@@ -43,6 +43,7 @@ > #include "WebFrame.h" > #include "WebPage.h" > #include "WebPageGroupProxy.h" >+#include "XPCServiceEntryPoint.h" > #include <WebCore/DatabaseTracker.h> > #include <WebCore/MemoryRelease.h> > #include <WebCore/ResourceLoadObserver.h> >@@ -259,6 +260,11 @@ void WKBundleSetDatabaseQuota(WKBundleRe > DatabaseTracker::singleton().setQuota(*SecurityOriginData::fromDatabaseIdentifier("file__0"), quota); > } > >+int WKWebProcessMain(int argc, const char** argv) >+{ >+ return XPCServiceMain(argc, argv); >+} >+ > void WKBundleReleaseMemory(WKBundleRef) > { > WebCore::releaseMemory(WTF::Critical::Yes, WTF::Synchronous::Yes); >Index: Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundle.h >=================================================================== >--- Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundle.h (revision 236017) >+++ Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundle.h (working copy) >@@ -78,6 +78,8 @@ WK_EXPORT void WKBundlePostSynchronousMe > > WK_EXPORT WKConnectionRef WKBundleGetApplicationConnection(WKBundleRef bundle); > >+WK_EXPORT int WKWebProcessMain(int argc, const char** argv) WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA)); >+ > WK_EXPORT void WKBundleReportException(JSContextRef, JSValueRef exception); > > #ifdef __cplusplus >Index: Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm >=================================================================== >--- Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm (revision 236017) >+++ Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm (working copy) >@@ -48,9 +48,6 @@ > #import <pal/spi/mac/NSAccessibilitySPI.h> > #import <wtf/ObjcRuntimeExtras.h> > >-using namespace WebCore; >-using namespace WebKit; >- > @implementation WKAccessibilityWebPageObject > > - (void)dealloc >@@ -100,7 +97,7 @@ - (void)accessibilitySetValue:(id)value > > - (NSPoint)convertScreenPointToRootView:(NSPoint)point > { >- return m_page->screenToRootView(IntPoint(point.x, point.y)); >+ return m_page->screenToRootView(WebCore::IntPoint(point.x, point.y)); > } > > - (NSArray *)accessibilityActionNames >@@ -152,8 +149,8 @@ - (id)accessibilityAttributeValue:(NSStr > return [[self accessibilityRootObjectWrapper] accessibilityAttributeValue:attribute]; > > if ([attribute isEqualToString:NSAccessibilitySizeAttribute]) { >- const IntSize& s = m_page->size(); >- return [NSValue valueWithSize:NSMakeSize(s.width(), s.height())]; >+ const auto& size = m_page->size(); >+ return [NSValue valueWithSize:NSMakeSize(size.width(), size.height())]; > } > > if ([attribute isEqualToString:NSAccessibilityChildrenAttribute]) >@@ -198,11 +195,11 @@ - (id)accessibilityHitTest:(NSPoint)poin > if (!m_page) > return nil; > >- IntPoint convertedPoint = m_page->screenToRootView(IntPoint(point)); >+ auto convertedPoint = m_page->screenToRootView(WebCore::IntPoint(point)); > > // Some plugins may be able to figure out the scroll position and inset on their own. > bool applyContentOffset = true; >- if (auto pluginView = WebPage::pluginViewForFrame(m_page->mainFrame())) >+ if (auto pluginView = WebKit::WebPage::pluginViewForFrame(m_page->mainFrame())) > applyContentOffset = !pluginView->plugin()->pluginHandlesContentOffsetForAccessibilityHitTest(); > > if (applyContentOffset) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 189636
:
349814
|
349832
|
349852
|
349864
|
349887
|
349894