Bundle unified sources more tightly in projects with deep directory structures
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 30 Aug 2018 20:31:32 +0000 (20:31 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 30 Aug 2018 20:31:32 +0000 (20:31 +0000)
https://bugs.webkit.org/show_bug.cgi?id=189009

Reviewed by Simon Fraser.

* Scripts/generate-unified-source-bundles.rb:
It turns out our plan to switch unified source bundle every time the directory
changes is not a good fit for projects like WebKit2 with many small directories.
It leaves many unified source bundles with only a single source file,
achieving only ~40% density.

Instead, switch unified source bundles every time the top-level directory changes.
This still achieves the goal of *usually* only rebuilding the one top-level
directory you touched, and increases source bundle density wildly, to ~95%.

Fix a variety of unification errors due to reshuffling the bundles.

* Modules/mediastream/RTCController.cpp:
* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* crypto/algorithms/CryptoAlgorithmECDSA.cpp:
(WebCore::CryptoAlgorithmECDSA::importKey):
* dom/Document.h:
* html/parser/HTMLTreeBuilder.cpp:
* loader/appcache/ApplicationCacheResourceLoader.h:
* page/AlternativeTextClient.h:
* platform/Pasteboard.h:
* platform/graphics/DisplayRefreshMonitor.cpp:
* platform/graphics/FontFamilySpecificationNull.cpp:
* platform/graphics/cocoa/WebGLLayer.mm:
(-[WebGLLayer initWithGraphicsContext3D:]):
(-[WebGLLayer copyImageSnapshotWithColorSpace:]):
(-[WebGLLayer display]):
(-[WebGLLayer allocateIOSurfaceBackingStoreWithSize:usingAlpha:]):
* platform/graphics/cocoa/WebGPULayer.mm:
(-[WebGPULayer initWithGPUDevice:]):
* platform/graphics/metal/GPUCommandQueueMetal.mm:
* platform/mac/PasteboardMac.mm:
* platform/mediastream/mac/DisplayCaptureManagerCocoa.cpp:
* platform/network/ResourceRequestBase.cpp:
* rendering/updating/RenderTreeBuilderBlockFlow.cpp:
* rendering/updating/RenderTreeBuilderInline.cpp:

* Shared/APIWebArchive.mm:
* Shared/APIWebArchiveResource.mm:
* Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
* Shared/Plugins/Netscape/mac/PluginInformationMac.mm:
* SourcesCocoa.txt:
* SourcesGTK.txt:
* UIProcess/API/APIAutomationSessionClient.h:
(API::AutomationSessionClient::sessionIdentifier const):
(API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage):
(API::AutomationSessionClient::setUserInputForCurrentJavaScriptPromptOnPage):
* UIProcess/Cocoa/LegacyCustomProtocolManagerClient.mm:
(-[WKCustomProtocolLoader initWithLegacyCustomProtocolManagerProxy:customProtocolID:request:]):
(-[WKCustomProtocolLoader connection:didFailWithError:]):
(-[WKCustomProtocolLoader connection:didReceiveResponse:]):
* UIProcess/Plugins/PluginProcessProxy.cpp:
(WebKit::generatePluginProcessCallbackID):
(WebKit::PluginProcessProxy::fetchWebsiteData):
(WebKit::PluginProcessProxy::deleteWebsiteData):
(WebKit::PluginProcessProxy::deleteWebsiteDataForHostNames):
(WebKit::generateCallbackID): Deleted.
* UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:
(-[WKScrollingNodeScrollViewDelegate scrollViewWillEndDragging:withVelocity:targetContentOffset:]):
* UIProcess/Storage/StorageProcessProxy.cpp:
(WebKit::generateStorageProcessCallbackID):
(WebKit::StorageProcessProxy::fetchWebsiteData):
(WebKit::StorageProcessProxy::deleteWebsiteData):
(WebKit::StorageProcessProxy::deleteWebsiteDataForOrigins):
(WebKit::generateCallbackID): Deleted.
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(-[WKPDFPluginAccessibilityObject accessibilityPerformAction:]):
(-[WKPDFPluginAccessibilityObject accessibilityFocusedUIElement]):
(-[WKPDFPluginAccessibilityObject accessibilityAssociatedControlForAnnotation:]):
(-[WKPDFPluginAccessibilityObject accessibilityHitTest:]):
(-[WKPDFLayerControllerDelegate updateScrollPosition:]):
(WebKit::PDFPlugin::updateCursor):
(WebKit::coreCursor):
(appendValuesInPDFNameSubtreeToVector): Deleted.
(getAllValuesInPDFNameTree): Deleted.
(getAllScriptsInPDFDocument): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235521 268f45cc-cd09-0410-ab3c-d52691b4dbfc

56 files changed:
Source/WTF/ChangeLog
Source/WTF/Scripts/generate-unified-source-bundles.rb
Source/WTF/wtf/Platform.h
Source/WTF/wtf/text/StringBuffer.h
Source/WebCore/ChangeLog
Source/WebCore/Modules/cache/WorkerCacheStorageConnection.cpp
Source/WebCore/Modules/mediastream/RTCController.cpp
Source/WebCore/Modules/paymentrequest/PaymentRequestUpdateEvent.cpp
Source/WebCore/Modules/webvr/VRDisplay.cpp
Source/WebCore/PAL/pal/crypto/gcrypt/Utilities.h
Source/WebCore/SourcesCocoa.txt
Source/WebCore/SourcesGTK.txt
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/crypto/algorithms/CryptoAlgorithmECDSA.cpp
Source/WebCore/crypto/gcrypt/GCryptUtilities.h
Source/WebCore/dom/Document.h
Source/WebCore/html/parser/HTMLTreeBuilder.cpp
Source/WebCore/loader/appcache/ApplicationCacheResourceLoader.h
Source/WebCore/page/AlternativeTextClient.h
Source/WebCore/platform/Pasteboard.h
Source/WebCore/platform/audio/mac/AudioSessionMac.cpp
Source/WebCore/platform/graphics/DisplayRefreshMonitor.cpp
Source/WebCore/platform/graphics/FontFamilySpecificationNull.cpp
Source/WebCore/platform/graphics/FontGenericFamilies.h
Source/WebCore/platform/graphics/FontTaggedSettings.cpp
Source/WebCore/platform/graphics/cairo/FontCairo.cpp
Source/WebCore/platform/graphics/cocoa/WebGLLayer.mm
Source/WebCore/platform/graphics/cocoa/WebGPULayer.mm
Source/WebCore/platform/graphics/metal/GPUCommandQueueMetal.mm
Source/WebCore/platform/mac/PasteboardMac.mm
Source/WebCore/platform/mediastream/mac/DisplayCaptureManagerCocoa.cpp
Source/WebCore/platform/network/ResourceRequestBase.cpp
Source/WebCore/platform/network/cf/FormDataStreamCFNet.cpp
Source/WebCore/platform/network/soup/SoupNetworkSession.h
Source/WebCore/platform/text/TextCodecUTF8.cpp
Source/WebCore/platform/text/TextCodecUTF8.h
Source/WebCore/rendering/updating/RenderTreeBuilderBlockFlow.cpp
Source/WebCore/rendering/updating/RenderTreeBuilderFormControls.cpp
Source/WebCore/rendering/updating/RenderTreeBuilderInline.cpp
Source/WebCore/rendering/updating/RenderTreeBuilderRuby.cpp
Source/WebCore/rendering/updating/RenderTreeUpdater.cpp
Source/WebKit/ChangeLog
Source/WebKit/Shared/APIWebArchive.mm
Source/WebKit/Shared/APIWebArchiveResource.mm
Source/WebKit/Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm
Source/WebKit/Shared/Plugins/Netscape/mac/PluginInformationMac.mm
Source/WebKit/SourcesCocoa.txt
Source/WebKit/SourcesGTK.txt
Source/WebKit/UIProcess/API/APIAutomationSessionClient.h
Source/WebKit/UIProcess/Cocoa/LegacyCustomProtocolManagerClient.mm
Source/WebKit/UIProcess/Plugins/PluginProcessProxy.cpp
Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm
Source/WebKit/UIProcess/Storage/StorageProcessProxy.cpp
Source/WebKit/UIProcess/WebPageProxy.h
Source/WebKit/WebKit.xcodeproj/project.pbxproj
Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm

index 165c56e..9267c1f 100644 (file)
@@ -1,3 +1,22 @@
+2018-08-30  Tim Horton  <timothy_horton@apple.com>
+
+        Bundle unified sources more tightly in projects with deep directory structures
+        https://bugs.webkit.org/show_bug.cgi?id=189009
+
+        Reviewed by Simon Fraser.
+
+        * Scripts/generate-unified-source-bundles.rb:
+        It turns out our plan to switch unified source bundle every time the directory
+        changes is not a good fit for projects like WebKit2 with many small directories.
+        It leaves many unified source bundles with only a single source file,
+        achieving only ~40% density.
+
+        Instead, switch unified source bundles every time the top-level directory changes.
+        This still achieves the goal of *usually* only rebuilding the one top-level
+        directory you touched, and increases source bundle density wildly, to ~95%.
+
+        * wtf/Platform.h:
+
 2018-08-29  David Kilzer  <ddkilzer@apple.com>
 
         Rename wtf/text/mac/StringMac.mm to wtf/text/cococa/StringCococa.mm
index c01966e..1fb3656 100644 (file)
@@ -210,10 +210,20 @@ class BundleManager
     end
 end
 
+def TopLevelDirectoryForPath(path)
+    if !path
+        return nil
+    end
+    while path.dirname != path.dirname.dirname
+        path = path.dirname
+    end
+    return path
+end
+
 def ProcessFileForUnifiedSourceGeneration(sourceFile)
     path = sourceFile.path
-    if ($currentDirectory != path.dirname)
-        log("Flushing because new dirname; old: #{$currentDirectory}, new: #{path.dirname}")
+    if (TopLevelDirectoryForPath($currentDirectory) != TopLevelDirectoryForPath(path.dirname))
+        log("Flushing because new top level directory; old: #{$currentDirectory}, new: #{path.dirname}")
         $bundleManagers.each_value { |x| x.flush }
         $currentDirectory = path.dirname
     end
index 0c6efb8..67cfa93 100644 (file)
 #if PLATFORM(MAC)
 #define HAVE_TOUCH_BAR 1
 #define HAVE_ADVANCED_SPELL_CHECKING 1
+#define USE_DICTATION_ALTERNATIVES 1
 
 #if defined(__LP64__)
 #define ENABLE_WEB_PLAYBACK_CONTROLS_MANAGER 1
index f293d33..e32cd26 100644 (file)
 #ifndef StringBuffer_h
 #define StringBuffer_h
 
-#include <wtf/Assertions.h>
 #include <limits>
 #include <unicode/utypes.h>
+#include <wtf/Assertions.h>
+#include <wtf/MallocPtr.h>
 
 namespace WTF {
 
index 6195ecd..489c454 100644 (file)
@@ -1,3 +1,38 @@
+2018-08-30  Tim Horton  <timothy_horton@apple.com>
+
+        Bundle unified sources more tightly in projects with deep directory structures
+        https://bugs.webkit.org/show_bug.cgi?id=189009
+
+        Reviewed by Simon Fraser.
+
+        Fix a variety of unification errors due to reshuffling the bundles.
+
+        * Modules/mediastream/RTCController.cpp:
+        * SourcesCocoa.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * crypto/algorithms/CryptoAlgorithmECDSA.cpp:
+        (WebCore::CryptoAlgorithmECDSA::importKey):
+        * dom/Document.h:
+        * html/parser/HTMLTreeBuilder.cpp:
+        * loader/appcache/ApplicationCacheResourceLoader.h:
+        * page/AlternativeTextClient.h:
+        * platform/Pasteboard.h:
+        * platform/graphics/DisplayRefreshMonitor.cpp:
+        * platform/graphics/FontFamilySpecificationNull.cpp:
+        * platform/graphics/cocoa/WebGLLayer.mm:
+        (-[WebGLLayer initWithGraphicsContext3D:]):
+        (-[WebGLLayer copyImageSnapshotWithColorSpace:]):
+        (-[WebGLLayer display]):
+        (-[WebGLLayer allocateIOSurfaceBackingStoreWithSize:usingAlpha:]):
+        * platform/graphics/cocoa/WebGPULayer.mm:
+        (-[WebGPULayer initWithGPUDevice:]):
+        * platform/graphics/metal/GPUCommandQueueMetal.mm:
+        * platform/mac/PasteboardMac.mm:
+        * platform/mediastream/mac/DisplayCaptureManagerCocoa.cpp:
+        * platform/network/ResourceRequestBase.cpp:
+        * rendering/updating/RenderTreeBuilderBlockFlow.cpp:
+        * rendering/updating/RenderTreeBuilderInline.cpp:
+
 2018-08-30  Andy Estes  <aestes@apple.com>
 
         [Payment Request] Implement the PaymentMethodChangeEvent and PaymentMethodChangeEventInit interfaces
index ad20932..1ebdd5d 100644 (file)
@@ -29,6 +29,7 @@
 
 #include "CacheQueryOptions.h"
 #include "CacheStorageProvider.h"
+#include "ClientOrigin.h"
 #include "Document.h"
 #include "Page.h"
 #include "WorkerGlobalScope.h"
@@ -36,7 +37,6 @@
 #include "WorkerRunLoop.h"
 #include "WorkerThread.h"
 
-
 namespace WebCore {
 using namespace WebCore::DOMCacheEngine;
 
index 96132e6..cdb777e 100644 (file)
@@ -27,6 +27,7 @@
 
 #if ENABLE(WEB_RTC)
 
+#include "Document.h"
 #include "LibWebRTCProvider.h"
 #include "RTCPeerConnection.h"
 
index adb751d..a933d98 100644 (file)
@@ -29,6 +29,7 @@
 #include "CanvasRenderingContext.h"
 #include "Chrome.h"
 #include "DOMException.h"
+#include "DOMWindow.h"
 #include "EventNames.h"
 #include "Page.h"
 #include "ScriptedAnimationController.h"
index 82fe17c..6292a0f 100644 (file)
@@ -28,6 +28,7 @@
 
 #include <gcrypt.h>
 #include <wtf/Assertions.h>
+#include <wtf/Optional.h>
 
 namespace PAL {
 namespace GCrypt {
index 66f7f16..957e4b5 100644 (file)
@@ -389,7 +389,7 @@ platform/ios/PlatformScreenIOS.mm
 platform/ios/PlatformSpeechSynthesizerIOS.mm @no-unify
 platform/ios/PlaybackSessionInterfaceAVKit.mm @no-unify
 platform/ios/QuickLook.mm
-platform/ios/QuickLookSoftLink.mm
+platform/ios/QuickLookSoftLink.mm @no-unify
 platform/ios/RemoteCommandListenerIOS.mm
 platform/ios/ScrollAnimatorIOS.mm
 platform/ios/ScrollbarThemeIOS.mm
@@ -399,7 +399,7 @@ platform/ios/SSLKeyGeneratorIOS.cpp
 platform/ios/SystemMemoryIOS.cpp
 platform/ios/ThemeIOS.mm @no-unify
 platform/ios/TileControllerMemoryHandlerIOS.cpp
-platform/ios/UserAgentIOS.mm
+platform/ios/UserAgentIOS.mm @no-unify
 platform/ios/ValidationBubbleIOS.mm @no-unify
 platform/ios/VideoFullscreenInterfaceAVKit.mm @no-unify
 platform/ios/WebAVPlayerController.mm
index 4626b6f..e616f27 100644 (file)
@@ -61,14 +61,14 @@ platform/UserAgentQuirks.cpp
 
 platform/geoclue/GeolocationProviderGeoclue.cpp
 
-platform/graphics/GLContext.cpp
+platform/graphics/GLContext.cpp @no-unify
 platform/graphics/GraphicsContext3DPrivate.cpp
 
-platform/graphics/cairo/BackingStoreBackendCairoX11.cpp
+platform/graphics/cairo/BackingStoreBackendCairoX11.cpp @no-unify
 
 platform/graphics/egl/GLContextEGL.cpp
 platform/graphics/egl/GLContextEGLWayland.cpp @no-unify
-platform/graphics/egl/GLContextEGLX11.cpp
+platform/graphics/egl/GLContextEGLX11.cpp @no-unify
 
 platform/graphics/glx/GLContextGLX.cpp
 
@@ -82,9 +82,9 @@ platform/graphics/opentype/OpenTypeVerticalData.cpp
 
 platform/graphics/wayland/PlatformDisplayWayland.cpp
 
-platform/graphics/x11/PlatformDisplayX11.cpp
-platform/graphics/x11/XErrorTrapper.cpp
-platform/graphics/x11/XUniqueResource.cpp
+platform/graphics/x11/PlatformDisplayX11.cpp @no-unify
+platform/graphics/x11/XErrorTrapper.cpp @no-unify
+platform/graphics/x11/XUniqueResource.cpp @no-unify
 
 platform/gtk/DragDataGtk.cpp
 platform/gtk/LocalizedStringsGtk.cpp
index 24842ab..dc460f1 100644 (file)
                2D8B92FF203D13E1009C868F /* UnifiedSource530.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE5F85D31FA23859006DB63B /* UnifiedSource530.cpp */; };
                2D8FEBDD143E3EF70072502B /* CSSCrossfadeValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D8FEBDB143E3EF70072502B /* CSSCrossfadeValue.h */; };
                2D9066070BE141D400956998 /* LayoutState.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D9066050BE141D400956998 /* LayoutState.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               2D92A79A2134AD7900F493FD /* QuickLookSoftLink.mm in Sources */ = {isa = PBXBuildFile; fileRef = 443917FD1A91B2F8006E04F2 /* QuickLookSoftLink.mm */; };
+               2D92A79D2134AF9500F493FD /* UserAgentIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = A3AF9D8320325691006CAD06 /* UserAgentIOS.mm */; };
                2D93AEE319DF5641002A86C3 /* ServicesOverlayController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D93AEE119DF5641002A86C3 /* ServicesOverlayController.h */; };
                2D97F04719DD413C001EE9C3 /* MockPageOverlayClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2DAAE32C19DCAF6000E002D2 /* MockPageOverlayClient.cpp */; };
                2D97F04819DD4140001EE9C3 /* MockPageOverlayClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DAAE32D19DCAF6000E002D2 /* MockPageOverlayClient.h */; };
                                AA12DF491743DF83004DAFDF /* PlatformSpeechSynthesizerIOS.mm in Sources */,
                                CDA29A301CBF74D400901CCF /* PlaybackSessionInterfaceAVKit.mm in Sources */,
                                CDA29A161CBDA56C00901CCF /* PlaybackSessionInterfaceMac.mm in Sources */,
