commit | 2764480713d1f2b46b8f239eae5a99a6fcc3b6d9 | [log] [tgz] |
---|---|---|
author | drousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc> | Thu Oct 17 08:00:46 2019 +0000 |
committer | drousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc> | Thu Oct 17 08:00:46 2019 +0000 |
tree | b1dcbed14441078e175af3bc3a952e4dff61fb45 | |
parent | f2d16d749e1eb13ee39cabe1161b2b71d3a72aea [diff] |
Web Inspector: rework frontend agent construction to allow commands/events to be controlled by the related target's type https://bugs.webkit.org/show_bug.cgi?id=200384 <rdar://problem/53850352> Reviewed by Joseph Pecoraro. Source/JavaScriptCore: * inspector/scripts/codegen/generate_js_backend_commands.py: (JSBackendCommandsGenerator.generate_domain): (JSBackendCommandsGenerator.generate_domain.generate_parameter_object): * inspector/scripts/codegen/models.py: (validate_target_types): Added. (Protocol.parse_domain): (Protocol.parse_command): (Protocol.parse_event): (Domain.__init__): (Domains): (Command.__init__): (Event.__init__): * inspector/protocol/ApplicationCache.json: * inspector/protocol/Audit.json: * inspector/protocol/CPUProfiler.json: * inspector/protocol/CSS.json: * inspector/protocol/Canvas.json: * inspector/protocol/Console.json: * inspector/protocol/DOM.json: * inspector/protocol/DOMDebugger.json: * inspector/protocol/DOMStorage.json: * inspector/protocol/Database.json: * inspector/protocol/Debugger.json: * inspector/protocol/Heap.json: * inspector/protocol/IndexedDB.json: * inspector/protocol/Inspector.json: * inspector/protocol/LayerTree.json: * inspector/protocol/Memory.json: * inspector/protocol/Network.json: * inspector/protocol/Page.json: * inspector/protocol/Recording.json: * inspector/protocol/Runtime.json: * inspector/protocol/ScriptProfiler.json: * inspector/protocol/Security.json: * inspector/protocol/ServiceWorker.json: * inspector/protocol/Target.json: * inspector/protocol/Timeline.json: * inspector/protocol/Worker.json: Add `debuggableTypes` and `targetTypes` arrays to domains/commands/events that are used when generating InspectorBackendCommands.js for more accurate compatibility checks. * inspector/InspectorTarget.h: * inspector/agents/InspectorTargetAgent.h: * inspector/agents/InspectorTargetAgent.cpp: (Inspector::targetTypeToProtocolType): (Inspector::InspectorTargetAgent::exists): Deleted. Remove `Target.exists` now that the frontend can do proper feature checking. * inspector/remote/RemoteControllableTarget.h: * inspector/remote/RemoteInspectionTarget.h: * inspector/remote/RemoteInspectorConstants.h: * inspector/remote/cocoa/RemoteInspectorCocoa.mm: (Inspector::RemoteInspector::listingForInspectionTarget const): * inspector/remote/glib/RemoteInspectorGlib.cpp: (Inspector::RemoteInspector::listingForInspectionTarget const): * inspector/remote/socket/RemoteInspectorSocket.cpp: (Inspector::RemoteInspector::listingForInspectionTarget const): Split the `Web` debuggable type into `Page` (WebCore::Page) and `WebPage` (WebKit::WebPageProxy). * inspector/scripts/tests/all/expected/definitions-with-mac-platform.json-result: * inspector/scripts/tests/generic/command-targetType-matching-domain-debuggableType.json: Added. * inspector/scripts/tests/generic/domain-availability.json: Removed. * inspector/scripts/tests/generic/domain-debuggableTypes.json: Added. * inspector/scripts/tests/generic/domain-targetType-matching-domain-debuggableType.json: Added. * inspector/scripts/tests/generic/domain-targetTypes.json: Added. * inspector/scripts/tests/generic/event-targetType-matching-domain-debuggableType.json: Added. * inspector/scripts/tests/generic/expected/command-targetType-matching-domain-debuggableType.json-result: Added. * inspector/scripts/tests/generic/expected/commands-with-async-attribute.json-result: * inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result: * inspector/scripts/tests/generic/expected/domain-debuggableTypes.json-result: Added. * inspector/scripts/tests/generic/expected/domain-targetType-matching-domain-debuggableType.json-result: Added. * inspector/scripts/tests/generic/expected/domain-targetTypes.json-result: Added. * inspector/scripts/tests/generic/expected/domains-with-varying-command-sizes.json-result: * inspector/scripts/tests/generic/expected/enum-values.json-result: * inspector/scripts/tests/generic/expected/event-targetType-matching-domain-debuggableType.json-result: Added. * inspector/scripts/tests/generic/expected/events-with-optional-parameters.json-result: * inspector/scripts/tests/generic/expected/fail-on-command-targetType-matching-domain-debuggableType.json-error: Added. * inspector/scripts/tests/generic/expected/fail-on-command-targetTypes-type.json-error: Added. * inspector/scripts/tests/generic/expected/fail-on-command-targetTypes-value.json-error: Added. * inspector/scripts/tests/generic/expected/fail-on-domain-availability-type.json-error: Removed. * inspector/scripts/tests/generic/expected/fail-on-domain-availability-value.json-error: Removed. * inspector/scripts/tests/generic/expected/fail-on-domain-availability.json-error: Removed. * inspector/scripts/tests/generic/expected/fail-on-domain-debuggableTypes-type.json-error: Added. * inspector/scripts/tests/generic/expected/fail-on-domain-debuggableTypes-value.json-error: Added. * inspector/scripts/tests/generic/expected/fail-on-domain-targetType-matching-domain-debuggableType.json-error: Added. * inspector/scripts/tests/generic/expected/fail-on-domain-targetTypes-type.json-error: Added. * inspector/scripts/tests/generic/expected/fail-on-domain-targetTypes-value.json-error: Added. * inspector/scripts/tests/generic/expected/fail-on-event-targetType-matching-domain-debuggableType.json-error: Added. * inspector/scripts/tests/generic/expected/fail-on-event-targetTypes-type.json-error: Added. * inspector/scripts/tests/generic/expected/fail-on-event-targetTypes-value.json-error: Added. * inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result: * inspector/scripts/tests/generic/expected/type-declaration-array-type.json-result: * inspector/scripts/tests/generic/expected/type-declaration-enum-type.json-result: * inspector/scripts/tests/generic/expected/type-declaration-object-type.json-result: * inspector/scripts/tests/generic/expected/type-requiring-runtime-casts.json-result: * inspector/scripts/tests/generic/expected/version.json-result: * inspector/scripts/tests/generic/fail-on-command-targetType-matching-domain-debuggableType.json: Added. * inspector/scripts/tests/generic/fail-on-command-targetTypes-type.json: Added. * inspector/scripts/tests/generic/fail-on-command-targetTypes-value.json: Added. * inspector/scripts/tests/generic/fail-on-domain-debuggableTypes-type.json: Added. * inspector/scripts/tests/generic/fail-on-domain-debuggableTypes-value.json: Added. * inspector/scripts/tests/generic/fail-on-domain-targetType-matching-domain-debuggableType.json: Added. * inspector/scripts/tests/generic/fail-on-domain-targetTypes-type.json: Added. * inspector/scripts/tests/generic/fail-on-domain-targetTypes-value.json: Added. * inspector/scripts/tests/generic/fail-on-event-targetType-matching-domain-debuggableType.json: Added. * inspector/scripts/tests/generic/fail-on-event-targetTypes-type.json: Added. * inspector/scripts/tests/generic/fail-on-event-targetTypes-value.json: Added. * inspector/scripts/tests/mac/expected/definitions-with-mac-platform.json-result: Update test results, as well as added new tests for `debuggableTypes` and `targetTypes`. Source/WebCore: * inspector/InspectorFrontendClient.h: (WebCore::InspectorFrontendClient::backendCommandsURL): Deleted. (WebCore::InspectorFrontendClient::debuggableType): Deleted. * inspector/InspectorFrontendClientLocal.h: * page/PageDebuggable.h: (WebCore::PageDebuggable::type const): * testing/Internals.cpp: (WebCore::InspectorStubFrontend::debuggableType const): Added. Split the `Web` debuggable type into `Page` (WebCore::Page) and `WebPage` (WebKit::WebPageProxy). Source/WebInspectorUI: `InspectorBackend.domains.${domain}` isn't a truly valid way to feature check, as it indicates what's supported by the WebKit framework underlying whatever's currently being inspected, not what the current inspection target supports. As an example, inspecting an iOS `JSContext` will still show `InspectorBackend.domains.DOM` as the `DOMAgent` is supported by WebKit, even though `JSContext`s have no concept of the DOM. In this example, however, `window.DOMAgent` would NOT exist, as the `availability` check for the `DOM` domain wouldn't pass, meaning that the agent never gets connected. In order to do proper feature checking, `InspectorBackend.domains` needs to be accurate depending on the debuggable type. Furthermore, each target underneath that debuggable needs to be able to "choose" what commands/events are supported based on that target's type. This patch modifies how InspectorBackendCommands.js ties into `InspectorBackend`. Rather than directly creating an `InspectorBackend.Agent` for each domain, we now create more of a "blueprint" of the domain, and wait to actually create an `InspectorBackend.Agent` until we have a `WI.Target` (and therefore an `InspectorBackend.Connection`). Each "concept" of the protocol now directly maps to an object. - InspectorBackend.Domain - InspectorBackend.Command - InspectorBackend.Event - InspectorBackend.Dispatcher When a `WI.Target` is created, it gets the list of `InspectorBackend.Domain` that support that `WI.Target`'s type (specified in the protocol JSON files) and generates an `InspectorBackend.Agent` for each, which in turn generates an `InspectorBackend.Callable` for each supported `InspectorBackend.Command` and instantiates `InspectorBackend.Dispatcher`. Activating a `InspectorBackend.Domain` means it's visible for `InspectorBackend` feature checking. This must be done this way for older ITML backends that will still appear as "JSContext" targets and therefore go through the "extra domains" path. Ideally, the process of registering a domain should be enough to activate it. <https://webkit.org/b/201150> Feature checking can now only be done via `hasDomain`, `hasCommand`, and `hasEvent` on `InspectorBackend` or a specific `WI.Target`, and there are different implications for each: - `InspectorBackend.hasDomain(DOM)` asks whether the `DOM` domain is supported by the current debuggable, but says nothing about whether any `WI.Target` support `DOM`. - `target.hasDomain("DOM")` asks whether the given `target` supports `DOM`, which is limited by `InspectorBackend.hasDomain("DOM")`. Now that `InspectorBackend.Agent` is only created by a `WI.Target`, it's no longer valid to write `window.DOMAgent`, as there is no "global" agent. All protocol logic _must_ go through a `WI.Target`. <https://webkit.org/b/201149> Debuggable Types: - JavaScript (JSC::JSGlobalObject) - Page (WebCore::Page) - ServiceWorker (WebCore::ServiceWorkerThreadProxy) - WebPage (WebKit::WebPageProxy) Target Types: - JavaScript (direct connection) - Page (multi-target connection to any Worker) - ServiceWorker (direct connection) - WebPage (multi-target connection to 1+ Page) - Worker (direct connection, only available for Page debuggables) * UserInterface/Base/DebuggableType.js: * UserInterface/Base/TargetType.js: Copied from Source/WebInspectorUI/UserInterface/Base/DebuggableType.js. * UserInterface/Protocol/Connection.js: * UserInterface/Protocol/InspectorBackend.js: * UserInterface/Protocol/ApplicationCacheObserver.js: * UserInterface/Protocol/CPUProfilerObserver.js: * UserInterface/Protocol/CSSObserver.js: * UserInterface/Protocol/CanvasObserver.js: * UserInterface/Protocol/ConsoleObserver.js: * UserInterface/Protocol/DOMObserver.js: * UserInterface/Protocol/DOMStorageObserver.js: * UserInterface/Protocol/DatabaseObserver.js: * UserInterface/Protocol/DebuggerObserver.js: * UserInterface/Protocol/HeapObserver.js: * UserInterface/Protocol/InspectorObserver.js: * UserInterface/Protocol/LayerTreeObserver.js: * UserInterface/Protocol/MemoryObserver.js: * UserInterface/Protocol/NetworkObserver.js: * UserInterface/Protocol/PageObserver.js: * UserInterface/Protocol/RuntimeObserver.js: * UserInterface/Protocol/ScriptProfilerObserver.js: * UserInterface/Protocol/TargetObserver.js: * UserInterface/Protocol/TimelineObserver.js: * UserInterface/Protocol/WorkerObserver.js: All observers now extend from `InspectorBackend.Dispatcher` and have a separate instance for each `InspectorBackend.Agent`, each having their own `_target`. * UserInterface/Protocol/Target.js: * UserInterface/Protocol/DirectBackendTarget.js: * UserInterface/Protocol/JavaScriptContextTarget.js: Removed. * UserInterface/Protocol/MultiplexingBackendTarget.js: * UserInterface/Protocol/PageTarget.js: * UserInterface/Protocol/WorkerTarget.js: Agents are now created per-target instead of copied from the "global" list. This means that agents can have a different set of commands/events depending on the associated target. * UserInterface/Base/Main.js: * UserInterface/Base/Utilities.js: * UserInterface/Controllers/AppController.js: * UserInterface/Controllers/AppControllerBase.js: * UserInterface/Controllers/ApplicationCacheManager.js: * UserInterface/Controllers/AuditManager.js: * UserInterface/Controllers/BreakpointPopoverController.js: * UserInterface/Controllers/CSSManager.js: * UserInterface/Controllers/CanvasManager.js: * UserInterface/Controllers/ConsoleManager.js: * UserInterface/Controllers/DOMDebuggerManager.js: * UserInterface/Controllers/DOMManager.js: * UserInterface/Controllers/DOMStorageManager.js: * UserInterface/Controllers/DatabaseManager.js: * UserInterface/Controllers/DebuggerManager.js: * UserInterface/Controllers/HeapManager.js: * UserInterface/Controllers/IndexedDBManager.js: * UserInterface/Controllers/JavaScriptLogViewController.js: * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js: * UserInterface/Controllers/LayerTreeManager.js: * UserInterface/Controllers/MemoryManager.js: * UserInterface/Controllers/NetworkManager.js: * UserInterface/Controllers/RuntimeManager.js: * UserInterface/Controllers/TargetManager.js: * UserInterface/Controllers/TimelineManager.js: * UserInterface/Controllers/WorkerManager.js: * UserInterface/Main.html: * UserInterface/Models/AuditTestBase.js: * UserInterface/Models/AuditTestCase.js: * UserInterface/Models/AuditTestCaseResult.js: * UserInterface/Models/CPUInstrument.js: * UserInterface/Models/CPUTimelineRecord.js: * UserInterface/Models/CSSCompletions.js: * UserInterface/Models/CSSStyleSheet.js: * UserInterface/Models/Canvas.js: * UserInterface/Models/DOMNode.js: * UserInterface/Models/DOMNodeStyles.js: * UserInterface/Models/DOMStorageObject.js: * UserInterface/Models/DOMTree.js: * UserInterface/Models/DatabaseObject.js: * UserInterface/Models/FPSInstrument.js: * UserInterface/Models/GarbageCollection.js: * UserInterface/Models/HeapAllocationsInstrument.js: * UserInterface/Models/Instrument.js: * UserInterface/Models/MediaInstrument.js: * UserInterface/Models/MemoryInstrument.js: * UserInterface/Models/MemoryPressureEvent.js: * UserInterface/Models/MemoryTimelineRecord.js: * UserInterface/Models/Recording.js: * UserInterface/Models/Resource.js: * UserInterface/Models/ScriptInstrument.js: * UserInterface/Models/ScriptSyntaxTree.js: * UserInterface/Models/ScriptTimelineRecord.js: * UserInterface/Models/ShaderProgram.js: * UserInterface/Models/SourceMapResource.js: * UserInterface/Models/TimelineRecording.js: * UserInterface/Protocol/RemoteObject.js: * UserInterface/Test.html: * UserInterface/Test/FrontendTestHarness.js: * UserInterface/Test/Test.js: * UserInterface/Test/TestAppController.js: * UserInterface/Views/AuditNavigationSidebarPanel.js: * UserInterface/Views/AuditTabContentView.js: * UserInterface/Views/CanvasTabContentView.js: * UserInterface/Views/ContextMenuUtilities.js: * UserInterface/Views/CookieStorageContentView.js: * UserInterface/Views/DOMNodeDetailsSidebarPanel.js: * UserInterface/Views/DOMTreeContentView.js: * UserInterface/Views/ElementsTabContentView.js: * UserInterface/Views/IndexedDatabaseDetailsSidebarPanel.js: * UserInterface/Views/Layers3DContentView.js: * UserInterface/Views/LayersTabContentView.js: * UserInterface/Views/LayoutTimelineView.js: * UserInterface/Views/LogContentView.js: * UserInterface/Views/NetworkTabContentView.js: * UserInterface/Views/NetworkTableContentView.js: * UserInterface/Views/NetworkTimelineView.js: * UserInterface/Views/ObjectTreeView.js: * UserInterface/Views/QuickConsole.js: * UserInterface/Views/ResourceDetailsSidebarPanel.js: * UserInterface/Views/ScriptClusterTimelineView.js: * UserInterface/Views/ScriptDetailsTimelineView.js: * UserInterface/Views/ScriptTreeElement.js: * UserInterface/Views/SearchSidebarPanel.js: * UserInterface/Views/SearchTabContentView.js: * UserInterface/Views/SettingsTabContentView.js: * UserInterface/Views/SourceCodeTextEditor.js: * UserInterface/Views/SourcesNavigationSidebarPanel.js: * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js: * UserInterface/Views/SpreadsheetStyleProperty.js: * UserInterface/Views/StorageTabContentView.js: * UserInterface/Views/TimelineRecordingContentView.js: * UserInterface/Views/TimelineTabContentView.js: * UserInterface/Views/Toolbar.js: * UserInterface/Views/WebSocketContentView.js: * UserInterface/Views/WorkerTreeElement.js: Replace all instances of `window.DomainAgent` with `target.DomainAgent`, where `target` is either derived from an associated model object or `WI.assumingMainTarget()`. Split the `WI.DebuggableType.Web` debuggable type into `WI.DebuggableType.Page` (WebCore::Page) and `WI.DebuggableType.WebPage` (WebKit::WebPageProxy). * UserInterface/Protocol/Legacy/*: * Versions/*: Update protocol files for older versions of iOS. * .eslintrc: * Localizations/en.lproj/localizedStrings.js: Source/WebKit: * WebProcess/WebPage/RemoteWebInspectorUI.h: (WebKit::WebInspectorUI::backendCommandsURL const): Added. (WebKit::WebInspectorUI::debuggableType const): Added. (WebKit::WebInspectorUI::backendCommandsURL): Deleted. (WebKit::WebInspectorUI::debuggableType): Deleted. * WebProcess/WebPage/WebInspectorUI.h: (WebKit::WebInspectorUI::backendCommandsURL const): Added. (WebKit::WebInspectorUI::debuggableType const): Added. * UIProcess/WebPageDebuggable.h: (WebKit::WebPageDebuggable::type const): * UIProcess/glib/RemoteInspectorClient.cpp: (WebKit::RemoteInspectorClient::RemoteInspectorClient): * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.h: * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm: (debuggableTypeString): Split the `Web` debuggable type into `Page` (WebCore::Page) and `WebPage` (WebKit::WebPageProxy). Source/WebKitLegacy/mac: * WebCoreSupport/WebInspectorClient.h: (WebInspectorFrontendClient::debuggableType const): Added. Split the `Web` debuggable type into `Page` (WebCore::Page) and `WebPage` (WebKit::WebPageProxy). Source/WebKitLegacy/win: * WebCoreSupport/WebInspectorClient.h: (WebInspectorFrontendClient::debuggableType const): Added. Split the `Web` debuggable type into `Page` (WebCore::Page) and `WebPage` (WebKit::WebPageProxy). LayoutTests: * inspector/canvas/requestShaderSource-webgl.html: * inspector/canvas/updateShader-webgl: * inspector/page/overrideSetting.html: * inspector/page/overrideSetting-ICECandidateFilteringEnabled.html: * inspector/page/overrideSetting-MockCaptureDevicesEnabled.html: * inspector/runtime/parse.html: Replace all instances of `DomainAgent.Enum` with `InspectorBackend.domains.Domain.Enum`. * inspector/audit/run.html: * inspector/audit/version.html: * inspector/recording/version.html: Use new `InspectorBackend` methods. * inspector/unit-tests/target-manager.html: * inspector/unit-tests/target-manager-expected.txt: * inspector/worker/console-basic.html: * inspector/worker/debugger-pause.html: * inspector/worker/debugger-scripts.html: * inspector/worker/debugger-shared-breakpoint.html: * inspector/worker/resources-in-worker.html: * inspector/worker/resources/dom-debugger-utilities.js: * inspector/worker/runtime-basic.html: * http/tests/inspector/worker/blob-script-with-cross-domain-imported-scripts.html: Replace `WI.Target.Type` with `WI.TargetType`. * inspector/dom/inspect.html: * inspector/dom/inspect-expected.txt: Rewrite test since faking events from the backend now requires a target. * inspector/unit-tests/set-utilities.html: * inspector/unit-tests/set-utilities-expected.txt: Add tests for `Set.prototype.addAll`. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@251227 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebKit is a cross-platform web browser engine. On iOS and macOS, it powers Safari, Mail, iBooks, and many other applications.
Visit WebKit Feature Status page to see which Web API has been implemented, in development, or under consideration.
On macOS, download Safari Technology Preview to test the latest version of WebKit. On Linux, download Epiphany Technology Preview. On Windows, you'll have to build it yourself.
Once your bug is filed, you will receive email when it is updated at each stage in the bug life cycle. After the bug is considered fixed, you may be asked to download the latest nightly and confirm that the fix works for you.
On Windows, follow the instructions on our website.
Run the following command to clone WebKit's Git SVN repository:
git clone git://git.webkit.org/WebKit.git WebKit
or
git clone https://git.webkit.org/git/WebKit.git WebKit
If you want to be able to commit changes to the repository, or just want to check out branches that aren’t contained in WebKit.git, you will need track WebKit's Subversion repository. You can run the following command to configure this and other options of the new Git clone for WebKit development.
Tools/Scripts/webkit-patch setup-git-clone
For information about this, and other aspects of using Git with WebKit, read the wiki page.
If you don‘t want to use Git, run the following command to check out WebKit’s Subversion repository:
svn checkout https://svn.webkit.org/repository/webkit/trunk WebKit
Install Xcode and its command line tools if you haven't done so already:
xcode-select --install
Run the following command to build a debug build with debugging symbols and assertions:
Tools/Scripts/build-webkit --debug
For performance testing, and other purposes, use --release
instead.
You can open WebKit.xcworkspace
to build and debug WebKit within Xcode.
If you don't use a custom build location in Xcode preferences, you have to update the workspace settings to use WebKitBuild
directory. In menu bar, choose File > Workspace Settings, then click the Advanced button, select “Custom”, “Relative to Workspace”, and enter WebKitBuild
for both Products and Intermediates.
The first time after you install a new Xcode, you will need to run the following command to enable Xcode to build command line tools for iOS Simulator:
sudo Tools/Scripts/configure-xcode-for-ios-development
Without this step, you will see the error message: “target specifies product type ‘com.apple.product-type.tool’, but there’s no such product type for the ‘iphonesimulator’ platform.
” when building target JSCLLIntOffsetsExtractor
of project JavaScriptCore
.
Run the following command to build a debug build with debugging symbols and assertions for iOS:
Tools/Scripts/build-webkit --debug --ios-simulator
For production builds:
cmake -DPORT=GTK -DCMAKE_BUILD_TYPE=RelWithDebInfo -GNinja ninja sudo ninja install
For development builds:
Tools/gtk/install-dependencies Tools/Scripts/update-webkitgtk-libs Tools/Scripts/build-webkit --gtk --debug
For more information on building WebKitGTK+, see the wiki page.
For production builds:
cmake -DPORT=WPE -DCMAKE_BUILD_TYPE=RelWithDebInfo -GNinja ninja sudo ninja install
For development builds:
Tools/wpe/install-dependencies Tools/Scripts/update-webkitwpe-libs Tools/Scripts/build-webkit --wpe --debug
For building WebKit on Windows, see the wiki page.
Run the following command to launch Safari with your local build of WebKit:
Tools/Scripts/run-safari --debug
The run-safari
script sets the DYLD_FRAMEWORK_PATH
environment variable to point to your build products, and then launches /Applications/Safari.app
. DYLD_FRAMEWORK_PATH
tells the system loader to prefer your build products over the frameworks installed in /System/Library/Frameworks
.
To run other applications with your local build of WebKit, run the following command:
Tools/Scripts/run-webkit-app <application-path>
Run the following command to launch iOS simulator with your local build of WebKit:
run-safari --debug --ios-simulator
In both cases, if you have built release builds instead, use --release
instead of --debug
.
If you have a development build, you can use the run-minibrowser script, e.g.:
run-minibrowser --debug --wpe
Pass one of --gtk
, --jsc-only
, or --wpe
to indicate the port to use.
Congratulations! You’re up and running. Now you can begin coding in WebKit and contribute your fixes and new features to the project. For details on submitting your code to the project, read Contributing Code.