WebKit Bugzilla
Attachment 349832 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-20180914171419.patch (text/plain), 15.94 KB, created by
Alex Christensen
on 2018-09-14 17:14:20 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Alex Christensen
Created:
2018-09-14 17:14:20 PDT
Size:
15.94 KB
patch
obsolete
>Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 236019) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,19 @@ >+2018-09-14 Alex Christensen <achristensen@webkit.org> >+ >+ Expose XPCServiceMain on a WebProcess object rather than WKProcessPool >+ https://bugs.webkit.org/show_bug.cgi?id=189636 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * SourcesCocoa.txt: >+ * UIProcess/API/Cocoa/WKProcessPool.mm: >+ (+[WKProcessPool _webContentProcessXPCMain]): Deleted. >+ * UIProcess/API/Cocoa/WKProcessPoolPrivate.h: >+ * WebKit.xcodeproj/project.pbxproj: >+ * WebProcess/InjectedBundle/API/Cocoa/WKWebProcess.h: Added. >+ * WebProcess/InjectedBundle/API/Cocoa/WKWebProcess.mm: Added. >+ (+[WKWebProcess main]): >+ > 2018-09-14 Geoffrey Garen <ggaren@apple.com> > > Clarify the configuration used by WKUIDelegate's createWebViewWithConfiguration >Index: Source/WebKit/SourcesCocoa.txt >=================================================================== >--- Source/WebKit/SourcesCocoa.txt (revision 236017) >+++ Source/WebKit/SourcesCocoa.txt (working copy) >@@ -478,6 +478,7 @@ WebProcess/InjectedBundle/API/c/WKBundle > WebProcess/InjectedBundle/API/c/mac/WKBundleMac.mm > WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.mm > >+WebProcess/InjectedBundle/API/Cocoa/WKWebProcess.mm > WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.mm > WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm > WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInHitTestResult.mm >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/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/WebKit.xcodeproj/project.pbxproj >=================================================================== >--- Source/WebKit/WebKit.xcodeproj/project.pbxproj (revision 236017) >+++ Source/WebKit/WebKit.xcodeproj/project.pbxproj (working copy) >@@ -1062,6 +1062,7 @@ > 5CB2378C1DF0DE6E00117AA3 /* _WKWebsitePolicies.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CB237891DF0DD4300117AA3 /* _WKWebsitePolicies.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 5CB2378E1DF0E0D300117AA3 /* _WKWebsitePoliciesInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CB2378D1DF0E0C200117AA3 /* _WKWebsitePoliciesInternal.h */; }; > 5CBC9B8E1C652CA000A8FDCF /* NetworkDataTask.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CBC9B891C6524A500A8FDCF /* NetworkDataTask.h */; }; >+ 5CC2387A214C661B00A28705 /* WKWebProcess.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CC23878214C661000A28705 /* WKWebProcess.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 5CD286511E7235990094FDC8 /* WKContentRuleListStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CD2864D1E722F440094FDC8 /* WKContentRuleListStore.h */; settings = {ATTRIBUTES = (Public, ); }; }; > 5CD286531E7235AA0094FDC8 /* _WKUserContentFilterPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CD286491E722F440094FDC8 /* _WKUserContentFilterPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 5CD286541E7235B10094FDC8 /* WKContentRuleList.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CD2864A1E722F440094FDC8 /* WKContentRuleList.h */; settings = {ATTRIBUTES = (Public, ); }; }; >@@ -3448,6 +3449,8 @@ > 5CB2378D1DF0E0C200117AA3 /* _WKWebsitePoliciesInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKWebsitePoliciesInternal.h; sourceTree = "<group>"; }; > 5CBC9B891C6524A500A8FDCF /* NetworkDataTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NetworkDataTask.h; sourceTree = "<group>"; }; > 5CBC9B8B1C65257300A8FDCF /* NetworkDataTaskCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = NetworkDataTaskCocoa.mm; sourceTree = "<group>"; }; >+ 5CC23878214C661000A28705 /* WKWebProcess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKWebProcess.h; sourceTree = "<group>"; }; >+ 5CC23879214C661000A28705 /* WKWebProcess.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKWebProcess.mm; sourceTree = "<group>"; }; > 5CC5DB9121488E16006CB8A8 /* SharedBufferDataReference.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SharedBufferDataReference.h; sourceTree = "<group>"; }; > 5CD286491E722F440094FDC8 /* _WKUserContentFilterPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKUserContentFilterPrivate.h; sourceTree = "<group>"; }; > 5CD2864A1E722F440094FDC8 /* WKContentRuleList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKContentRuleList.h; sourceTree = "<group>"; }; >@@ -5388,6 +5391,8 @@ > 1F0181681858DC1500F92884 /* Cocoa */ = { > isa = PBXGroup; > children = ( >+ 5CC23878214C661000A28705 /* WKWebProcess.h */, >+ 5CC23879214C661000A28705 /* WKWebProcess.mm */, > 1AA2E56518D77508003814BD /* WKWebProcessBundleParameters.h */, > 1AA2E56418D77508003814BD /* WKWebProcessBundleParameters.mm */, > 3775122E1DF0DC8B008A351C /* WKWebProcessPlugInEditingDelegate.h */, >@@ -9774,6 +9779,7 @@ > BFA6179F12F0B99D0033E0CA /* WKViewPrivate.h in Headers */, > C5E1AFE916B20B75006CC1F2 /* WKWebArchive.h in Headers */, > C5E1AFEB16B20B7E006CC1F2 /* WKWebArchiveResource.h in Headers */, >+ 5CC2387A214C661B00A28705 /* WKWebProcess.h in Headers */, > 1AA2E56718D77508003814BD /* WKWebProcessBundleParameters.h in Headers */, > BC989D82161A7E5D000D46D3 /* WKWebProcessPlugIn.h in Headers */, > BC8F2F2B16273A2C005FACB5 /* WKWebProcessPlugInBrowserContextController.h in Headers */, >Index: Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcess.h >=================================================================== >--- Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcess.h (nonexistent) >+++ Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcess.h (working copy) >@@ -0,0 +1,38 @@ >+/* >+ * Copyright (C) 2018 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#import <WebKit/WKFoundation.h> >+ >+#if WK_API_ENABLED >+ >+@interface WKWebProcess : NSObject >+ >+- (instancetype)init NS_UNAVAILABLE; >+ >++ (int)main; >+ >+@end >+ >+#endif >Index: Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcess.mm >=================================================================== >--- Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcess.mm (nonexistent) >+++ Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcess.mm (working copy) >@@ -0,0 +1,42 @@ >+/* >+ * Copyright (C) 2018 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#import "config.h" >+#import "WKWebProcess.h" >+ >+#if WK_API_ENABLED >+ >+#import "XPCServiceEntryPoint.h" >+ >+@implementation WKWebProcess >+ >++ (int)main >+{ >+ return WebKit::XPCServiceMain(); >+} >+ >+@end >+ >+#endif >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