2019-06-05 Devin Rousso Web Inspector: Dark Mode: inactive tab bar tint is too light https://bugs.webkit.org/show_bug.cgi?id=198546 Reviewed by Joseph Pecoraro. * UserInterface/Views/TabBar.css: (@media (prefers-color-scheme: dark)): 2019-06-03 Devin Rousso Web Inspector: remove RemoteObject.prototype.getPropertyDescriptorsAsObject https://bugs.webkit.org/show_bug.cgi?id=198395 Reviewed by Matt Baker. When calling `RemoteObject.prototype.getPropertyDescriptorsAsObject`, if one of the returned property descriptors is named `__proto__`, it will replace the `__proto__` of the plain object created for that function with the `WI.PropertyDescriptor` itself, altering the prototype chain. * UserInterface/Protocol/RemoteObject.js: (WI.RemoteObject.prototype.getPropertyDescriptorsAsObject): Deleted. * UserInterface/Models/AuditTestCase.js: (WI.AuditTestCase.prototype.async run.async parseResponse.async resultArrayForEach): * UserInterface/Views/ErrorObjectView.js: (WI.ErrorObjectView.prototype.update): 2019-06-02 Matt Baker Web Inspector: Debugger: sidebar should always reveal active call frame when hitting a breakpoint https://bugs.webkit.org/show_bug.cgi?id=198228 Reviewed by Devin Rousso. Reveal the active call frame TreeElement when call frames change. Refreshing the current target's ThreadTreeElement children is insufficient, since the sidebar panel content may have been scrolled. This patch also introduces a workaround to prevent the DetailsSection header element, which has sticky positioning, from covering a revealed TreeElement. This can be the case when the TreeElement being revealed is at the topmost edge of the scrolled content element. * UserInterface/Base/Utilities.js: * UserInterface/Views/DebuggerSidebarPanel.js: (WI.DebuggerSidebarPanel.prototype.createContentTreeOutline): (WI.DebuggerSidebarPanel.prototype._debuggerCallFramesDidChange): * UserInterface/Views/DetailsSection.js: (WI.DetailsSection.prototype.get element): (WI.DetailsSection.prototype.get headerElement): (WI.DetailsSection.prototype.get identifier): * UserInterface/Views/SourcesNavigationSidebarPanel.js: (WI.SourcesNavigationSidebarPanel.prototype.createContentTreeOutline): (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerCallFramesDidChange): * UserInterface/Views/TreeElement.js: (WI.TreeElement.prototype.reveal): * UserInterface/Views/TreeOutline.js: 2019-06-02 Devin Rousso Web Inspector: propagate whether to show prototype information to subobject views https://bugs.webkit.org/show_bug.cgi?id=194929 Reviewed by Matt Baker. Add a way to mark the `ObjectTreeView` as holding a JSON value, which extends `showOnlyProperties` to also hide the prototype of all held values (e.g. children). * UserInterface/Views/ObjectTreeView.js: (WI.ObjectTreeView.prototype.showOnlyJSON): Added. * UserInterface/Views/ObjectTreeView.css: (.object-tree.properties-only.json-only .object-tree-property .prototype-property): Added. * UserInterface/Views/AuditTestCaseContentView.js: (WI.AuditTestCaseContentView.prototype.layout): * UserInterface/Views/DOMNodeDetailsSidebarPanel.js: (WI.DOMNodeDetailsSidebarPanel.prototype._refreshAssociatedData): * UserInterface/Views/JSONResourceContentView.css: (.content-view.resource.json .object-tree .prototype-property): Deleted. * UserInterface/Views/JSONResourceContentView.js: (WI.JSONResourceContentView.prototype.contentAvailable): 2019-05-31 Nikita Vasilyev Web Inspector: CSS Changes: modifications aren't shared for rules that match multiple elements https://bugs.webkit.org/show_bug.cgi?id=195264 Reviewed by Devin Rousso. This patch fixes several cases when the diff was incorrect. 1. Perform diff based on CSSProperty content (name, value, and enabled property) instead of strict equality of CSSProperty instances. 2. Copy all initial CSSProperty instances of CSSStyleDeclaration on 1st edit. This removes the need to update `properties` on every single edit. 3. Do full diff to display modified property markers (green background) in Rules panel. This fixes a few cases when the markers were inaccurate. E.g. a newly added property matches removed property - no need to show the green background. * UserInterface/Base/Utilities.js: (Array.diffArrays): Allow repeating items in the arrays. * UserInterface/Controllers/CSSManager.js: (WI.CSSManager.prototype.getModifiedStyle): (WI.CSSManager.prototype.removeModifiedStyle): * UserInterface/Models/CSSProperty.js: (WI.CSSProperty): (WI.CSSProperty.prototype.get modified): (WI.CSSProperty.prototype.set modified): (WI.CSSProperty.prototype.equals): (WI.CSSProperty.prototype.clone): (WI.CSSProperty.prototype._updateOwnerStyleText): (WI.CSSProperty.prototype._markModified): * UserInterface/Models/CSSStyleDeclaration.js: (WI.CSSStyleDeclaration.prototype.markModified): (WI.CSSStyleDeclaration.prototype.updatePropertiesModifiedState): * UserInterface/Views/ChangesDetailsSidebarPanel.js: (WI.ChangesDetailsSidebarPanel.prototype._createRuleElement): * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js: (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout): * UserInterface/Views/SpreadsheetStyleProperty.js: 2019-05-31 Devin Rousso Web Inspector: Timelines: CPU: gray (?) and (x) should be white https://bugs.webkit.org/show_bug.cgi?id=198394 Reviewed by Joseph Pecoraro. * UserInterface/Views/Variables.css: (@media (prefers-color-scheme: dark)): Remove the dark mode override for `--gray-foreground-color`, as the default `white` is a better contrast. 2019-05-30 Devin Rousso Web Inspector: Audit: there should be a default test for WebInspectorAudit.Resources functionality https://bugs.webkit.org/show_bug.cgi?id=196710 Reviewed by Joseph Pecoraro. Previously, there was no way to return data from Audit that wasn't a DOM node, a DOM attribute (which wasn't "shown" anywhere, as it would highlight that attribute on any returned DOM nodes), or an error string. In order for Audits to be more flexible with the types of things they test, there needs to be a way for other types of data to be sent back and displayed in the Audit tab. This patch makes it so that an Audit result can now contain other keys/values that are all expected to be JSON serializable. It will take all of the non-"special" (e.g. "domNodes" or "errors") keys/values and display them as object trees. This way, any JSON serializable data can be sent with the result and be displayed in the Audit tab. * UserInterface/Models/AuditTestBase.js: (WI.AuditTestBase.prototype.async setup): (WI.AuditTestBase.prototype.clearResult): * UserInterface/Models/AuditTestGroup.js: (WI.AuditTestCase.prototype.clearResult): (WI.AuditTestCase.prototype._updateResult): * UserInterface/Models/AuditTestCase.js: (WI.AuditTestCase.prototype.async run): (WI.AuditTestCase.prototype.async run.async parseResponse): (WI.AuditTestCase.prototype.async run.async parseResponse.checkResultProperty): (WI.AuditTestCase.prototype.async run.async parseResponse.checkResultProperty.addErrorForValueType): (WI.AuditTestCase.prototype.async run.async parseResponse.async resultArrayForEach): (WI.AuditTestCase.prototype.async run.async parseResponse.inspectedPage_stringify): Added. Rename `ResultCleared` to `ResultChanged` so that it can (semantically) be used whenever a new result is set in addition to when an existing one is cleared. This is needed so that `AuditTestCaseContentView` will refresh each time the result changes, instead of only in the first `layout()` after the last result was cleared. * UserInterface/Models/AuditTestCaseResult.js: (WI.AuditTestCaseResult.async fromPayload): (WI.AuditTestCaseResult.prototype.toJSON): Drive-by: fix the check for optional `data` values to still warn if the value is `null`. * UserInterface/Controllers/AuditManager.js: (WI.AuditManager.prototype._addDefaultTests): Add a default test "Demo Audit > Result Data > data-custom" as an example how to write an Audit that returns custom data, as well as how that custom data is shown in the Audit tab. * UserInterface/Views/AuditTestContentView.js: (WI.AuditTestContentView.prototype.shown): (WI.AuditTestContentView.prototype.handleResultChanged): Added. * UserInterface/Views/AuditTestCaseContentView.js: (WI.AuditTestCaseContentView): (WI.AuditTestCaseContentView.prototype.layout): (WI.AuditTestCaseContentView.prototype.handleResultChanged): Added. Preserve the UI for each section across `layout()`s, so that expand/collapse states aren't reset each time the user changes the selected Audit. * UserInterface/Views/AuditTestCaseContentView.css: (.content-view.audit-test-case > section table > tr > td + td): Added. Drive-by: ensure that the "index" table column is never larger than it needs to be. * UserInterface/Views/AuditTreeElement.js: (WI.AuditTreeElement.prototype.onattach): (WI.AuditTreeElement.prototype._handleTestResultChanged): Added. (WI.AuditTreeElement.prototype._handleTestResultCleared): Deleted. * Localizations/en.lproj/localizedStrings.js: 2019-05-28 Devin Rousso Web Inspector: Timelines: spacing around pie chart is different between CPU and Memory https://bugs.webkit.org/show_bug.cgi?id=198299 Reviewed by Matt Baker. "Style Resolution" is a much longer string than any of the legend strings in the Memory timeline, and causes the CPU timeline legend to shift as a result. Rename "Script" to "JavaScript" and "Style Resolution" to "Styles" so that the strings are roughly the same length between the CPU and Memory timelines, meaning that they will appear in the same spot with similar sizing. * UserInterface/Views/CPUTimelineView.js: (WI.CPUTimelineView.displayNameForSampleType): (WI.CPUTimelineView.prototype.initialLayout): (WI.CPUTimelineView.prototype._computeStatisticsData): Drive-by: remove the `WI` prefix from all `CPUTimelineView.SampleType` since it's within the same class. * UserInterface/Views/CPUTimelineView.css: (.timeline-view.cpu > .content > .overview .legend > .row > .swatch.sample-type-javascript): Added. (.timeline-view.cpu > .content > .overview .legend > .row > .swatch.sample-type-script): Deleted. Drive-by: move the `.overview` rules lower to be in the same area as the `.overview *` rules. * UserInterface/Views/MemoryTimelineView.css: (.timeline-view.memory > .content > .overview): Drive-by: remove duplicate CSS rule. * Localizations/en.lproj/localizedStrings.js: 2019-05-28 Nikita Vasilyev Web Inspector: Provide UIString descriptions to improve localizations https://bugs.webkit.org/show_bug.cgi?id=195132 Reviewed by Devin Rousso. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Base/LoadLocalizedStrings.js: (WI.UIString): (WI.repeatedUIString.timelineRecordLayout): (WI.repeatedUIString.timelineRecordPaint): (WI.repeatedUIString.timelineRecordComposite): (WI.repeatedUIString.allExceptions): (WI.repeatedUIString.uncaughtExceptions): (WI.repeatedUIString.assertionFailures): (WI.repeatedUIString.allRequests): (WI.repeatedUIString.fetch): (WI.repeatedUIString.revealInDOMTree): * UserInterface/Models/LayoutTimelineRecord.js: (WI.LayoutTimelineRecord.displayNameForEventType): * UserInterface/Models/RenderingFrameTimelineRecord.js: (WI.RenderingFrameTimelineRecord.displayNameForTaskType): * UserInterface/Models/Resource.js: (WI.Resource.displayNameForType): * UserInterface/Views/AuditTestGroupContentView.js: (WI.AuditTestGroupContentView.prototype.layout): * UserInterface/Views/CPUTimelineView.js: (WI.CPUTimelineView.displayNameForSampleType): * UserInterface/Views/ContextMenuUtilities.js: * UserInterface/Views/DOMBreakpointTreeElement.js: (WI.DOMBreakpointTreeElement.displayNameForType): * UserInterface/Views/DOMNodeTreeElement.js: (WI.DOMNodeTreeElement.prototype.populateContextMenu): (WI.DOMNodeTreeElement): * UserInterface/Views/DOMTreeElement.js: (WI.DOMTreeElement.prototype.populateDOMNodeContextMenu): * UserInterface/Views/DebuggerSidebarPanel.js: (WI.DebuggerSidebarPanel.prototype._addBreakpoint): (WI.DebuggerSidebarPanel.prototype._handleCreateBreakpointMouseDown): (WI.DebuggerSidebarPanel): * UserInterface/Views/LayerTreeDetailsSidebarPanel.js: (WI.LayerTreeDetailsSidebarPanel.prototype._buildDataGridSection): * UserInterface/Views/NetworkTableContentView.js: (WI.NetworkTableContentView.shortDisplayNameForResourceType): (WI.NetworkTableContentView.prototype.initialLayout): * UserInterface/Views/SourcesNavigationSidebarPanel.js: (WI.SourcesNavigationSidebarPanel.prototype._addBreakpoint): (WI.SourcesNavigationSidebarPanel.prototype._handleCreateBreakpointMouseDown): * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js: (WI.SpreadsheetCSSStyleDeclarationSection.prototype._renderSelector): * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js: (WI.SpreadsheetRulesStyleDetailsPanel.prototype.layout): 2019-05-24 Devin Rousso Web Inspector: Overlay: don't show setting for showing rulers/guides during element selection if it's not supported https://bugs.webkit.org/show_bug.cgi?id=198221 Reviewed by Joseph Pecoraro. * UserInterface/Views/SettingsTabContentView.js: (WI.SettingsTabContentView.prototype._createGeneralSettingsView): 2019-05-23 Devin Rousso Web Inspector: prevent stripping `console.assert` if it's used inside a string https://bugs.webkit.org/show_bug.cgi?id=198207 Reviewed by Joseph Pecoraro. * Scripts/remove-console-asserts.pl: (removeConsoleAssertsInFile): 2019-05-23 Devin Rousso Web Inspector: Overlay: rulers/guides should be shown whenever element selection is enabled https://bugs.webkit.org/show_bug.cgi?id=198088 Reviewed by Timothy Hatcher. When trying to "measure" the absolute position (to the viewport) or relative position (to another element) of a given element, often the easiest way is to enable Element Selection and Show Rulers at the same time. This can have the undesired "side-effect" of having the rulers be always present, even when not highlighting any nodes. The ideal functionality is to allow the rulers/guides to be shown when element selection is active and a node is hovered, regardless of whether "Show Rulers" is enabled. * UserInterface/Base/Setting.js: * UserInterface/Views/SettingsTabContentView.js: (WI.SettingsTabContentView.prototype._createGeneralSettingsView): Add a setting for controlling whether rulers/guides are shown during element selection. * UserInterface/Controllers/DOMManager.js: (WI.DOMManager.prototype.set inspectModeEnabled): Pass the setting value as an optional parameter when calling `DOM.setInspectModeEnabled`. * Localizations/en.lproj/localizedStrings.js: 2019-05-23 Commit Queue Unreviewed, rolling out r245665. https://bugs.webkit.org/show_bug.cgi?id=198203 Inspector appears blank, again. (Requested by NVI on #webkit). Reverted changeset: "Web Inspector: Provide UIString descriptions to improve localizations" https://bugs.webkit.org/show_bug.cgi?id=195132 https://trac.webkit.org/changeset/245665 2019-05-23 Matt Baker Web Inspector: Remove unused CSS class "offset-sections" https://bugs.webkit.org/show_bug.cgi?id=198194 Reviewed by Devin Rousso. * UserInterface/Views/DebuggerSidebarPanel.js: * UserInterface/Views/StyleDetailsPanel.js: (WI.StyleDetailsPanel): 2019-05-23 Devin Rousso Web Inspector: clicking a source link should never open the Network tab https://bugs.webkit.org/show_bug.cgi?id=197951 Reviewed by Timothy Hatcher. The preview panel in the Network tab is really meant to be just that; a preview. Opening resources in the preview panel is not a great experience, as the Network tab doesn't have as much of the information one would expect when viewing a resource (namely the Resource details sidebar panel). Navigating within the Network tab also completely wipes out the current "state" of what you're looking at (e.g. which panel), which could be unexpected. The only way this could happen previously was if the Resources/Debugger/Sources tabs had never been active at any point in the past. Selecting one of those tabs and then clicking on an initiator link in the Network tab would re-select that other tab. * UserInterface/Base/Main.js: (WI.dialogWasDismissedWithRepresentedObject): * UserInterface/Views/ResourceHeadersContentView.js: (WI.ResourceHeadersContentView.prototype._refreshSummarySection): 2019-05-22 Nikita Vasilyev Web Inspector: Provide UIString descriptions to improve localizations https://bugs.webkit.org/show_bug.cgi?id=195132 Reviewed by Devin Rousso. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Base/LoadLocalizedStrings.js: (WI.UIString): (WI.repeatedUIString.timelineRecordLayout): (WI.repeatedUIString.timelineRecordPaint): (WI.repeatedUIString.timelineRecordComposite): (WI.repeatedUIString.allExceptions): (WI.repeatedUIString.uncaughtExceptions): (WI.repeatedUIString.assertionFailures): (WI.repeatedUIString.allRequests): (WI.repeatedUIString.fetch): (WI.repeatedUIString.revealInDOMTree): * UserInterface/Models/LayoutTimelineRecord.js: (WI.LayoutTimelineRecord.displayNameForEventType): * UserInterface/Models/RenderingFrameTimelineRecord.js: (WI.RenderingFrameTimelineRecord.displayNameForTaskType): * UserInterface/Models/Resource.js: (WI.Resource.displayNameForType): * UserInterface/Views/AuditTestGroupContentView.js: (WI.AuditTestGroupContentView.prototype.layout): * UserInterface/Views/CPUTimelineView.js: (WI.CPUTimelineView.displayNameForSampleType): * UserInterface/Views/ContextMenuUtilities.js: * UserInterface/Views/DOMBreakpointTreeElement.js: (WI.DOMBreakpointTreeElement.displayNameForType): * UserInterface/Views/DOMNodeTreeElement.js: (WI.DOMNodeTreeElement.prototype.populateContextMenu): (WI.DOMNodeTreeElement): * UserInterface/Views/DOMTreeElement.js: (WI.DOMTreeElement.prototype.populateDOMNodeContextMenu): * UserInterface/Views/DebuggerSidebarPanel.js: (WI.DebuggerSidebarPanel.prototype._addBreakpoint): (WI.DebuggerSidebarPanel.prototype._handleCreateBreakpointMouseDown): (WI.DebuggerSidebarPanel): * UserInterface/Views/LayerTreeDetailsSidebarPanel.js: (WI.LayerTreeDetailsSidebarPanel.prototype._buildDataGridSection): * UserInterface/Views/NetworkTableContentView.js: (WI.NetworkTableContentView.shortDisplayNameForResourceType): (WI.NetworkTableContentView.prototype.initialLayout): * UserInterface/Views/SourcesNavigationSidebarPanel.js: (WI.SourcesNavigationSidebarPanel.prototype._addBreakpoint): (WI.SourcesNavigationSidebarPanel.prototype._handleCreateBreakpointMouseDown): * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js: (WI.SpreadsheetCSSStyleDeclarationSection.prototype._renderSelector): * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js: (WI.SpreadsheetRulesStyleDetailsPanel.prototype.layout): 2019-05-22 Devin Rousso Web Inspector: provide a debug setting button to reset all settings for easier testing/presentation https://bugs.webkit.org/show_bug.cgi?id=195777 Reviewed by Joseph Pecoraro. * UserInterface/Base/Setting.js: (WI.Setting.reset): Added. * UserInterface/Views/SettingsTabContentView.js: (WI.SettingsTabContentView.prototype._createDebugSettingsView): 2019-05-20 Devin Rousso Web Inspector: Storage tab crashes easily when adding new local/session storage entries. https://bugs.webkit.org/show_bug.cgi?id=198004 Reviewed by Ross Kirsling. * UserInterface/Views/DataGrid.js: (WI.DataGrid.prototype._startEditingNodeAtColumnIndex): Force a layout in the case that a new `PlaceholderDataGridNode` was added to the end of the `DataGrid` as part of the `editCallback`. Web Inspector won't crash without this, but it won't properly select/focus the next row when tabbing from the last column to the next row. (WI.DataGrid.prototype._editingCommitted): Save the new value of the column before removing the editing styles, as that refreshes the `DataGridNode`. If the new value isn't saved, the old value is used during the refresh. (WI.DataGrid.prototype._keyDown): Drive-by: use `get element` instead of using the member variable directly, as the underlying value might not have been initialized yet. 2019-05-19 Nikita Vasilyev Web Inspector: Decrease spacing before and after tooltip paragraphs https://bugs.webkit.org/show_bug.cgi?id=198024 Reviewed by Joseph Pecoraro. * UserInterface/Views/Popover.css: (.popover p): Added. (.popover p + p): Added. 2019-05-17 Devin Rousso Web Inspector: Timelines: CPU/memory timeline bars sometimes don't draw correctly and jump around on scrolling https://bugs.webkit.org/show_bug.cgi?id=197440 Reviewed by Joseph Pecoraro. When drawing the Memory/CPU graphs, we need to know about the record immediately before/after what's overlapping the visible range so that the graph correctly slopes off the screen. * UserInterface/Models/Timeline.js: (WI.Timeline.prototype.recordsInTimeRange): (WI.Timeline.prototype.recordsOverlappingTimeRange): Deleted. Merge `recordsOverlappingTimeRange` into `recordsInTimeRange` by accepting an options object that determines whether to include the record before/after the first/last record that are at all overlapping the range. * UserInterface/Models/CPUTimelineRecord.js: (WI.CPUTimelineRecord): (WI.CPUTimelineRecord.get samplingRatePerSecond): Added. (WI.CPUTimelineRecord.prototype.adjustStartTimeToLastRecord): Added. * UserInterface/Models/MemoryTimelineRecord.js: (WI.MemoryTimelineRecord): (WI.MemoryTimelineRecord.get samplingRatePerSecond): Added. (WI.MemoryTimelineRecord.prototype.adjustStartTimeToLastRecord): Added. Adjust the `startTime` of the record by the sampling rate (which is 500ms). * UserInterface/Models/CPUTimeline.js: Added. (WI.CPUTimeline.prototype.addRecord): * UserInterface/Models/MemoryTimeline.js: (WI.MemoryTimeline.prototype.addRecord): Added. Adjust the `startTime` of the new record to be equal to the `endTime` of the last record. * UserInterface/Views/TimelineOverview.js: (WI.TimelineOverview.prototype._recordSelected): * UserInterface/Views/CPUTimelineView.js: (WI.CPUTimelineView.prototype.layout): (WI.CPUTimelineView.prototype._computeStatisticsData): (WI.CPUTimelineView.prototype._attemptSelectIndicatatorTimelineRecord): * UserInterface/Views/CPUTimelineOverviewGraph.js: (WI.CPUTimelineOverviewGraph.prototype.layout): (WI.CPUTimelineOverviewGraph.prototype._handleChartClick): (WI.CPUTimelineOverviewGraph.prototype.get samplingRatePerSecond): Deleted. (WI.CPUTimelineOverviewGraph.prototype.layout.yScaleForRecord): Deleted. * UserInterface/Views/MemoryTimelineView.js: (WI.MemoryTimelineView.prototype.layout): * UserInterface/Views/MemoryTimelineOverviewGraph.js: (WI.MemoryTimelineOverviewGraph.prototype.layout): * UserInterface/Main.html: * UserInterface/Test.html: 2019-05-17 Devin Rousso Web Inspector: Audit: make it easier to jump to any returned DOM node in the Elements tab https://bugs.webkit.org/show_bug.cgi?id=197470 Reviewed by Joseph Pecoraro. Right now, the only way to jump to the Elements tab for any DOM nodes returned by an audit is to context menu and "Reveal in DOM Tree". Providing a more visible/discoverable way to jump to the Elements tab will help developers diagnose issues easier. * UserInterface/Views/AuditTestCaseContentView.js: (WI.AuditTestCaseContentView.prototype.layout): * UserInterface/Views/AuditTestCaseContentView.css: (.content-view.audit-test-case > section table): * UserInterface/Views/DOMTreeElement.js: (WI.DOMTreeElement): (WI.DOMTreeElement.prototype.set showGoToArrow): Added. (WI.DOMTreeElement.prototype._buildTagDOM): (WI.DOMTreeElement.prototype._nodeTitleInfo): Provide a way to insert a go-to arrow right after the: - open tag, if the close tag is rendered on a separate line - close tag, if the close tag is rendered on the same line * UserInterface/Views/DOMTreeOutline.js: (WI.DOMTreeOutline): Allow `DOMTreeOutline` to be non-selectable. * UserInterface/Views/DOMTreeOutline.css: (.tree-outline.dom:not(.non-selectable):focus li:matches(.selected, .hovered) .selection-area): Added. (.tree-outline.dom:not(.non-selectable) li.hovered:not(.selected) .selection-area): Added. (.tree-outline.dom li .html-tag ~ .go-to-arrow): Added. (.tree-outline.dom li:not(.hovered) .html-tag ~ .go-to-arrow): Added. (.tree-outline.dom:focus li:matches(.selected, .hovered) .selection-area): Deleted. (.tree-outline.dom li.hovered:not(.selected) .selection-area): Deleted. Ensure that hovering a non-selectable node doesn't change the background color. 2019-05-17 Devin Rousso Web Inspector: Elements: context menu items in DOM tree should work when not clicking directly on the node representation https://bugs.webkit.org/show_bug.cgi?id=197541 Reviewed by Timothy Hatcher. * UserInterface/Views/DOMTreeElement.js: (WI.DOMTreeElement.prototype.populateDOMNodeContextMenu): Added. (WI.DOMTreeElement.prototype._populateTagContextMenu): Deleted. (WI.DOMTreeElement.prototype._populateTextContextMenu): Deleted. (WI.DOMTreeElement.prototype._populateNodeContextMenu): Deleted. * UserInterface/Views/DOMTreeOutline.js: (WI.DOMTreeOutline.prototype.populateContextMenu): * UserInterface/Views/ContextMenuUtilities.js: (WI.appendContextMenuItemsForDOMNode): 2019-05-17 Joonghun Park Implement CSS `display: flow-root` (modern clearfix) https://bugs.webkit.org/show_bug.cgi?id=165603 Reviewed by Zalan Bujtas. This change follows https://drafts.csswg.org/css-display-3/#valdef-display-flow-root as below. 'display: flow-root' generates a block container box, and lays out its contents using flow layout. It always establishes a new block formatting context for its contents. * UserInterface/External/CodeMirror/css.js: 2019-05-17 Ross Kirsling REGRESSION(r244350): Web Inspector: Storage tab data grids aren't editable. https://bugs.webkit.org/show_bug.cgi?id=198003 Reviewed by Devin Rousso. * UserInterface/Views/DOMStorageContentView.js: (WI.DOMStorageContentView): Fix typo. 2019-05-17 Jamal Nasser Web Inspector: Dark Mode: Fix colors in network table waterfall container https://bugs.webkit.org/show_bug.cgi?id=197955 Reviewed by Devin Rousso. * UserInterface/Views/NetworkTableContentView.css: (.network-table :not(.header) .cell.waterfall .waterfall-container > .dom-event): (.network-table :not(.header) .cell.waterfall .waterfall-container > .dom-activity): (.network-table :not(.header) .cell.waterfall .waterfall-container > .area.dom-fullscreen): 2019-05-09 Devin Rousso Web Inspector: Uncaught Exception: null is not an object (evaluating 'resource.parentFrame.securityOrigin') https://bugs.webkit.org/show_bug.cgi?id=196572 Reviewed by Timothy Hatcher. * UserInterface/Views/SourcesNavigationSidebarPanel.js: (WI.SourcesNavigationSidebarPanel.prototype._addResource): 2019-05-09 Devin Rousso Web Inspector: REGRESSION: unable to expand/collapse non-selectable WI.TreeOutline https://bugs.webkit.org/show_bug.cgi?id=197591 Reviewed by Timothy Hatcher. * UserInterface/Views/TreeElement.js: (WI.TreeElement.treeElementToggled): 2019-05-09 Devin Rousso Web Inspector: Uncaught Exception: null is not an object (evaluating 'url.startsWith') https://bugs.webkit.org/show_bug.cgi?id=196662 Reviewed by Timothy Hatcher. * UserInterface/Views/ConsoleMessageView.js: (WI.ConsoleMessageView.prototype._appendLocationLink): (WI.ConsoleMessageView.prototype._linkifyLocation): Deleted. * UserInterface/Base/Main.js: (WI.linkifyLocation): (WI.linkifySourceCode): Added. Split the logic into two functions, as there's no need to re-fetch the `SourceCode` from a given url if you already have the `SourceCode` in the caller. 2019-05-08 Ryan Haddad Unreviewed, rolling out r244952. Caused inspector to appear blank. Reverted changeset: "Web Inspector: Provide UIString descriptions to improve localizations" https://bugs.webkit.org/show_bug.cgi?id=195132 https://trac.webkit.org/changeset/244952 2019-05-04 Nikita Vasilyev Web Inspector: Provide UIString descriptions to improve localizations https://bugs.webkit.org/show_bug.cgi?id=195132 Reviewed by Devin Rousso. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Base/LoadLocalizedStrings.js: (WI.UIString): (WI.repeatedUIString.timelineRecordLayout): (WI.repeatedUIString.timelineRecordPaint): (WI.repeatedUIString.timelineRecordComposite): (WI.repeatedUIString.allExceptions): (WI.repeatedUIString.uncaughtExceptions): (WI.repeatedUIString.assertionFailures): (WI.repeatedUIString.allRequests): (WI.repeatedUIString.fetch): (WI.repeatedUIString.revealInDOMTree): * UserInterface/Models/LayoutTimelineRecord.js: (WI.LayoutTimelineRecord.displayNameForEventType): * UserInterface/Models/RenderingFrameTimelineRecord.js: (WI.RenderingFrameTimelineRecord.displayNameForTaskType): * UserInterface/Models/Resource.js: (WI.Resource.displayNameForType): * UserInterface/Views/AuditTestGroupContentView.js: (WI.AuditTestGroupContentView.prototype.layout): * UserInterface/Views/CPUTimelineView.js: (WI.CPUTimelineView.displayNameForSampleType): * UserInterface/Views/ContextMenuUtilities.js: * UserInterface/Views/DOMBreakpointTreeElement.js: (WI.DOMBreakpointTreeElement.displayNameForType): * UserInterface/Views/DOMNodeTreeElement.js: (WI.DOMNodeTreeElement.prototype.populateContextMenu): (WI.DOMNodeTreeElement): * UserInterface/Views/DOMTreeElement.js: (WI.DOMTreeElement.prototype._populateTagContextMenu): (WI.DOMTreeElement.prototype._populateNodeContextMenu): * UserInterface/Views/DebuggerSidebarPanel.js: (WI.DebuggerSidebarPanel.prototype._addBreakpoint): (WI.DebuggerSidebarPanel.prototype._handleCreateBreakpointMouseDown): (WI.DebuggerSidebarPanel): * UserInterface/Views/LayerTreeDetailsSidebarPanel.js: (WI.LayerTreeDetailsSidebarPanel.prototype._buildDataGridSection): * UserInterface/Views/NetworkTableContentView.js: (WI.NetworkTableContentView.shortDisplayNameForResourceType): (WI.NetworkTableContentView.prototype.initialLayout): * UserInterface/Views/SourcesNavigationSidebarPanel.js: (WI.SourcesNavigationSidebarPanel.prototype._addBreakpoint): (WI.SourcesNavigationSidebarPanel.prototype._handleCreateBreakpointMouseDown): * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js: (WI.SpreadsheetCSSStyleDeclarationSection.prototype._renderSelector): * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js: (WI.SpreadsheetRulesStyleDetailsPanel.prototype.layout): 2019-05-04 Nikita Vasilyev Web Inspector: Styles: use the same green color for modified properties as in Changes panel https://bugs.webkit.org/show_bug.cgi?id=197538 Reviewed by Timothy Hatcher. * UserInterface/Views/ChangesDetailsSidebarPanel.css: (.changes-panel .css-property-line.added): (.changes-panel .css-property-line.removed): (.changes-panel .css-property-line.added::before): * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css: (.spreadsheet-style-declaration-editor .property.modified): (.spreadsheet-style-declaration-editor .property.modified:not(.selected)): (@media (prefers-color-scheme: dark)): * UserInterface/Views/Variables.css: (:root): (@media (prefers-color-scheme: dark)): 2019-05-03 Devin Rousso Web Inspector: DOM: dragging a node to the console should log the node https://bugs.webkit.org/show_bug.cgi?id=197330 Reviewed by Timothy Hatcher. * UserInterface/Views/DOMTreeOutline.js: (WI.DOMTreeOutline.prototype._ondragstart): * UserInterface/Views/LogContentView.js: (WI.LogContentView): (WI.LogContentView.prototype._handleDragOver): Added. (WI.LogContentView.prototype._handleDrop): Added. * UserInterface/Views/QuickConsole.js: (WI.QuickConsole): (WI.QuickConsole.prototype._handleDragOver): Added. (WI.QuickConsole.prototype._handleDrop): Added. * UserInterface/Views/GeneralStyleDetailsSidebarPanel.js: Drive-by: update the format to be more unique. * Localizations/en.lproj/localizedStrings.js: 2019-05-03 Devin Rousso Web Inspector: DOM: rename "low power" to "display composited" https://bugs.webkit.org/show_bug.cgi?id=197296 Reviewed by Joseph Pecoraro. Removed specific ChangeLog entries since it is almost entirely mechanical changes. * UserInterface/Protocol/DOMObserver.js: * UserInterface/Controllers/DOMManager.js: * UserInterface/Controllers/TimelineManager.js: * UserInterface/Models/DOMNode.js: * UserInterface/Models/MediaInstrument.js: * UserInterface/Models/MediaTimelineRecord.js: * UserInterface/Models/TimelineRecording.js: * UserInterface/Views/DOMEventsBreakdownView.js: * UserInterface/Views/DOMEventsBreakdownView.css: * UserInterface/Views/NetworkTableContentView.js: * UserInterface/Views/NetworkTableContentView.css: * UserInterface/Views/TimelineIcons.css: * UserInterface/Views/TimelineTabContentView.js: * UserInterface/Images/PowerEfficientPlaybackStateChanged.svg: Added. * UserInterface/Images/LowPower.svg: Removed. * Localizations/en.lproj/localizedStrings.js: 2019-05-03 Devin Rousso Web Inspector: Record actions performed on WebGL2RenderingContext https://bugs.webkit.org/show_bug.cgi?id=176008 Reviewed by Joseph Pecoraro. * UserInterface/Models/Recording.js: (WI.Recording.fromPayload): (WI.Recording.displayNameForSwizzleType): (WI.Recording.prototype.async swizzle): (WI.Recording.prototype.createContext): * UserInterface/Models/RecordingAction.js: (WI.RecordingAction.constantNameForParameter): (WI.RecordingAction._prototypeForType): (WI.RecordingAction.prototype.async swizzle): Treat all actions with a snapshot as being a "visible" action. * UserInterface/Views/CanvasTabContentView.css: (.content-view.tab.canvas .navigation-bar > .item .canvas:matches(.webgl, .webgl2, .webgpu, .webmetal) .icon): Added. (.content-view.tab.canvas .navigation-bar > .item .canvas.webgl): Deleted. * UserInterface/Views/CanvasContentView.js: (WI.CanvasContentView.prototype.initialLayout): * UserInterface/Views/CanvasSidebarPanel.js: (WI.CanvasSidebarPanel.prototype.shown): (WI.CanvasSidebarPanel.prototype._canvasChanged): (WI.CanvasSidebarPanel.prototype._updateRecordNavigationItem): * UserInterface/Views/RecordingContentView.js: (WI.RecordingContentView): (WI.RecordingContentView.prototype.get navigationItems): (WI.RecordingContentView.prototype.shown): (WI.RecordingContentView.prototype.initialLayout): * UserInterface/Views/RecordingActionTreeElement.js: (WI.RecordingActionTreeElement._generateDOM.createParameterElement): 2019-05-02 Nikita Vasilyev Web Inspector: Dark Mode: borders between section should be lighter than background https://bugs.webkit.org/show_bug.cgi?id=197551 Reviewed by Joseph Pecoraro. * UserInterface/Views/DetailsSection.css: (.details-section .details-section): 2019-04-29 Alex Christensen Fix internal High Sierra build https://bugs.webkit.org/show_bug.cgi?id=197388 * Configurations/Base.xcconfig: 2019-04-26 Jessie Berlin Add new mac target numbers https://bugs.webkit.org/show_bug.cgi?id=197313 Reviewed by Alex Christensen. * Configurations/Version.xcconfig: 2019-04-25 Alex Christensen Start using C++17 https://bugs.webkit.org/show_bug.cgi?id=197131 Reviewed by Darin Adler. * Configurations/Base.xcconfig: 2019-04-24 Nikita Vasilyev Web Inspector: Styles: don't start property selection when pressing right mouse button https://bugs.webkit.org/show_bug.cgi?id=197242 Reviewed by Timothy Hatcher. * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js: (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleMouseDown): 2019-04-24 Devin Rousso Web Inspector: Network: importing a HAR with an active detail view shows no content https://bugs.webkit.org/show_bug.cgi?id=197223 Reviewed by Timothy Hatcher. When hiding the detail view, we force a `layout` of the Network table, which causes the cached row count to be set to `0`, which prevents the `reloadDataAddedToEndOnly` from rendering anything since the `WI.Table` thinks it has no rows. Given that all of the users of `WI.Table` are backed by an array, we don't need to cache the number of rows since `.length` is an extremely cheap operation. In turn, this guarantees that we are always rendering with an accurate value. * UserInterface/Views/Table.js: (WI.Table): (WI.Table.prototype.get numberOfRows): (WI.Table.prototype.reloadData): (WI.Table.prototype._removeRows): 2019-04-23 Devin Rousso Web Inspector: REGRESSION(r238168): Network: preserve log doesn't show main frame main resource changes https://bugs.webkit.org/show_bug.cgi?id=197220 Reviewed by Timothy Hatcher. * UserInterface/Views/NetworkTableContentView.js: (WI.NetworkTableContentView.prototype.reset): (WI.NetworkTableContentView.prototype._addCollection): (WI.NetworkTableContentView.prototype._resetCollection): Added. (WI.NetworkTableContentView.prototype._changeCollection): (WI.NetworkTableContentView.prototype._mainResourceDidChange): We want to add the frame's main resource in the case that it's the main frame, but we also want to clear the main collection of data (e.g. if viewing an imported HAR). Drive-by: `_groupByDOMNodeNavigationItem` was renamed in a previous patch. 2019-04-23 Devin Rousso Web Inspector: Network: support drag/drop for importing https://bugs.webkit.org/show_bug.cgi?id=197221 Reviewed by Timothy Hatcher. * UserInterface/Views/NetworkTabContentView.js: (WI.NetworkTabContentView.prototype.async.handleFileDrop): Added. * UserInterface/Views/NetworkTableContentView.js: (WI.NetworkTableContentView.prototype.processHAR): Added. (WI.NetworkTableContentView.prototype._importHAR): * UserInterface/Base/FileUtilities.js: (WI.FileUtilities.async readText): Only `await` if the result is a `Promise`. 2019-04-23 Devin Rousso Web Inspector: Uncaught Exception: null is not an object (evaluating 'this.ownerDocument.frameIdentifier') https://bugs.webkit.org/show_bug.cgi?id=196420 Reviewed by Timothy Hatcher. * UserInterface/Models/DOMNode.js: (WI.DOMNode): (WI.DOMNode.prototype.get frame): Added. (WI.DOMNode.prototype.get frameIdentifier): Deleted. Modify the existing `frameId` to represent the owner frame of the node, rather than the frame it holds (in the case of an `