+                               2D92A79A2134AD7900F493FD /* QuickLookSoftLink.mm in Sources */,
                                419242492127B93E00634FCF /* RealtimeOutgoingVideoSourceCocoa.mm in Sources */,
                                316DCB8A1E7A6996001B5F87 /* RTCIceTransport.cpp in Sources */,
                                BC51156E12B1749C00C96754 /* ScrollAnimatorMac.mm in Sources */,
                                2D8B92FD203D13E1009C868F /* UnifiedSource528.cpp in Sources */,
                                2D8B92FE203D13E1009C868F /* UnifiedSource529.cpp in Sources */,
                                2D8B92FF203D13E1009C868F /* UnifiedSource530.cpp in Sources */,
+                               2D92A79D2134AF9500F493FD /* UserAgentIOS.mm in Sources */,
                                532042021F9A9F1000B81B2A /* UserAgentScriptsData.cpp in Sources */,
                                7C3B79711908757B00B47A2D /* UserMessageHandler.cpp in Sources */,
                                7CE68344192143A800F4D928 /* UserMessageHandlerDescriptor.cpp in Sources */,
index 97317e0..1b53c45 100644 (file)
 
 namespace WebCore {
 
+namespace CryptoAlgorithmECDSAInternal {
 static const char* const ALG256 = "ES256";
 static const char* const ALG384 = "ES384";
 static const char* const ALG512 = "ES512";
 static const char* const P256 = "P-256";
 static const char* const P384 = "P-384";
 static const char* const P521 = "P-521";
+}
 
 Ref<CryptoAlgorithm> CryptoAlgorithmECDSA::create()
 {
@@ -102,6 +104,7 @@ void CryptoAlgorithmECDSA::generateKey(const CryptoAlgorithmParameters& paramete
 
 void CryptoAlgorithmECDSA::importKey(CryptoKeyFormat format, KeyData&& data, const CryptoAlgorithmParameters& parameters, bool extractable, CryptoKeyUsageBitmap usages, KeyCallback&& callback, ExceptionCallback&& exceptionCallback)
 {
+    using namespace CryptoAlgorithmECDSAInternal;
     const auto& ecParameters = downcast<CryptoAlgorithmEcKeyParams>(parameters);
 
     RefPtr<CryptoKeyEC> result;
index f0a4134..36f48d0 100644 (file)
@@ -34,6 +34,7 @@
 #include <pal/crypto/CryptoDigest.h>
 #include <pal/crypto/gcrypt/Handle.h>
 #include <pal/crypto/gcrypt/Utilities.h>
+#include <wtf/Optional.h>
 
 namespace WebCore {
 
index 9e3c318..d399386 100644 (file)
@@ -641,7 +641,7 @@ public:
     
     WEBCORE_EXPORT DocumentLoader* loader() const;
 
-    WEBCORE_EXPORT ExceptionOr<RefPtr<WindowProxy>> openForBindings(DOMWindow& activeWindow, DOMWindow& firstWindow, const String& url, const AtomicString& name, const String& features);
+    WEBCORE_EXPORT ExceptionOr<RefPtr<WindowProxy>> openForBindings(DOMWindow& activeWindow, DOMWindow& firstDOMWindow, const String& url, const AtomicString& name, const String& features);
     WEBCORE_EXPORT ExceptionOr<Document&> openForBindings(Document* responsibleDocument, const String& type, const String& replace);
 
     // FIXME: We should rename this at some point and give back the name 'open' to the HTML specified ones.
index e40f9a8..c731922 100644 (file)
@@ -32,6 +32,7 @@
 #include "HTMLDocumentParser.h"
 #include "HTMLFormControlElement.h"
 #include "HTMLFormElement.h"
+#include "HTMLInputElement.h"
 #include "HTMLOptGroupElement.h"
 #include "HTMLOptionElement.h"
 #include "HTMLParserIdioms.h"
index 72b2975..6d9a2da 100644 (file)
@@ -25,6 +25,7 @@
 
 #pragma once
 
+#include "ApplicationCacheResource.h"
 #include "CachedRawResource.h"
 #include "CachedRawResourceClient.h"
 #include "CachedResourceHandle.h"
index 9355937..143da6c 100644 (file)
 #include <wtf/Vector.h>
 #include <wtf/text/WTFString.h>
 
-#if PLATFORM(MAC)
-// Some platforms provide UI for suggesting alternative dictation text.
-#define USE_DICTATION_ALTERNATIVES 1
-#endif
-
 namespace WebCore {
 
 enum ReasonForDismissingAlternativeText {
index d5433dd..e098156 100644 (file)
@@ -338,6 +338,7 @@ extern NSString *UIColorPboardType;
 #if PLATFORM(MAC)
 extern const char* const WebArchivePboardType;
 extern const char* const WebURLNamePboardType;
+extern const char* const WebURLsWithTitlesPboardType;
 #endif
 
 #if !PLATFORM(GTK)
index 79ab9f4..e918098 100644 (file)
@@ -33,6 +33,7 @@
 #include "NotImplemented.h"
 #include <CoreAudio/AudioHardware.h>
 #include <wtf/MainThread.h>
+#include <wtf/text/WTFString.h>
 
 namespace WebCore {
 
index 968bb22..3e2c82b 100644 (file)
@@ -30,6 +30,7 @@
 
 #include "DisplayRefreshMonitorClient.h"
 #include "DisplayRefreshMonitorManager.h"
+#include "Logging.h"
 
 #if PLATFORM(IOS)
 #include "DisplayRefreshMonitorIOS.h"
index 217691f..15c0387 100644 (file)
@@ -27,6 +27,7 @@
 #include "FontFamilySpecificationNull.h"
 
 #include "FontSelector.h"
+#include <wtf/text/AtomicStringHash.h>
 
 namespace WebCore {
 
index f762bae..42f42b2 100644 (file)
@@ -29,6 +29,7 @@
 #include <unicode/uscript.h>
 #include <wtf/HashMap.h>
 #include <wtf/text/AtomicString.h>
+#include <wtf/text/AtomicStringHash.h>
 
 namespace WebCore {
 
index 61b2ebe..b0ca43d 100644 (file)
@@ -27,9 +27,8 @@
 #include "config.h"
 #include "FontTaggedSettings.h"
 
-#include <wtf/text/TextStream.h>
-
 #include <wtf/text/AtomicStringHash.h>
+#include <wtf/text/TextStream.h>
 
 namespace WebCore {
 
index 06d9d74..286bc6d 100644 (file)
@@ -34,6 +34,7 @@
 #if USE(CAIRO)
 
 #include "AffineTransform.h"
+#include "CairoOperations.h"
 #include "CairoUtilities.h"
 #include "Font.h"
 #include "GlyphBuffer.h"
index 3ed7e41..8ee348d 100644 (file)
 #import <OpenGL/gl.h>
 #endif
 
-using namespace WebCore;
-
 @implementation WebGLLayer
 
 @synthesize context=_context;
 
--(id)initWithGraphicsContext3D:(GraphicsContext3D*)context
+-(id)initWithGraphicsContext3D:(WebCore::GraphicsContext3D*)context
 {
     _context = context;
     self = [super init];
@@ -86,7 +84,7 @@ static void freeData(void *, const void *data, size_t /* size */)
 }
 #endif
 
--(CGImageRef)copyImageSnapshotWithColorSpace:(CGColorSpaceRef)colorSpace
+- (CGImageRef)copyImageSnapshotWithColorSpace:(CGColorSpaceRef)colorSpace
 {
     if (!_context)
         return nullptr;
@@ -96,7 +94,7 @@ static void freeData(void *, const void *data, size_t /* size */)
 
     RetainPtr<CGColorSpaceRef> imageColorSpace = colorSpace;
     if (!imageColorSpace)
-        imageColorSpace = sRGBColorSpaceRef();
+        imageColorSpace = WebCore::sRGBColorSpaceRef();
 
     CGRect layerBounds = CGRectIntegral([self bounds]);
 
@@ -141,19 +139,19 @@ static void freeData(void *, const void *data, size_t /* size */)
 #endif
 
     _context->markLayerComposited();
-    PlatformCALayer* layer = PlatformCALayer::platformCALayer((__bridge void*)self);
+    WebCore::PlatformCALayer* layer = WebCore::PlatformCALayer::platformCALayer((__bridge void*)self);
     if (layer && layer->owner())
         layer->owner()->platformCALayerLayerDidDisplay(layer);
 }
 
 #if USE(OPENGL)
-- (void)allocateIOSurfaceBackingStoreWithSize:(IntSize)size usingAlpha:(BOOL)usingAlpha
+- (void)allocateIOSurfaceBackingStoreWithSize:(WebCore::IntSize)size usingAlpha:(BOOL)usingAlpha
 {
     _bufferSize = size;
     _usingAlpha = usingAlpha;
-    _contentsBuffer = WebCore::IOSurface::create(size, sRGBColorSpaceRef());
-    _drawingBuffer = WebCore::IOSurface::create(size, sRGBColorSpaceRef());
-    _spareBuffer = WebCore::IOSurface::create(size, sRGBColorSpaceRef());
+    _contentsBuffer = WebCore::IOSurface::create(size, WebCore::sRGBColorSpaceRef());
+    _drawingBuffer = WebCore::IOSurface::create(size, WebCore::sRGBColorSpaceRef());
+    _spareBuffer = WebCore::IOSurface::create(size, WebCore::sRGBColorSpaceRef());
 
     ASSERT(_contentsBuffer);
     ASSERT(_drawingBuffer);
index 5c3557f..25efb8b 100644 (file)
 #import <wtf/FastMalloc.h>
 #import <wtf/RetainPtr.h>
 
-using namespace WebCore;
-
 @implementation WebGPULayer
 
 @synthesize context=_context;
 
-- (id)initWithGPUDevice:(GPUDevice*)context
+- (id)initWithGPUDevice:(WebCore::GPUDevice*)context
 {
     self = [super init];
     _context = context;
@@ -50,7 +48,7 @@ using namespace WebCore;
 
 #if PLATFORM(MAC)
     self.contentsScale = _devicePixelRatio;
-    self.colorspace = sRGBColorSpaceRef();
+    self.colorspace = WebCore::sRGBColorSpaceRef();
 #endif
     return self;
 }
index 820af8b..303b25d 100644 (file)
@@ -31,6 +31,7 @@
 #import "GPUDevice.h"
 #import "Logging.h"
 #import <Metal/Metal.h>
+#import <wtf/text/WTFString.h>
 
 namespace WebCore {
 
index cb504cf..fd6e929 100644 (file)
@@ -52,10 +52,10 @@ namespace WebCore {
 
 const char* const WebArchivePboardType = "Apple Web Archive pasteboard type";
 const char* const WebURLNamePboardType = "public.url-name";
+const char* const WebURLsWithTitlesPboardType = "WebURLsWithTitlesPboardType";
 
 const char WebSmartPastePboardType[] = "NeXT smart paste pasteboard type";
 const char WebURLPboardType[] = "public.url";
-const char WebURLsWithTitlesPboardType[] = "WebURLsWithTitlesPboardType";
 
 static const Vector<String> writableTypesForURL()
 {
index 5c2a9d2..f492e61 100644 (file)
@@ -28,6 +28,7 @@
 
 #if ENABLE(MEDIA_STREAM)
 
+#include "CoreVideoSoftLink.h"
 #include "Logging.h"
 #include <wtf/Algorithms.h>
 #include <wtf/NeverDestroyed.h>
index 2540965..ff58361 100644 (file)
@@ -29,6 +29,7 @@
 #include "HTTPHeaderNames.h"
 #include "PublicSuffix.h"
 #include "ResourceRequest.h"
+#include "ResourceResponse.h"
 #include "SecurityPolicy.h"
 #include <wtf/PointerComparison.h>
 
index 29025d3..e5321c2 100644 (file)
 #include <wtf/StdLibExtras.h>
 #include <wtf/Threading.h>
 
-#if PLATFORM(IOS) && !PLATFORM(IOSMAC)
-static const SInt32 fnfErr = -43;
-#elif PLATFORM(MAC)
-#include <CoreServices/CoreServices.h>
-#endif
+static const SInt32 fileNotFoundError = -43;
 
 #if PLATFORM(COCOA)
 extern "C" void CFURLRequestSetHTTPRequestBody(CFMutableURLRequestRef mutableHTTPRequest, CFDataRef httpBody);
@@ -241,7 +237,7 @@ static Boolean formOpen(CFReadStreamRef, CFStreamError* error, Boolean* openComp
 #if PLATFORM(WIN)
         ENOENT;
 #else
-        fnfErr;
+        fileNotFoundError;
 #endif
     return opened;
 }
index c63befd..d1e9d9c 100644 (file)
@@ -26,6 +26,7 @@
 #ifndef SoupNetworkSession_h
 #define SoupNetworkSession_h
 
+#include <gio/gio.h>
 #include <glib-object.h>
 #include <pal/SessionID.h>
 #include <wtf/Function.h>
index b318e62..21f038b 100644 (file)
@@ -29,6 +29,7 @@
 #include "TextCodecASCIIFastPath.h"
 #include <wtf/text/CString.h>
 #include <wtf/text/StringBuffer.h>
+#include <wtf/text/WTFString.h>
 #include <wtf/unicode/CharacterNames.h>
 
 namespace WebCore {
index f8282b5..84f7147 100644 (file)
@@ -26,6 +26,7 @@
 #pragma once
 
 #include "TextCodec.h"
+#include <unicode/utf8.h>
 #include <wtf/text/LChar.h>
 
 namespace WebCore {
index 3bc82c6..2c2b508 100644 (file)
@@ -27,6 +27,8 @@
 #include "RenderTreeBuilderBlockFlow.h"
 
 #include "RenderMultiColumnFlow.h"
+#include "RenderTreeBuilderBlock.h"
+#include "RenderTreeBuilderMultiColumn.h"
 
 namespace WebCore {
 
index 7cd0715..ee639d9 100644 (file)
@@ -30,6 +30,8 @@
 #include "RenderFullScreen.h"
 #include "RenderInline.h"
 #include "RenderTable.h"
+#include "RenderTreeBuilderMultiColumn.h"
+#include "RenderTreeBuilderTable.h"
 
 namespace WebCore {
 
index 7ac19ba..ac1245d 100644 (file)
@@ -26,6 +26,7 @@
 #include "config.h"
 #include "RenderTreeBuilderRuby.h"
 
+#include "RenderAncestorIterator.h"
 #include "RenderRuby.h"
 #include "RenderRubyBase.h"
 #include "RenderRubyRun.h"
index 7d76af9..65226a0 100644 (file)
@@ -41,6 +41,8 @@
 #include "RenderDescendantIterator.h"
 #include "RenderFullScreen.h"
 #include "RenderInline.h"
+#include "RenderMultiColumnFlow.h"
+#include "RenderMultiColumnSet.h"
 #include "RenderTreeUpdaterGeneratedContent.h"
 #include "RuntimeEnabledFeatures.h"
 #include "StyleResolver.h"
index e16d7b6..35fb43e 100644 (file)
@@ -1,5 +1,55 @@
 2018-08-30  Tim Horton  <timothy_horton@apple.com>
 
+        Bundle unified sources more tightly in projects with deep directory structures
+        https://bugs.webkit.org/show_bug.cgi?id=189009
+
+        Reviewed by Simon Fraser.
+
+        Fix a variety of unification errors due to reshuffling the bundles.
+
+        * Shared/APIWebArchive.mm:
+        * Shared/APIWebArchiveResource.mm:
+        * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
+        * Shared/Plugins/Netscape/mac/PluginInformationMac.mm:
+        * SourcesCocoa.txt:
+        * SourcesGTK.txt:
+        * UIProcess/API/APIAutomationSessionClient.h:
+        (API::AutomationSessionClient::sessionIdentifier const):
+        (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage):
+        (API::AutomationSessionClient::setUserInputForCurrentJavaScriptPromptOnPage):
+        * UIProcess/Cocoa/LegacyCustomProtocolManagerClient.mm:
+        (-[WKCustomProtocolLoader initWithLegacyCustomProtocolManagerProxy:customProtocolID:request:]):
+        (-[WKCustomProtocolLoader connection:didFailWithError:]):
+        (-[WKCustomProtocolLoader connection:didReceiveResponse:]):
+        * UIProcess/Plugins/PluginProcessProxy.cpp:
+        (WebKit::generatePluginProcessCallbackID):
+        (WebKit::PluginProcessProxy::fetchWebsiteData):
+        (WebKit::PluginProcessProxy::deleteWebsiteData):
+        (WebKit::PluginProcessProxy::deleteWebsiteDataForHostNames):
+        (WebKit::generateCallbackID): Deleted.
+        * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:
+        (-[WKScrollingNodeScrollViewDelegate scrollViewWillEndDragging:withVelocity:targetContentOffset:]):
+        * UIProcess/Storage/StorageProcessProxy.cpp:
+        (WebKit::generateStorageProcessCallbackID):
+        (WebKit::StorageProcessProxy::fetchWebsiteData):
+        (WebKit::StorageProcessProxy::deleteWebsiteData):
+        (WebKit::StorageProcessProxy::deleteWebsiteDataForOrigins):
+        (WebKit::generateCallbackID): Deleted.
+        * WebKit.xcodeproj/project.pbxproj:
+        * WebProcess/Plugins/PDF/PDFPlugin.mm:
+        (-[WKPDFPluginAccessibilityObject accessibilityPerformAction:]):
+        (-[WKPDFPluginAccessibilityObject accessibilityFocusedUIElement]):
+        (-[WKPDFPluginAccessibilityObject accessibilityAssociatedControlForAnnotation:]):
+        (-[WKPDFPluginAccessibilityObject accessibilityHitTest:]):
+        (-[WKPDFLayerControllerDelegate updateScrollPosition:]):
+        (WebKit::PDFPlugin::updateCursor):
+        (WebKit::coreCursor):
+        (appendValuesInPDFNameSubtreeToVector): Deleted.
+        (getAllValuesInPDFNameTree): Deleted.
+        (getAllScriptsInPDFDocument): Deleted.
+
+2018-08-30  Tim Horton  <timothy_horton@apple.com>
+
         Fix the watchOS and tvOS build
 
         * UIProcess/ios/WKContentViewInteraction.mm:
index b1742fd..b8c972f 100644 (file)
@@ -34,9 +34,8 @@
 #include <WebCore/LegacyWebArchive.h>
 #include <wtf/RetainPtr.h>
 
-using namespace WebCore;
-
 namespace API {
+using namespace WebCore;
 
 Ref<WebArchive> WebArchive::create(WebArchiveResource* mainResource, RefPtr<API::Array>&& subresources, RefPtr<API::Array>&& subframeArchives)
 {
index cae5b85..dc0f90f 100644 (file)
@@ -33,9 +33,8 @@
 #include <WebCore/URL.h>
 #include <wtf/RetainPtr.h>
 
-using namespace WebCore;
-
 namespace API {
+using namespace WebCore;
 
 Ref<WebArchiveResource> WebArchiveResource::create(API::Data* data, const String& URL, const String& MIMEType, const String& textEncoding)
 {
index 68d7c6a..c0ccac5 100644 (file)
@@ -34,9 +34,8 @@
 #import <wtf/MainThread.h>
 #import <wtf/spi/cf/CFBundleSPI.h>
 
-using namespace WebCore;
-
 namespace WebKit {
+using namespace WebCore;
 
 static bool getPluginArchitecture(CFBundleRef bundle, PluginModuleInfo& plugin)
 {
index 5ec8424..32584d4 100644 (file)
@@ -34,9 +34,8 @@
 #import "StringUtilities.h"
 #import <WebCore/PluginBlacklist.h>
 
-using namespace WebCore;
-
 namespace WebKit {
+using namespace WebCore;
 
 void getPlatformPluginModuleInformation(const PluginModuleInfo& plugin, API::Dictionary::MapType& map)
 {
index d8a3c90..4b8d480 100644 (file)
@@ -298,9 +298,9 @@ UIProcess/API/mac/WKView.mm @no-unify
 
 UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm
 
-UIProcess/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm
+UIProcess/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm @no-unify
 
-UIProcess/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm
+UIProcess/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm @no-unify
 
 UIProcess/Authentication/cocoa/AuthenticationChallengeProxyCocoa.mm
 UIProcess/Authentication/cocoa/SecKeyProxyStore.mm
index a2dc5c9..442996d 100644 (file)
@@ -207,16 +207,16 @@ UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.cpp
 
 UIProcess/linux/MemoryPressureMonitor.cpp
 
-UIProcess/Plugins/gtk/PluginInfoCache.cpp
+UIProcess/Plugins/gtk/PluginInfoCache.cpp @no-unify
 
-UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp
+UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp @no-unify
 UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp @no-unify
 
 UIProcess/WebStorage/StorageManager.cpp
 
 UIProcess/WebsiteData/unix/WebsiteDataStoreUnix.cpp
 
-UIProcess/cairo/BackingStoreCairo.cpp
+UIProcess/cairo/BackingStoreCairo.cpp @no-unify
 
 UIProcess/glib/RemoteInspectorClient.cpp
 
@@ -229,16 +229,16 @@ UIProcess/gtk/AcceleratedBackingStoreX11.cpp @no-unify
 UIProcess/gtk/DragAndDropHandler.cpp
 UIProcess/gtk/GestureController.cpp
 UIProcess/gtk/HardwareAccelerationManager.cpp
-UIProcess/gtk/InputMethodFilter.cpp
+UIProcess/gtk/InputMethodFilter.cpp @no-unify
 UIProcess/gtk/KeyBindingTranslator.cpp
 UIProcess/gtk/RemoteWebInspectorProxyGtk.cpp @no-unify
 UIProcess/gtk/TextCheckerGtk.cpp @no-unify
 UIProcess/gtk/WaylandCompositor.cpp @no-unify
-UIProcess/gtk/WebColorPickerGtk.cpp
+UIProcess/gtk/WebColorPickerGtk.cpp @no-unify
 UIProcess/gtk/WebContextMenuProxyGtk.cpp
 UIProcess/gtk/WebInspectorProxyGtk.cpp
 UIProcess/gtk/WebKitInspectorWindow.cpp
-UIProcess/gtk/WebPageProxyGtk.cpp
+UIProcess/gtk/WebPageProxyGtk.cpp @no-unify
 UIProcess/gtk/WebPasteboardProxyGtk.cpp
 UIProcess/gtk/WebPopupMenuProxyGtk.cpp
 UIProcess/gtk/WebPreferencesGtk.cpp
index bfc5ee3..379c885 100644 (file)
@@ -51,7 +51,7 @@ public:
 
     virtual ~AutomationSessionClient() { }
 
-    virtual String sessionIdentifier() const { return String(); }
+    virtual WTF::String sessionIdentifier() const { return WTF::String(); }
     virtual void didDisconnectFromRemote(WebKit::WebAutomationSession&) { }
     virtual void requestNewPageWithOptions(WebKit::WebAutomationSession&, AutomationSessionBrowsingContextOptions, CompletionHandler<void(WebKit::WebPageProxy*)>&& completionHandler) { completionHandler(nullptr); }
     virtual void requestMaximizeWindowOfPage(WebKit::WebAutomationSession&, WebKit::WebPageProxy&, CompletionHandler<void()>&& completionHandler) { completionHandler(); }
@@ -61,8 +61,8 @@ public:
     virtual bool isShowingJavaScriptDialogOnPage(WebKit::WebAutomationSession&, WebKit::WebPageProxy&) { return false; }
     virtual void dismissCurrentJavaScriptDialogOnPage(WebKit::WebAutomationSession&, WebKit::WebPageProxy&) { }
     virtual void acceptCurrentJavaScriptDialogOnPage(WebKit::WebAutomationSession&, WebKit::WebPageProxy&) { }
-    virtual String messageOfCurrentJavaScriptDialogOnPage(WebKit::WebAutomationSession&, WebKit::WebPageProxy&) { return String(); }
-    virtual void setUserInputForCurrentJavaScriptPromptOnPage(WebKit::WebAutomationSession&, WebKit::WebPageProxy&, const String&) { }
+    virtual WTF::String messageOfCurrentJavaScriptDialogOnPage(WebKit::WebAutomationSession&, WebKit::WebPageProxy&) { return WTF::String(); }
+    virtual void setUserInputForCurrentJavaScriptPromptOnPage(WebKit::WebAutomationSession&, WebKit::WebPageProxy&, const WTF::String&) { }
     virtual std::optional<JavaScriptDialogType> typeOfCurrentJavaScriptDialogOnPage(WebKit::WebAutomationSession&, WebKit::WebPageProxy&) { return std::nullopt; }
 };
 
index 11ba372..19a59b4 100644 (file)
 #import <WebCore/ResourceRequest.h>
 #import <WebCore/ResourceResponse.h>
 
-using namespace WebCore;
-using namespace WebKit;
-
 @interface WKCustomProtocolLoader : NSObject <NSURLConnectionDelegate> {
 @private
-    LegacyCustomProtocolManagerProxy* _customProtocolManagerProxy;
+    WebKit::LegacyCustomProtocolManagerProxy* _customProtocolManagerProxy;
     uint64_t _customProtocolID;
     NSURLCacheStoragePolicy _storagePolicy;
     NSURLConnection *_urlConnection;
 }
-- (id)initWithLegacyCustomProtocolManagerProxy:(LegacyCustomProtocolManagerProxy*)customProtocolManagerProxy customProtocolID:(uint64_t)customProtocolID request:(NSURLRequest *)request;
+- (id)initWithLegacyCustomProtocolManagerProxy:(WebKit::LegacyCustomProtocolManagerProxy*)customProtocolManagerProxy customProtocolID:(uint64_t)customProtocolID request:(NSURLRequest *)request;
 - (void)customProtocolManagerProxyDestroyed;
 @end
 
 @implementation WKCustomProtocolLoader
 
-- (id)initWithLegacyCustomProtocolManagerProxy:(LegacyCustomProtocolManagerProxy*)customProtocolManagerProxy customProtocolID:(uint64_t)customProtocolID request:(NSURLRequest *)request
+- (id)initWithLegacyCustomProtocolManagerProxy:(WebKit::LegacyCustomProtocolManagerProxy*)customProtocolManagerProxy customProtocolID:(uint64_t)customProtocolID request:(NSURLRequest *)request
 {
     self = [super init];
     if (!self)
@@ -85,7 +82,7 @@ using namespace WebKit;
 
 - (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error
 {
-    ResourceError coreError(error);
+    WebCore::ResourceError coreError(error);
     _customProtocolManagerProxy->didFailWithError(_customProtocolID, coreError);
     _customProtocolManagerProxy->stopLoading(_customProtocolID);
 }
@@ -99,7 +96,7 @@ using namespace WebKit;
 
 - (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response
 {
-    ResourceResponse coreResponse(response);
+    WebCore::ResourceResponse coreResponse(response);
     _customProtocolManagerProxy->didReceiveResponse(_customProtocolID, coreResponse, _storagePolicy);
 }
 
@@ -127,6 +124,7 @@ using namespace WebKit;
 @end
 
 namespace WebKit {
+using namespace WebCore;
 
 void LegacyCustomProtocolManagerClient::startLoading(LegacyCustomProtocolManagerProxy& manager, uint64_t customProtocolID, const ResourceRequest& coreRequest)
 {
index c2b91a6..eded9c7 100644 (file)
@@ -48,7 +48,7 @@ static const Seconds snapshottingMinimumLifetime { 30_s };
 static const Seconds shutdownTimeout { 1_min };
 static const Seconds snapshottingShutdownTimeout { 15_s };
 
-static uint64_t generateCallbackID()
+static uint64_t generatePluginProcessCallbackID()
 {
     static uint64_t callbackID;
 
@@ -114,7 +114,7 @@ void PluginProcessProxy::getPluginProcessConnection(Messages::WebProcessProxy::G
 
 void PluginProcessProxy::fetchWebsiteData(CompletionHandler<void (Vector<String>)>&& completionHandler)
 {
-    uint64_t callbackID = generateCallbackID();
+    uint64_t callbackID = generatePluginProcessCallbackID();
     m_pendingFetchWebsiteDataCallbacks.set(callbackID, WTFMove(completionHandler));
 
     if (state() == State::Launching) {
@@ -127,7 +127,7 @@ void PluginProcessProxy::fetchWebsiteData(CompletionHandler<void (Vector<String>
 
 void PluginProcessProxy::deleteWebsiteData(WallTime modifiedSince, CompletionHandler<void ()>&& completionHandler)
 {
-    uint64_t callbackID = generateCallbackID();
+    uint64_t callbackID = generatePluginProcessCallbackID();
     m_pendingDeleteWebsiteDataCallbacks.set(callbackID, WTFMove(completionHandler));
 
     if (state() == State::Launching) {
@@ -140,7 +140,7 @@ void PluginProcessProxy::deleteWebsiteData(WallTime modifiedSince, CompletionHan
 
 void PluginProcessProxy::deleteWebsiteDataForHostNames(const Vector<String>& hostNames, CompletionHandler<void ()>&& completionHandler)
 {
-    uint64_t callbackID = generateCallbackID();
+    uint64_t callbackID = generatePluginProcessCallbackID();
     m_pendingDeleteWebsiteDataForHostNamesCallbacks.set(callbackID, WTFMove(completionHandler));
 
     if (state() == State::Launching) {
index 4a2e29b..72a882f 100644 (file)
@@ -43,8 +43,6 @@
 #import <WebCore/ScrollSnapOffsetsInfo.h>
 #endif
 
-using namespace WebCore;
-
 @implementation WKScrollingNodeScrollViewDelegate
 
 - (instancetype)initWithScrollingTreeNodeDelegate:(WebKit::ScrollingTreeScrollingNodeDelegateIOS*)delegate
@@ -80,7 +78,7 @@ using namespace WebCore;
 
     if (!_scrollingTreeNodeDelegate->scrollingNode().horizontalSnapOffsets().isEmpty()) {
         unsigned index;
-        float potentialSnapPosition = closestSnapOffset(_scrollingTreeNodeDelegate->scrollingNode().horizontalSnapOffsets(), _scrollingTreeNodeDelegate->scrollingNode().horizontalSnapOffsetRanges(), horizontalTarget, velocity.x, index);
+        float potentialSnapPosition = WebCore::closestSnapOffset(_scrollingTreeNodeDelegate->scrollingNode().horizontalSnapOffsets(), _scrollingTreeNodeDelegate->scrollingNode().horizontalSnapOffsetRanges(), horizontalTarget, velocity.x, index);
         _scrollingTreeNodeDelegate->scrollingNode().setCurrentHorizontalSnapPointIndex(index);
         if (horizontalTarget >= 0 && horizontalTarget <= scrollView.contentSize.width)
             targetContentOffset->x = potentialSnapPosition;
@@ -88,7 +86,7 @@ using namespace WebCore;
 
     if (!_scrollingTreeNodeDelegate->scrollingNode().verticalSnapOffsets().isEmpty()) {
         unsigned index;
-        float potentialSnapPosition = closestSnapOffset(_scrollingTreeNodeDelegate->scrollingNode().verticalSnapOffsets(), _scrollingTreeNodeDelegate->scrollingNode().verticalSnapOffsetRanges(), verticalTarget, velocity.y, index);
+        float potentialSnapPosition = WebCore::closestSnapOffset(_scrollingTreeNodeDelegate->scrollingNode().verticalSnapOffsets(), _scrollingTreeNodeDelegate->scrollingNode().verticalSnapOffsetRanges(), verticalTarget, velocity.y, index);
         _scrollingTreeNodeDelegate->scrollingNode().setCurrentVerticalSnapPointIndex(index);
         if (verticalTarget >= 0 && verticalTarget <= scrollView.contentSize.height)
             targetContentOffset->y = potentialSnapPosition;
@@ -122,6 +120,7 @@ using namespace WebCore;
 @end
 
 namespace WebKit {
+using namespace WebCore;
 
 ScrollingTreeScrollingNodeDelegateIOS::ScrollingTreeScrollingNodeDelegateIOS(ScrollingTreeScrollingNode& scrollingNode)
     : ScrollingTreeScrollingNodeDelegate(scrollingNode)
index efa8d13..3a131b4 100644 (file)
@@ -37,7 +37,7 @@
 namespace WebKit {
 using namespace WebCore;
 
-static uint64_t generateCallbackID()
+static uint64_t generateStorageProcessCallbackID()
 {
     static uint64_t callbackID;
 
@@ -105,7 +105,7 @@ void StorageProcessProxy::fetchWebsiteData(PAL::SessionID sessionID, OptionSet<W
 {
     ASSERT(canSendMessage());
 
-    uint64_t callbackID = generateCallbackID();
+    uint64_t callbackID = generateStorageProcessCallbackID();
     m_pendingFetchWebsiteDataCallbacks.add(callbackID, WTFMove(completionHandler));
 
     send(Messages::StorageProcess::FetchWebsiteData(sessionID, dataTypes, callbackID), 0);
@@ -113,7 +113,7 @@ void StorageProcessProxy::fetchWebsiteData(PAL::SessionID sessionID, OptionSet<W
 
 void StorageProcessProxy::deleteWebsiteData(PAL::SessionID sessionID, OptionSet<WebsiteDataType> dataTypes, WallTime modifiedSince, CompletionHandler<void ()>&& completionHandler)
 {
-    auto callbackID = generateCallbackID();
+    auto callbackID = generateStorageProcessCallbackID();
 
     m_pendingDeleteWebsiteDataCallbacks.add(callbackID, WTFMove(completionHandler));
     send(Messages::StorageProcess::DeleteWebsiteData(sessionID, dataTypes, modifiedSince, callbackID), 0);
@@ -123,7 +123,7 @@ void StorageProcessProxy::deleteWebsiteDataForOrigins(PAL::SessionID sessionID,
 {
     ASSERT(canSendMessage());
 
-    uint64_t callbackID = generateCallbackID();
+    uint64_t callbackID = generateStorageProcessCallbackID();
     m_pendingDeleteWebsiteDataForOriginsCallbacks.add(callbackID, WTFMove(completionHandler));
 
     send(Messages::StorageProcess::DeleteWebsiteDataForOrigins(sessionID, dataTypes, origins, callbackID), 0);
index da0581d..7be5398 100644 (file)
@@ -62,7 +62,6 @@
 #include "WebPageInjectedBundleClient.h"
 #include "WebPaymentCoordinatorProxy.h"
 #include "WebPreferences.h"
-#include <WebCore/AlternativeTextClient.h> // FIXME: Needed by WebPageProxyMessages.h for DICTATION_ALTERNATIVES.
 #include "WebPageProxyMessages.h"
 #include "WebPopupMenuProxy.h"
 #include "WebProcessLifetimeTracker.h"
index 94c9b1f..938443b 100644 (file)
                2D92A795212B6AD400F493FD /* PluginProcessCreationParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2D90D11281C966001EB962 /* PluginProcessCreationParameters.cpp */; };
                2D92A796212B6ADA00F493FD /* NetscapePluginModule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A4A9C5312B816CF008FE984 /* NetscapePluginModule.cpp */; };
                2D92A797212B6ADA00F493FD /* PluginInformation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C3F8C8E173AF52D007B7F39 /* PluginInformation.cpp */; };
+               2D92A79821348D8500F493FD /* WebPaymentCoordinatorProxyMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AB1F77D1D1B30A9007C9BD1 /* WebPaymentCoordinatorProxyMac.mm */; };
+               2D92A79F2134B07E00F493FD /* WebPaymentCoordinatorProxyIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AB1F77B1D1B30A9007C9BD1 /* WebPaymentCoordinatorProxyIOS.mm */; };
                2D931169212F61B200044BFE /* WKContentView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0FCB4E3D18BBE044000FCFC9 /* WKContentView.mm */; };
                2D93116A212F61B500044BFE /* WKContentViewInteraction.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0FCB4E6B18BBF26A000FCFC9 /* WKContentViewInteraction.mm */; };
                2D9EA30D1A96CB59002D2807 /* WKPageInjectedBundleClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D9EA30C1A96CB59002D2807 /* WKPageInjectedBundleClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
                                7CE9CE101FA0767A000177DE /* WebPageUpdatePreferences.cpp in Sources */,
                                7C4694C91A4B4EA100AD5845 /* WebPasteboardProxyMessageReceiver.cpp in Sources */,
                                1AB1F7961D1B3613007C9BD1 /* WebPaymentCoordinatorMessageReceiver.cpp in Sources */,
+                               2D92A79F2134B07E00F493FD /* WebPaymentCoordinatorProxyIOS.mm in Sources */,
+                               2D92A79821348D8500F493FD /* WebPaymentCoordinatorProxyMac.mm in Sources */,
                                1AB1F7981D1B3613007C9BD1 /* WebPaymentCoordinatorProxyMessageReceiver.cpp in Sources */,
                                2D92A78D212B6AB100F493FD /* WebPlatformTouchPoint.cpp in Sources */,
                                2D91344E212CF9F000128AFD /* WebPluginInfoProvider.cpp in Sources */,
index 5307e26..4caa6cc 100644 (file)
@@ -88,8 +88,6 @@
 #import <pal/spi/mac/NSMenuSPI.h>
 #import <wtf/UUID.h>
 
-using namespace WebCore;
-
 // Set overflow: hidden on the annotation container so <input> elements scrolled out of view don't show
 // scrollbars on the body. We can't add annotations directly to the body, because overflow: hidden on the body
 // will break rubber-banding.
@@ -290,7 +288,7 @@ static const int defaultScrollMagnitudeThresholdForPageFlip = 20;
 - (void)accessibilityPerformAction:(NSString *)action
 {
     if ([action isEqualToString:NSAccessibilityShowMenuAction])
-        _pdfPlugin->showContextMenuAtPoint(IntRect(IntPoint(), _pdfPlugin->size()).center());
+        _pdfPlugin->showContextMenuAtPoint(WebCore::IntRect(WebCore::IntPoint(), _pdfPlugin->size()).center());
 }
 
 - (BOOL)accessibilityIsAttributeSettable:(NSString *)attribute
@@ -316,8 +314,8 @@ static const int defaultScrollMagnitudeThresholdForPageFlip = 20;
 {
 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300
     if (WebKit::PDFPluginAnnotation* activeAnnotation = _pdfPlugin->activeAnnotation()) {
-        if (AXObjectCache* existingCache = _pdfPlugin->axObjectCache()) {
-            if (AccessibilityObject* object = existingCache->getOrCreate(activeAnnotation->element()))
+        if (WebCore::AXObjectCache* existingCache = _pdfPlugin->axObjectCache()) {
+            if (WebCore::AccessibilityObject* object = existingCache->getOrCreate(activeAnnotation->element()))
 #pragma clang diagnostic push
 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
                 return [object->wrapper() accessibilityAttributeValue:@"_AXAssociatedPluginParent"];
@@ -338,11 +336,11 @@ static const int defaultScrollMagnitudeThresholdForPageFlip = 20;
     if (!activeAnnotation || ![activeAnnotation->annotation() isEqual:annotation])
         return nil;
     
-    AXObjectCache* cache = _pdfPlugin->axObjectCache();
+    WebCore::AXObjectCache* cache = _pdfPlugin->axObjectCache();
     if (!cache)
         return nil;
     
-    AccessibilityObject* object = cache->getOrCreate(activeAnnotation->element());
+    WebCore::AccessibilityObject* object = cache->getOrCreate(activeAnnotation->element());
     if (!object)
         return nil;
 
@@ -353,7 +351,7 @@ static const int defaultScrollMagnitudeThresholdForPageFlip = 20;
 - (id)accessibilityHitTest:(NSPoint)point
 {
 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300
-    point = _pdfPlugin->convertFromRootViewToPDFView(IntPoint(point));
+    point = _pdfPlugin->convertFromRootViewToPDFView(WebCore::IntPoint(point));
     return [_pdfLayerController accessibilityHitTest:point];
 #else
     return self;
@@ -421,7 +419,7 @@ static const int defaultScrollMagnitudeThresholdForPageFlip = 20;
 
 - (void)updateScrollPosition:(CGPoint)newPosition
 {
-    _pdfPlugin->notifyScrollPositionChanged(IntPoint(newPosition));
+    _pdfPlugin->notifyScrollPositionChanged(WebCore::IntPoint(newPosition));
 }
 
 - (void)writeItemsToPasteboard:(NSArray *)items withTypes:(NSArray *)types
@@ -500,6 +498,10 @@ static const int defaultScrollMagnitudeThresholdForPageFlip = 20;
 - (PDFPage *)pageNearestPoint:(NSPoint)point currentPage:(PDFPage *)currentPage;
 @end
 
+namespace WebKit {
+using namespace WebCore;
+using namespace HTMLNames;
+
 static const char* postScriptMIMEType = "application/postscript";
 const uint64_t pdfDocumentRequestID = 1; // PluginController supports loading multiple streams, but we only need one for PDF.
 
@@ -596,9 +598,6 @@ static void getAllScriptsInPDFDocument(CGPDFDocumentRef pdfDocument, Vector<Reta
     }
 }
 
-namespace WebKit {
-using namespace HTMLNames;
-
 Ref<PDFPlugin> PDFPlugin::create(WebFrame& frame)
 {
     return adoptRef(*new PDFPlugin(frame));
@@ -1450,7 +1449,7 @@ void PDFPlugin::updateCursor(const WebMouseEvent& event, UpdateCursorMode mode)
     if (hitTestResult == m_lastHitTestResult && mode == UpdateIfNeeded)
         return;
 
-    webFrame()->page()->send(Messages::WebPageProxy::SetCursor(hitTestResult == Text ? iBeamCursor() : pointerCursor()));
+    webFrame()->page()->send(Messages::WebPageProxy::SetCursor(hitTestResult == Text ? WebCore::iBeamCursor() : WebCore::pointerCursor()));
     m_lastHitTestResult = hitTestResult;
 }
 #endif
@@ -1981,16 +1980,16 @@ void PDFPlugin::notifySelectionChanged(PDFSelection *)
     webFrame()->page()->didChangeSelection();
 }
 
-static const Cursor& coreCursor(PDFLayerControllerCursorType type)
+static const WebCore::Cursor& coreCursor(PDFLayerControllerCursorType type)
 {
     switch (type) {
     case kPDFLayerControllerCursorTypeHand:
-        return handCursor();
+        return WebCore::handCursor();
     case kPDFLayerControllerCursorTypeIBeam:
-        return iBeamCursor();
+        return WebCore::iBeamCursor();
     case kPDFLayerControllerCursorTypePointer:
     default:
-        return pointerCursor();
+        return WebCore::pointerCursor();
     }
 }