haikuwebkit/LayoutTests/inspector/unit-tests/set-utilities-expected.txt

91 lines
3.2 KiB
Plaintext
Raw Permalink Normal View History

Web Inspector: CPU Usage Timeline - Statistics and Sources sections https://bugs.webkit.org/show_bug.cgi?id=195202 Reviewed by Devin Rousso. Source/WebInspectorUI: * Localizations/en.lproj/localizedStrings.js: New strings. * UserInterface/Base/Utilities.js: (Map.prototype.getOrInitialize): Helper to get and if not found initialize with a value. * UserInterface/Views/CPUTimelineView.css: (.timeline-view.cpu > .content > .overview > .chart > .container.stats): (.timeline-view.cpu > .content > .overview > .chart > .container.stats > table): (.timeline-view.cpu > .content > .overview > .chart > .container.stats > table > tr > th): (.timeline-view.cpu > .content > .overview > .chart > .container.stats > table > tr > td.number): (.timeline-view.cpu > .content > .overview > .chart > .container.stats > table > tr > td.label): (.timeline-view.cpu > .content > .overview > .chart > .container.stats > table .show-more): (.timeline-view.cpu > .content > .overview > .chart > .container.stats > table .filter): (.timeline-view.cpu > .content > .overview > .chart > .container.stats > table .filter:hover): (.timeline-view.cpu > .content > .overview > .chart > .container.stats > table .active): (.timeline-view.cpu > .content > .overview > .chart > .container.stats > table .active + .active): (@media (prefers-color-scheme: dark)): Colors for the statistics sections. * UserInterface/Views/CPUTimelineView.js: (WI.CPUTimelineView): (WI.CPUTimelineView.prototype.reset): (WI.CPUTimelineView.prototype.clear): (WI.CPUTimelineView.prototype._clearStatistics): (WI.CPUTimelineView.prototype._clearSources): Updates for additional sections. Include a cache of the statisiticsData so we can relayout parts of the UI and avoid an entire UI update. (WI.CPUTimelineView.prototype.initialLayout): (WI.CPUTimelineView.prototype._layoutBreakdownChart): (WI.CPUTimelineView.prototype._layoutStatisticsAndSources): (WI.CPUTimelineView.prototype._layoutStatisticsSection.createEllipsisElement): (WI.CPUTimelineView.prototype._layoutStatisticsSection): (WI.CPUTimelineView.prototype._layoutSourcesSection.firstNonNativeCallFrame): (WI.CPUTimelineView.prototype._layoutSourcesSection.keyForSourceCodeLocation): (WI.CPUTimelineView.prototype._layoutSourcesSection.labelForLocation): (WI.CPUTimelineView.prototype._layoutSourcesSection.createEllipsisElement): (WI.CPUTimelineView.prototype._layoutSourcesSection): Extract layouts into helper methods to avoid an enormous layout method. (WI.CPUTimelineView.prototype._computeSamplingData.incrementTypeCount): (WI.CPUTimelineView.prototype._computeSamplingData): Compute additional data when going through script events. (WI.CPUTimelineView.prototype._resetSourcesFilters): (WI.CPUTimelineView.prototype._addSourcesFilter): (WI.CPUTimelineView.prototype._removeSourcesFilter): (WI.CPUTimelineView.prototype._updateSourcesFilters): Helpers for updating the source filters. (WI.CPUTimelineView.prototype._createTableRow): (WI.CPUTimelineView.prototype._insertTableRow): Helpers for creating rows in the statistics / sources tables. LayoutTests: * inspector/unit-tests/map-utilities-expected.txt: Added. * inspector/unit-tests/map-utilities.html: Added. * inspector/unit-tests/set-utilities-expected.txt: * inspector/unit-tests/set-utilities.html: Canonical link: https://commits.webkit.org/209710@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242562 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-03-06 20:38:43 +00:00
== Running test suite: Set
Web Inspector: allow multiple resources for a given URL https://bugs.webkit.org/show_bug.cgi?id=212852 Reviewed by Brian Burg. Source/WebInspectorUI: Previously, when a new resource is added with a URL that matches an existing resource, any `resourceForURL` call with that URL will return the new resource instead of the old one. Now that there is a `Multimap` of URL to resource, it is possible to pick which resource is used instead of always using the newest one. * UserInterface/Models/ResourceCollection.js: (WI.ResourceCollection): (WI.ResourceCollection.prototype.resourcesForURL): Added. (WI.ResourceCollection.prototype._associateWithResource): (WI.ResourceCollection.prototype._disassociateWithResource): (WI.ResourceCollection.prototype._resourceURLDidChange): (WI.ResourceCollection.prototype.resourceForURL): Deleted. * UserInterface/Models/Frame.js: (WI.Frame.prototype.resourcesForURL): Added. (WI.Frame.prototype.resourceForURL): Deleted. * UserInterface/Controllers/NetworkManager.js: (WI.NetworkManager.prototype.resourcesForURL): Added. (WI.NetworkManager.prototype.resourceRequestDidReceiveResponse): (WI.NetworkManager.prototype._initiatorSourceCodeLocationFromPayload): (WI.NetworkManager.prototype.resourceForURL): Deleted. * UserInterface/Models/Script.js: (WI.Script.prototype._resolveResource): (WI.Script.prototype._resolveResource.isScriptResource): Added. * UserInterface/Controllers/CSSManager.js: (WI.CSSManager.prototype._updateResourceContent.fetchedStyleSheetContent): * UserInterface/Base/Utilities.js: (Set.prototype.find): Added. Add utility for finding an item in a `Set` to avoid having to `Array.from`. * UserInterface/Base/Main.js: (WI.openURL): (WI.sourceCodeForURL): * UserInterface/Controllers/TimelineManager.js: (WI.TimelineManager.prototype._processRecord): * UserInterface/Models/CallFrame.js: (WI.CallFrame.fromPayload): * UserInterface/Models/ConsoleMessage.js: (WI.ConsoleMessage.prototype.get sourceCodeLocation): * UserInterface/Models/DOMNodeStyles.js: (WI.DOMNodeStyles.prototype.createSourceCodeLocation): * UserInterface/Models/ScriptTimelineRecord.js: (WI.ScriptTimelineRecord.prototype._initializeProfileFromPayload.profileNodeFromPayload): * UserInterface/Views/ContextMenuUtilities.js: (WI.appendContextMenuItemsForURL): * UserInterface/Views/DOMDetailsSidebarPanel.js: (WI.DOMDetailsSidebarPanel.prototype._mouseWasClicked): * UserInterface/Views/SearchSidebarPanel.js: (WI.SearchSidebarPanel.prototype.performSearch): Use the `firstValue` instead of the implicit `lastValue` to match existing nearby usage of `WI.DebuggerManager.prototype.scriptsForURL`, which explicitly chooses the first script. LayoutTests: * inspector/unit-tests/set-utilities.html: * inspector/unit-tests/set-utilities-expected.txt: Add test for `Set.prototype.find`. * http/tests/websocket/tests/hybi/inspector/resolveWebSocket.html: Update usage of `resourceForURL` to `resourcesForURL` with `Set.prototype.firstValue`. Canonical link: https://commits.webkit.org/225783@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262806 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-06-09 20:44:14 +00:00
-- Running test case: Set.prototype.find
PASS: Set can find a item it holds.
PASS: Set finds the first item if the given predicate matches multiple items.
PASS: Set returns 'undefined' when attempting to find an item if the given predicate doesn't match anything.
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`. Canonical link: https://commits.webkit.org/216493@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251227 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-10-17 08:00:46 +00:00
-- Running test case: Set.prototype.pushAll
Array:
[1,2] => [1,2,"a1","a2"]
Set:
[1,2] => [1,2,"s1","s2"]
[1,2] => [1,2,["s1","s1"],["s2","s2"]]
[1,2] => [1,2,"s1","s2"]
[1,2] => [1,2,"s1","s2"]
Map:
[1,2] => [1,2,["m1k","m1v"],["m2k","m2v"]]
[1,2] => [1,2,["m1k","m1v"],["m2k","m2v"]]
[1,2] => [1,2,"m1k","m2k"]
[1,2] => [1,2,"m1v","m2v"]
Object:
[1,2] => [1,2,["o1k","o1v"],["o2k","o2v"]]
[1,2] => [1,2,"o1k","o2k"]
[1,2] => [1,2,"o1v","o2v"]
Generator:
[1,2] => [1,2,"g1","g2"]
Node:
[1,2] => [1,2,<n1>,<n2>]
[1,2] => [1,2,<n1>,<n2>]
Object (doesn't have [Symbol.iterator]):
PASS: Should produce an exception.
TypeError: undefined is not a function (near '...item of iterable...')
Web Inspector: REGRESSION(r245498): Timelines: CPU: discontinuities are filled in by the next record https://bugs.webkit.org/show_bug.cgi?id=198927 Reviewed by Matt Baker. Source/WebInspectorUI: * UserInterface/Controllers/TimelineManager.js: (WI.TimelineManager.prototype.capturingStarted): (WI.TimelineManager.prototype.capturingStopped): * UserInterface/Models/TimelineRecording.js: (WI.TimelineRecording): (WI.TimelineRecording.prototype.start): (WI.TimelineRecording.prototype.capturingStarted): Added. (WI.TimelineRecording.prototype.capturingStopped): Added. (WI.TimelineRecording.prototype.reset): (WI.TimelineRecording.prototype.addRecord): (WI.TimelineRecording.prototype.discontinuitiesInTimeRange): (WI.TimelineRecording.prototype.addDiscontinuity): Deleted. Notify the `TimelineRecording` when capturing has started/stopped. Adjust the first record after a discontinuity to have it's `startTime` match the `endTime` of the most recent discontinuity. * UserInterface/Models/Timeline.js: (WI.Timeline.prototype.addRecord): * UserInterface/Models/CPUTimeline.js: (WI.CPUTimeline.prototype.addRecord): * UserInterface/Models/CPUTimelineRecord.js: (WI.CPUTimelineRecord.prototype.adjustStartTime): Added. (WI.CPUTimelineRecord.prototype.adjustStartTimeToLastRecord): Deleted. * UserInterface/Models/MemoryTimeline.js: (WI.MemoryTimeline.prototype.addRecord): * UserInterface/Models/MemoryTimelineRecord.js: (WI.MemoryTimelineRecord.prototype.adjustStartTime): Added. (WI.MemoryTimelineRecord.prototype.adjustStartTimeToLastRecord): Deleted. * UserInterface/Models/NetworkTimeline.js: (WI.NetworkTimeline.prototype.addRecord): * UserInterface/Views/CPUTimelineView.js: (WI.CPUTimelineView.prototype.layout): * UserInterface/Views/MemoryTimelineOverviewGraph.js: (WI.MemoryTimelineOverviewGraph.prototype.layout): * UserInterface/Views/MemoryTimelineView.js: (WI.MemoryTimelineView.prototype.layout): Include discontinuities that exactly match the start/end time of the record immediately before/after the discontinuity. * UserInterface/Views/TimelineRecordingContentView.js: (WI.TimelineRecordingContentView): (WI.TimelineRecordingContentView.prototype._handleTimelineCapturingStateChanged): (WI.TimelineRecordingContentView.prototype._recordingReset): Move the logic for handling discontinuity start/end times to the `TimelineRecording`. * UserInterface/Base/Utilities.js: LayoutTests: * inspector/unit-tests/set-utilities.html: * inspector/unit-tests/set-utilities-expected.txt: Canonical link: https://commits.webkit.org/213317@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247033 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-07-02 01:17:50 +00:00
-- Running test case: Set.prototype.take
PASS: Set can take `key`.
PASS: Set no longer has `key`.
PASS: Set can NOT take `key`.
PASS: Set can NOT take `DNE`, as it does NOT exist.
-- Running test case: Set.prototype.intersects
PASS: an empty set should not intersect another empty set.
PASS: a non-empty set should not intersect an empty set.
PASS: a set should intersect another set with the same values.
PASS: a set should not intersect another set with different values.
PASS: a set should intersect another set with same and additional values.
PASS: a set should intersect another set with same and different values.
-- Running test case: Set.prototype.isSubsetOf
PASS: an empty set should be a subset of another empty set.
PASS: an empty set should be a subset of a non-empty set.
PASS: a set should be a subset of another set with the same values.
PASS: a set should not be a subset of another set with different values.
PASS: a set should be a subset of another set with same and additional values.
PASS: a set should not be a subset of another set with same and different values.
Web Inspector: Frontend performance is very slow reloading theverge.com - 50% of time in TreeOutline _indexOfTreeElement https://bugs.webkit.org/show_bug.cgi?id=193605 <rdar://problem/47403986> Reviewed by Devin Rousso. Source/WebInspectorUI: SelectionController should track an unordered Set of represented objects instead of an ordered set of indexes. This eliminates the costly and error-prone updates needed to keep the selected indexes in sync as items are added and removed from TreeOutline (and Table, to a far lesser extent). The SelectionController interface is largely the same. Class and delegate methods have been renamed to reflect the change from indexes to objects. SelectionController tracks selected items in selection order. For the operations that rely on objects being in insertion order, the controller uses a comparator function provided at construction time. * UserInterface/Base/IndexSet.js: Removed. No longer used. SelectionController now uses a plain Set. * UserInterface/Base/Utilities.js: (value): (get return): Add utilities previously supplied by IndexSet and used by SelectionController. * UserInterface/Controllers/SelectionController.js: (WI.SelectionController): (WI.SelectionController.prototype.get lastSelectedItem): (WI.SelectionController.prototype.get selectedItems): (WI.SelectionController.prototype.set allowsMultipleSelection): (WI.SelectionController.prototype.hasSelectedItem): (WI.SelectionController.prototype.selectItem): (WI.SelectionController.prototype.deselectItem): (WI.SelectionController.prototype.selectAll): (WI.SelectionController.prototype.deselectAll): (WI.SelectionController.prototype.removeSelectedItems): (WI.SelectionController.prototype.reset): (WI.SelectionController.prototype.didRemoveItems): (WI.SelectionController.prototype.handleKeyDown): (WI.SelectionController.prototype.handleItemMouseDown): (WI.SelectionController.prototype._deselectAllAndSelect): (WI.SelectionController.prototype._selectItemsFromArrowKey): (WI.SelectionController.prototype._firstSelectableItem): (WI.SelectionController.prototype._lastSelectableItem): (WI.SelectionController.prototype._previousSelectableItem): (WI.SelectionController.prototype._nextSelectableItem): (WI.SelectionController.prototype._updateSelectedItems): (WI.SelectionController.prototype._addRange): (WI.SelectionController.prototype._deleteRange): (WI.SelectionController.prototype.get numberOfItems): Deleted. (WI.SelectionController.prototype.didInsertItem): Deleted. (WI.SelectionController.prototype.handleItemMouseDown.normalizeRange): Deleted. (WI.SelectionController.prototype._nextSelectableIndex): Deleted. (WI.SelectionController.prototype._previousSelectableIndex): Deleted. * UserInterface/Main.html: * UserInterface/Test.html: Remove IndexSet. * UserInterface/Views/CookieStorageContentView.js: (WI.CookieStorageContentView.prototype.tableIndexForRepresentedObject): (WI.CookieStorageContentView.prototype.tableRepresentedObjectForIndex): * UserInterface/Views/DOMTreeOutline.js: (WI.DOMTreeOutline.prototype.objectForSelection): * UserInterface/Views/NetworkTableContentView.js: (WI.NetworkTableContentView.prototype.tableIndexForRepresentedObject): (WI.NetworkTableContentView.prototype.tableRepresentedObjectForIndex): * UserInterface/Views/Table.js: (WI.Table): (WI.Table.prototype.get selectedRow): (WI.Table.prototype.get selectedRows): (WI.Table.prototype.isRowSelected): (WI.Table.prototype.selectRow): (WI.Table.prototype.deselectRow): (WI.Table.prototype.removeRow): (WI.Table.prototype.removeSelectedRows): (WI.Table.prototype.selectionControllerSelectionDidChange): (WI.Table.prototype.selectionControllerFirstSelectableItem): (WI.Table.prototype.selectionControllerLastSelectableItem): (WI.Table.prototype.selectionControllerPreviousSelectableItem): (WI.Table.prototype.selectionControllerNextSelectableItem): (WI.Table.prototype._handleMouseDown): (WI.Table.prototype._removeRows): (WI.Table.prototype._indexForRepresentedObject): (WI.Table.prototype._representedObjectForIndex): (WI.Table.prototype.selectionControllerNumberOfItems): Deleted. (WI.Table.prototype.selectionControllerNextSelectableIndex): Deleted. (WI.Table.prototype.selectionControllerPreviousSelectableIndex): Deleted. (WI.Table.prototype._toggleSelectedRowStyle): Deleted. * UserInterface/Views/TreeOutline.js: (WI.TreeOutline.compareSiblings): (WI.TreeOutline): (WI.TreeOutline.prototype.get selectedTreeElement): (WI.TreeOutline.prototype.set selectedTreeElement): (WI.TreeOutline.prototype.get selectedTreeElements): (WI.TreeOutline.prototype.removeChildAtIndex): (WI.TreeOutline.prototype.removeChildren): (WI.TreeOutline.prototype._rememberTreeElement): (WI.TreeOutline.prototype.getCachedTreeElement): (WI.TreeOutline.prototype.selectionControllerSelectionDidChange): (WI.TreeOutline.prototype.selectionControllerFirstSelectableItem): (WI.TreeOutline.prototype.selectionControllerLastSelectableItem): (WI.TreeOutline.prototype.selectionControllerPreviousSelectableItem): (WI.TreeOutline.prototype.selectionControllerNextSelectableItem): (WI.TreeOutline.prototype.objectForSelection): (WI.TreeOutline._generateStyleRulesIfNeeded): (WI.TreeOutline.prototype.selectionControllerNextSelectableIndex): Deleted. (WI.TreeOutline.prototype.selectionControllerPreviousSelectableIndex): Deleted. (WI.TreeOutline._generateStyleRulesIfNeeded._indexesForSubtree.numberOfElementsInSubtree): Deleted. LayoutTests: * inspector/table/resources/table-utilities.js: (TestPage.registerInitializer.InspectorTest.TableDataSource.prototype.tableIndexForRepresentedObject): (TestPage.registerInitializer.InspectorTest.TableDataSource.prototype.tableRepresentedObjectForIndex): (TestPage.registerInitializer.InspectorTest.TableDataSource): New Table data source methods. * inspector/unit-tests/index-set-expected.txt: Removed. * inspector/unit-tests/index-set.html: Removed. * inspector/unit-tests/set-utilities-expected.txt: * inspector/unit-tests/set-utilities.html: Remove IndexSet tests and update tests for Set utilities to include new helper methods `equals` and `difference`, and `firstValue`. Canonical link: https://commits.webkit.org/209144@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@241652 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-02-17 20:49:38 +00:00
-- Running test case: Set.prototype.equals
PASS: an empty set should be equal to another empty set.
PASS: a set should be equal to another set with the same values.
PASS: a set should be equal to another set with the same values in a different order.
PASS: a set should not be a equal to another set with different values.
PASS: a set should not be equal to another set with same and different values.
-- Running test case: Set.prototype.difference
Given a Set with values [], and another Set with values []:
PASS: Set difference should be [].
Given a Set with values [1,2,3], and another Set with values []:
PASS: Set difference should be [1,2,3].
Given a Set with values [], and another Set with values [1,2,3]:
PASS: Set difference should be [].
Given a Set with values [1,2,3], and another Set with values [2,3,4]:
PASS: Set difference should be [1].
-- Running test case: Set.prototype.firstValue
PASS: Set with values [] should have firstValue equal to undefined.
PASS: Set with values [1,2,3] should have firstValue equal to 1.
Web Inspector: Elements tab: multiple selection lost after navigating to another tab https://bugs.webkit.org/show_bug.cgi?id=192681 <rdar://problem/46709392> Reviewed by Timothy Hatcher. Orginal patch by Matt Baker <mattbaker@apple.com>. Source/WebInspectorUI: * UserInterface/Controllers/SelectionController.js: (WI.SelectionController.prototype.selectItem): Simplify internal logic by removing an early return. (WI.SelectionController.prototype.selectItems): Added. (WI.SelectionController.prototype.selectAll): Provide a means to select multiple items in a single operation. If `_lastSelectedItem` is not in the items to select, the last item being selected will become the last selected item. (WI.SelectionController.prototype._deselectAllAndSelect): Drive-by fix: correct a logic error. If no items are selected, the item passed as an argument should still become selected. * UserInterface/Views/TreeOutline.js: (WI.TreeOutline.prototype.selectTreeElements): Added. * UserInterface/Views/DOMTreeElement.js: (WI.DOMTreeElement): (WI.DOMTreeElement.prototype.get closeTagTreeElement): Added. (WI.DOMTreeElement.prototype._updateChildren): Make the close tag `TreeElement` available from the open tag `TreeElement`. * UserInterface/Views/DOMTreeOutline.js: (WI.DOMTreeOutline.prototype.update): Restore selected `TreeElement`s after updating. * UserInterface/Base/Utilities.js: * UserInterface/Test.html: LayoutTests: * inspector/tree-outline/tree-outline-selection.html: Added. * inspector/tree-outline/tree-outline-selection-expected.txt: Added. Add `TreeOutline` tests for single and multiple selection. * inspector/unit-tests/set-utilities.html: * inspector/unit-tests/set-utilities-expected.txt: Add tests for `Set.prototype.lastValue`. Canonical link: https://commits.webkit.org/211070@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244154 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-10 22:44:11 +00:00
-- Running test case: Set.prototype.lastValue
PASS: Set with values [] should have lastValue equal to undefined.
PASS: Set with values [1,2,3] should have lastValue equal to 3.