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)
commitf0077eeae372c4b70437fd4e6204496affe653ef
tree12efa737ac5632421c0dc7edbe0cf32af78b1f25
parentea5a51bc60f422ac03e6cade65687e40c6905681
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%.

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