1 2019-02-15 Nikita Vasilyev <nvasilyev@apple.com>
3 Web Inspector: Dark Mode: commas in CSS selectors are too dim
4 https://bugs.webkit.org/show_bug.cgi?id=194729
5 <rdar://problem/48128592>
7 Reviewed by Matt Baker.
9 Use `--text-color-tertiary` for both light and dark modes.
11 * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
12 (.spreadsheet-style-declaration-editor):
13 * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:
14 (.spreadsheet-css-declaration):
15 (.spreadsheet-css-declaration .selector > span):
16 (@media (prefers-color-scheme: dark)):
17 * UserInterface/Views/Variables.css:
20 2019-02-15 Nikita Vasilyev <nvasilyev@apple.com>
22 Unreviewed, fix intentation.
24 * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.css:
25 (.sidebar > .panel.details.css-style .rules):
26 (.sidebar > .panel.details.css-style > .content > .rules .section-header):
28 2019-02-15 Dean Jackson <dino@apple.com>
30 Allow emulation of user gestures from Web Inspector console
31 https://bugs.webkit.org/show_bug.cgi?id=194725
32 <rdar://problem/48126604>
34 Reviewed by Joseph Pecoraro and Devin Rousso.
36 Add some UI for emulating a User Gesture when evaluating in the console. This
37 allows the developer to do things that would otherwise require actual interaction
38 with the page, such as start playback of media on iOS.
40 * Localizations/en.lproj/localizedStrings.js:
41 * UserInterface/Base/Setting.js: Add a new setting for this option.
42 * UserInterface/Controllers/JavaScriptLogViewController.js:
43 (WI.JavaScriptLogViewController.prototype.consolePromptTextCommitted):
44 * UserInterface/Controllers/RuntimeManager.js: Call evaluate with this new option.
45 (WI.RuntimeManager.prototype.evaluateInInspectedWindow):
46 * UserInterface/Views/LogContentView.js: Add a new checkbox in the upper bar
47 that allows the user to toggle the setting.
49 (WI.LogContentView.prototype.get navigationItems):
50 (WI.LogContentView.prototype._handleEmulateInUserGestureSettingChanged):
52 * UserInterface/Views/NetworkTableContentView.js: Two drive-by typo fixes :)
53 (WI.NetworkTableContentView): perserve -> preserve
54 (WI.NetworkTableContentView.prototype.get navigationItems): checkboxs -> checkboxes
56 2019-02-15 Nikita Vasilyev <nvasilyev@apple.com>
58 Web Inspector: Styles: valid values in style attributes are reported as unsupported property values
59 https://bugs.webkit.org/show_bug.cgi?id=194619
60 <rdar://problem/47917373>
62 Reviewed by Devin Rousso.
64 Payload of inline styles may contain `range` that doesn't match
65 the actual text of the payload - it has an extra empty line at the end.
66 Mismatching ranges caused data corruption.
68 * UserInterface/Models/DOMNodeStyles.js:
69 (WI.DOMNodeStyles.prototype._parseStylePropertyPayload):
71 2019-02-15 Nikita Vasilyev <nvasilyev@apple.com>
73 Web Inspector: remove unused parameter in _parseStylePropertyPayload
74 https://bugs.webkit.org/show_bug.cgi?id=194642
76 Reviewed by Devin Rousso.
78 * UserInterface/Models/DOMNodeStyles.js:
79 (WI.DOMNodeStyles.prototype._parseStyleDeclarationPayload):
80 The `styleText` parameter was never used
82 2019-02-15 Devin Rousso <drousso@apple.com>
84 Web Inspector: Canvas: all actions after an offscreen path modification are marked as offscreen path errors
85 https://bugs.webkit.org/show_bug.cgi?id=194684
87 Reviewed by Joseph Pecoraro.
89 * UserInterface/Models/RecordingAction.js:
90 (WI.RecordingAction.prototype.process):
92 2019-02-15 Devin Rousso <drousso@apple.com>
94 Web Inspector: Canvas: taking a second recording doesn't select the Initial State by default
95 https://bugs.webkit.org/show_bug.cgi?id=194685
97 Reviewed by Matt Baker.
99 * UserInterface/Views/CanvasSidebarPanel.js:
100 (WI.CanvasSidebarPanel.prototype._recordingChanged):
102 2019-02-14 Commit Queue <commit-queue@webkit.org>
104 Unreviewed, rolling out r241497.
105 https://bugs.webkit.org/show_bug.cgi?id=194676
107 New test times out (Requested by NVI on #webkit).
111 "Web Inspector: Styles: valid values in style attributes are
112 reported as unsupported property values"
113 https://bugs.webkit.org/show_bug.cgi?id=194619
114 https://trac.webkit.org/changeset/241497
116 2019-02-13 Nikita Vasilyev <nvasilyev@apple.com>
118 Web Inspector: Styles: valid values in style attributes are reported as unsupported property values
119 https://bugs.webkit.org/show_bug.cgi?id=194619
120 <rdar://problem/47917373>
122 Reviewed by Devin Rousso.
124 Payload of inline styles may contain `range` that doesn't match
125 the actual text of the payload - it has an extra empty line at the end.
126 Mismatching ranges caused data corruption.
128 * UserInterface/Models/DOMNodeStyles.js:
129 (WI.DOMNodeStyles.prototype._parseStylePropertyPayload):
131 2019-02-13 Joseph Pecoraro <pecoraro@apple.com>
133 Web Inspector: Update combined and minified copyright header for 2018-2019
134 https://bugs.webkit.org/show_bug.cgi?id=194635
136 Reviewed by Devin Rousso.
138 * Scripts/copy-user-interface-resources.pl:
140 2019-02-13 Chris Dumez <cdumez@apple.com>
142 Unreviewed, update localizable strings.
144 * Localizations/en.lproj/localizedStrings.js:
146 2019-02-12 Joseph Pecoraro <pecoraro@apple.com>
148 Web Inspector: Experimental setting for CPU Usage Timeline improvements
149 https://bugs.webkit.org/show_bug.cgi?id=194556
151 Reviewed by Matt Baker.
153 * UserInterface/Main.html:
154 * UserInterface/Views/LegacyCPUTimelineView.css: Added.
155 * UserInterface/Views/LegacyCPUTimelineView.js: Added.
156 Copy of CPUTimelineView.js/css to be used when the setting is not set.
158 * UserInterface/Views/ContentView.js:
159 (WI.ContentView.createFromRepresentedObject):
160 ContentView to create based on the setting.
162 * UserInterface/Base/Setting.js:
163 * UserInterface/Views/SettingsTabContentView.js:
164 (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
167 2019-02-12 Joseph Pecoraro <pecoraro@apple.com>
169 Web Inspector: Timeline.prototype.recordsInTimeRange uses a property most records do not have
170 https://bugs.webkit.org/show_bug.cgi?id=194549
172 Reviewed by Devin Rousso.
174 * UserInterface/Models/Timeline.js:
175 (WI.Timeline.prototype.recordsInTimeRange):
177 2019-02-12 Devin Rousso <drousso@apple.com>
179 Web Inspector: Timelines: clicking on an empty space in the overview should deselect any selected record bar
180 https://bugs.webkit.org/show_bug.cgi?id=194365
181 <rdar://problem/47868426>
183 Reviewed by Joseph Pecoraro.
185 * UserInterface/Views/TimelineRecordBar.js:
186 (WI.TimelineRecordBar.prototype._handleClick):
187 Mark the "click" event so that later listeners know it was handled by `WI.TimelineRecordBar`.
189 * UserInterface/Views/TimelineOverview.js:
190 (WI.TimelineOverview):
191 (WI.TimelineOverview.prototype._instrumentAdded):
192 (WI.TimelineOverview.prototype._instrumentRemoved):
193 (WI.TimelineOverview.prototype._handleGraphsContainerClick): Added.
194 (WI.TimelineOverview.prototype._handleOverviewGraphRecordSelected): Added.
195 (WI.TimelineOverview.prototype._recordSelected):
196 Listen for "click" on the graph container and deselect all records when fired, unless the
197 click was marked by a `WI.TimelineRecordBar`.
199 * UserInterface/Views/TimelineRecordingContentView.js:
200 (WI.TimelineRecordingContentView.prototype._recordSelected):
201 Ensure that all `WI.TimelineView` update their selected record whenever it changes for any
202 other `WI.TimelineView` (or if there is no selected record).
204 * UserInterface/Views/TimelineOverviewGraph.js:
205 (WI.TimelineOverviewGraph.prototype.didLayoutSubtree): Added.
206 Drive-by: since `WI.TimelineRecordBar` are reused when combining, we need to re-determine
207 which one holds the currently selected record.
209 2019-02-12 Joseph Pecoraro <pecoraro@apple.com>
211 Web Inspector: Remove unused maxUsage in CPUTimelineView
212 https://bugs.webkit.org/show_bug.cgi?id=194526
214 Reviewed by Devin Rousso.
216 * UserInterface/Views/CPUTimelineView.js:
217 (WI.CPUTimelineView):
218 (WI.CPUTimelineView.prototype.shown):
220 2019-02-11 Devin Rousso <drousso@apple.com>
222 Web Inspector: add context menu items to copy a resource's HTTP request/response data
223 https://bugs.webkit.org/show_bug.cgi?id=194261
224 <rdar://problem/21693696>
226 Reviewed by Joseph Pecoraro.
228 * UserInterface/Models/Resource.js:
229 (WI.Resource.prototype.stringifyHTTPRequest): Added.
230 (WI.Resource.prototype.stringifyHTTPResponse): Added.
231 Don't include the request/response data, as that can be very large, and can easily be
232 accessed by actually selecting the resource in the Resources/Network tab.
234 * UserInterface/Views/ContextMenuUtilities.js:
235 (WI.appendContextMenuItemsForSourceCode):
237 * Localizations/en.lproj/localizedStrings.js:
239 2019-02-08 Devin Rousso <drousso@apple.com>
241 Web Inspector: Audit: show keyboard shortcut in export tooltip
242 https://bugs.webkit.org/show_bug.cgi?id=194454
244 Reviewed by Matt Baker.
246 * UserInterface/Views/AuditTestContentView.js:
247 (WI.AuditTestContentView):
248 (WI.AuditTestContentView.prototype.get saveData):
249 (WI.AuditTestContentView.prototype._exportResult): Added.
250 (WI.AuditTestContentView.prototype._handleExportButtonNavigationItemClicked):
251 (WI.AuditTestContentView.prototype._exportAudit): Deleted.
253 * Localizations/en.lproj/localizedStrings.js:
255 2019-02-08 Nikita Vasilyev <nvasilyev@apple.com>
257 Web Inspector: Styles: easier way to select a single line
258 https://bugs.webkit.org/show_bug.cgi?id=193305
260 Reviewed by Devin Rousso.
262 Start property selection after mousedown when mouse cursor moves 8px,
263 which is ~1.5 times the width of a text character in the style editor.
265 * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
266 (WI.SpreadsheetCSSStyleDeclarationSection):
267 (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleMouseDown):
268 (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleWindowMouseMove): Added.
269 (WI.SpreadsheetCSSStyleDeclarationSection.prototype._stopSelection):
271 2019-02-08 Joseph Pecoraro <pecoraro@apple.com>
273 Web Inspector: Debugger Popover should work with value in template string `${identifier}`
274 https://bugs.webkit.org/show_bug.cgi?id=194459
275 <rdar://problem/47932564>
277 Reviewed by Devin Rousso.
279 * UserInterface/Controllers/CodeMirrorTokenTrackingController.js:
280 (WI.CodeMirrorTokenTrackingController.prototype._processJavaScriptExpression):
281 When walking backwards to get the full expression we were walking outside
282 of the interpolation group `outside ${inside}`. Stop walking backwards once
283 we cross the boundary.
285 2019-02-08 Joseph Pecoraro <pecoraro@apple.com>
287 Web Inspector: Import / Export Heap Snapshots
288 https://bugs.webkit.org/show_bug.cgi?id=194448
289 <rdar://problem/47928093>
291 Reviewed by Devin Rousso.
293 * Localizations/en.lproj/localizedStrings.js:
296 * UserInterface/Proxies/HeapSnapshotProxy.js:
297 (WI.HeapSnapshotProxy):
298 (WI.HeapSnapshotProxy.deserialize):
299 (WI.HeapSnapshotProxy.prototype.get imported):
300 (WI.HeapSnapshotProxy.prototype.get snapshotStringData):
301 (WI.HeapSnapshotProxy.prototype.set snapshotStringData):
302 Include an "imported" state on the HeapSnapshot and allow for
303 stashing the snapshotStringData on the main thread side.
305 * UserInterface/Proxies/HeapSnapshotWorkerProxy.js:
306 (WI.HeapSnapshotWorkerProxy.prototype.createImportedSnapshot):
307 * UserInterface/Workers/HeapSnapshot/HeapSnapshotWorker.js:
308 (HeapSnapshotWorker.prototype.clearSnapshots):
309 (HeapSnapshotWorker.prototype.createSnapshot):
310 Provide a specialized way to create an imported HeapSnapshot.
311 Track imported snapshots separately since they won't want to
312 be searched for live/dead objects due to active recording GCs.
314 * UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
316 (HeapSnapshot.updateCategoriesAndMetadata):
317 (HeapSnapshot.allocationBucketCounts):
318 (HeapSnapshot.instancesWithClassName):
319 (HeapSnapshot.prototype.nodeWithIdentifier):
320 (HeapSnapshot.prototype.dominatedNodes):
321 (HeapSnapshot.prototype.retainedNodes):
322 (HeapSnapshot.prototype.retainers):
323 (HeapSnapshot.prototype.updateDeadNodesAndGatherCollectionData):
324 (HeapSnapshot.prototype.serialize):
325 (HeapSnapshot.prototype.serializeNode):
326 (HeapSnapshot.prototype._buildPostOrderIndexes):
327 (HeapSnapshot.prototype._buildDominatorIndexes):
328 (HeapSnapshot.prototype._buildRetainedSizes):
329 (HeapSnapshot.prototype._gcRootPathes.visitNode):
330 (HeapSnapshot.prototype._gcRootPathes):
331 Construct a HeapSnapshot knowinng whether or not it is imported.
332 Imported snapshots may be the "GCDebugging" snapshot type which
333 differs from "Inspector" by the number of node fields. So keep
334 the node field count a member instead of a global constant
335 in order to work with both snapshot types.
337 * UserInterface/Models/HeapAllocationsInstrument.js:
338 (WI.HeapAllocationsInstrument.prototype._takeHeapSnapshot):
339 * UserInterface/Protocol/ConsoleObserver.js:
340 (WI.ConsoleObserver.prototype.heapSnapshot):
341 * UserInterface/Protocol/HeapObserver.js:
342 (WI.HeapObserver.prototype.trackingStart):
343 (WI.HeapObserver.prototype.trackingComplete):
344 Stash the original string JSON data on the main thread side
345 where we already have the data.
347 * UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js:
348 (WI.HeapAllocationsTimelineOverviewGraph.prototype.layout):
349 Don't show [S] icons for imported snapshots with no timestamp.
351 * UserInterface/Views/HeapAllocationsTimelineView.js:
352 (WI.HeapAllocationsTimelineView):
353 (WI.HeapAllocationsTimelineView.prototype.get navigationItems):
354 (WI.HeapAllocationsTimelineView.prototype._importButtonNavigationItemClicked):
355 (WI.HeapAllocationsTimelineView.prototype._takeHeapSnapshotClicked):
356 Import button that just creates a new snapshot.
358 * UserInterface/Views/HeapSnapshotContentView.js:
359 (WI.HeapSnapshotContentView):
360 (WI.HeapSnapshotContentView.prototype.get navigationItems):
361 (WI.HeapSnapshotContentView.prototype.get supportsSave):
362 (WI.HeapSnapshotContentView.prototype.get saveData):
363 (WI.HeapSnapshotContentView.prototype._exportSnapshot):
364 Export button that saves the original data.
366 * UserInterface/Views/TimelineTabContentView.js:
367 (WI.TimelineTabContentView.displayNameForRecord):
368 Specialized display string for imported snapshots.
370 2019-02-08 Joseph Pecoraro <pecoraro@apple.com>
372 Web Inspector: Add Debug setting to show Internal Object Classes in Heap Snapshot
373 https://bugs.webkit.org/show_bug.cgi?id=194445
375 Reviewed by Devin Rousso.
377 * UserInterface/Base/Setting.js:
378 * UserInterface/Views/HeapSnapshotDataGridTree.js:
379 (WI.HeapSnapshotInstancesDataGridTree.prototype.populateTopLevel):
380 * UserInterface/Views/SettingsTabContentView.js:
381 (WI.SettingsTabContentView.prototype._createDebugSettingsView):
383 2019-02-08 Nikita Vasilyev <nvasilyev@apple.com>
385 Web Inspector: Styles: close unbalanced quotes and parenthesis when editing values
386 https://bugs.webkit.org/show_bug.cgi?id=182523
387 <rdar://problem/37260209>
389 Reviewed by Devin Rousso.
391 Close CSS comments, append missing closed quotes and right parenthesis.
393 * UserInterface/Models/CSSCompletions.js:
394 (WI.CSSCompletions.completeUnbalancedValue):
395 * UserInterface/Models/CSSProperty.js:
396 (WI.CSSProperty.prototype.set rawValue):
398 2019-02-07 Joseph Pecoraro <pecoraro@apple.com>
400 Web Inspector: Make Timeline markers light gray instead of black in dark mode
401 https://bugs.webkit.org/show_bug.cgi?id=194417
403 Reviewed by Devin Rousso.
405 * UserInterface/Views/RenderingFrameTimelineOverviewGraph.css:
406 (.timeline-overview-graph.rendering-frame > .divider):
407 * UserInterface/Views/TimelineRuler.css:
408 (.timeline-ruler > .markers > .divider):
410 2019-02-06 Devin Rousso <drousso@apple.com>
412 Web Inspector: DOM: don't send the entire function string with each event listener
413 https://bugs.webkit.org/show_bug.cgi?id=194293
414 <rdar://problem/47822809>
416 Reviewed by Joseph Pecoraro.
418 * UserInterface/Views/EventListenerSectionGroup.js:
419 (WI.EventListenerSectionGroup.prototype._functionTextOrLink):
421 2019-02-06 Joseph Pecoraro <pecoraro@apple.com>
423 Web Inspector: "Worker not found" uncaught protocol errors
424 https://bugs.webkit.org/show_bug.cgi?id=194319
426 Reviewed by Matt Baker.
428 * UserInterface/Base/Main.js:
429 (WI.terminatePageTarget):
430 Remove Worker targets associated with the Page on navigation.
431 Eventually we will have to associate Workers with their parent
432 frame, but for now a transition can only happen at the Page
433 level, so we can eliminate all workers on the page.
435 * UserInterface/Controllers/WorkerManager.js:
436 (WI.WorkerManager.prototype.workerCreated):
437 * UserInterface/Protocol/Connection.js:
438 (InspectorBackend.WorkerConnection.sendMessageToBackend):
439 Allow any WorkerAgent domain message to fail silently. This can
440 happen if a Worker is created and destroyed before the frontend
441 hears about it and sends messages to the backend for that Worker.
443 2019-02-05 Nikita Vasilyev <nvasilyev@apple.com>
445 Web Inspector: Styles: PropertiesChanged shouldn't fire when old and new text are both empty
446 https://bugs.webkit.org/show_bug.cgi?id=194318
448 Reviewed by Devin Rousso.
450 Previously, WI.CSSStyleDeclaration.Event.PropertiesChanged fired when
451 old text and new text were empty strings.
453 * UserInterface/Models/CSSStyleDeclaration.js:
455 2019-02-05 Devin Rousso <drousso@apple.com>
457 Web Inspector: Lots of time spent updating related resources in ResourceDetailsSidebar when loading a page with lots of resources
458 https://bugs.webkit.org/show_bug.cgi?id=159577
459 <rdar://problem/27251461>
461 Reviewed by Joseph Pecoraro.
463 * UserInterface/Views/ResourceDetailsSidebarPanel.js:
464 (WI.ResourceDetailsSidebarPanel.prototype._refreshRelatedResourcesSection):
465 (WI.ResourceDetailsSidebarPanel.prototype._applyResourceEventListeners):
467 2019-02-05 Matt Baker <mattbaker@apple.com>
469 Web Inspector: Elements tab: selection is broken after deleting the selected node
470 https://bugs.webkit.org/show_bug.cgi?id=194300
471 <rdar://problem/47829275>
473 Reviewed by Devin Rousso.
475 Deleting a TreeElement can cause an IndexSet including indexes
476 outside the deleted range to be passed to SelectionController,
477 corrupting the internal selection state.
479 * UserInterface/Views/TreeOutline.js:
480 (WI.TreeOutline.prototype._indexesForSubtree.numberOfElementsInSubtree): Added.
481 (WI.TreeOutline.prototype._indexesForSubtree):
482 Finding the last (rightmost leaf) TreeElement in the subtree used
483 TreeElement.prototype.traverseNextElement to do a depth first traversal.
484 This method did not stay within the subtree rooted at `treeElement`.
486 2019-02-05 Matt Baker <mattbaker@apple.com>
488 Web Inspector: REGRESSION (r240947): Resources tab: can't select main frame after refreshing page
489 https://bugs.webkit.org/show_bug.cgi?id=194254
490 <rdar://problem/47805023>
492 Reviewed by Devin Rousso.
494 * UserInterface/Views/TreeOutline.js:
495 (WI.TreeOutline.prototype.selectionControllerSelectionDidChange):
496 TreeOutline should always call the TreeElement `select` and `deselect`
497 methods while processing selection changes. Having notifications
498 suppressed by `this._suppressNextSelectionDidChangeEvent` should only
499 affect the dispatching of TreeOutline events.
501 2019-02-05 Nikita Vasilyev <nvasilyev@apple.com>
503 Web Inspector: Styles: remove harmless "property was unlocked" asserts
504 https://bugs.webkit.org/show_bug.cgi?id=194262
506 Reviewed by Matt Baker.
508 * UserInterface/Views/SpreadsheetStyleProperty.js:
509 (WI.SpreadsheetStyleProperty.prototype.remove):
510 (WI.SpreadsheetStyleProperty.prototype.update):
511 (WI.SpreadsheetStyleProperty.prototype._handleNameChange):
512 (WI.SpreadsheetStyleProperty.prototype._handleValueChange):
514 2019-02-04 Devin Rousso <drousso@apple.com>
516 Web Inspector: Uncaught Exception: undefined is not an object (evaluating 'classes.includes')
517 https://bugs.webkit.org/show_bug.cgi?id=194280
518 <rdar://problem/47811159>
520 Reviewed by Matt Baker.
522 * UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
523 (WI.GeneralStyleDetailsSidebarPanel.prototype._populateClassToggles):
524 Add a fallback value in case the `class` attribute isn't specified for the selected node.
526 2019-02-04 Devin Rousso <drousso@apple.com>
528 Web Inspector: Resources: missing resource data for document on reload
529 https://bugs.webkit.org/show_bug.cgi?id=194243
530 <rdar://problem/47559021>
532 Reviewed by Joseph Pecoraro.
534 * UserInterface/Views/ResourceDetailsSidebarPanel.js:
535 (WI.ResourceDetailsSidebarPanel.prototype.set resource):
536 (WI.ResourceDetailsSidebarPanel.prototype._applyResourceEventListeners):
538 * UserInterface/Base/Object.js:
539 (WI.Object.removeEventListener):
540 Drive-by: there's no need to iterate over the entire table to check if `thisObject` exists,
541 as that is handled for us by `ListMultimap`, which we later call anyways.
543 2019-02-04 Matt Baker <mattbaker@apple.com>
545 Web Inspector: REGRESSION: Resources: WI.TreeOutline assertions when refreshing the page
546 https://bugs.webkit.org/show_bug.cgi?id=194242
547 <rdar://problem/47802027>
549 Reviewed by Joseph Pecoraro.
551 * UserInterface/Views/FolderizedTreeElement.js:
552 (WI.FolderizedTreeElement.prototype.removeChildren):
553 FolderTreeElements are removed by the base class call to removeChildren.
554 Calling `removeChildren` for detached TreeElements is unnecessary.
556 2019-02-04 Matt Baker <mattbaker@apple.com>
558 Web Inspector: REGRESSION: clicking a selected call frame doesn't re-scroll
559 https://bugs.webkit.org/show_bug.cgi?id=194169
560 <rdar://problem/47743864>
562 Reviewed by Devin Rousso.
564 * UserInterface/Views/TreeOutline.js:
565 (WI.TreeOutline.prototype._handleMouseDown):
566 Add a special case for a single-selection TreeOutline with
567 allowsRepeatSelection enabled. Since the element is already
568 selected, bypass the SelectionCongroller and dispatch an
569 event with event.data.selectedByUser set to true.
571 2019-02-04 Nikita Vasilyev <nvasilyev@apple.com>
573 Web Inspector: Styles: fix race conditions when editing
574 https://bugs.webkit.org/show_bug.cgi?id=192739
575 <rdar://problem/46752925>
577 Reviewed by Devin Rousso.
579 Editing CSS property in the style editor syncronously updates CSSStyleDeclaration on the front-end
580 and asyncronously updates the backend by calling CSSAgent.setStyleText. After the new style text is applied
581 on the backend, CSSStyleDeclaration (on the front-end) gets updated.
583 Unsure there's no race conditions by introducing `_updatesInProgressCount`:
585 - Increment it before calling CSSAgent.setStyleText.
586 - Decrement it after CSSAgent.setStyleText is finished.
588 Prevent updates of CSSStyleDeclaration when _updatesInProgressCount isn't 0.
590 * UserInterface/Models/CSSProperty.js:
591 (WI.CSSProperty.prototype._updateOwnerStyleText):
592 * UserInterface/Models/CSSStyleDeclaration.js:
593 (WI.CSSStyleDeclaration):
594 (WI.CSSStyleDeclaration.prototype.set text): Removed.
595 (WI.CSSStyleDeclaration.prototype.setText): Added.
596 Change the setter to a method since it has side effects including an asynchronous backend call.
598 * UserInterface/Models/DOMNodeStyles.js:
599 (WI.DOMNodeStyles.prototype.changeStyleText):
601 * UserInterface/Views/SpreadsheetStyleProperty.js:
602 (WI.SpreadsheetStyleProperty.prototype.get nameTextField): Removed.
603 (WI.SpreadsheetStyleProperty.prototype.get valueTextField): Removed.
604 Drive-by: remove unused code.
606 2019-02-01 Devin Rousso <drousso@apple.com>
608 Web Inspector: create icons for media event types instead of using a blue circle
609 https://bugs.webkit.org/show_bug.cgi?id=190381
610 <rdar://problem/45507995>
612 Reviewed by Brian Burg.
614 * UserInterface/Models/DOMNode.js:
615 (WI.DOMNode.isPlayEvent): Added.
616 (WI.DOMNode.isPauseEvent): Added.
617 (WI.DOMNode.isStopEvent): Added.
619 * UserInterface/Views/DOMEventsBreakdownView.js:
620 (WI.DOMEventsBreakdownView.prototype.layout):
621 * UserInterface/Views/DOMEventsBreakdownView.css:
622 (.dom-events-breakdown tr > :matches(th, td)):
623 (.dom-events-breakdown .graph):
624 (.dom-events-breakdown .graph > :matches(img, .area)): Added.
625 (.dom-events-breakdown .graph > img): Added.
626 (.dom-events-breakdown .inherited > .name, .dom-events-breakdown .inherited > .graph > img): Added.
627 (.dom-events-breakdown .graph > :matches(.point, .area)): Deleted.
628 (.dom-events-breakdown .graph > .point): Deleted.
629 (.dom-events-breakdown .inherited > .name, .dom-events-breakdown .inherited > .graph > .point): Deleted.
631 * UserInterface/Views/NetworkTableContentView.js:
632 (WI.NetworkTableContentView.prototype._populateWaterfallGraph.createDOMEventLine):
634 * UserInterface/Images/EventPause.svg: Added.
635 * UserInterface/Images/EventPlay.svg: Added.
636 * UserInterface/Images/EventProcessing.svg: Added.
637 * UserInterface/Images/EventStop.svg: Added.
639 2019-02-01 Joseph Pecoraro <pecoraro@apple.com>
641 Web Inspector: Make WI.ColumnChart a WI.View subclass
642 https://bugs.webkit.org/show_bug.cgi?id=194171
644 Rubber-stamped by Devin Rousso.
646 * UserInterface/Views/CPUTimelineOverviewGraph.js:
647 (WI.CPUTimelineOverviewGraph):
648 * UserInterface/Views/ColumnChart.js:
650 (WI.ColumnChart.prototype.set size):
651 (WI.ColumnChart.prototype.layout):
652 (WI.ColumnChart.prototype.get element): Deleted.
653 (WI.ColumnChart.prototype.needsLayout): Deleted.
654 (WI.ColumnChart.prototype.updateLayout): Deleted.
656 2019-02-01 Joseph Pecoraro <pecoraro@apple.com>
658 Web Inspector: Make WI.StackedLineChart a WI.View subclass
659 https://bugs.webkit.org/show_bug.cgi?id=194119
661 Rubber-stamped by Devin Rousso.
663 * UserInterface/Views/LineChart.js:
664 (WI.LineChart.prototype.layout):
666 * UserInterface/Views/MemoryTimelineOverviewGraph.js:
667 (WI.MemoryTimelineOverviewGraph):
668 * UserInterface/Views/StackedLineChart.js:
669 (WI.StackedLineChart):
670 (WI.StackedLineChart.prototype.set size):
671 (WI.StackedLineChart.prototype.layout):
672 (WI.StackedLineChart.prototype.get element): Deleted.
673 (WI.StackedLineChart.prototype.get points): Deleted.
674 (WI.StackedLineChart.prototype.needsLayout): Deleted.
675 (WI.StackedLineChart.prototype.updateLayout): Deleted.
677 2019-02-01 Joseph Pecoraro <pecoraro@apple.com>
679 Web Inspector: Make WI.CircleChart a WI.View subclass
680 https://bugs.webkit.org/show_bug.cgi?id=194118
682 Reviewed by Matt Baker.
684 * UserInterface/Views/CircleChart.js:
685 (WI.CircleChart.prototype.get centerElement):
686 (WI.CircleChart.prototype.layout):
687 (WI.CircleChart.prototype.get element): Deleted.
688 (WI.CircleChart.prototype.needsLayout): Deleted.
689 (WI.CircleChart.prototype.updateLayout): Deleted.
690 * UserInterface/Views/MemoryTimelineView.js:
691 (WI.MemoryTimelineView):
693 2019-02-01 Joseph Pecoraro <pecoraro@apple.com>
695 Web Inspector: Timeline Detail Views do not reset properly when new time range selection contains nothing
696 https://bugs.webkit.org/show_bug.cgi?id=194115
697 <rdar://problem/47716693>
699 Rubber-stamped by Devin Rousso.
701 * UserInterface/Views/CPUTimelineView.js:
702 (WI.CPUTimelineView.prototype.reset):
703 (WI.CPUTimelineView.prototype.clear):
704 (WI.CPUTimelineView.prototype.layout):
705 * UserInterface/Views/MemoryTimelineView.js:
706 (WI.MemoryTimelineView.prototype.reset):
707 (WI.MemoryTimelineView.prototype.clear):
708 (WI.MemoryTimelineView.prototype.layout):
709 When there are no visible records in the selected range clear our UI.
710 Introduce a `clear` method that clears the UI but keeps
711 non-range-specific values (e.g. maximums).
713 2019-02-01 Joseph Pecoraro <pecoraro@apple.com>
715 Web Inspector: Timeline graphs have drawing issues with multiple discontinuities
716 https://bugs.webkit.org/show_bug.cgi?id=194110
717 <rdar://problem/47714356>
719 Reviewed by Devin Rousso.
721 * UserInterface/Views/CPUTimelineView.js:
722 (WI.CPUTimelineView):
723 (WI.CPUTimelineView.prototype.layout.xScale): Deleted.
724 * UserInterface/Views/MemoryTimelineOverviewGraph.js:
725 (WI.MemoryTimelineOverviewGraph.prototype.layout.insertDiscontinuity):
726 (WI.MemoryTimelineOverviewGraph.prototype.layout):
727 * UserInterface/Views/MemoryTimelineView.js:
728 (WI.MemoryTimelineView.prototype.layout.xScale):
729 (WI.MemoryTimelineView.prototype.layout.yScale):
730 (WI.MemoryTimelineView.prototype.layout):
731 Handle if multiple discontinuities exist between records.
733 2019-02-01 Joseph Pecoraro <pecoraro@apple.com>
735 Web Inspector: Timeline time range selection should show duration alongside start and end
736 https://bugs.webkit.org/show_bug.cgi?id=194109
737 <rdar://problem/47714279>
739 Reviewed by Devin Rousso.
741 * Localizations/en.lproj/localizedStrings.js:
742 * UserInterface/Views/TimelineRecordingContentView.js:
743 (WI.TimelineRecordingContentView.prototype._updateTimeRangePathComponents):
744 Include the duration when not obvious.
746 2019-02-01 Joseph Pecoraro <pecoraro@apple.com>
748 Web Inspector: Improve API and documentation of ColumnChart
749 https://bugs.webkit.org/show_bug.cgi?id=193982
751 Reviewed by Devin Rousso.
753 This used to be named "BarChart". Convert remaining instances
754 of "bar" to "column" and clean up related things.
756 * UserInterface/Views/CPUTimelineOverviewGraph.css:
757 (body[dir=rtl] .timeline-overview-graph.cpu > .column-chart):
758 (.timeline-overview-graph.cpu > .column-chart > svg > rect):
759 (body[dir=rtl] .timeline-overview-graph.cpu > .bar-chart): Deleted.
760 (.timeline-overview-graph.cpu > .bar-chart > svg > rect): Deleted.
761 * UserInterface/Views/CPUTimelineOverviewGraph.js:
762 (WI.CPUTimelineOverviewGraph.prototype.layout):
763 * UserInterface/Views/ColumnChart.js:
765 (WI.ColumnChart.prototype.get columns):
766 (WI.ColumnChart.prototype.addColumn):
767 (WI.ColumnChart.prototype.clear):
768 (WI.ColumnChart.prototype.updateLayout):
769 (WI.ColumnChart.prototype.get bars): Deleted.
770 (WI.ColumnChart.prototype.addBar): Deleted.
771 * UserInterface/Views/StackedLineChart.js:
772 (WI.StackedLineChart.prototype.get element):
773 (WI.StackedLineChart.prototype.get points):
775 2019-01-31 Joseph Pecoraro <pecoraro@apple.com>
777 Web Inspector: Timeline time range selection sometimes shows 0.000, should be just 0
778 https://bugs.webkit.org/show_bug.cgi?id=194108
779 <rdar://problem/47714273>
781 Reviewed by Devin Rousso.
783 * UserInterface/Base/Utilities.js:
784 Check under epsilon for the zero case.
786 2019-01-31 Matt Baker <mattbaker@apple.com>
788 REGRESSION(r?): Web Inspector: Clicking on text doesn't move text caret when editing innerHTML/tagName/attribute
789 https://bugs.webkit.org/show_bug.cgi?id=192652
790 <rdar://problem/46684612>
792 Reviewed by Devin Rousso.
794 * UserInterface/Views/DOMTreeElement.js:
795 (WI.DOMTreeElement.prototype.canSelectOnMouseDown):
796 Call to Event.preventDefault() should be made here instead of at the
799 * UserInterface/Views/TreeElement.js:
800 (WI.TreeElement.prototype.selectOnMouseDown): Deleted.
803 * UserInterface/Views/TreeOutline.js:
804 (WI.TreeOutline._handleMouseDown):
805 Do not prevent default event handling when the item cannot be selected.
806 This matches TreeOutline behavior prior to introducing SelectionController.
808 2019-01-30 Devin Rousso <drousso@apple.com>
810 Web Inspector: Memory Timeline View should be responsive / resizable
811 https://bugs.webkit.org/show_bug.cgi?id=153758
812 <rdar://problem/24444320>
814 Reviewed by Joseph Pecoraro.
816 Leverage the SVG `viewBox` (which was misspelled) to scale the graphs when the width of the
817 container changes. The `viewBox` used is equal to the total amount of time that is visible.
819 Make `WI.LineChart` (and its container classes) into subclasses of `WI.View` to leverage the
820 existing layout system.
822 Prevent any work from being done when resizing, as this is now handled by CSS/SVG.
824 * UserInterface/Views/LineChart.js:
826 (WI.LineChart.prototype.set size):
827 (WI.LineChart.prototype.addPoint):
828 (WI.LineChart.prototype.clear):
829 (WI.LineChart.prototype.layout):
830 (WI.LineChart.prototype.get element): Deleted.
831 (WI.LineChart.prototype.get points): Deleted.
832 (WI.LineChart.prototype.needsLayout): Deleted.
833 (WI.LineChart.prototype.updateLayout): Deleted.
835 * UserInterface/Views/CPUUsageView.js:
837 (WI.CPUUsageView.prototype.clear):
838 (WI.CPUUsageView.prototype.updateChart): Added.
839 (WI.CPUUsageView.prototype.get element): Deleted.
840 (WI.CPUUsageView.prototype.layoutWithDataPoints): Deleted.
841 * UserInterface/Views/CPUUsageView.css:
843 (.cpu-usage-view > .details):
844 (.cpu-usage-view > .graph, .cpu-usage-view > .graph > .line-chart, .cpu-usage-view > .graph > .line-chart > svg): Added.
845 (.cpu-usage-view > .graph): Deleted.
847 * UserInterface/Views/CPUTimelineView.js:
848 (WI.CPUTimelineView):
849 (WI.CPUTimelineView.prototype.layout):
850 (WI.CPUTimelineView.prototype.layout.layoutView):
851 (WI.CPUTimelineView.prototype.layout.layoutView.xScale):
852 (WI.CPUTimelineView.prototype.layout.layoutView.yScale):
853 * UserInterface/Views/CPUTimelineView.css:
854 (body .timeline-view.cpu): Added.
855 (.timeline-view.cpu > .content):
856 (.timeline-view.cpu): Deleted.
858 * UserInterface/Views/MemoryCategoryView.js:
859 (WI.MemoryCategoryView):
860 (WI.MemoryCategoryView.prototype.clear):
861 (WI.MemoryCategoryView.prototype.updateChart): Added.
862 (WI.MemoryCategoryView.prototype.get element): Deleted.
863 (WI.MemoryCategoryView.prototype.layoutWithDataPoints): Deleted.
864 * UserInterface/Views/MemoryCategoryView.css:
865 (.memory-category-view):
866 (.memory-category-view > .details):
867 (.memory-category-view > .graph, .memory-category-view > .graph > .line-chart, .memory-category-view > .graph > .line-chart > svg): Added.
868 (.memory-category-view > .graph): Deleted.
870 * UserInterface/Views/MemoryTimelineView.js:
871 (WI.MemoryTimelineView.prototype.layout):
872 (WI.MemoryTimelineView.prototype.layout.layoutCategoryView):
873 (WI.MemoryTimelineView.prototype.layout.layoutCategoryView.xScale):
874 (WI.MemoryTimelineView.prototype.layout.layoutCategoryView.yScale):
875 (WI.MemoryTimelineView.prototype._initializeCategoryViews):
876 (WI.MemoryTimelineView.prototype._initializeCategoryViews.appendLegendRow):
877 * UserInterface/Views/MemoryTimelineView.css:
878 (.timeline-view.memory > .content > .overview):
879 (.timeline-view.memory > .content > .overview > .divider):
880 (.timeline-view.memory > .content > .overview .total-usage, .timeline-view.memory > .content > .overview .max-percentage, .timeline-view.memory > .content > .overview .legend .size): Added.
881 (.timeline-view.memory .legend):
882 (.timeline-view.memory .legend .row): Added.
883 (.timeline-view.memory .legend .row + .row): Added.
884 (.timeline-view.memory .legend .swatch): Addd.
885 (.timeline-view.memory .legend .swatch.javascript): Addd.
886 (.timeline-view.memory .legend .swatch.images): Addd.
887 (.timeline-view.memory .legend .swatch.layers): Addd.
888 (.timeline-view.memory .legend .swatch.page): Addd.
889 (.timeline-view.memory .legend .swatch.current): Addd.
890 (.timeline-view.memory > .content): Deleted.
891 (.timeline-view.memory > .content > .overview .total-usage, .timeline-view.memory > .content > .overview .max-percentage):
892 (body[dir=ltr] .timeline-view.memory .legend): Deleted.
893 (body[dir=rtl] .timeline-view.memory .legend): Deleted.
894 (.timeline-view.memory .legend > .row): Deleted.
895 (.timeline-view.memory .legend > .row > .swatch): Deleted.
896 (body[dir=ltr] .timeline-view.memory .legend > .row > .swatch): Deleted.
897 (body[dir=rtl] .timeline-view.memory .legend > .row > .swatch): Deleted.
898 (.timeline-view.memory .legend > .row > p): Deleted.
899 (body[dir=ltr] .timeline-view.memory .legend > .row > :matches(.label, .size)): Deleted.
900 (body[dir=rtl] .timeline-view.memory .legend > .row > :matches(.label, .size)): Deleted.
901 (.timeline-view.memory .legend > .row > .label): Deleted.
902 (.timeline-view.memory .legend > .row > .size): Deleted.
903 (.timeline-view.memory .legend > .row > .swatch.javascript): Deleted.
904 (.timeline-view.memory .legend > .row > .swatch.images): Deleted.
905 (.timeline-view.memory .legend > .row > .swatch.layers): Deleted.
906 (.timeline-view.memory .legend > .row > .swatch.page): Deleted.
907 (.timeline-view.memory .legend > .row > .swatch.current): Deleted.
909 2019-01-30 Nikita Vasilyev <nvasilyev@apple.com>
911 Web Inspector: Changes: group CSS rules by resource
912 https://bugs.webkit.org/show_bug.cgi?id=193940
913 <rdar://problem/47617785>
915 Reviewed by Matt Baker.
917 Create resource sections with source links in their headers.
920 - Use read-only WI.SpreadsheetStyleProperty to display inline swatches for colors;
921 - Make the red and green background span the entire width of the panel.
923 * Localizations/en.lproj/localizedStrings.js:
924 * UserInterface/Views/ChangesDetailsSidebarPanel.css:
925 (.sidebar > .panel.changes-panel):
926 (.sidebar > .panel.changes-panel .css-rule):
927 (.sidebar > .panel.selected.changes-panel.empty):
928 (.changes-panel .resource-section):
929 (.changes-panel .resource-section > .header):
930 (.changes-panel .resource-section > .header > a:hover):
931 (.sidebar > .panel.changes-panel .selector-line,):
932 (.changes-panel .css-property-line > .property):
933 (.changes-panel .css-property-line.unchanged):
934 (.changes-panel .css-property-line.added):
935 (.changes-panel .css-property-line.removed):
936 (.changes-panel .css-property-line.removed::before):
937 (.changes-panel .css-property-line.added::before):
938 (@media (prefers-color-scheme: dark)):
940 * UserInterface/Views/ChangesDetailsSidebarPanel.js:
941 (WI.ChangesDetailsSidebarPanel.prototype.layout):
942 (WI.ChangesDetailsSidebarPanel.prototype._createRuleElement):
943 (WI.ChangesDetailsSidebarPanel.prototype._createLocationLink):
945 * UserInterface/Views/SpreadsheetStyleProperty.js:
946 (WI.SpreadsheetStyleProperty.prototype._createInlineSwatch):
947 Allow passing `null` as a delegate.
949 2019-01-30 Devin Rousso <drousso@apple.com>
951 Web Inspector: change style of device settings override popover content
952 https://bugs.webkit.org/show_bug.cgi?id=194049
954 Reviewed by Joseph Pecoraro.
956 * UserInterface/Base/Main.js:
957 (WI._handleDeviceSettingsToolbarButtonClicked):
958 (WI._handleDeviceSettingsToolbarButtonClicked.showUserAgentInput):
959 (WI._handleDeviceSettingsToolbarButtonClicked.createContainer): Deleted.
960 * UserInterface/Views/Main.css:
961 (.device-settings-content):
962 (.device-settings-content > tr > td:first-child): Added.
963 (.device-settings-content .container):
964 (.device-settings-content .container > * + *): Added.
965 (.device-settings-content .column): Added.
966 (.device-settings-content .user-agent select): Added.
967 (.device-settings-content .user-agent input): Added.
968 (.device-settings-content label + label): Added.
969 (.device-settings-content label > input): Added.
970 (.device-settings-content .columns): Deleted.
971 (.device-settings-content .columns > .column): Deleted.
972 (.device-settings-content .columns > .column + .column): Deleted.
973 (.device-settings-content .user-agent-value): Deleted.
974 (.device-settings-content .user-agent-value > select): Deleted.
975 (.device-settings-content .user-agent-value > input): Deleted.
976 (body[dir=ltr] .device-settings-content .user-agent-value > input): Deleted.
977 (body[dir=rtl] .device-settings-content .user-agent-value > input): Deleted.
979 2019-01-30 Devin Rousso <drousso@apple.com>
981 Web Inspector: Uncaught Exception: null is not an object (evaluating 'url.startsWith')
982 https://bugs.webkit.org/show_bug.cgi?id=194029
984 Reviewed by Matt Baker.
986 * UserInterface/Views/ConsoleMessageView.js:
987 (WI.ConsoleMessageView.prototype._appendLocationLink):
989 2019-01-29 Nikita Vasilyev <nvasilyev@apple.com>
991 Web Inspector: Enabled Changes panel in Elements tab by default
992 https://bugs.webkit.org/show_bug.cgi?id=193986
993 <rdar://problem/47647683>
995 Reviewed by Matt Baker.
997 * UserInterface/Base/Setting.js:
998 * UserInterface/Views/ElementsTabContentView.js:
999 (WI.ElementsTabContentView):
1000 * UserInterface/Views/SettingsTabContentView.js:
1001 (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
1003 2019-01-29 Nikita Vasilyev <nvasilyev@apple.com>
1005 Web Inspector: Styles: enable computed style cascades by default
1006 https://bugs.webkit.org/show_bug.cgi?id=193983
1007 <rdar://problem/47645821>
1009 Reviewed by Matt Baker.
1011 * Localizations/en.lproj/localizedStrings.js:
1012 * UserInterface/Base/Setting.js:
1013 * UserInterface/Views/ComputedStyleDetailsPanel.css:
1014 (.computed-style-properties):
1015 (.computed-style-properties .property .go-to-arrow):
1016 (.details-section.computed-style-properties:not(.collapsed) > :matches(.header, .content)):
1017 (.details-section.computed-style-properties > .content):
1018 (@media (prefers-color-scheme: dark)):
1019 (.computed-with-traces .computed-style-properties): Deleted.
1020 (.computed-with-traces .details-section.computed-style-properties:not(.collapsed) > :matches(.header, .content)): Deleted.
1021 (.computed-with-traces .details-section.computed-style-properties > .content): Deleted.
1022 (.computed-with-traces .computed-style-properties .property .go-to-arrow): Deleted.
1023 * UserInterface/Views/ComputedStyleDetailsPanel.js:
1024 (WI.ComputedStyleDetailsPanel.prototype.refresh):
1025 (WI.ComputedStyleDetailsPanel.prototype.initialLayout):
1026 * UserInterface/Views/ComputedStyleDetailsSidebarPanel.js:
1027 (WI.ComputedStyleDetailsSidebarPanel):
1028 * UserInterface/Views/SettingsTabContentView.js:
1029 (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
1031 2019-01-28 Joseph Pecoraro <pecoraro@apple.com>
1033 Web Inspector: Remove unnecessary promise rejection handlers now that we use the global onunhandledrejection handler
1034 https://bugs.webkit.org/show_bug.cgi?id=193921
1036 Reviewed by Devin Rousso.
1038 * UserInterface/Base/Utilities.js:
1039 * UserInterface/Debug/UncaughtExceptionReporter.js:
1040 * UserInterface/Views/NetworkTableContentView.js:
1041 (WI.NetworkTableContentView.prototype._exportHAR):
1042 * UserInterface/Views/TextEditor.js:
1043 (WI.TextEditor.prototype.updateFormattedState):
1045 2019-01-28 Devin Rousso <drousso@apple.com>
1047 Web Inspector: provide a way to edit page WebRTC settings on a remote target
1048 https://bugs.webkit.org/show_bug.cgi?id=193863
1049 <rdar://problem/47572764>
1051 Reviewed by Joseph Pecoraro.
1053 * UserInterface/Base/Main.js:
1055 (WI.initializeTarget):
1056 (WI._handleDeviceSettingsToolbarButtonClicked):
1057 (WI._handleDeviceSettingsToolbarButtonClicked.createCheckbox):
1058 (WI._handleDeviceSettingsToolbarButtonClicked.createColumns): Deleted.
1059 * UserInterface/Views/Main.css:
1060 (.device-settings-content .container): Added.
1062 * Localizations/en.lproj/localizedStrings.js:
1064 2019-01-28 Matt Baker <mattbaker@apple.com>
1066 Web Inspector: Elements tab should toggle visibility for all selected nodes
1067 https://bugs.webkit.org/show_bug.cgi?id=193089
1068 <rdar://problem/47009256>
1070 Reviewed by Devin Rousso.
1072 Update "Toggle Visibility" command in DOM tree for multiple selection.
1073 When both visible and hidden elements are selected in the DOM tree,
1074 the toggle command behaves contextually. If one or more elements are
1075 visible, they are hidden, otherwise they are shown. The context menu
1076 shows "Hide Elements" or "Show Elements", respectively.
1078 When only one element is selected, or the context menu target element
1079 is not selected, the command continues to be "Toggle Visibility".
1081 * Localizations/en.lproj/localizedStrings.js:
1083 * UserInterface/Views/DOMTreeElement.js:
1084 (WI.DOMTreeElement.prototype.get isNodeHidden): Added.
1085 (WI.DOMTreeElement.prototype.toggleElementVisibility.inspectedPage_node_injectStyleAndToggleClass):
1086 (WI.DOMTreeElement.prototype.toggleElementVisibility):
1087 (WI.DOMTreeElement.prototype._populateTagContextMenu):
1089 * UserInterface/Views/DOMTreeOutline.js:
1090 (WI.DOMTreeOutline):
1091 (WI.DOMTreeOutline.prototype.toggleSelectedElementsVisibility): Added.
1092 Provide a public method for toggling the visibility of selected DOM nodes.
1093 Used by the "H" keyboard shortcut and DOMTreeElement context menu.
1095 (WI.DOMTreeOutline.prototype._hideElements):
1096 (WI.DOMTreeOutline.prototype._hideElement): Deleted.
1097 Rename for multiple selection.
1099 2019-01-28 Commit Queue <commit-queue@webkit.org>
1101 Unreviewed, rolling out r240351.
1102 https://bugs.webkit.org/show_bug.cgi?id=193918
1104 Causes overlapping Timeline records, as some record types
1105 don't have an endTime (Requested by drousso on #webkit).
1109 "WebInspector: Confusingly nested events in the timeline for
1111 https://bugs.webkit.org/show_bug.cgi?id=192884
1112 https://trac.webkit.org/changeset/240351
1114 2019-01-28 Matt Baker <mattbaker@apple.com>
1116 REGRESSION(?): Web Inspector: Can have multiple Timelines selected after edit mode
1117 https://bugs.webkit.org/show_bug.cgi?id=193808
1118 <rdar://problem/47537734>
1120 Reviewed by Devin Rousso.
1122 * UserInterface/Controllers/SelectionController.js:
1123 (WI.SelectionController.prototype.didRemoveItems):
1125 * UserInterface/Views/TreeOutline.js:
1126 (WI.TreeOutline.prototype._indexesForSubtree):
1127 Fix a bug where no IndexSet was returned when passed a TreeElement with
1128 no children. This caused the Timelines tree selection to be corrupted when
1129 entering and exiting edit mode, as TreeElements are inserted and removed.
1131 2019-01-28 Nikita Vasilyev <nvasilyev@apple.com>
1133 Web Inspector: Add Changes panel to Elements tab
1134 https://bugs.webkit.org/show_bug.cgi?id=193803
1136 Reviewed by Devin Rousso.
1138 Introduce the new experimental Changes Panel. It shows a list of CSS changes
1139 made via Web Inspector, so the changes could be copied to the source files.
1141 * Localizations/en.lproj/localizedStrings.js:
1142 * UserInterface/Base/Setting.js:
1143 * UserInterface/Base/Utilities.js:
1144 (Array.diffArrays): Added.
1146 * UserInterface/Controllers/CSSManager.js:
1148 (WI.CSSManager.prototype.get modifiedCSSRules):
1149 (WI.CSSManager.prototype.addModifiedCSSRule):
1150 (WI.CSSManager.prototype.removeModifiedCSSRule):
1151 (WI.CSSManager.prototype._mainResourceDidChange):
1153 * UserInterface/Main.html:
1154 * UserInterface/Models/CSSProperty.js:
1156 (WI.CSSProperty.prototype.remove):
1157 (WI.CSSProperty.prototype.replaceWithText):
1158 (WI.CSSProperty.prototype.commentOut):
1159 (WI.CSSProperty.prototype.set text):
1160 (WI.CSSProperty.prototype.get modified):
1161 (WI.CSSProperty.prototype.set name):
1162 (WI.CSSProperty.prototype.set rawValue):
1163 (WI.CSSProperty.prototype.get initialState):
1164 (WI.CSSProperty.prototype._updateOwnerStyleText):
1165 (WI.CSSProperty.prototype._markModified):
1166 Mark CSSProperty modified *before* making any changes to copy its initial state.
1168 * UserInterface/Models/CSSRule.js:
1170 (WI.CSSRule.prototype.get id):
1171 (WI.CSSRule.prototype.get initialState):
1172 (WI.CSSRule.prototype.get stringId):
1173 (WI.CSSRule.prototype.markModified):
1175 * UserInterface/Models/CSSStyleDeclaration.js:
1176 (WI.CSSStyleDeclaration):
1177 (WI.CSSStyleDeclaration.prototype.get initialState):
1178 (WI.CSSStyleDeclaration.prototype.get enabledProperties):
1179 (WI.CSSStyleDeclaration.prototype.get properties):
1180 (WI.CSSStyleDeclaration.prototype.set properties):
1181 (WI.CSSStyleDeclaration.prototype.propertyForName):
1182 (WI.CSSStyleDeclaration.prototype.newBlankProperty):
1183 (WI.CSSStyleDeclaration.prototype.markModified):
1185 * UserInterface/Views/ChangesDetailsSidebarPanel.css: Added.
1186 (.sidebar > .panel.changes-panel):
1187 (.sidebar > .panel.changes-panel:not(.empty)):
1188 (.sidebar > .panel.changes-panel.empty):
1189 (.changes-panel ins):
1190 (.changes-panel del):
1191 (.changes-panel del.css-property::before):
1192 (.changes-panel ins.css-property::before):
1193 (@media (prefers-color-scheme: dark)):
1195 * UserInterface/Views/ChangesDetailsSidebarPanel.js: Added.
1196 (WI.ChangesDetailsSidebarPanel):
1197 (WI.ChangesDetailsSidebarPanel.prototype.inspect):
1198 (WI.ChangesDetailsSidebarPanel.prototype.supportsDOMNode):
1199 (WI.ChangesDetailsSidebarPanel.prototype.shown):
1200 (WI.ChangesDetailsSidebarPanel.prototype.detached):
1201 (WI.ChangesDetailsSidebarPanel.prototype.layout):
1202 (WI.ChangesDetailsSidebarPanel.prototype._mainResourceDidChange):
1204 * UserInterface/Views/ElementsTabContentView.js:
1205 (WI.ElementsTabContentView):
1207 * UserInterface/Views/SettingsTabContentView.js:
1208 (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
1210 * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
1211 (.spreadsheet-style-declaration-editor .property):
1212 (.spreadsheet-style-declaration-editor .property.modified):
1213 (.spreadsheet-style-declaration-editor .property.modified:not(.selected)):
1214 (@media (prefers-color-scheme: dark)):
1216 * UserInterface/Views/SpreadsheetStyleProperty.js:
1217 (WI.SpreadsheetStyleProperty.prototype.updateStatus):
1219 2019-01-26 Devin Rousso <drousso@apple.com>
1221 Web Inspector: handle CSS Color 4 color syntaxes
1222 https://bugs.webkit.org/show_bug.cgi?id=193166
1223 <rdar://problem/47062403>
1225 Reviewed by Simon Fraser.
1227 * UserInterface/Models/Color.js:
1228 (WI.Color.fromString):
1229 (WI.Color.fromString.splitFunctionString): Added.
1230 (WI.Color.fromString.parseFunctionAlpha): Added.
1231 (WI.Color.fromString.parseFunctionComponent): Added.
1232 (WI.Color.fromString.parseHueComponent): Added.
1233 (WI.Color.fromString.parsePercentageComponent): Added.
1235 2019-01-26 Devin Rousso <drousso@apple.com>
1237 Web Inspector: provide a way to edit the user agent of a remote target
1238 https://bugs.webkit.org/show_bug.cgi?id=193862
1239 <rdar://problem/47359292>
1241 Reviewed by Joseph Pecoraro.
1243 * UserInterface/Base/Main.js:
1246 (WI.initializeTarget):
1247 (WI._handleDeviceSettingsToolbarButtonClicked):
1248 (WI._handleDeviceSettingsToolbarButtonClicked.updateActivatedState):
1249 (WI._handleDeviceSettingsToolbarButtonClicked.applyOverriddenUserAgent):
1250 (WI._handleDeviceSettingsToolbarButtonClicked.applyOverriddenSetting):
1251 (WI._handleDeviceSettingsToolbarButtonClicked.createContainer):
1252 (WI._handleDeviceSettingsToolbarButtonClicked.createColumns):
1253 (WI._handleDeviceSettingsToolbarButtonClicked.calculateTargetFrame):
1254 (WI._handleDeviceSettingsToolbarButtonClicked.showUserAgentInput):
1256 * UserInterface/Views/Main.css:
1257 (.device-settings-content):
1258 (.device-settings-content .user-agent-value): Added.
1259 (.device-settings-content .user-agent-value > select): Added.
1260 (.device-settings-content .user-agent-value > input): Added.
1261 (body[dir=ltr] .device-settings-content .user-agent-value > input): Added.
1262 (body[dir=rtl] .device-settings-content .user-agent-value > input): Added.
1263 (.device-settings-content label > input): Added.
1264 (body[dir=ltr] .device-settings-content label > input): Deleted.
1265 (body[dir=rtl] .device-settings-content label > input): Deleted.
1267 * Localizations/en.lproj/localizedStrings.js:
1269 2019-01-25 Devin Rousso <drousso@apple.com>
1271 Web Inspector: provide a way to edit page settings on a remote target
1272 https://bugs.webkit.org/show_bug.cgi?id=193813
1273 <rdar://problem/47359510>
1275 Reviewed by Joseph Pecoraro.
1277 Add toolbar button that shows a popover with the target's (page's) settings when clicked.
1279 * UserInterface/Base/Main.js:
1282 (WI.initializeTarget): Added.
1283 (WI._handleDeviceSettingsToolbarButtonClicked): Added.
1284 (WI.didDismissPopover): Added.
1285 * UserInterface/Views/Main.css:
1286 (.device-settings-content): Added.
1287 (.device-settings-content .columns): Added.
1288 (.device-settings-content .columns > .column): Added.
1289 (.device-settings-content .columns > .column + .column): Added.
1290 (body[dir=ltr] .device-settings-content label > input): Added.
1291 (body[dir=rtl] .device-settings-content label > input): Added.
1293 * UserInterface/Views/Popover.js:
1294 (WI.Popover.prototype._update.area):
1295 (WI.Popover.prototype._update):
1296 (WI.Popover.prototype._drawBackground):
1297 (WI.Popover.prototype._bestMetricsForEdge):
1298 (WI.Popover.prototype._drawFrame):
1299 If the best area is negative, treat it as the worst area.
1300 Allow areas to be clamped so long as the clamped edge is not the preferred edge.
1302 * UserInterface/Base/Test.js:
1303 (WI.initializeTarget): Added.
1305 * UserInterface/Images/Device.svg: Added.
1306 * Localizations/en.lproj/localizedStrings.js:
1308 2019-01-25 Devin Rousso <drousso@apple.com>
1310 Web Inspector: Audit: unable to import audits
1311 https://bugs.webkit.org/show_bug.cgi?id=193861
1313 Reviewed by Joseph Pecoraro.
1315 * UserInterface/Controllers/AuditManager.js:
1316 (WI.AuditManager.prototype.async processJSON):
1318 2019-01-25 Devin Rousso <drousso@apple.com>
1320 Web Inspector: Uncaught Exception: No node with given id found
1321 https://bugs.webkit.org/show_bug.cgi?id=193833
1323 Reviewed by Joseph Pecoraro.
1325 * UserInterface/Views/CanvasContentView.js:
1326 (WI.CanvasContentView):
1327 (WI.CanvasContentView.prototype.initialLayout):
1328 (WI.CanvasContentView.prototype.layout):
1329 (WI.CanvasContentView.prototype._refreshPixelSize):
1330 Drive-by: show the refresh button when viewing a specific canvas.
1332 * UserInterface/Views/CanvasTabContentView.js:
1333 (WI.CanvasTabContentView.prototype._removeCanvas):
1334 Reset to the overview if the canvas is removed.
1336 2019-01-25 Joseph Pecoraro <pecoraro@apple.com>
1338 Web Inspector: Improve Dark Mode appearance within Memory timeline
1339 https://bugs.webkit.org/show_bug.cgi?id=193804
1341 Reviewed by Matt Baker.
1343 * UserInterface/Views/TimelineOverview.css:
1344 (.timeline-overview.edit-instruments > .tree-outline.timelines .item.selected):
1345 (.timeline-overview > .tree-outline.timelines .item.selected + .item,):
1346 (@media (prefers-color-scheme: dark)):
1347 (.timeline-overview > .tree-outline.timelines .item.selected + .item): Deleted.
1348 (body.window-inactive .timeline-overview > .tree-outline.timelines .item.selected + .item): Deleted.
1349 Fix some colors for Timelines edit mode.
1351 * UserInterface/Views/CPUTimelineOverviewGraph.css:
1352 (.timeline-overview-graph.cpu:nth-child(even) > .legend):
1353 (@media (prefers-color-scheme: dark)):
1354 (.timeline-overview-graph.cpu > .legend):
1355 (.timeline-overview-graph:nth-child(even) > .legend): Deleted.
1356 * UserInterface/Views/MemoryTimelineOverviewGraph.css:
1357 (.timeline-overview-graph.memory:nth-child(even) > .legend):
1358 (@media (prefers-color-scheme: dark)):
1359 (.timeline-overview-graph.memory > .legend):
1360 (.timeline-overview-graph:nth-child(even) > .legend): Deleted.
1361 Improved colors in CPU / Memory overview graph legends.
1363 * UserInterface/Views/CPUUsageView.css:
1364 (.cpu-usage-view > .details):
1365 * UserInterface/Views/CircleChart.css:
1366 (.circle-chart > svg > path.background):
1367 * UserInterface/Views/MemoryCategoryView.css:
1368 (.memory-category-view > .details):
1369 (.memory-category-view > .details > .name):
1370 * UserInterface/Views/MemoryTimelineView.css:
1371 (.timeline-view.memory > .content > .overview .total-usage,):
1372 (.timeline-view.memory .legend > .row > .size):
1373 Improved colors in CPU / Memory detail views.
1375 * UserInterface/Views/Variables.css:
1377 Add a default --text-secondary-color which will end up slightly
1378 lighter in dark mode where it was already implemented.
1380 (@media (prefers-color-scheme: dark)):
1381 Improved max-comparison colors.
1383 2019-01-25 Devin Rousso <drousso@apple.com>
1385 Web Inspector: Timelines: DOMContentLoaded and load event lines need to be more obvious
1386 https://bugs.webkit.org/show_bug.cgi?id=193186
1387 <rdar://problem/45100694>
1389 Reviewed by Joseph Pecoraro.
1391 Shift around z-index values to make Timelines markers appear behind record bars. Widen the
1392 marker hit region to make it easier to see the tooltip.
1394 * UserInterface/Views/Variables.css:
1397 * UserInterface/Views/TimelineRuler.css:
1399 (.timeline-ruler > .markers):
1400 (.timeline-ruler > .markers > .marker):
1401 (body[dir=ltr] .timeline-ruler > .markers > .marker):
1402 (body[dir=rtl] .timeline-ruler > .markers > .marker):
1403 (.timeline-ruler > .markers > .marker::before):
1404 (body[dir=ltr] .timeline-ruler > .markers > .marker::before):
1405 (body[dir=rtl] .timeline-ruler > .markers > .marker::before):
1406 (.timeline-ruler > .markers > .marker::after): Added.
1407 (body[dir=ltr] .timeline-ruler > .markers > .marker::after): Added.
1408 (body[dir=rtl] .timeline-ruler > .markers > .marker::after): Added.
1409 (.timeline-ruler > .markers > .marker.current-time):
1410 (.timeline-ruler > .markers > .marker.current-time::after): Added.
1411 (.timeline-ruler > .markers > .marker.load-event):
1412 (.timeline-ruler > .markers > .marker.dom-content-event):
1413 (.timeline-ruler > .markers > .marker.timestamp):
1414 (.timeline-ruler > .selection-handle):
1415 (.timeline-ruler.both-handles-clamped > .selection-handle):
1416 (.timeline-ruler > .shaded-area):
1417 (.timeline-ruler > .markers > .marker.current-time::before): Deleted.
1419 * UserInterface/Views/TimelineRecordBar.css:
1420 (.timeline-record-bar):
1421 (.timeline-record-bar > .segment):
1423 * UserInterface/Views/CPUTimelineOverviewGraph.css:
1424 (.timeline-overview-graph.cpu > .legend):
1425 * UserInterface/Views/MemoryTimelineOverviewGraph.css:
1426 (.timeline-overview-graph.memory > .legend):
1428 2019-01-25 Devin Rousso <drousso@apple.com>
1430 Web Inspector: Audit: remove experimental setting
1431 https://bugs.webkit.org/show_bug.cgi?id=193743
1432 <rdar://problem/28234022>
1434 Reviewed by Joseph Pecoraro.
1436 * UserInterface/Base/Setting.js:
1438 (WI.Setting.localStorageKey): Added.
1439 (WI.Setting.migrateValue):
1440 Drive-by: add the localStorage key prefix to the key passed into `WI.Setting.migrateValue`.
1442 * UserInterface/Base/Main.js:
1445 * UserInterface/Views/AuditTabContentView.js:
1446 (WI.AuditTabContentView.isTabAllowed):
1448 * UserInterface/Views/SettingsTabContentView.js:
1449 (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
1451 * Localizations/en.lproj/localizedStrings.js:
1453 2019-01-25 Devin Rousso <drousso@apple.com>
1455 Web Inspector: show uncaught exception view for unhandled promise rejections
1456 https://bugs.webkit.org/show_bug.cgi?id=193832
1458 Reviewed by Matt Baker.
1460 * UserInterface/Debug/UncaughtExceptionReporter.js:
1461 (handleUnhandledPromiseRejection): Added.
1463 2019-01-25 Devin Rousso <drousso@apple.com>
1465 Web Inspector: REGRESSION (r237808): offscreen path warning doesn't work
1466 https://bugs.webkit.org/show_bug.cgi?id=193830
1468 Reviewed by Matt Baker.
1470 * UserInterface/Models/RecordingAction.js:
1471 (WI.RecordingAction.prototype.process):
1473 2019-01-25 Joseph Pecoraro <pecoraro@apple.com>
1475 Web Inspector: Add another Protocol Version (iOS 12.2)
1476 https://bugs.webkit.org/show_bug.cgi?id=193810
1477 <rdar://problem/42981838>
1479 Reviewed by Matt Baker.
1481 * UserInterface/Protocol/Legacy/12.2/InspectorBackendCommands.js: Added.
1482 * Versions/Inspector-iOS-12.2.json: Added.
1484 2019-01-25 Devin Rousso <drousso@apple.com>
1486 Web Inspector: `WI.Setting.migrateValue` doesn't take into account the key prefix
1487 https://bugs.webkit.org/show_bug.cgi?id=193814
1489 Reviewed by Matt Baker.
1491 * UserInterface/Base/Setting.js:
1493 (WI.Setting.migrateValue):
1494 (WI.Setting._localStorageKey): Added.
1496 2019-01-25 Devin Rousso <drousso@apple.com>
1498 Web Inspector: improve invalid Audit/Recording JSON error messages
1499 https://bugs.webkit.org/show_bug.cgi?id=193476
1500 <rdar://problem/47303659>
1502 Reviewed by Joseph Pecoraro.
1504 * UserInterface/Models/AuditTestBase.js:
1506 * UserInterface/Models/AuditTestCase.js:
1507 (WI.AuditTestCase.async fromPayload):
1508 * UserInterface/Models/AuditTestGroup.js:
1509 (WI.AuditTestGroup.async fromPayload):
1510 * UserInterface/Models/AuditTestCaseResult.js:
1511 (WI.AuditTestCaseResult.async fromPayload.checkArray):
1512 (WI.AuditTestCaseResult.async fromPayload):
1513 * UserInterface/Models/AuditTestGroupResult.js:
1514 (WI.AuditTestGroupResult.async fromPayload):
1515 * UserInterface/Controllers/AuditManager.js:
1516 (WI.AuditManager.synthesizeWarning): Added.
1517 (WI.AuditManager.synthesizeError):
1518 (WI.AuditManager.prototype.async processJSON):
1520 * UserInterface/Models/Recording.js:
1521 (WI.Recording.fromPayload):
1522 (WI.Recording.synthesizeWarning): Added.
1523 (WI.Recording.synthesizeError):
1524 * UserInterface/Models/RecordingFrame.js:
1525 (WI.RecordingFrame.fromPayload):
1526 * UserInterface/Models/RecordingAction.js:
1527 (WI.RecordingAction.fromPayload):
1528 (WI.RecordingAction.prototype.async swizzle):
1529 (WI.RecordingAction.prototype.apply):
1530 * UserInterface/Controllers/CanvasManager.js:
1531 (WI.CanvasManager.prototype.processJSON):
1533 * Localizations/en.lproj/localizedStrings.js:
1535 2019-01-24 Devin Rousso <drousso@apple.com>
1537 Web Inspector: Audit: add supports key to test/group for compatibility
1538 https://bugs.webkit.org/show_bug.cgi?id=193686
1539 <rdar://problem/47460872>
1541 Reviewed by Joseph Pecoraro.
1543 * UserInterface/Models/AuditTestBase.js:
1545 (WI.AuditTestBase.prototype.get supported): Added.
1546 (WI.AuditTestBase.prototype.set supported): Added.
1547 (WI.AuditTestBase.prototype.set disabled):
1548 (WI.AuditTestBase.prototype.async start):
1549 (WI.AuditTestBase.prototype.stop):
1550 (WI.AuditTestBase.toJSON):
1551 * UserInterface/Models/AuditTestCase.js:
1552 (WI.AuditTestCase.async fromPayload):
1553 * UserInterface/Models/AuditTestGroup.js:
1554 (WI.AuditTestGroup):
1555 (WI.AuditTestGroup.async fromPayload):
1556 (WI.AuditTestGroup.prototype.get supported): Added.
1557 (WI.AuditTestGroup.prototype.set supported): Added.
1558 Add support for a "supports" key in the test JSON that prevents the test from being run if
1559 it's value is lower than the frontend/backend version.
1561 * UserInterface/Views/AuditTreeElement.js:
1562 (WI.AuditTreeElement.prototype.onattach):
1563 (WI.AuditTreeElement.prototype.ondelete):
1564 (WI.AuditTreeElement.prototype.populateContextMenu):
1565 (WI.AuditTreeElement.prototype._updateStatus): Added.
1566 (WI.AuditTreeElement.prototype._showRunningSpinner):
1567 (WI.AuditTreeElement.prototype._showRunningProgress):
1568 (WI.AuditTreeElement.prototype._updateTestGroupDisabled):
1569 (WI.AuditTreeElement.prototype._handleTestCaseCompleted):
1570 (WI.AuditTreeElement.prototype._handleTestResultCleared):
1571 (WI.AuditTreeElement.prototype._handleTestGroupCompleted):
1572 (WI.AuditTreeElement.prototype._handleManagerEditingChanged):
1573 (WI.AuditTreeElement.prototype.canSelectOnMouseDown): Deleted.
1574 (WI.AuditTreeElement.prototype._updateLevel): Deleted.
1575 * UserInterface/Views/AuditTreeElement.css:
1576 (.tree-outline .item.audit:matches(.test-case, .test-group):not(.unsupported, .manager-active) > .status:hover > img): Added.
1577 (.tree-outline .item.audit > .status:not(:hover) > img.show-on-hover, .tree-outline .item.audit.test-group.expanded:not(.unsupported, .editing-audits) > .status:not(:hover)): Added.
1578 (.tree-outline .item.audit.manager-active > .status > img.show-on-hover, .tree-outline .item.audit.test-group.expanded:not(.editing-audits) > .status:hover > :not(img), .tree-outline .item.audit.test-group-result.expanded > .status, .tree-outline .item.audit.unsupported + .children .item.audit.unsupported > .status > img): Added.
1579 (.tree-outline .item.audit.unsupported:not(.selected) > :matches(.icon, .titles)): Added.
1580 (.tree-outline .item.audit.unsupported > .status > img): Added.
1581 (.tree-outline .item.audit:matches(.test-case, .test-group):not(.manager-active) > .status:hover > img): Deleted.
1582 (.tree-outline .item.audit > .status:not(:hover) > img.show-on-hover, .tree-outline .item.audit.test-group.expanded:not(.editing-audits) > .status:not(:hover)): Deleted.
1583 (.tree-outline .item.audit.manager-active > .status > img.show-on-hover, .tree-outline .item.audit.test-group.expanded:not(.editing-audits) > .status:hover > :not(img), .tree-outline .item.audit.test-group-result.expanded > .status): Deleted.
1584 Hide unsupported tests unless in edit mode, where they are greyed out and cannot be enabled.
1585 Drive-by: only allow tests to be deleted when in edit mode.
1587 * UserInterface/Views/AuditNavigationSidebarPanel.js:
1588 (WI.AuditNavigationSidebarPanel.prototype._treeSelectionDidChange):
1590 * Localizations/en.lproj/localizedStrings.js:
1592 2019-01-24 Joseph Pecoraro <pecoraro@apple.com>
1594 Web Inspector: CPU Usage Timeline
1595 https://bugs.webkit.org/show_bug.cgi?id=193730
1596 <rdar://problem/46797201>
1598 Reviewed by Devin Rousso.
1600 CPU Usage is gathered in the backend twice a second, the frequency of the
1601 ResourceUsageThread in WebCore. The frontend displays cpu usage in a few
1602 ways in the Timeline.
1604 We use a column chart in the timeline overview to display the frequency and
1605 relative distance of samples. This helps show if the samples were close
1606 together or far apart, which indicates how meaningful they will be at a
1609 We use a line chart in the timeline detail view which will be easier to see
1610 the changes over a particular time range selection.
1612 * Localizations/en.lproj/localizedStrings.js:
1615 * UserInterface/Main.html:
1616 * UserInterface/Base/Main.js:
1618 * UserInterface/Test.html:
1619 * UserInterface/Test/Test.js:
1621 * UserInterface/Protocol/CPUProfilerObserver.js:
1622 (WI.CPUProfilerObserver.prototype.trackingStart):
1623 (WI.CPUProfilerObserver.prototype.trackingUpdate):
1624 (WI.CPUProfilerObserver.prototype.trackingComplete):
1625 (WI.CPUProfilerObserver):
1626 New files and default registration.
1628 * UserInterface/Protocol/Target.js:
1629 (WI.Target.prototype.get CPUProfilerAgent):
1632 * UserInterface/Controllers/TimelineManager.js:
1633 (WI.TimelineManager.availableTimelineTypes):
1634 (WI.TimelineManager.prototype.cpuProfilerTrackingStarted):
1635 (WI.TimelineManager.prototype.cpuProfilerTrackingUpdated):
1636 (WI.TimelineManager.prototype.cpuProfilerTrackingCompleted):
1637 (WI.TimelineManager.prototype._updateAutoCaptureInstruments):
1638 (WI.TimelineManager.prototype.memoryTrackingStart): Renamed.
1639 (WI.TimelineManager.prototype.memoryTrackingUpdate): Renamed.
1640 (WI.TimelineManager.prototype.memoryTrackingComplete): Renamed.
1641 * UserInterface/Models/CPUInstrument.js:
1643 (WI.CPUInstrument.supported):
1644 (WI.CPUInstrument.prototype.get timelineRecordType):
1645 (WI.CPUInstrument.prototype.startInstrumentation):
1646 (WI.CPUInstrument.prototype.stopInstrumentation):
1647 * UserInterface/Models/CPUTimelineRecord.js:
1648 (WI.CPUTimelineRecord):
1649 (WI.CPUTimelineRecord.prototype.get timestamp):
1650 (WI.CPUTimelineRecord.prototype.get usage):
1651 * UserInterface/Models/Instrument.js:
1652 (WI.Instrument.createForTimelineType):
1653 * UserInterface/Models/TimelineRecord.js:
1654 * UserInterface/Models/TimelineRecording.js:
1655 (WI.TimelineRecording.prototype.addRecord):
1656 Expose a new CPU instrument and timeline.
1658 * UserInterface/Views/ColumnChart.js: Added.
1660 (WI.ColumnChart.prototype.get element):
1661 (WI.ColumnChart.prototype.get bars):
1662 (WI.ColumnChart.prototype.get size):
1663 (WI.ColumnChart.prototype.set size):
1664 (WI.ColumnChart.prototype.addBar):
1665 (WI.ColumnChart.prototype.clear):
1666 (WI.ColumnChart.prototype.needsLayout):
1667 (WI.ColumnChart.prototype.updateLayout):
1668 View that will draw vertical bars with independent widths.
1669 This is meant to be used similiar to WI.LineChart.
1671 * UserInterface/Images/CPUInstrument.svg: Added.
1672 * UserInterface/Views/Variables.css:
1674 CPU timeline colors and icon.
1676 * UserInterface/Views/CPUTimelineOverviewGraph.css:
1677 (body .sidebar > .panel.navigation.timeline > .timelines-content li.item.cpu,):
1678 (.timeline-overview-graph.cpu):
1679 (.timeline-overview-graph.cpu > .legend):
1680 (body[dir=ltr] .timeline-overview-graph.cpu > .legend):
1681 (body[dir=rtl] .timeline-overview-graph.cpu > .legend):
1682 (.timeline-overview-graph:nth-child(even) > .legend):
1683 (body[dir=rtl] .timeline-overview-graph.cpu > .bar-chart):
1684 (.timeline-overview-graph.cpu > .bar-chart > svg > g > rect):
1685 * UserInterface/Views/CPUTimelineOverviewGraph.js: Added.
1686 (WI.CPUTimelineOverviewGraph):
1687 (WI.CPUTimelineOverviewGraph.prototype.get height):
1688 (WI.CPUTimelineOverviewGraph.prototype.reset):
1689 (WI.CPUTimelineOverviewGraph.prototype.layout.xScale):
1690 (WI.CPUTimelineOverviewGraph.prototype.layout.yScale):
1691 (WI.CPUTimelineOverviewGraph.prototype.layout.yScaleForRecord):
1692 (WI.CPUTimelineOverviewGraph.prototype.layout):
1693 (WI.CPUTimelineOverviewGraph.prototype._updateLegend):
1694 (WI.CPUTimelineOverviewGraph.prototype._cpuTimelineRecordAdded):
1695 * UserInterface/Views/CPUTimelineView.css:
1696 (.timeline-view.cpu):
1697 (.timeline-view.cpu > .content):
1698 (.timeline-view.cpu > .content .subtitle):
1699 (.timeline-view.cpu > .content > .details):
1700 (.timeline-view.cpu > .content > .details > .timeline-ruler):
1701 (body[dir=ltr] .timeline-view.cpu > .content > .details > .timeline-ruler):
1702 (body[dir=rtl] .timeline-view.cpu > .content > .details > .timeline-ruler):
1703 (.timeline-view.cpu > .content > .details > .subtitle):
1704 (.cpu-usage-view .line-chart > svg > path):
1705 (.timeline-view.cpu .legend > .row > .swatch.current):
1706 * UserInterface/Views/CPUTimelineView.js: Added.
1707 (WI.CPUTimelineView):
1708 (WI.CPUTimelineView.prototype.shown):
1709 (WI.CPUTimelineView.prototype.hidden):
1710 (WI.CPUTimelineView.prototype.closed):
1711 (WI.CPUTimelineView.prototype.reset):
1712 (WI.CPUTimelineView.prototype.get scrollableElements):
1713 (WI.CPUTimelineView.prototype.get showsFilterBar):
1714 (WI.CPUTimelineView.prototype.layout.layoutView):
1715 (WI.CPUTimelineView.prototype.layout.xScale):
1716 (WI.CPUTimelineView.prototype.layout.yScale):
1717 (WI.CPUTimelineView.prototype.layout):
1718 (WI.CPUTimelineView.prototype._cpuTimelineRecordAdded):
1719 * UserInterface/Views/CPUUsageView.css:
1721 (.cpu-usage-view > .details):
1722 (body[dir=ltr] .cpu-usage-view > .details):
1723 (body[dir=rtl] .cpu-usage-view > .details):
1724 (.cpu-usage-view > .graph):
1725 (body[dir=rtl] .cpu-usage-view > .graph):
1726 * UserInterface/Views/CPUUsageView.js:
1728 (WI.CPUUsageView.prototype.get element):
1729 (WI.CPUUsageView.prototype.clear):
1730 (WI.CPUUsageView.prototype.layoutWithDataPoints):
1731 (WI.CPUUsageView.prototype._updateDetails):
1732 * UserInterface/Views/ContentView.js:
1733 (WI.ContentView.createFromRepresentedObject):
1734 * UserInterface/Views/TimelineIcons.css:
1736 * UserInterface/Views/TimelineOverviewGraph.js:
1737 (WI.TimelineOverviewGraph.createForTimeline):
1738 * UserInterface/Views/TimelineTabContentView.js:
1739 (WI.TimelineTabContentView.displayNameForTimelineType):
1740 (WI.TimelineTabContentView.iconClassNameForTimelineType):
1741 (WI.TimelineTabContentView.genericClassNameForTimelineType):
1742 (WI.TimelineTabContentView.iconClassNameForRecord):
1743 (WI.TimelineTabContentView.displayNameForRecord):
1744 Timeline views for CPU usage.
1746 * UserInterface/Views/MemoryCategoryView.js:
1747 (WI.MemoryCategoryView):
1748 * UserInterface/Views/MemoryTimelineView.js:
1749 (WI.MemoryTimelineView.createChartContainer):
1750 (WI.MemoryTimelineView):
1751 (WI.MemoryTimelineView.prototype._clearMaxComparisonLegend):
1752 Minor updates to style and comments.
1754 2019-01-23 Nikita Vasilyev <nvasilyev@apple.com>
1756 Web Inspector: Refactor WI.CSSStyleDeclaration.prototype.update
1757 https://bugs.webkit.org/show_bug.cgi?id=193737
1759 Reviewed by Matt Baker.
1761 Remove unused event data from the WI.CSSStyleDeclaration.Event.PropertiesChanged event.
1763 * UserInterface/Models/CSSStyleDeclaration.js:
1764 (WI.CSSStyleDeclaration.prototype.update):
1766 2019-01-23 Devin Rousso <drousso@apple.com>
1768 WebInspector: Confusingly nested events in the timeline for Mutation Observers
1769 https://bugs.webkit.org/show_bug.cgi?id=192884
1770 <rdar://problem/46854178>
1772 Reviewed by Joseph Pecoraro.
1774 If a microtask event (e.g. `ObserverCallback`) is contained within a `EvaluatedScript`
1775 event, move that microtask event to be a sibling of the `EvaluateScript`, subtracting the
1776 microtask's time taken from the `EvaluateScript`'s time. If there are no other children
1777 after this move, then remove the `EvaluateScript` altogether.
1779 * UserInterface/Controllers/TimelineManager.js:
1780 (WI.TimelineManager.prototype.eventRecorded.fixMicrotaskPlacement): Added.
1781 (WI.TimelineManager.prototype.eventRecorded):
1782 (WI.TimelineManager.prototype._mergeScriptProfileRecords):
1784 2019-01-23 Joseph Pecoraro <pecoraro@apple.com>
1786 Web Inspector: Network Waterfall column should redraw when adding/removing new columns
1787 https://bugs.webkit.org/show_bug.cgi?id=193696
1788 <rdar://problem/47464149>
1790 Reviewed by Devin Rousso.
1792 * UserInterface/Views/TableColumn.js:
1793 (WI.TableColumn.prototype.get needsReloadOnResize):
1794 * UserInterface/Views/NetworkTableContentView.js:
1795 (WI.NetworkTableContentView.prototype.initialLayout):
1796 Mark the waterfall column as sensitive to any resizes.
1798 * UserInterface/Views/Table.js:
1799 (WI.Table.prototype.showColumn):
1800 (WI.Table.prototype.hideColumn):
1801 Update column widths and reload any columns that may be sensitive to resizes.
1803 2019-01-22 Devin Rousso <drousso@apple.com>
1805 Web Inspector: InspectorInstrumentation::willEvaluateScript should include column number
1806 https://bugs.webkit.org/show_bug.cgi?id=116191
1807 <rdar://problem/13905910>
1809 Reviewed by Joseph Pecoraro.
1811 * UserInterface/Controllers/TimelineManager.js:
1812 (WI.TimelineManager.prototype._processRecord):
1814 2019-01-22 Devin Rousso <drousso@apple.com>
1816 Web Inspector: expose Audit and Recording versions to the frontend
1817 https://bugs.webkit.org/show_bug.cgi?id=193262
1818 <rdar://problem/47130684>
1820 Reviewed by Joseph Pecoraro.
1822 * UserInterface/Protocol/InspectorBackend.js:
1823 (InspectorBackendClass.prototype.registerVersion): Added.
1825 * UserInterface/Models/AuditTestCase.js:
1826 * UserInterface/Models/Recording.js:
1827 (WI.Recording.fromPayload):
1828 Add Interface version values.
1830 2019-01-22 Nikita Vasilyev <nvasilyev@apple.com>
1832 Web Inspector: Styles: refactor properties/allProperties/visibleProperties/allVisibleProperties
1833 https://bugs.webkit.org/show_bug.cgi?id=193615
1835 Reviewed by Devin Rousso.
1837 Remove unused visibleProperties.
1840 - properties to enabledProperties;
1841 - allProperties to properties;
1842 - allVisibleProperties to visibleProperties.
1844 * UserInterface/Models/CSSProperty.js:
1845 (WI.CSSProperty.prototype._prependSemicolonIfNeeded):
1847 * UserInterface/Models/CSSStyleDeclaration.js:
1848 (WI.CSSStyleDeclaration):
1849 (WI.CSSStyleDeclaration.prototype.get enabledProperties):
1850 (WI.CSSStyleDeclaration.prototype.get properties):
1851 (WI.CSSStyleDeclaration.prototype.propertyForName):
1852 (WI.CSSStyleDeclaration.prototype.newBlankProperty):
1853 (WI.CSSStyleDeclaration.prototype.shiftPropertiesAfter):
1854 (WI.CSSStyleDeclaration.prototype._rangeAfterPropertyAtIndex):
1855 * UserInterface/Models/DOMNodeStyles.js:
1856 (WI.DOMNodeStyles.prototype._parseStylePropertyPayload):
1857 (WI.DOMNodeStyles.prototype._markOverriddenProperties):
1858 (WI.DOMNodeStyles.prototype._associateRelatedProperties):
1859 (WI.DOMNodeStyles.prototype._isPropertyFoundInMatchingRules):
1861 * UserInterface/Views/BoxModelDetailsSectionRow.js:
1862 (WI.BoxModelDetailsSectionRow.prototype._updateMetrics):
1863 * UserInterface/Views/ComputedStyleDetailsPanel.js:
1864 (WI.ComputedStyleDetailsPanel.prototype._computePropertyTraces):
1865 * UserInterface/Views/ComputedStyleSection.js:
1866 (WI.ComputedStyleSection.prototype.get propertiesToRender):
1867 * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
1868 (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.get propertiesToRender):
1869 * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
1870 (WI.SpreadsheetRulesStyleDetailsPanel.prototype.layout):
1871 * UserInterface/Views/SpreadsheetStyleProperty.js:
1872 (WI.SpreadsheetStyleProperty.prototype.updateStatus):
1874 2019-01-22 Joseph Pecoraro <pecoraro@apple.com>
1876 Web Inspector: Network Table appears broken after filter - rows look collapsed
1877 https://bugs.webkit.org/show_bug.cgi?id=192730
1878 <rdar://problem/46853158>
1880 Reviewed by Devin Rousso.
1882 * UserInterface/Views/Table.js:
1883 (WI.Table.prototype._applyColumnWidthsToColumnsIfNeeded):
1884 Affect the filler row like the other applyColumnWidths calls since this
1885 now may be the initial call to size visible columns.
1887 2019-01-22 Devin Rousso <drousso@apple.com>
1889 Web Inspector: Audit: use plural strings for Passed, Failed, and Unsupported
1890 https://bugs.webkit.org/show_bug.cgi?id=193675
1891 <rdar://problem/46628680>
1893 Reviewed by Joseph Pecoraro.
1895 * UserInterface/Views/AuditTestGroupContentView.js:
1896 (WI.AuditTestGroupContentView.prototype.layout):
1898 * Localizations/en.lproj/localizedStrings.js:
1900 2019-01-18 Jer Noble <jer.noble@apple.com>
1902 SDK_VARIANT build destinations should be separate from non-SDK_VARIANT builds
1903 https://bugs.webkit.org/show_bug.cgi?id=189553
1905 Reviewed by Tim Horton.
1907 * Configurations/Base.xcconfig:
1908 * Configurations/SDKVariant.xcconfig: Added.
1910 2019-01-18 Devin Rousso <drousso@apple.com>
1912 Web Inspector: Uncaught Exception: TypeError: undefined is not an object (evaluating 'resource.finished')
1913 https://bugs.webkit.org/show_bug.cgi?id=193589
1915 Reviewed by Joseph Pecoraro.
1917 * UserInterface/Views/NetworkTableContentView.js:
1918 (WI.NetworkTableContentView.prototype.get supportsSave):
1919 (WI.NetworkTableContentView.prototype._HARResources):
1921 2019-01-17 Truitt Savell <tsavell@apple.com>
1923 Unreviewed, rolling out r240124.
1925 This commit broke an internal build.
1929 "SDK_VARIANT build destinations should be separate from non-
1931 https://bugs.webkit.org/show_bug.cgi?id=189553
1932 https://trac.webkit.org/changeset/240124
1934 2019-01-17 Jer Noble <jer.noble@apple.com>
1936 SDK_VARIANT build destinations should be separate from non-SDK_VARIANT builds
1937 https://bugs.webkit.org/show_bug.cgi?id=189553
1939 Reviewed by Tim Horton.
1941 * Configurations/Base.xcconfig:
1942 * Configurations/SDKVariant.xcconfig: Added.
1944 2019-01-16 Matt Baker <mattbaker@apple.com>
1946 Web Inspector: Fix TreeOutline TypeError:​ this._indexesForSubtree is not a function
1947 https://bugs.webkit.org/show_bug.cgi?id=193501
1948 <rdar://problem/47323967>
1950 Reviewed by Joseph Pecoraro.
1952 * UserInterface/Views/TreeOutline.js:
1953 (WI.TreeOutline.prototype.removeChildAtIndex):
1955 2019-01-15 Devin Rousso <drousso@apple.com>
1957 Web Inspector: Audit: create new IDL type for exposing special functionality in test context
1958 https://bugs.webkit.org/show_bug.cgi?id=193149
1959 <rdar://problem/46801218>
1961 Reviewed by Joseph Pecoraro.
1963 Add `AuditAgent` getters and plumbing.
1965 * UserInterface/Protocol/Target.js:
1966 (WI.Target.prototype.get AuditAgent): Added.
1968 * UserInterface/Models/AuditTestCase.js:
1969 (WI.AuditTestCase.prototype.async run):
1971 * UserInterface/Controllers/AuditManager.js:
1972 (WI.AuditManager.prototype.async start):
1976 2019-01-14 Devin Rousso <drousso@apple.com>
1978 Web Inspector: Event breakpoints: typing uppercase "DOM" doesn't show completions for events that start with "DOM"
1979 https://bugs.webkit.org/show_bug.cgi?id=193384
1981 Reviewed by Joseph Pecoraro.
1983 * UserInterface/Views/EventBreakpointPopover.js:
1984 (WI.EventBreakpointPopover.prototype.show):
1986 2019-01-14 Devin Rousso <drousso@apple.com>
1988 Web Inspector: Event breakpoints: text field and completion popover fonts should match
1989 https://bugs.webkit.org/show_bug.cgi?id=193249
1991 Reviewed by Matt Baker.
1993 * UserInterface/Views/EventBreakpointPopover.css:
1994 (.popover .event-breakpoint-content > .event-type > input): Added.
1995 (.popover .event-breakpoint-content > .event-type > input::placeholder): Added.
1996 * UserInterface/Views/EventBreakpointPopover.js:
1997 (WI.EventBreakpointPopover.prototype.show):
1998 (WI.EventBreakpointPopover.prototype._showSuggestionsView):
1999 Subtract the <input> border and padding from the bounds position so the <input> text lines
2000 up with the `WI.CompletionSuggestionsView` text.
2002 * UserInterface/Views/CompletionSuggestionsView.js:
2003 (WI.CompletionSuggestionsView):
2004 Drive-by: force `dir=ltr` to match the `text-align: left;` CSS styling.
2006 2019-01-14 Nikita Vasilyev <nvasilyev@apple.com>
2008 Web Inspector: Styles: pressing Down key on empty value field shouldn't discard completion popover
2009 https://bugs.webkit.org/show_bug.cgi?id=193098
2010 <rdar://problem/47016036>
2012 Reviewed by Devin Rousso.
2014 Hide CompletionSuggestionsView when SpreadsheetTextField moves, e.g. by scrolling or resizing the sidebar.
2015 Update CompletionSuggestionsView position after pressing Up or Down key, because SpreadsheetTextField may
2016 move from wrapping text.
2018 * UserInterface/Views/CompletionSuggestionsView.js:
2019 (WI.CompletionSuggestionsView.prototype.hide):
2020 (WI.CompletionSuggestionsView.prototype.show):
2021 (WI.CompletionSuggestionsView.prototype.showUntilAnchorMoves): Removed.
2022 (WI.CompletionSuggestionsView.prototype.hideWhenElementMoves): Added.
2023 (WI.CompletionSuggestionsView.prototype._stopMoveTimer): Added.
2024 (WI.CompletionSuggestionsView):
2026 * UserInterface/Views/SpreadsheetTextField.js:
2027 (WI.SpreadsheetTextField.prototype.set suggestionHint):
2028 (WI.SpreadsheetTextField.prototype.completionSuggestionsSelectedCompletion):
2029 (WI.SpreadsheetTextField.prototype._handleKeyDownForSuggestionView):
2030 (WI.SpreadsheetTextField.prototype._updateCompletions):
2031 (WI.SpreadsheetTextField.prototype._showSuggestionsView): Added.
2033 (WI.SpreadsheetTextField.prototype._reAttachSuggestionHint):
2034 Drive-by: abstract out repeating code into a private method.
2036 2019-01-14 Devin Rousso <drousso@apple.com>
2038 Web Inspector: Settings: group titles should vertically align with the first editor
2039 https://bugs.webkit.org/show_bug.cgi?id=193391
2041 Reviewed by Dean Jackson.
2043 * UserInterface/Views/SettingsTabContentView.css:
2044 (.content-view.settings > .settings-view > .container):
2045 (.content-view.settings > .settings-view > .container > .editor-group > .editor): Added.
2046 (.content-view.settings > .settings-view > .container > .editor-group > .editor:first-child > *): Added.
2047 (.content-view.settings > .settings-view > .container > .editor-group > .editor select):
2048 (.content-view.settings > .settings-view > .container > .editor-group > .editor input[type="number"]):
2050 2019-01-11 Matt Baker <mattbaker@apple.com>
2052 Web Inspector: REGRESSION: deleting an audit puts selection in a selected but invisible state
2053 https://bugs.webkit.org/show_bug.cgi?id=192917
2054 <rdar://problem/46875285>
2056 Reviewed by Devin Rousso.
2058 SelectionController should not be notified of removed children until the
2059 child items have been removed from the TreeOutline. Doing so at this stage
2060 is unsafe, since this method checks `this.selectedTreeElement`, which could
2061 return the adjusted index from the SelectionController before anything has
2062 actually been removed from the TreeOutline.
2064 The number of calls to SelectionController.prototype.didRemoveItems is also
2065 reduced somewhat, since we're no longer calling it for every TreeElement.
2067 * UserInterface/Views/TreeOutline.js:
2068 (WI.TreeOutline.prototype.removeChildAtIndex):
2069 (WI.TreeOutline.prototype.removeChildren):
2070 (WI.TreeOutline.prototype._forgetTreeElement):
2071 (WI.TreeOutline.prototype._indexesForSubtree): Added.
2073 2019-01-10 Devin Rousso <drousso@apple.com>
2075 Web Inspector: Audit: allow audits to be enabled/disabled
2076 https://bugs.webkit.org/show_bug.cgi?id=192210
2077 <rdar://problem/46423583>
2079 Reviewed by Joseph Pecoraro.
2081 * UserInterface/Controllers/AuditManager.js:
2082 (WI.AuditManager.prototype.get editing): Added.
2083 (WI.AuditManager.prototype.set editing): Added.
2084 (WI.AuditManager.prototype.stop):
2085 (WI.AuditManager.prototype.addDefaultTestsIfNeeded):
2086 Since default audits aren't stored, keep a list of disabled default tests in a `WI.Setting`.
2088 * UserInterface/Models/AuditTestBase.js:
2090 (WI.AuditTestBase.prototype.get disabled): Added.
2091 (WI.AuditTestBase.prototype.set disabled): Added.
2092 (WI.AuditTestBase.prototype.async start):
2093 (WI.AuditTestBase.prototype.stop):
2094 (WI.AuditTestBase.toJSON):
2096 * UserInterface/Models/AuditTestCase.js:
2098 (WI.AuditTestCase.async fromPayload):
2099 (WI.AuditTestCase.prototype.toJSON):
2101 * UserInterface/Models/AuditTestGroup.js:
2102 (WI.AuditTestGroup):
2103 (WI.AuditTestGroup.async fromPayload):
2104 (WI.AuditTestGroup.prototype.get disabled): Added.
2105 (WI.AuditTestGroup.prototype.set disabled): Added.
2106 (WI.AuditTestGroup.prototype.toJSON):
2107 (WI.AuditTestGroup.prototype.async run):
2108 (WI.AuditTestGroup.prototype._handleTestDisabledChanged): Added.
2109 (WI.AuditTestGroup.prototype._handleTestProgress):
2110 Propagate `disabled` changes to all sub-tests, unless the change was caused by one of the
2111 sub-tests, in which case we are now in an intermediate state.
2113 * UserInterface/Views/AuditNavigationSidebarPanel.js:
2114 (WI.AuditNavigationSidebarPanel):
2115 (WI.AuditNavigationSidebarPanel.prototype.showDefaultContentView):
2116 (WI.AuditNavigationSidebarPanel.prototype.initialLayout):
2117 (WI.AuditNavigationSidebarPanel.prototype.hasCustomFilters): Added.
2118 (WI.AuditNavigationSidebarPanel.prototype.matchTreeElementAgainstCustomFilters): Added.
2119 (WI.AuditNavigationSidebarPanel.prototype._addTest):
2120 (WI.AuditNavigationSidebarPanel.prototype._addResult):
2121 (WI.AuditNavigationSidebarPanel.prototype._updateStartStopButtonNavigationItemState):
2122 (WI.AuditNavigationSidebarPanel.prototype._updateEditButtonNavigationItemState): Added.
2123 (WI.AuditNavigationSidebarPanel.prototype._handleAuditManagerEditingChanged): Added.
2124 (WI.AuditNavigationSidebarPanel.prototype._handleAuditTestRemoved):
2125 (WI.AuditNavigationSidebarPanel.prototype._handleAuditTestScheduled):
2126 (WI.AuditNavigationSidebarPanel.prototype._treeSelectionDidChange):
2127 (WI.AuditNavigationSidebarPanel.prototype._handleEditButtonNavigationItemClicked): Added.
2128 * UserInterface/Views/AuditNavigationSidebarPanel.css:
2129 (.sidebar > .panel.navigation.audit > .content):
2130 (.sidebar > .panel.navigation.audit > .content > .tree-outline): Added.
2131 (.sidebar > .panel.navigation.audit > .content .edit-audits:not(.disabled):active): Added.
2132 (.sidebar > .panel.navigation.audit > .content .edit-audits:not(.disabled).activated): Added.
2133 (.sidebar > .panel.navigation.audit > .content .edit-audits:not(.disabled).activated:active): Added.
2134 (.sidebar > .panel.navigation.audit > .content .edit-audits.disabled): Added.
2135 (.finish-editing-audits-placeholder.message-text-view .navigation-item-help .navigation-bar): Added.
2136 Leverage custom filters to ensure that disabled audits arent shown when not editing and that
2137 result tree elements aren't shown while editing.
2139 * UserInterface/Views/AuditTestGroupContentView.js:
2140 (WI.AuditTestGroupContentView.prototype.shown):
2142 * UserInterface/Views/AuditTreeElement.js:
2143 (WI.AuditTreeElement.prototype.onattach):
2144 (WI.AuditTreeElement.prototype.canSelectOnMouseDown): Added.
2145 (WI.AuditTreeElement.prototype._updateTestGroupDisabled): Added.
2146 (WI.AuditTreeElement.prototype._handleTestDisabledChanged): Added.
2147 (WI.AuditTreeElement.prototype._handleManagerEditingChanged): Added.
2148 * UserInterface/Views/AuditTreeElement.css:
2149 (.tree-outline .item.audit > .status:not(:hover) > img.show-on-hover, .tree-outline .item.audit.test-group.expanded:not(.editing-audits) > .status:not(:hover)): Added.
2150 (.tree-outline .item.audit.manager-active > .status > img.show-on-hover, .tree-outline .item.audit.test-group.expanded:not(.editing-audits) > .status:hover > :not(img), .tree-outline .item.audit.test-group-result.expanded > .status): Added.
2151 (.tree-outline .item.audit > .status:not(:hover) > img.show-on-hover, .tree-outline .item.audit.test-group.expanded > .status:not(:hover)): Deleted.
2152 (.tree-outline .item.audit.manager-active > .status > img.show-on-hover, .tree-outline .item.audit.test-group.expanded > .status:hover > :not(img), .tree-outline .item.audit.test-group-result.expanded > .status): Deleted.
2153 Prevent selection and running when editing.
2155 * UserInterface/Views/TreeOutline.css:
2156 (.tree-outline .children.expanded:not([hidden])): Added.
2157 (.tree-outline .children.expanded): Deleted.
2159 * UserInterface/Base/ObjectStore.js:
2160 (WI.ObjectStore._open):
2161 Batch operations together to help avoid multiple simultaneous `indexedDB.open` calls. This
2162 should also help preserve the order of operations, as once the database is open, operations
2163 are executed in the order they were enqueued.
2165 (WI.ObjectStore.prototype.async.addObject):
2166 Pass a unique `Symbol` to the `toJSON` call on the given object so that the object can save
2167 additional values that wouldn't normally be saved. This doesn't conflict with normal usage
2168 of `toJSON` (e.g. `JSON.stringify`) because that case also passes in a value:
2169 - `undefined`, if it was called directly on the object
2170 - the key for this object in the containing object
2171 - the index of this object in the containing array
2172 In any case, the value can never equal the unique `Symbol`, so it's guaranteed that the code
2173 will only run for `WI.ObjectStore` operations.
2175 (WI.ObjectStore.prototype.async.clear): Added.
2177 * Localizations/en.lproj/localizedStrings.js:
2179 2019-01-09 Devin Rousso <drousso@apple.com>
2181 Web Inspector: Protocol Logging: log messages as objects if inspector^2 is open
2182 https://bugs.webkit.org/show_bug.cgi?id=193284
2184 Reviewed by Joseph Pecoraro.
2186 If inspector^2 is closed, stringify all messages.
2187 If inspector^2 is open, log each message JSON object without modifying it.
2189 * UserInterface/Protocol/LoggingProtocolTracer.js:
2190 (WI.LoggingProtocolTracer.prototype._processEntry):
2192 2019-01-09 Nikita Vasilyev <nvasilyev@apple.com>
2194 Web Inspector: Styles: clicking on property that soon to be discarded shouldn't start selection
2195 https://bugs.webkit.org/show_bug.cgi?id=193218
2196 <rdar://problem/47098303>
2198 Reviewed by Devin Rousso.
2200 * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
2201 (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleMouseDown):
2202 A style property may get removed on blur event, so propertyElement may get removed from the DOM right when mousedown event happens.
2204 (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleWindowClick):
2205 (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleClick):
2206 (WI.SpreadsheetCSSStyleDeclarationSection.prototype._stopSelection):
2208 2019-01-08 Nikita Vasilyev <nvasilyev@apple.com>
2210 Web Inspector: Styles: Undo reverts all changes at once
2211 https://bugs.webkit.org/show_bug.cgi?id=177676
2212 <rdar://problem/34745031>
2214 Reviewed by Devin Rousso.
2216 Command-Z used to revert all changes at once because Web Inspector never
2217 set any history checkpoints in the style editor.
2219 * UserInterface/Views/SpreadsheetStyleProperty.js:
2220 (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidBlur):
2221 * UserInterface/Views/SpreadsheetTextField.js:
2222 (WI.SpreadsheetTextField.prototype._handleBlur):
2224 2019-01-08 Nikita Vasilyev <nvasilyev@apple.com>
2226 Web Inspector: Use prefers-color-scheme instead of prefers-dark-interface
2227 https://bugs.webkit.org/show_bug.cgi?id=193265
2229 Reviewed by Timothy Hatcher.
2231 * UserInterface/Views/AuditTestContentView.css:
2232 (@media (prefers-color-scheme: dark)):
2233 * UserInterface/Views/AuditTestGroupContentView.css:
2234 (@media (prefers-color-scheme: dark)):
2235 * UserInterface/Views/BezierEditor.css:
2236 (@media (prefers-color-scheme: dark)):
2237 * UserInterface/Views/BoxModelDetailsSectionRow.css:
2238 (@media (prefers-color-scheme: dark)):
2239 * UserInterface/Views/BreakpointActionView.css:
2240 (@media (prefers-color-scheme: dark)):
2241 * UserInterface/Views/BreakpointPopoverController.css:
2242 (@media (prefers-color-scheme: dark)):
2243 * UserInterface/Views/ButtonNavigationItem.css:
2244 (@media (prefers-color-scheme: dark)):
2245 * UserInterface/Views/ButtonToolbarItem.css:
2246 (@media (prefers-color-scheme: dark)):
2247 * UserInterface/Views/CallFrameView.css:
2248 (@media (prefers-color-scheme: dark)):
2249 * UserInterface/Views/CanvasContentView.css:
2250 (@media (prefers-color-scheme: dark)):
2251 * UserInterface/Views/CanvasOverviewContentView.css:
2252 (@media (prefers-color-scheme: dark)):
2253 * UserInterface/Views/CanvasSidebarPanel.css:
2254 (@media (prefers-color-scheme: dark)):
2255 * UserInterface/Views/CanvasTabContentView.css:
2256 (@media (prefers-color-scheme: dark)):
2257 * UserInterface/Views/CodeMirrorOverrides.css:
2258 (@media (prefers-color-scheme: dark)):
2259 * UserInterface/Views/CompletionSuggestionsView.css:
2260 (@media (prefers-color-scheme: dark)):
2261 * UserInterface/Views/ComputedStyleDetailsPanel.css:
2262 (@media (prefers-color-scheme: dark)):
2263 * UserInterface/Views/ComputedStyleSection.css:
2264 (@media (prefers-color-scheme: dark)):
2265 * UserInterface/Views/ConsoleMessageView.css:
2266 (@media (prefers-color-scheme: dark)):
2267 * UserInterface/Views/ConsolePrompt.css:
2268 (@media (prefers-color-scheme: dark)):
2269 * UserInterface/Views/DOMNodeDetailsSidebarPanel.css:
2270 (@media (prefers-color-scheme: dark)):
2271 * UserInterface/Views/DOMTreeOutline.css:
2272 (@media (prefers-color-scheme: dark)):
2273 * UserInterface/Views/DataGrid.css:
2274 (@media (prefers-color-scheme: dark)):
2275 * UserInterface/Views/DebuggerDashboardView.css:
2276 (@media (prefers-color-scheme: dark)):
2277 * UserInterface/Views/DebuggerSidebarPanel.css:
2278 (@media (prefers-color-scheme: dark)):
2279 * UserInterface/Views/DefaultDashboardView.css:
2280 (@media (prefers-color-scheme: dark)):
2281 * UserInterface/Views/DetailsSection.css:
2282 (@media (prefers-color-scheme: dark)):
2283 * UserInterface/Views/DividerNavigationItem.css:
2284 (@media (prefers-color-scheme: dark)):
2285 * UserInterface/Views/Editing.css:
2286 (@media (prefers-color-scheme: dark)):
2287 * UserInterface/Views/FindBanner.css:
2288 (@media (prefers-color-scheme: dark)):
2289 * UserInterface/Views/FontResourceContentView.css:
2290 (@media (prefers-color-scheme: dark)):
2291 * UserInterface/Views/FormattedValue.css:
2292 (@media (prefers-color-scheme: dark)):
2293 * UserInterface/Views/GeneralStyleDetailsSidebarPanel.css:
2294 (@media (prefers-color-scheme: dark)):
2295 * UserInterface/Views/HoverMenu.css:
2296 (@media (prefers-color-scheme: dark)):
2297 * UserInterface/Views/ImageResourceContentView.css:
2298 (@media (prefers-color-scheme: dark)):
2299 * UserInterface/Views/IndexedDatabaseObjectStoreContentView.css:
2300 (@media (prefers-color-scheme: dark)):
2301 * UserInterface/Views/LogContentView.css:
2302 (@media (prefers-color-scheme: dark)):
2304 * UserInterface/Views/Main.css:
2307 (@media (prefers-color-scheme: dark)):
2308 * UserInterface/Views/NetworkDetailView.css:
2309 (@media (prefers-color-scheme: dark)):
2310 * UserInterface/Views/NetworkTableContentView.css:
2311 (@media (prefers-color-scheme: dark)):
2312 * UserInterface/Views/NewTabContentView.css:
2313 (@media (prefers-color-scheme: dark)):
2314 * UserInterface/Views/ObjectPreviewView.css:
2315 (@media (prefers-color-scheme: dark)):
2316 * UserInterface/Views/ObjectTreePropertyTreeElement.css:
2317 (@media (prefers-color-scheme: dark)):
2318 * UserInterface/Views/OpenResourceDialog.css:
2319 (@media (prefers-color-scheme: dark)):
2320 * UserInterface/Views/ProgressView.css:
2321 (@media (prefers-color-scheme: dark)):
2322 * UserInterface/Views/QuickConsole.css:
2323 (@media (prefers-color-scheme: dark)):
2324 * UserInterface/Views/RecordingActionTreeElement.css:
2325 (@media (prefers-color-scheme: dark)):
2326 * UserInterface/Views/RecordingContentView.css:
2327 (@media (prefers-color-scheme: dark)):
2328 * UserInterface/Views/RecordingStateDetailsSidebarPanel.css:
2329 (@media (prefers-color-scheme: dark)):
2330 * UserInterface/Views/ResourceSecurityContentView.css:
2331 (@media (prefers-color-scheme: dark)):
2332 * UserInterface/Views/ResourceSizesContentView.css:
2333 (@media (prefers-color-scheme: dark)):
2334 * UserInterface/Views/ResourceTimingBreakdownView.css:
2335 (@media (prefers-color-scheme: dark)):
2336 * UserInterface/Views/ScopeBar.css:
2337 (@media (prefers-color-scheme: dark)):
2338 * UserInterface/Views/ScopeChainDetailsSidebarPanel.css:
2339 (@media (prefers-color-scheme: dark)):
2340 * UserInterface/Views/SearchBar.css:
2341 (@media (prefers-color-scheme: dark)):
2342 * UserInterface/Views/SearchSidebarPanel.css:
2343 (@media (prefers-color-scheme: dark)):
2344 * UserInterface/Views/SettingsTabContentView.css:
2345 (@media (prefers-color-scheme: dark)):
2346 * UserInterface/Views/ShaderProgramContentView.css:
2347 (@media (prefers-color-scheme: dark)):
2348 * UserInterface/Views/ShaderProgramTreeElement.css:
2349 (@media (prefers-color-scheme: dark)):
2350 * UserInterface/Views/SourceCodeTextEditor.css:
2351 (@media (prefers-color-scheme: dark)):
2352 * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
2353 (@media (prefers-color-scheme: dark)):
2354 * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:
2355 (@media (prefers-color-scheme: dark)):
2356 * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.css:
2357 (@media (prefers-color-scheme: dark)):
2358 * UserInterface/Views/SyntaxHighlightingDefaultTheme.css:
2359 (@media (prefers-color-scheme: dark)):
2360 * UserInterface/Views/TabBar.css:
2361 (@media (prefers-color-scheme: dark)):
2362 * UserInterface/Views/Table.css:
2363 (@media (prefers-color-scheme: dark)):
2364 * UserInterface/Views/TextEditor.css:
2365 (@media (prefers-color-scheme: dark)):
2366 * UserInterface/Views/TimelineDataGrid.css:
2367 (@media (prefers-color-scheme: dark)):
2368 * UserInterface/Views/TimelineIcons.css:
2369 (@media (prefers-color-scheme: dark)):
2370 * UserInterface/Views/TimelineOverview.css:
2371 (@media (prefers-color-scheme: dark)):
2372 * UserInterface/Views/Toolbar.css:
2373 (@media (prefers-color-scheme: dark)):
2374 * UserInterface/Views/TreeOutline.css:
2375 (@media (prefers-color-scheme: dark)):
2376 * UserInterface/Views/URLBreakpointPopover.css:
2377 (@media (prefers-color-scheme: dark)):
2378 * UserInterface/Views/Variables.css:
2379 (@media (prefers-color-scheme: dark)):
2380 * UserInterface/Views/WebSocketContentView.css:
2381 (@media (prefers-color-scheme: dark)):
2383 2019-01-07 Devin Rousso <drousso@apple.com>
2385 Web Inspector: Audit: run arrow shouldn't be visible when running tests
2386 https://bugs.webkit.org/show_bug.cgi?id=192209
2387 <rdar://problem/46423615>
2389 Reviewed by Brian Burg.
2391 * UserInterface/Views/AuditTreeElement.js:
2392 (WI.AuditTreeElement.prototype.onattach):
2393 (WI.AuditTreeElement.prototype.ondetach):
2394 (WI.AuditTreeElement.prototype._updateLevel):
2395 (WI.AuditTreeElement.prototype._handleAuditManagerTestScheduled): Added.
2396 (WI.AuditTreeElement.prototype._handleAuditManagerTestCompleted): Added.
2397 * UserInterface/Views/AuditTreeElement.css: Added.
2398 (.tree-outline .item.audit:matches(.test-case, .test-group):not(.manager-active) > .status:hover > img): Added.
2399 (.tree-outline .item.audit.manager-active > .status > img.show-on-hover, .tree-outline .item.audit.test-group.expanded > .status:hover > :not(img), .tree-outline .item.audit.test-group-result.expanded > .status): Added.
2400 (.tree-outline .item.audit:matches(.test-case, .test-group) > .status:hover > img): Deleted.
2401 (.tree-outline .item.audit.test-group.expanded > .status:hover > :not(img), .tree-outline .item.audit.test-group-result.expanded > .status): Deleted.
2403 2019-01-07 Devin Rousso <drousso@apple.com>
2405 Web Inspector: extend XHR breakpoints to work with fetch
2406 https://bugs.webkit.org/show_bug.cgi?id=185843
2407 <rdar://problem/40431027>
2409 Reviewed by Matt Baker.
2411 * UserInterface/Controllers/DOMDebuggerManager.js:
2412 (WI.DOMDebuggerManager):
2413 (WI.DOMDebuggerManager.supportsURLBreakpoints): Added.
2414 (WI.DOMDebuggerManager.prototype.get urlBreakpoints): Added.
2415 (WI.DOMDebuggerManager.prototype.urlBreakpointForURL): Added.
2416 (WI.DOMDebuggerManager.prototype.addURLBreakpoint): Added.
2417 (WI.DOMDebuggerManager.prototype.removeURLBreakpoint): Added.
2418 (WI.DOMDebuggerManager.prototype._speculativelyResolveBreakpoints):
2419 (WI.DOMDebuggerManager.prototype._updateURLBreakpoint): Added.
2420 (WI.DOMDebuggerManager.prototype._resolveURLBreakpoint): Added.
2421 (WI.DOMDebuggerManager.prototype._saveURLBreakpoints): Added.
2422 (WI.DOMDebuggerManager.prototype._urlBreakpointDisabledStateDidChange): Added.
2423 (WI.DOMDebuggerManager.prototype.get xhrBreakpoints): Deleted.
2424 (WI.DOMDebuggerManager.prototype.xhrBreakpointForURL): Deleted.
2425 (WI.DOMDebuggerManager.prototype.addXHRBreakpoint): Deleted.
2426 (WI.DOMDebuggerManager.prototype.removeXHRBreakpoint): Deleted.
2427 (WI.DOMDebuggerManager.prototype._updateXHRBreakpoint.breakpointUpdated): Deleted.
2428 (WI.DOMDebuggerManager.prototype._updateXHRBreakpoint): Deleted.
2429 (WI.DOMDebuggerManager.prototype._resolveXHRBreakpoint): Deleted.
2430 (WI.DOMDebuggerManager.prototype._saveXHRBreakpoints): Deleted.
2431 (WI.DOMDebuggerManager.prototype._xhrBreakpointDisabledStateDidChange): Deleted.
2433 * UserInterface/Controllers/DebuggerManager.js:
2434 (WI.DebuggerManager.prototype._pauseReasonFromPayload):
2436 * UserInterface/Views/DebuggerSidebarPanel.js:
2437 (WI.DebuggerSidebarPanel):
2438 (WI.DebuggerSidebarPanel.prototype.willDismissPopover):
2439 (WI.DebuggerSidebarPanel.prototype._addBreakpoint):
2440 (WI.DebuggerSidebarPanel.prototype._treeSelectionDidChange):
2441 (WI.DebuggerSidebarPanel.prototype._addTreeElement):
2442 (WI.DebuggerSidebarPanel.prototype._updatePauseReasonSection):
2443 (WI.DebuggerSidebarPanel.prototype._handleCreateBreakpointClicked):
2445 * UserInterface/Views/NavigationSidebarPanel.js:
2446 (WI.NavigationSidebarPanel.prototype._isTreeElementWithoutRepresentedObject):
2448 * UserInterface/Models/URLBreakpoint.js: Renamed from Source/WebInspectorUI/UserInterface/Models/XHRBreakpoint.js.
2449 * UserInterface/Views/URLBreakpointPopover.css: Renamed from Source/WebInspectorUI/UserInterface/Views/XHRBreakpointPopover.css.
2450 * UserInterface/Views/URLBreakpointPopover.js: Renamed from Source/WebInspectorUI/UserInterface/Views/XHRBreakpointPopover.js.
2451 * UserInterface/Views/URLBreakpointTreeElement.css: Renamed from Source/WebInspectorUI/UserInterface/Views/XHRBreakpointTreeElement.css.
2452 * UserInterface/Views/URLBreakpointTreeElement.js: Renamed from Source/WebInspectorUI/UserInterface/Views/XHRBreakpointTreeElement.js.
2454 * UserInterface/Base/Setting.js:
2455 (WI.Setting.migrateValue): Added.
2457 * UserInterface/Main.html:
2458 * UserInterface/Test.html:
2460 * Localizations/en.lproj/localizedStrings.js:
2462 2019-01-07 Devin Rousso <drousso@apple.com>
2464 Web Inspector: Network: show secure connection details per-request
2465 https://bugs.webkit.org/show_bug.cgi?id=191539
2466 <rdar://problem/45979891>
2468 Reviewed by Joseph Pecoraro.
2470 * UserInterface/Models/Resource.js:
2472 (WI.Resource.prototype.get security): Added.
2473 (WI.Resource.prototype.updateForResponse):
2474 (WI.Resource.prototype.updateWithMetrics):
2475 (WI.Resource.prototype.get responseSecurity): Deleted.
2477 * UserInterface/Views/ResourceSecurityContentView.js:
2478 (WI.ResourceSecurityContentView):
2479 (WI.ResourceSecurityContentView.prototype.initialLayout):
2480 (WI.ResourceSecurityContentView.prototype.layout):
2481 (WI.ResourceSecurityContentView.prototype._refreshConnectionSection): Added.
2482 (WI.ResourceSecurityContentView.prototype._refreshCetificateSection):
2483 (WI.ResourceSecurityContentView.prototype._handleResourceMetricsDidChange): Added.
2484 * UserInterface/Views/ResourceSecurityContentView.css:
2485 (body[dir] .resource-security > section:matches(.connection, .certificate) > .details): Added.
2486 (@media (prefers-dark-interface) body[dir] .resource-security > section:matches(.connection, .certificate) > .details): Added.
2487 (body[dir] .resource-security > section.certificate > .details): Deleted.
2488 (@media (prefers-dark-interface) body[dir] .resource-security > section.certificate > .details): Deleted.
2490 * Localizations/en.lproj/localizedStrings.js:
2492 2019-01-07 Nikita Vasilyev <nvasilyev@apple.com>
2494 Web Inspector: "white" isn't recognized as a color keyword
2495 https://bugs.webkit.org/show_bug.cgi?id=193173
2496 <rdar://problem/47068595>
2498 Reviewed by Joseph Pecoraro.
2500 Attempt to parse "atom" token types as colors.
2502 Display color picker only for color-aware properties. For instance,
2503 display it for "color: white" but not for "-apple-pay-button-style: white".
2505 * UserInterface/Models/CSSKeywordCompletions.js:
2506 (addKeywordsForName):
2507 (WI.CSSKeywordCompletions.forProperty):
2508 (WI.CSSKeywordCompletions.isColorAwareProperty):
2509 * UserInterface/Views/SpreadsheetStyleProperty.js:
2510 (WI.SpreadsheetStyleProperty.prototype._renderValue):
2511 (WI.SpreadsheetStyleProperty.prototype._addColorTokens):
2513 2019-01-04 Joseph Pecoraro <pecoraro@apple.com>
2515 Web Inspector: subclasses of WI.ClusterContentView don't save/restore content views after the initial view
2516 https://bugs.webkit.org/show_bug.cgi?id=192451
2517 <rdar://problem/46800958>
2519 Reviewed by Devin Rousso.
2521 * UserInterface/Models/BackForwardEntry.js:
2522 (WI.BackForwardEntry.prototype.prepareToHide):
2523 * UserInterface/Views/ClusterContentView.js:
2524 (WI.ClusterContentView.prototype.get shouldSaveStateOnHide):
2525 * UserInterface/Views/ContentView.js:
2526 (WI.ContentView.prototype.get shouldSaveStateOnHide):
2527 Allow ClusterContentViews to save its state whenever its hidden,
2528 this means it can be properly restored to the last state it had
2529 instead of the initial state it was shown with.
2531 2019-01-04 Devin Rousso <drousso@apple.com>
2533 Web Inspector: Audit: disable breakpoints when running Audit
2534 https://bugs.webkit.org/show_bug.cgi?id=193158
2535 <rdar://problem/47057083>
2537 Reviewed by Joseph Pecoraro.
2539 * UserInterface/Controllers/DebuggerManager.js:
2540 (WI.DebuggerManager):
2541 (WI.DebuggerManager.prototype._startDisablingBreakpointsTemporarily):
2542 (WI.DebuggerManager.prototype._stopDisablingBreakpointsTemporarily):
2543 (WI.DebuggerManager.prototype._handleAuditManagerTestScheduled): Added.
2544 (WI.DebuggerManager.prototype._handleAuditManagerTestCompleted): Added.
2546 * UserInterface/Views/DebuggerSidebarPanel.js:
2547 (WI.DebuggerSidebarPanel.prototype._timelineCapturingWillStart):
2548 (WI.DebuggerSidebarPanel.prototype._timelineCapturingStopped):
2549 (WI.DebuggerSidebarPanel.prototype._handleAuditManagerTestScheduled): Added.
2550 (WI.DebuggerSidebarPanel.prototype._handleAuditManagerTestCompleted): Added.
2551 (WI.DebuggerSidebarPanel.prototype._updateBreakpointsDisabledBanner):
2552 * UserInterface/Views/DebuggerSidebarPanel.css:
2553 (.sidebar > .panel.navigation.debugger .warning-banner + .warning-banner): Added.
2555 * UserInterface/Base/Main.js:
2557 * UserInterface/Test/Test.js:
2559 Move `WI.auditManager` higher in the managers list so that it can be used in
2560 `WI.DebuggerManager`'s constructor.
2562 * Localizations/en.lproj/localizedStrings.js:
2564 2019-01-04 Joseph Pecoraro <pecoraro@apple.com>
2566 Web Inspector: Add a Setting Toggle for Source Maps
2567 https://bugs.webkit.org/show_bug.cgi?id=193148
2569 Reviewed by Devin Rousso.
2571 * UserInterface/Controllers/NetworkManager.js:
2572 (WI.NetworkManager.prototype.downloadSourceMap):
2573 Don't download source maps if the setting is disabled.
2575 * UserInterface/Base/Setting.js:
2576 * UserInterface/Views/SettingsTabContentView.js:
2577 (WI.SettingsTabContentView.prototype._createGeneralSettingsView):
2578 Settings toggle for source maps. Enabled by default.
2580 * Localizations/en.lproj/localizedStrings.js:
2582 2019-01-04 Joseph Pecoraro <pecoraro@apple.com>
2584 Web Inspector: Include `globalThis` in default JavaScript completions
2585 https://bugs.webkit.org/show_bug.cgi?id=193147
2587 Reviewed by Devin Rousso.
2589 * UserInterface/Controllers/CodeMirrorCompletionController.js:
2590 Add `globalThis` which is a new global value.
2592 2019-01-03 Devin Rousso <drousso@apple.com>
2594 Web Inspector: conic-gradient color picker doesn't accurately show color when saturation value is not 100%
2595 https://bugs.webkit.org/show_bug.cgi?id=192729
2596 <rdar://problem/46746815>
2598 Reviewed by Joseph Pecoraro.
2600 Rework `WI.ColorWheel` to use similar canvas drawing logic as `WI.LegacyColorWheel` so that
2601 it's able to adjust the saturation value as the pixels gets closer to the center.
2603 * UserInterface/Models/Color.js:
2604 (WI.Color.rgb2hsl): Added.
2605 (WI.Color.hsl2rgb): Added.
2606 (WI.Color.cmyk2rgb):
2607 (WI.Color.prototype.isKeyword):
2608 (WI.Color.prototype._toRGBString):
2609 (WI.Color.prototype._toRGBAString):
2610 (WI.Color.prototype._toHSLString):
2611 (WI.Color.prototype._toHSLAString):
2612 (WI.Color.prototype._rgbaToHSLA):
2613 (WI.Color.prototype._hslaToRGBA):
2614 (WI.Color.rgb2hsv): Deleted.
2615 (WI.Color.hsv2rgb): Deleted.
2616 (WI.Color.prototype._rgbToHSL): Deleted.
2617 (WI.Color.prototype._hslToRGB): Deleted.
2618 Adjust the conversion functions of `WI.Color` to be more accurate.
2620 * UserInterface/Views/ColorWheel.js:
2622 (WI.ColorWheel.prototype.set dimension):
2623 (WI.ColorWheel.prototype.set brightness):
2624 (WI.ColorWheel.prototype.get tintedColor):
2625 (WI.ColorWheel.prototype.set tintedColor):
2626 (WI.ColorWheel.prototype._updateColorForMouseEvent):
2627 (WI.ColorWheel.prototype._updateCanvas): Added.
2628 (WI.ColorWheel.prototype._updateGradient): Deleted.
2629 * UserInterface/Views/ColorWheel.css:
2630 (.color-wheel > canvas): Added.
2631 (.color-wheel > .gradient): Deleted.
2633 * UserInterface/Views/ColorPicker.js:
2635 (WI.ColorPicker.prototype.set color):
2636 (WI.ColorPicker.prototype.sliderValueDidChange):
2637 (WI.ColorPicker.prototype._updateSliders):
2638 (WI.ColorPicker.prototype._showColorComponentInputs):
2639 (WI.ColorPicker.supportsConicGradient): Deleted.
2641 * UserInterface/Main.html:
2643 * UserInterface/Views/LegacyColorWheel.js: Removed.
2645 2019-01-02 Nikita Vasilyev <nvasilyev@apple.com>
2647 Web Inspector: Styles: selection lost when inspector is blurred
2648 https://bugs.webkit.org/show_bug.cgi?id=192124
2649 <rdar://problem/46800965>
2651 Reviewed by Devin Rousso.
2653 * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
2654 (body:matches(.window-docked-inactive, .window-inactive) .spreadsheet-style-declaration-editor .property.selected):
2655 Selection should be gray when Web Inspector window isn't focused.
2657 * UserInterface/Views/SpreadsheetStyleProperty.js:
2659 2019-01-02 Nikita Vasilyev <nvasilyev@apple.com>
2661 Web Inspector: Styles: it shouldn't be possible to delete read-only properties
2662 https://bugs.webkit.org/show_bug.cgi?id=193099
2663 <rdar://problem/47016335>
2665 Reviewed by Devin Rousso.
2667 * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
2668 (WI.SpreadsheetCSSStyleDeclarationEditor):
2669 Drive-by: Forward Delete should work the same way as Delete (Backspace).
2671 2019-01-02 Devin Rousso <webkit@devinrousso.com>
2673 Web Inspector: Implement `queryObjects` Command Line API
2674 https://bugs.webkit.org/show_bug.cgi?id=176766
2675 <rdar://problem/34890689>
2677 Reviewed by Joseph Pecoraro.
2679 * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
2680 (WI.JavaScriptRuntimeCompletionProvider.completionControllerCompletionsNeeded.receivedPropertyNames):
2681 Add `queryObjects` to the list of command line functions.
2683 2018-12-21 Devin Rousso <drousso@apple.com>
2685 Web Inspector: Styles Redesign: remove unused CSS style icons
2686 https://bugs.webkit.org/show_bug.cgi?id=192999
2687 <rdar://problem/46912094>
2689 Reviewed by Matt Baker.
2691 * UserInterface/Main.html:
2692 * UserInterface/Views/StyleRuleIcons.css: Removed.
2693 * UserInterface/Images/StyleRule.svg: Removed.
2694 * UserInterface/Images/StyleRuleInheritedElement.svg: Removed.
2695 * UserInterface/Images/StyleRulePseudoElement.svg: Removed.
2697 * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
2698 * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:
2700 2018-12-21 Nikita Vasilyev <nvasilyev@apple.com>
2702 Web Inspector: Styles: editing focus lost when inspector is blurred
2703 https://bugs.webkit.org/show_bug.cgi?id=192123
2704 <rdar://problem/46800966>
2706 Reviewed by Devin Rousso.
2708 * UserInterface/Views/SpreadsheetSelectorField.js:
2709 (WI.SpreadsheetSelectorField.prototype._handleBlur):
2710 * UserInterface/Views/SpreadsheetTextField.js:
2711 (WI.SpreadsheetTextField.prototype._handleBlur):
2713 2018-12-21 Devin Rousso <drousso@apple.com>
2715 Web Inspector: Settings: experimental setting editors are misaligned in other locales
2716 https://bugs.webkit.org/show_bug.cgi?id=192971
2717 <rdar://problem/46718451>
2719 Reviewed by Joseph Pecoraro.
2721 * UserInterface/Views/SettingsTabContentView.css:
2722 (.content-view.settings > .settings-view > .container):
2723 (.content-view.settings > .settings-view > .container > .title):
2725 2018-12-21 Devin Rousso <drousso@apple.com>
2727 Web Inspector: update scroll position when revealing a virtualized WI.DataGridNode
2728 https://bugs.webkit.org/show_bug.cgi?id=192992
2729 <rdar://problem/46886427>
2731 Reviewed by Joseph Pecoraro.
2733 When `reveal`ing a `WI.DataGridNode`, if it is not currently in the DOM tree (e.g. it's been
2734 virtualized by it's owner `WI.DataGrid`), we need to scroll to it's position so that it gets
2735 added to the DOM tree before it can be revealed/selected.
2737 * UserInterface/Views/DataGrid.js:
2738 (WI.DataGrid.prototype.layout):
2739 (WI.DataGrid.prototype.updateVisibleRows):
2740 (WI.DataGrid.prototype._updateVisibleRows): Deleted.
2742 * UserInterface/Views/DataGridNode.js:
2743 (WI.DataGridNode.prototype.reveal):
2745 2018-12-20 Nikita Vasilyev <nvasilyev@apple.com>
2747 Web Inspector: Dark Mode: Type profiler popovers have black text on dark background
2748 https://bugs.webkit.org/show_bug.cgi?id=192916
2749 <rdar://problem/46863518>
2751 Reviewed by Devin Rousso.
2753 * UserInterface/Views/SourceCodeTextEditor.css:
2754 (.popover .debugger-popover-content > .body):
2755 * UserInterface/Views/TypeTreeElement.css:
2756 (.item.type-tree-element.prototype):
2757 (.item.type-tree-element.prototype:hover,):
2758 * UserInterface/Views/TypeTreeView.css:
2760 * UserInterface/Views/Variables.css:
2763 2018-12-20 Nikita Vasilyev <nvasilyev@apple.com>
2765 Web Inspector: Styles: Pressing Esc when editing name/value should select entire property
2766 https://bugs.webkit.org/show_bug.cgi?id=192919
2768 Reviewed by Devin Rousso.
2770 - Esc still hides the completion popover.
2771 - Esc still discards changes.
2772 - When there's no completion popover, Esc selects outer scope.
2773 I.e., it goes from editing name/value to selecting the entire property.
2774 - Pressing Esc for newly added properties discards those properties.
2776 * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
2777 (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyRemoved):
2778 (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyDidPressEsc):
2779 * UserInterface/Views/SpreadsheetStyleProperty.js:
2780 (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidPressEsc):
2781 * UserInterface/Views/SpreadsheetTextField.js:
2782 (WI.SpreadsheetTextField.prototype._discardChange):
2783 (WI.SpreadsheetTextField.prototype._handleKeyDown):
2785 2018-12-20 Joseph Pecoraro <pecoraro@apple.com>
2787 Web Inspector: Charles Proxy errors opening har files exported from Safari (invalid startedDateTime)
2788 https://bugs.webkit.org/show_bug.cgi?id=192959
2789 <rdar://problem/46863411>
2791 Reviewed by Brian Burg.
2793 * UserInterface/Views/NetworkTableContentView.js:
2794 (WI.NetworkTableContentView.prototype.tableCellContextMenuClicked):
2795 (WI.NetworkTableContentView.prototype._updateExportButton):
2796 (WI.NetworkTableContentView.prototype._canExportHAR):
2797 Disallow HAR export if we don't have load data, such as the requestSentDate for
2798 the main resource or sub-resources.
2800 (WI.NetworkTableContentView.prototype._HARResources):
2801 Only export resources that have load data.
2803 2018-12-20 Joseph Pecoraro <pecoraro@apple.com>
2805 Web Inspector: Autoformat doesn't work on icloud.com (javascript-packed.js)
2806 https://bugs.webkit.org/show_bug.cgi?id=192946
2807 <rdar://problem/42546126>
2809 Rubber-stamped by Devin Rousso.
2811 * UserInterface/Base/Utilities.js:
2813 (isTextLikelyMinified):
2814 Check the first 2500 and the last 2500 characters whitespace ratio.
2815 If either is below 20% then treat as minified.
2817 2018-12-20 Joseph Pecoraro <pecoraro@apple.com>
2819 ITMLKit Inspector: Elements tab does not show DOM Tree
2820 https://bugs.webkit.org/show_bug.cgi?id=192910
2821 <rdar://problem/46680585>
2823 Reviewed by Brian Burg.
2825 * UserInterface/Protocol/Connection.js:
2826 (InspectorBackend.Connection.prototype._dispatchEvent):
2827 Better logging for errors.
2829 * UserInterface/Base/Main.js:
2830 * UserInterface/Controllers/AppController.js:
2831 (WI.AppController.prototype.activateExtraDomains):
2832 Let Targets get a chance to activate extra domains.
2833 Perform a little more work in these cases.
2835 * UserInterface/Protocol/Target.js:
2837 (WI.Target.prototype.activateExtraDomain):
2838 Expose agents for domains that are active.
2839 Expose agents for extra domains when they are activated.
2841 2018-12-20 Joseph Pecoraro <pecoraro@apple.com>
2843 ITMLKit Inspector: Computed Style Box Model section throws exceptions
2844 https://bugs.webkit.org/show_bug.cgi?id=192911
2845 <rdar://problem/46861112>
2847 Reviewed by Matt Baker.
2849 * UserInterface/Views/BoxModelDetailsSectionRow.js:
2850 (WI.BoxModelDetailsSectionRow.prototype._updateMetrics.createBoxPartElement):
2851 (WI.BoxModelDetailsSectionRow.prototype._updateMetrics.createContentAreaElement):
2852 (WI.BoxModelDetailsSectionRow.prototype._updateMetrics):
2853 ITMLKit doesn't always provide a display/position/width/height etc properties.
2854 Protect against this, and just show an empty message in the box model section
2855 if those properties do not exist.
2857 2018-12-20 Devin Rousso <drousso@apple.com>
2859 Web Inspector: UIString should take an optional key and description to aid localization
2860 https://bugs.webkit.org/show_bug.cgi?id=153962
2861 <rdar://problem/24542505>
2863 Reviewed by Brian Burg.
2865 * UserInterface/Base/LoadLocalizedStrings.js:
2868 * UserInterface/Test/Test.js:
2871 * UserInterface/Views/AuditTestGroupContentView.js:
2872 (WI.AuditTestGroupContentView.prototype.initialLayout):
2874 2018-12-20 Devin Rousso <drousso@apple.com>
2876 Web Inspector: Audits: don't cache default audits
2877 https://bugs.webkit.org/show_bug.cgi?id=192918
2878 <rdar://problem/46626543>
2880 Reviewed by Brian Burg.
2882 Instead of adding the default audits to the "audits" `WI.ObjectStore`, which preserves them
2883 across WebInspector sessions, load them every time WebInspector is opened (unless there are
2884 existing audits) so that the localized strings are able to respond to locale changes.
2886 * UserInterface/Controllers/AuditManager.js:
2887 (WI.AuditManager.prototype.removeTest):
2888 (WI.AuditManager.prototype.addDefaultTestsIfNeeded):
2890 2018-12-20 Devin Rousso <drousso@apple.com>
2892 Web Inspector: Dark Mode: unreadable background color for tables containing object previews
2893 https://bugs.webkit.org/show_bug.cgi?id=192887
2894 <rdar://problem/46855270>
2896 Reviewed by Brian Burg.
2898 * UserInterface/Views/LogContentView.css:
2899 (.console-messages:focus .console-item .data-grid tr.selected td:not(:last-child)): Added.
2900 (@media (prefers-dark-interface) .console-item .data-grid tr.selected): Added.
2901 (@media (prefers-dark-interface) .console-messages:focus .console-item.selected .data-grid tr.selected): Added.
2902 (@media (prefers-dark-interface) .console-messages:focus .console-item .data-grid tr.selected td:not(:last-child)): Added.
2904 * UserInterface/Views/IndexedDatabaseObjectStoreContentView.css:
2905 (.content-view.indexed-database-object-store > .data-grid tr.selected):
2906 (.content-view.indexed-database-object-store > .data-grid:focus tr.selected): Added.
2907 (@media (prefers-dark-interface) .content-view.indexed-database-object-store > .data-grid tr.selected): Added.
2908 (@media (prefers-dark-interface) .content-view.indexed-database-object-store > .data-grid:focus tr.selected): Added.
2909 (@media (prefers-dark-interface) .content-view.indexed-database-object-store > .data-grid:focus tr.selected td:not(:last-child)): Added.
2911 2018-12-19 Devin Rousso <drousso@apple.com>
2913 Web Inspector: Audit: fix descriptions for default tests
2914 https://bugs.webkit.org/show_bug.cgi?id=192764
2915 <rdar://problem/46729437>
2917 Reviewed by Matt Baker.
2919 * UserInterface/Controllers/AuditManager.js:
2920 (WI.AuditManager.prototype.addDefaultTestsIfNeeded):
2922 * Localizations/en.lproj/localizedStrings.js:
2924 2018-12-19 Nikita Vasilyev <nvasilyev@apple.com>
2926 Web Inspector: "E" icon on debugger dashboard is too close to current function name
2927 https://bugs.webkit.org/show_bug.cgi?id=192915
2929 Reviewed by Matt Baker.
2931 * UserInterface/Views/DebuggerDashboardView.css:
2932 (.dashboard.debugger > .location):
2933 (body[dir=ltr] .dashboard.debugger > .location :matches(.function-icon, .event-listener-icon)):
2934 (body[dir=rtl] .dashboard.debugger > .location :matches(.function-icon, .event-listener-icon)):
2935 (.dashboard.debugger > .location .function-icon): Deleted.
2936 (body[dir=ltr] .dashboard.debugger > .location .function-icon): Deleted.
2937 (body[dir=rtl] .dashboard.debugger > .location .function-icon): Deleted.
2939 2018-12-19 Nikita Vasilyev <nvasilyev@apple.com>
2941 Web Inspector: Dark Mode: ThreadTreeElement status icon is hard to see when hovered
2942 https://bugs.webkit.org/show_bug.cgi?id=192097
2943 <rdar://problem/46318421>
2945 Reviewed by Matt Baker.
2947 * UserInterface/Views/ThreadTreeElement.css:
2948 (.tree-outline > .item.thread .status-button.resume):
2949 (.tree-outline > .item.thread .status-button.resume:active):
2951 2018-12-19 Devin Rousso <drousso@apple.com>
2953 Web Inspector: Uncaught Exception: TypeError: null is not an object (evaluating 'effectiveDOMNode.enabledPseudoClasses')
2954 https://bugs.webkit.org/show_bug.cgi?id=192783
2956 Reviewed by Joseph Pecoraro.
2958 * UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
2959 (WI.GeneralStyleDetailsSidebarPanel.prototype._forcedPseudoClassCheckboxChanged):
2960 (WI.GeneralStyleDetailsSidebarPanel.prototype._updatePseudoClassCheckboxes):
2962 2018-12-19 Devin Rousso <drousso@apple.com>
2964 Web Inspector: REGRESSION (r237195): Timelines: selecting a rendering frame row moves the time selection
2965 https://bugs.webkit.org/show_bug.cgi?id=192773
2966 <rdar://problem/46782446>
2968 Reviewed by Joseph Pecoraro.
2970 * UserInterface/Views/TimelineOverview.js:
2971 (WI.TimelineOverview.prototype._recordSelected):
2972 The Frames timeline uses `frameIndex` instead of `startTime`/`endTime`, so when trying to
2973 ensure that the selected record is within the filtered range, use `frameIndex` instead.
2974 The associated `WI.TimelineRuler` will already be using an index-based approach for
2975 selection, so this will match.
2977 2018-12-19 Devin Rousso <drousso@apple.com>
2979 Web Inspector: Canvas: the recording auto-capture input shouldn't start focused
2980 https://bugs.webkit.org/show_bug.cgi?id=192454
2982 Reviewed by Joseph Pecoraro.
2984 * UserInterface/Views/CanvasOverviewContentView.js:
2985 (WI.CanvasOverviewContentView.prototype._updateRecordingAutoCaptureCheckboxLabel):
2986 (WI.CanvasOverviewContentView.prototype._handleCanvasRecordingAutoCaptureFrameCountChanged):
2988 2018-12-19 Nikita Vasilyev <nvasilyev@apple.com>
2990 Web Inspector: Styles: shift-clicking a color-swatch to change formats starts editing the color
2991 https://bugs.webkit.org/show_bug.cgi?id=192784
2992 <rdar://problem/46801028>
2994 Reviewed by Devin Rousso.
2996 * UserInterface/Views/SpreadsheetStyleProperty.js:
2997 (WI.SpreadsheetStyleProperty.prototype._createInlineSwatch):
2999 2018-12-19 Matt Baker <mattbaker@apple.com>
3001 Web Inspector: Elements tab: arrow key after undoing a DOM node delete selects the wrong element
3002 https://bugs.webkit.org/show_bug.cgi?id=192871
3003 <rdar://problem/46849060>
3005 Reviewed by Devin Rousso.
3007 Undoing a DOM node removal reinserts the node into the DOMTreeOutline.
3008 When the reinserted node precedes the selected node in the tree, the
3009 SelectionController should update `_lastSelectedIndex`.
3011 * UserInterface/Controllers/SelectionController.js:
3012 (WI.SelectionController.prototype.didInsertItem):
3014 2018-12-19 Devin Rousso <drousso@apple.com>
3016 Web Inspector: Audit: provide localization support for % pass display
3017 https://bugs.webkit.org/show_bug.cgi?id=192870
3018 <rdar://problem/46779245>
3020 Reviewed by Brian Burg.
3022 * UserInterface/Views/AuditTestGroupContentView.js:
3023 (WI.AuditTestGroupContentView.prototype.initialLayout):
3024 (WI.AuditTestGroupContentView.prototype.layout):
3025 * UserInterface/Views/AuditTestGroupContentView.css:
3026 (.content-view.audit-test-group > header > .percentage-pass):
3027 (.content-view.audit-test-group > header > .percentage-pass > span): Added.
3028 (@media (prefers-dark-interface) .content-view.audit-test-group > header > .percentage-pass): Added.
3029 (@media (prefers-dark-interface) .content-view.audit-test-group > header > .percentage-pass > span): Added.
3030 (.content-view.audit-test-group > header > .percentage-pass:not(:empty)::after): Deleted.
3032 * Localizations/en.lproj/localizedStrings.js:
3034 2018-12-19 Nikita Vasilyev <nvasilyev@apple.com>
3036 Web Inspector: Computed: make UI more usable when the panel is narrow
3037 https://bugs.webkit.org/show_bug.cgi?id=192578
3038 <rdar://problem/46615753>
3040 Reviewed by Devin Rousso.
3042 * UserInterface/Views/ComputedStyleSection.css:
3043 (.computed-style-section .computed-property-item .property-traces):
3044 (.computed-style-section .computed-property-item.expanded .disclosure-button):
3045 (.computed-style-section .computed-property-item .property-trace-item):
3046 (.computed-style-section .computed-property-item .property-trace-item::before):
3047 (.computed-style-section .computed-property-item .property):
3048 (.computed-style-section .computed-property-item .property-trace-item .selector):
3049 Allow CSS property values and selectors to take more than one line.
3051 (.computed-style-section .property-trace-item .property .name,):
3052 * UserInterface/Views/ComputedStyleSection.js:
3053 (WI.ComputedStyleSection.prototype._createTrace):
3054 * UserInterface/Views/SpreadsheetStyleProperty.js:
3055 (WI.SpreadsheetStyleProperty.prototype.update):
3057 2018-12-18 Simon Fraser <simon.fraser@apple.com>
3059 Web Inspector: Timelines: correctly label Intersection Observer callbacks
3060 https://bugs.webkit.org/show_bug.cgi?id=192669
3061 <rdar://problem/46702490>
3063 Reviewed by Joseph Pecoraro.
3065 Add InspectorInstrumentation::willFireObserverCallback() and use it to wrap calls
3066 to Intersection Observer, Performance Observer and Mutation Observer callbacks so
3067 that they get correctly labeled in the Inspector timeline.
3069 * Localizations/en.lproj/localizedStrings.js:
3070 * UserInterface/Controllers/TimelineManager.js:
3071 (WI.TimelineManager.prototype._processRecord):
3072 * UserInterface/Models/ScriptTimelineRecord.js:
3073 (WI.ScriptTimelineRecord.EventType.displayName):
3074 * UserInterface/Views/TimelineTabContentView.js:
3075 (WI.TimelineTabContentView.iconClassNameForRecord):
3077 2018-12-19 Devin Rousso <drousso@apple.com>
3079 Web Inspector: Audit: "Clear Filters" button gets clipped when window is vertically small
3080 https://bugs.webkit.org/show_bug.cgi?id=192868
3081 <rdar://problem/46780400>
3083 Reviewed by Matt Baker.
3085 * UserInterface/Views/Main.css:
3086 (.message-text-view):
3088 2018-12-19 Nikita Vasilyev <nvasilyev@apple.com>
3090 Web Inspector: Dark Mode: selected text is too light when Inspector window is inactive
3091 https://bugs.webkit.org/show_bug.cgi?id=190542
3092 <rdar://problem/45238712>
3094 Reviewed by Devin Rousso.
3096 * UserInterface/Views/CodeMirrorOverrides.css:
3097 (.CodeMirror .CodeMirror-selected):
3099 2018-12-19 Nikita Vasilyev <nvasilyev@apple.com>
3101 Web Inspector: column sort controls in Layers tab sidebar don't render correctly in dark mode
3102 https://bugs.webkit.org/show_bug.cgi?id=192845
3104 Reviewed by Devin Rousso.
3106 * UserInterface/Views/DataGrid.css:
3107 (@media (prefers-dark-interface)):
3108 (.data-grid th.sortable:active):
3109 Drive-by: replace obnoxiously light background of the pressed header with a more subtle gray.
3111 (.data-grid th.sort-ascending > div:first-child::after, .data-grid th.sort-descending > div:first-child::after):
3112 Invert colors of the arrow glyph.
3114 2018-12-18 Devin Rousso <drousso@apple.com>
3116 Web Inspector: Layers: increase default column width for other localizations
3117 https://bugs.webkit.org/show_bug.cgi?id=192812
3118 <rdar://problem/46628625>
3120 Reviewed by Brian Burg.
3122 * UserInterface/Views/LayerDetailsSidebarPanel.js:
3123 (WI.LayerDetailsSidebarPanel.prototype._buildDataGrid):
3124 * UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
3125 (WI.LayerTreeDetailsSidebarPanel.prototype._buildDataGridSection):
3127 2018-12-18 Joseph Pecoraro <pecoraro@apple.com>
3129 Web Inspector: m3u8 content not shown, it should be text
3130 https://bugs.webkit.org/show_bug.cgi?id=192731
3131 <rdar://problem/46747728>
3133 Reviewed by Devin Rousso.
3135 * UserInterface/Base/MIMETypeUtilities.js:
3136 (WI.shouldTreatMIMETypeAsText):
3137 Support m3u8/m3u files as text.
3139 2018-12-17 Devin Rousso <drousso@apple.com>
3141 Web Inspector: Canvas: path view is misaligned
3142 https://bugs.webkit.org/show_bug.cgi?id=192761
3144 Reviewed by Joseph Pecoraro.
3146 * UserInterface/Views/RecordingContentView.css:
3147 (.content-view:not(.tab).recording :matches(img, canvas)):
3148 (.content-view:not(.tab).recording canvas.path):
3150 2018-12-17 Devin Rousso <drousso@apple.com>
3152 Web Inspector: Audit: add plural result strings
3153 https://bugs.webkit.org/show_bug.cgi?id=192769
3154 <rdar://problem/46628680>
3156 Reviewed by Brian Burg.
3158 * UserInterface/Views/AuditTestContentView.js:
3159 (WI.AuditTestContentView.prototype.showNoResultDataPlaceholder):
3161 * UserInterface/Views/AuditTestGroupContentView.js:
3162 (WI.AuditTestGroupContentView.prototype.layout):
3164 * Localizations/en.lproj/localizedStrings.js:
3166 2018-12-17 Devin Rousso <drousso@apple.com>
3168 Web Inspector: Settings: add singular "space" UIString
3169 https://bugs.webkit.org/show_bug.cgi?id=192766
3170 <rdar://problem/46776948>
3172 Reviewed by Brian Burg.
3174 * UserInterface/Views/SettingEditor.js:
3176 (WI.SettingEditor.prototype.get label):
3177 (WI.SettingEditor.prototype.set label): Added.
3179 * UserInterface/Views/SettingsTabContentView.js:
3180 (WI.SettingsTabContentView.prototype._createGeneralSettingsView):
3181 (WI.SettingsTabContentView.prototype._createGeneralSettingsView.addSpacesSetting): Added.
3182 (WI.SettingsTabContentView.prototype._createGeneralSettingsView.addSpacesSetting.updateLabel): Added.
3184 * Localizations/en.lproj/localizedStrings.js:
3186 2018-12-15 Nikita Vasilyev <nvasilyev@apple.com>
3188 Web Inspector: Styles: toggling selected properties may cause data corruption
3189 https://bugs.webkit.org/show_bug.cgi?id=192396
3190 <rdar://problem/46478383>
3192 Reviewed by Devin Rousso.
3194 Uncommenting a property after a commented out property used to insert an unnecessary semicolon,
3195 and not updating ranges of the following properties.
3200 /* font-size: 12px */
3202 Uncommenting `font-size` would result in something like this:
3204 /* color: red; */; font-size: 12px
3206 unnecessary semicolon
3208 Now the semicolon doesn't get inserted and the white space is preserved better:
3213 * UserInterface/Models/CSSProperty.js:
3214 (WI.CSSProperty.prototype._updateOwnerStyleText):
3215 (WI.CSSProperty.prototype._appendSemicolonIfNeeded): Removed.
3216 (WI.CSSProperty.prototype._prependSemicolonIfNeeded): Added.
3218 * UserInterface/Views/SpreadsheetStyleProperty.js:
3219 (WI.SpreadsheetStyleProperty.prototype.remove):
3220 (WI.SpreadsheetStyleProperty.prototype.update):
3221 (WI.SpreadsheetStyleProperty.prototype._handleNameChange):
3222 (WI.SpreadsheetStyleProperty.prototype._handleValueChange):
3223 Style declaration should be locked while editing. Add asserts to ensure this.
3225 2018-12-14 Matt Baker <mattbaker@apple.com>
3227 Web Inspector: REGRESSION(r238599): Uncaught Exception: TypeError: null is not an object (evaluating 'treeElement.listItemElement.classList')
3228 https://bugs.webkit.org/show_bug.cgi?id=192090
3229 <rdar://problem/46318614>
3231 Reviewed by Devin Rousso.
3233 * UserInterface/Views/TreeOutline.js:
3234 (WI.TreeOutline.prototype.selectionControllerSelectionDidChange):
3235 Check that `listItemElement` is valid before accessing it to update class
3236 names. The selection can change before the TreeElement has been attached.
3238 2018-12-14 Matt Baker <mattbaker@apple.com>
3240 Web Inspector: Cookies view should use model objects instead of raw payload data
3241 https://bugs.webkit.org/show_bug.cgi?id=189533
3242 <rdar://problem/44364183>
3244 Reviewed by Joseph Pecoraro and Devin Rousso.
3246 * UserInterface/Models/Cookie.js:
3248 (WI.Cookie.fromPayload):
3249 (WI.Cookie.parseSetCookieResponseHeader):
3250 (WI.Cookie.prototype.get type):
3251 (WI.Cookie.prototype.get name):
3252 (WI.Cookie.prototype.get value):
3253 (WI.Cookie.prototype.get header):
3254 (WI.Cookie.prototype.get expires):
3255 (WI.Cookie.prototype.get maxAge):
3256 (WI.Cookie.prototype.get path):
3257 (WI.Cookie.prototype.get domain):
3258 (WI.Cookie.prototype.get secure):
3259 (WI.Cookie.prototype.get httpOnly):
3260 (WI.Cookie.prototype.get sameSite):
3261 (WI.Cookie.prototype.get size):
3262 (WI.Cookie.prototype.get url):
3263 (WI.Cookie.prototype.expirationDate):
3264 Cleanup Cookie object; add pubic getters for data, `url` property,
3265 static `fromPayload` method, and calculate `_size` if missing.
3267 * UserInterface/Views/CookieStorageContentView.js:
3268 (WI.CookieStorageContentView.prototype.tableDidRemoveRows):
3269 (WI.CookieStorageContentView.prototype._reloadCookies):
3270 Create Cookie objects from the payload instead of using raw payload data.
3272 2018-12-13 Devin Rousso <drousso@apple.com>
3274 Web Inspector: remove DOM.BackendNodeId and associated commands/events
3275 https://bugs.webkit.org/show_bug.cgi?id=192478
3277 Reviewed by Matt Baker.
3279 * Versions/Inspector-iOS-8.0.json:
3280 * Versions/Inspector-iOS-9.0.json:
3281 * Versions/Inspector-iOS-9.3.json:
3282 * Versions/Inspector-iOS-10.0.json:
3283 * Versions/Inspector-iOS-10.3.json:
3284 * Versions/Inspector-iOS-11.0.json:
3285 * Versions/Inspector-iOS-11.3.json:
3286 * Versions/Inspector-iOS-12.0.json:
3287 * UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
3288 * UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js:
3289 * UserInterface/Protocol/Legacy/9.3/InspectorBackendCommands.js:
3290 * UserInterface/Protocol/Legacy/10.0/InspectorBackendCommands.js:
3291 * UserInterface/Protocol/Legacy/10.3/InspectorBackendCommands.js:
3292 * UserInterface/Protocol/Legacy/11.0/InspectorBackendCommands.js:
3293 * UserInterface/Protocol/Legacy/11.3/InspectorBackendCommands.js:
3294 * UserInterface/Protocol/Legacy/12.0/InspectorBackendCommands.js:
3296 2018-12-13 Devin Rousso <drousso@apple.com>
3298 Web Inspector: experimental settings reload button disappears after changing more than one setting
3299 https://bugs.webkit.org/show_bug.cgi?id=192645
3300 <rdar://problem/46626204>
3302 Reviewed by Joseph Pecoraro.
3304 * UserInterface/Views/SettingsTabContentView.js:
3305 (WI.SettingsTabContentView.prototype._createExperimentalSettingsView.listenForChange):
3306 (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
3308 2018-12-13 Matt Baker <mattbaker@apple.com>
3310 Web Inspector: REGRESSION(r238602): Elements: deleting multiple DOM nodes doesn't select the nearest node after deletion
3311 https://bugs.webkit.org/show_bug.cgi?id=192116
3312 <rdar://problem/46344339>
3314 Reviewed by Devin Rousso.
3316 * UserInterface/Controllers/SelectionController.js:
3317 (WI.SelectionController.prototype.removeSelectedItems):
3318 Finding a new index to select should go through the delegate instead of
3319 naively advancing the index.
3321 * UserInterface/Views/DOMTreeElement.js:
3322 (WI.DOMTreeElement.prototype._populateNodeContextMenu):
3323 (WI.DOMTreeElement.prototype.ondelete): Deleted.
3324 The menu item for removing the DOM node is now managed by the parent
3325 DOMTreeOutline, since its UI and behavior now depend on whether there
3326 are multiple elements selected.
3328 * UserInterface/Views/DOMTreeOutline.js:
3329 (WI.DOMTreeOutline.prototype.populateContextMenu):
3330 (WI.DOMTreeOutline.prototype.ondelete.level):
3331 (WI.DOMTreeOutline.prototype.ondelete):
3332 Implement `ondelete` to remove selected DOM nodes using the delete and
3333 backspace keys. Also used by the DOMTreeOutline's context menu handler.
3335 2018-12-13 Matt Baker <mattbaker@apple.com>
3337 Web Inspector: Table selection becomes corrupted when deleting selected cookies
3338 https://bugs.webkit.org/show_bug.cgi?id=192388
3339 <rdar://problem/46472364>
3341 Reviewed by Devin Rousso.
3343 * UserInterface/Controllers/SelectionController.js:
3344 (WI.SelectionController):
3345 (WI.SelectionController.prototype.didRemoveItems):
3346 (WI.SelectionController.prototype._updateSelectedItems):
3347 (WI.SelectionController.prototype.didRemoveItem): Deleted.
3348 Replace `didRemoveItem` with a method taking an IndexSet. Calling the
3349 single-index version while iterating over multiple rows in ascending
3350 order is unsafe, a detail best left to the SelectionController.
3352 * UserInterface/Views/Table.js:
3353 (WI.Table.prototype.removeRow):
3354 (WI.Table.prototype._removeRows):
3355 Notify SelectionController of removed rows.
3357 * UserInterface/Views/TreeOutline.js:
3358 (WI.TreeOutline.prototype.insertChild):
3359 (WI.TreeOutline.prototype.removeChildAtIndex):
3360 Remove the child from the element's `children` after calling `_forgetTreeElement`,
3361 which needs to calculate the child's index to pass to the SelectionController.
3363 (WI.TreeOutline.prototype.removeChildren):
3364 Remove child items during iteration so that `children` doesn't contain
3365 detached TreeElements while calling `_forgetTreeElement`.
3367 (WI.TreeOutline.prototype._rememberTreeElement):
3368 (WI.TreeOutline.prototype._forgetTreeElement):
3370 2018-12-10 Matt Baker <mattbaker@apple.com>
3372 Web Inspector: REGRESSION (r238599): unable to select specific timeline
3373 https://bugs.webkit.org/show_bug.cgi?id=192443
3374 <rdar://problem/46608087>
3376 Reviewed by Joseph Pecoraro.
3378 When determining the trailing horizontal edge for TreeElement mouse
3379 events, TreeOutline should not assume that its containing DOM element
3380 is only as wide as its <ol> element.
3382 * UserInterface/Views/TreeOutline.js:
3383 (WI.TreeOutline.prototype.treeElementFromEvent):
3385 2018-12-10 Matt Baker <mattbaker@apple.com>
3387 Web Inspector: Move TreeOutlineGroup coordination out of TreeElement
3388 https://bugs.webkit.org/show_bug.cgi?id=192487
3389 <rdar://problem/46543431>
3391 Reviewed by Devin Rousso.
3393 * UserInterface/Views/TreeElement.js:
3394 (WI.TreeElement.prototype.select):
3395 (WI.TreeElement.prototype.deselect):
3397 * UserInterface/Views/TreeOutlineGroup.js:
3398 (WI.TreeOutlineGroup):
3399 (WI.TreeOutlineGroup.prototype.itemAdded):
3400 (WI.TreeOutlineGroup.prototype.itemRemoved):
3401 (WI.TreeOutlineGroup.prototype._removeConflictingTreeSelections):
3402 (WI.TreeOutlineGroup.prototype._treeOutlineSelectionDidChange):
3403 (WI.TreeOutlineGroup.groupForTreeOutline): Deleted.
3404 (WI.TreeOutlineGroup.prototype.didSelectTreeElement): Deleted.
3405 make the group responsible for listening to selection changes from the
3406 TreeOutlines it manages, and synchronizing the selection between them.
3408 2018-12-10 Dean Jackson <dino@apple.com>
3410 Use text/javascript as recommended by the HTML specification
3411 https://bugs.webkit.org/show_bug.cgi?id=192525
3412 <rdar://problem/46569636>
3414 Reviewed by Jon Lee.
3416 The HTML specification says we should use text/javascript for
3418 https://html.spec.whatwg.org/multipage/scripting.html#scriptingLanguages:javascript-mime-type
3420 * UserInterface/Base/MIMETypeUtilities.js:
3421 (WI.mimeTypeForFileExtension):
3422 * UserInterface/Views/TextEditor.js:
3423 (WI.TextEditor.prototype._attemptToDetermineMIMEType):
3425 2018-12-06 Matt Baker <mattbaker@apple.com>
3427 Web Inspector: REGRESSION(r238602): Elements: collapsing a DOM node with the left arrow doesn't work
3428 https://bugs.webkit.org/show_bug.cgi?id=192353
3429 <rdar://problem/46455019>
3431 Reviewed by Devin Rousso.
3433 * UserInterface/Views/TreeElement.js:
3434 (WI.TreeElement.prototype.deselect):
3435 Don't early return when the element is not the selected tree element.
3436 This condition no longer holds now that TreeOutline supports multiple selection.
3438 2018-12-05 Matt Baker <mattbaker@apple.com>
3440 Web Inspector: SelectionController should not extend the selection when allowsMultipleSelection is false
3441 https://bugs.webkit.org/show_bug.cgi?id=192390
3442 <rdar://problem/46473624>
3444 Reviewed by Devin Rousso.
3446 * UserInterface/Controllers/SelectionController.js:
3447 (WI.SelectionController.prototype.selectItem):
3449 2018-12-04 Nikita Vasilyev <nvasilyev@apple.com>
3451 Web Inspector: Add style editing debug mode
3452 https://bugs.webkit.org/show_bug.cgi?id=192282
3453 <rdar://problem/46399176>
3455 Reviewed by Matt Baker.
3457 Introduce a style editing debug mode to help to troubleshoot complex bugs in the style editor.
3460 - Display red border for locked style declarations.
3462 * UserInterface/Base/Setting.js:
3463 * UserInterface/Models/CSSProperty.js:
3464 (WI.CSSProperty.prototype._updateOwnerStyleText):
3465 * UserInterface/Views/SettingsTabContentView.js:
3466 (WI.SettingsTabContentView.prototype._createDebugSettingsView):
3467 * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
3468 (.spreadsheet-style-declaration-editor.debug-style-locked::after):
3469 * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
3470 (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
3471 (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._updateStyleLock):
3472 (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._updateDebugLockStatus):
3474 2018-12-04 Matt Baker <mattbaker@apple.com>
3476 Web Inspector: REGRESSION(r238602): Elements: changing selection no longer highlights the selected node
3477 https://bugs.webkit.org/show_bug.cgi?id=192354
3478 <rdar://problem/46444438>
3480 Reviewed by Joseph Pecoraro.
3482 * UserInterface/Views/TreeOutline.js:
3483 (WI.TreeOutline.prototype._treeKeyDown):
3484 (WI.TreeOutline.prototype._handleMouseDown):
3486 2018-12-04 Joseph Pecoraro <pecoraro@apple.com>
3488 Web Inspector: REGRESSION(r238330): Timeline auto-capture does not work after page transition
3489 https://bugs.webkit.org/show_bug.cgi?id=192248
3490 <rdar://problem/46390199>
3492 Reviewed by Devin Rousso.
3494 * UserInterface/Base/Main.js:
3495 (WI.transitionPageTarget):
3496 Let the TimelineManager perform work on page transitions.
3498 * UserInterface/Controllers/TimelineManager.js:
3499 (WI.TimelineManager.prototype.initializeTarget):
3500 Initialize the autocapture state of the target.
3502 (WI.TimelineManager.prototype.transitionPageTarget):
3503 When transitioning pages perform a legacy (frontend based) timeline capture.
3505 2018-12-04 Matt Baker <mattbaker@apple.com>
3507 Web Inspector: Elements: $0 is shown for all selected elements
3508 https://bugs.webkit.org/show_bug.cgi?id=192119
3509 <rdar://problem/46327554>
3511 Reviewed by Devin Rousso.
3513 * UserInterface/Views/ContentBrowserTabContentView.js:
3514 (WI.ContentBrowserTabContentView.prototype._revealAndSelectRepresentedObject):
3515 * UserInterface/Views/DOMTreeContentView.js:
3516 (WI.DOMTreeContentView):
3517 (WI.DOMTreeContentView.prototype.layout):
3518 (WI.DOMTreeContentView.prototype._domTreeSelectionDidChange):
3519 Update the selected DOM node using the TreeOutline's selection change
3520 event, instead of in `onselect`, which wasn't always called.
3522 * UserInterface/Views/DOMTreeElement.js:
3523 (WI.DOMTreeElement.prototype.onselect): Deleted.
3524 (WI.DOMTreeElement.prototype.ondeselect): Deleted.
3525 Eliminate `onselect` and `ondeselect`. TreeOutline clients should use
3526 the TreeOutline.Event.SelectedDidChange event instead.
3528 * UserInterface/Views/DOMTreeOutline.css:
3529 (.tree-outline.dom li.last-selected > span::after):
3530 (.tree-outline.dom:focus li.last-selected > span::after):
3531 (.tree-outline.dom li.selected > span::after): Deleted.
3532 (.tree-outline.dom:focus li.selected > span::after): Deleted.
3533 * UserInterface/Views/DOMTreeOutline.js:
3534 (WI.DOMTreeOutline.prototype.updateSelection): Deleted.
3536 * UserInterface/Views/DebuggerSidebarPanel.js:
3537 (WI.DebuggerSidebarPanel.prototype._handleDebuggerObjectDisplayLocationDidChange):
3538 * UserInterface/Views/FolderizedTreeElement.js:
3539 (WI.FolderizedTreeElement.prototype._addTreeElement):
3540 * UserInterface/Views/NavigationSidebarPanel.js:
3541 (WI.NavigationSidebarPanel.prototype.showDefaultContentViewForTreeElement):
3542 (WI.NavigationSidebarPanel.prototype._treeElementWasFiltered):
3543 (WI.NavigationSidebarPanel):
3544 * UserInterface/Views/OpenResourceDialog.js:
3545 (WI.OpenResourceDialog.prototype._populateResourceTreeOutline):
3546 (WI.OpenResourceDialog.prototype._handleKeydownEvent):
3547 * UserInterface/Views/SourceCodeTreeElement.js:
3548 (WI.SourceCodeTreeElement.prototype.descendantResourceTreeElementTypeDidChange):
3549 * UserInterface/Views/TreeElement.js:
3550 (WI.TreeElement.prototype.select):
3551 (WI.TreeElement.prototype.revealAndSelect):
3552 (WI.TreeElement.prototype.deselect):
3553 Remove `suppressOnDeselect` and rename `suppressOnSelect` to `suppressNotification`.
3554 Now that `ondeselect` has been removed `suppressOnDeselect` is no longer
3555 meaningful, as TreeOutline generates a single `SelectedDidChange` event
3556 when the selected item changes. In the case of `revealAndSelect`, both
3557 arguments had the same value.
3559 * UserInterface/Views/TreeOutline.js:
3561 (WI.TreeOutline.prototype.selectionControllerSelectionDidChange):
3562 Add a unique class name to the last selected TreeElement to distinguish
3563 it from other selected elements.
3565 2018-12-04 Matt Baker <mattbaker@apple.com>
3567 Web Inspector: Elements: ⌘-A should select all visible nodes
3568 https://bugs.webkit.org/show_bug.cgi?id=192120
3569 <rdar://problem/46344435>
3571 Reviewed by Devin Rousso.
3573 * UserInterface/Views/TreeOutline.js:
3574 (WI.TreeOutline.prototype._treeKeyDown):
3575 Remove an early return, allowing `WI.SelectionController` to handle ⌘-A
3576 and select all items.
3578 2018-12-04 Devin Rousso <drousso@apple.com>
3580 Web Inspector: Audit: tests should support async operations
3581 https://bugs.webkit.org/show_bug.cgi?id=192171
3582 <rdar://problem/46423562>
3584 Reviewed by Joseph Pecoraro.
3586 * UserInterface/Controllers/RuntimeManager.js:
3587 (WI.RuntimeManager.supportsAwaitPromise): Added.
3589 * UserInterface/Models/AuditTestCase.js:
3590 (WI.AuditTestCase.prototype.async run.async parseResponse.checkResultProperty.addErrorForValueType): Deleted.
3591 (WI.AuditTestCase.prototype.async run.async parseResponse.checkResultProperty): Deleted.
3592 (WI.AuditTestCase.prototype.async run.async parseResponse.async resultArrayForEach): Deleted.
3593 (WI.AuditTestCase.prototype.async run.async parseResponse): Added.
3594 (WI.AuditTestCase.prototype.async run):
3595 (WI.AuditTestCase.prototype.async run.checkResultProperty.addErrorForValueType): Deleted.
3596 (WI.AuditTestCase.prototype.async run.checkResultProperty): Deleted.
3597 (WI.AuditTestCase.prototype.async run.async resultArrayForEach): Deleted.
3599 * UserInterface/Models/AuditTestCaseResult.js:
3600 (WI.AuditTestCaseResult.async fromPayload):
3601 (WI.AuditTestCaseResult.prototype.toJSON):
3603 * UserInterface/Views/AuditTestCaseContentView.js:
3604 (WI.AuditTestCaseContentView.prototype.layout):
3606 2018-12-03 Devin Rousso <drousso@apple.com>
3608 Web Inspector: Audit: save the expanded state of test groups
3609 https://bugs.webkit.org/show_bug.cgi?id=192346
3610 <rdar://problem/46440704>
3612 Reviewed by Matt Baker.
3614 * UserInterface/Views/AuditTreeElement.js:
3615 (WI.AuditTreeElement):
3616 (WI.AuditTreeElement.prototype.onattach):
3617 (WI.AuditTreeElement.prototype.onexpand): Added.
3618 (WI.AuditTreeElement.prototype.oncollapse): Added.
3620 2018-12-03 Devin Rousso <drousso@apple.com>
3622 Web Inspector: Audit: sidebar briefly shows "No Filter Results" before populating default audits
3623 https://bugs.webkit.org/show_bug.cgi?id=192341
3624 <rdar://problem/46436550>
3626 Reviewed by Matt Baker.
3628 * UserInterface/Views/AuditNavigationSidebarPanel.js:
3629 (WI.AuditNavigationSidebarPanel.prototype.initialLayout):
3630 (WI.AuditNavigationSidebarPanel.prototype._addTest):
3631 (WI.AuditNavigationSidebarPanel.prototype._addResult):
3632 (WI.AuditNavigationSidebarPanel.prototype.applyFiltersToTreeElement): Deleted.
3633 Delay the construction of the "Results" folder until it's needed, since adding a hidden
3634 `WI.TreeElement` will cause the placeholder to appear.
3636 2018-12-03 Devin Rousso <drousso@apple.com>
3638 Web Inspector: Audit: navigating while tests are running should stop and clear all results
3639 https://bugs.webkit.org/show_bug.cgi?id=192317
3640 <rdar://problem/46435222>
3642 Reviewed by Joseph Pecoraro.
3644 * UserInterface/Controllers/AuditManager.js:
3645 (WI.AuditManager.prototype.async start):
3646 (WI.AuditManager.prototype._handleFrameMainResourceDidChange):
3648 * UserInterface/Views/AuditNavigationSidebarPanel.js:
3649 (WI.AuditNavigationSidebarPanel.prototype.initialLayout):
3650 Drive-by: pass the index of the saved result.
3652 2018-12-03 Devin Rousso <drousso@apple.com>
3654 Web Inspector: Audit: "Add Default Audits" shown when there are no filter results
3655 https://bugs.webkit.org/show_bug.cgi?id=192105
3657 Reviewed by Matt Baker.
3659 * UserInterface/Views/NavigationSidebarPanel.js:
3660 (WI.NavigationSidebarPanel):
3661 (WI.NavigationSidebarPanel.prototype.get hasActiveFilters): Added.
3662 (WI.NavigationSidebarPanel.prototype.suppressFilteringOnTreeElements):
3663 (WI.NavigationSidebarPanel.prototype.showEmptyContentPlaceholder):
3664 (WI.NavigationSidebarPanel.prototype.hideEmptyContentPlaceholder):
3665 (WI.NavigationSidebarPanel.prototype.updateEmptyContentPlaceholder):
3666 (WI.NavigationSidebarPanel.prototype.updateFilter):
3667 (WI.NavigationSidebarPanel.prototype._checkForEmptyFilterResults.checkTreeOutlineForEmptyFilterResults):
3668 (WI.NavigationSidebarPanel.prototype._filterDidChange):
3669 (WI.NavigationSidebarPanel.prototype._updateFilter): Deleted.
3670 (WI.NavigationSidebarPanel.prototype._createEmptyContentPlaceholderIfNeeded): Deleted.
3672 * UserInterface/Views/AuditNavigationSidebarPanel.js:
3673 (WI.AuditNavigationSidebarPanel.prototype._handleAuditTestRemoved):
3674 Drive-by: change capitalization for consistency with other navigation sidebars.
3676 * Localizations/en.lproj/localizedStrings.js:
3678 2018-12-03 Devin Rousso <drousso@apple.com>
3680 Web Inspector: Canvas: add singular localized string for "Record first %s frames"
3681 https://bugs.webkit.org/show_bug.cgi?id=192189
3683 Reviewed by Joseph Pecoraro.
3685 * UserInterface/Views/CanvasOverviewContentView.js:
3686 (WI.CanvasOverviewContentView):
3687 (WI.CanvasOverviewContentView.prototype._setRecordingAutoCaptureFrameCount):
3688 (WI.CanvasOverviewContentView.prototype._updateRecordingAutoCaptureCheckboxLabel): Added.
3689 (WI.CanvasOverviewContentView.prototype._handleRecordingAutoCaptureInput):
3690 (WI.CanvasOverviewContentView.prototype._handleCanvasRecordingAutoCaptureFrameCountChanged):
3691 (WI.CanvasOverviewContentView.prototype.initialLayout): Deleted.
3692 Drive-by: update the auto-capture navigation item when the view is first created so there is
3693 no flashing of in the navigation bar (before `initialLayout` is called).
3695 * UserInterface/Views/CheckboxNavigationItem.js:
3696 (WI.CheckboxNavigationItem):
3697 (WI.CheckboxNavigationItem.prototype.set label): Added.
3699 * Localizations/en.lproj/localizedStrings.js:
3701 2018-12-03 Matt Baker <mattbaker@apple.com>
3703 Web Inspector: REGRESSION(r238599): Multiple Selection: restoring selection when opening WebInspector puts the TreeElement into a permanent selected state
3704 https://bugs.webkit.org/show_bug.cgi?id=192091
3705 <rdar://problem/46321795>
3707 Reviewed by Devin Rousso.
3709 * UserInterface/Controllers/SelectionController.js:
3710 (WI.SelectionController.prototype.didInsertItem):
3711 Fix a bug where selected indexes were overwritten by the inserted index.
3713 * UserInterface/Views/TreeOutline.js:
3715 (WI.TreeOutline.prototype.insertChild):
3716 Update the SelectionController with the newly inserted index before
3717 attaching the TreeElement. Attaching the TreeElement can cause it to
3718 become selected, which would add the index to the SelectionController,
3719 only to have it immediately incremented by the call to `didInsertItem`.
3720 Additionally, change `insertionIndex` to be the index of the inserted
3721 item instead of the inserted item's previous sibling.
3723 (WI.TreeOutline.prototype._rememberTreeElement):
3724 (WI.TreeOutline.prototype._forgetTreeElement):
3725 (WI.TreeOutline.prototype._indexOfTreeElement.previousElement): Deleted.
3726 Eliminate TreeElement index caching, which could become stale and cause
3727 the wrong index to be calculated. Additionally, instead of walking up the
3728 parent chain to determine the index, start at the root and use existing
3729 method `traverseNextTreeElement`.
3731 2018-12-03 Devin Rousso <drousso@apple.com>
3733 Web Inspector: Audit: test tree elements should start out collapsed
3734 https://bugs.webkit.org/show_bug.cgi?id=192107
3736 Reviewed by Matt Baker.
3738 * UserInterface/Views/AuditTreeElement.js:
3739 (WI.AuditTreeElement.prototype.onattach):
3741 2018-12-03 Nikita Vasilyev <nvasilyev@apple.com>
3743 Web Inspector: Styles: can't select properties of read-only rules
3744 https://bugs.webkit.org/show_bug.cgi?id=192266
3746 Reviewed by Devin Rousso.
3748 Implement multiple properties selection for read-only rules (such as User Agent Stylesheets)
3749 in the Styles panel.
3751 * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
3752 (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.initialLayout):
3753 (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
3754 Keep selection on layout.
3756 (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.startEditingFirstProperty):
3757 (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.startEditingLastProperty):
3758 (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyBlur):
3759 (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyMouseEnter):
3760 SpreadsheetCSSStyleDeclarationEditor is used by ComputedStyleDetailsPanel, which doesn't have:
3761 - spreadsheetCSSStyleDeclarationEditorPropertyBlur
3762 - spreadsheetCSSStyleDeclarationEditorPropertyMouseEnter
3764 (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyFocusMoved):
3765 (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._handleKeyDown):
3766 * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
3767 (WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
3768 * UserInterface/Views/SpreadsheetStyleProperty.js:
3769 (WI.SpreadsheetStyleProperty.prototype.startEditingName):
3770 (WI.SpreadsheetStyleProperty.prototype.startEditingValue):
3772 2018-11-30 Brian Burg <bburg@apple.com>
3774 Web Inspector: resource combining should be more robust against missing WebKitAdditions
3775 https://bugs.webkit.org/show_bug.cgi?id=192255
3776 <rdar://problem/46042879>
3778 Reviewed by Joseph Pecoraro.
3780 * Scripts/copy-user-interface-resources.pl:
3781 (combineOrStripResourcesForWebKitAdditions):
3783 2018-11-30 Nikita Vasilyev <nvasilyev@apple.com>
3785 Web Inspector: Jumping from Computed to Styles should select property
3786 https://bugs.webkit.org/show_bug.cgi?id=192198
3788 Reviewed by Devin Rousso.
3790 * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
3791 (.spreadsheet-style-declaration-editor .property.highlighted): Deleted.
3792 (@keyframes style-property-highlight): Deleted.
3793 * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
3794 (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.highlightProperty):
3795 Remove unnecessary `__propertyView` property.
3797 * UserInterface/Views/SpreadsheetStyleProperty.js:
3798 (WI.SpreadsheetStyleProperty.prototype.detached):
3799 (WI.SpreadsheetStyleProperty.prototype.highlight): Deleted.
3801 2018-11-30 Matt Baker <mattbaker@apple.com>
3803 Web Inspector: REGRESSION(r238599): Multiple Selection: selecting a breakpoint will change the selection to it's parent on the first click
3804 https://bugs.webkit.org/show_bug.cgi?id=192093
3805 <rdar://problem/46318466>
3807 Reviewed by Devin Rousso.
3809 * UserInterface/Views/TreeElement.js:
3810 (WI.TreeElement.prototype.select):
3811 TreeElement shouldn't manage the TreeOutline's selection barrier.
3813 * UserInterface/Views/TreeOutline.js:
3815 (WI.TreeOutline.prototype.get processingSelectionChange):
3816 (WI.TreeOutline.prototype.selectionControllerSelectionDidChange):
3817 (WI.TreeOutline.prototype.selectTreeElementInternal):
3818 The selection re-entry barrier `processingSelectionChange` should be
3819 managed internally by TreeOutline, and exposed as a read-only property.
3820 Fix a bug where the barrier was cleared before dispatching the change
3821 notification, which can cause re-entry as a side effect.
3823 2018-11-30 Devin Rousso <drousso@apple.com>
3825 Web Inspector: Settings: reload button needs horizontal spacing
3826 https://bugs.webkit.org/show_bug.cgi?id=192231
3827 <rdar://problem/46274363>
3829 Reviewed by Matt Baker.
3831 * UserInterface/Views/SettingsTabContentView.css:
3832 (.content-view.settings > .settings-view > .container button):
3833 (.content-view.settings > .settings-view > .container > .title):
3834 (.content-view.settings > .settings-view > .container > .editor-group > .editor input[type="checkbox"]):
3835 (body[dir=ltr] .content-view.settings > .settings-view > .container > .title): Deleted.
3836 (body[dir=rtl] .content-view.settings > .settings-view > .container > .title): Deleted.
3837 (body[dir=ltr] .content-view.settings > .settings-view > .container > .editor-group > .editor input[type="checkbox"]): Deleted.
3838 (body[dir=rtl] .content-view.settings > .settings-view > .container > .editor-group > .editor input[type="checkbox"]): Deleted.
3839 Drive-by: replace `dir=*` attribute rules with `-webkit-margin-*` properties.
3841 2018-11-30 Joseph Pecoraro <pecoraro@apple.com>
3843 Web Inspector: Uncaught Exception opening Web Inspector to Debugger Tab
3844 https://bugs.webkit.org/show_bug.cgi?id=192174
3846 Reviewed by Devin Rousso.
3848 * UserInterface/Protocol/InspectorBackend.js:
3849 (InspectorBackendClass.prototype.runAfterPendingDispatches):
3850 Dispatch the callback with a timeout if there is no backend target yet
3851 so it doesn't get lost.
3853 * UserInterface/Protocol/Connection.js:
3854 (InspectorBackend.Connection.prototype.runAfterPendingDispatches):
3855 Change the ambiguous name "script" to the more familiar "callback".
3857 2018-11-30 Devin Rousso <drousso@apple.com>
3859 Web Inspector: replace all unicode characters with the escaped character code
3860 https://bugs.webkit.org/show_bug.cgi?id=192216
3861 <rdar://problem/46275637>
3863 Reviewed by Brian Burg.
3865 * Localizations/en.lproj/localizedStrings.js:
3866 * UserInterface/Controllers/BreakpointPopoverController.js:
3867 * UserInterface/Debug/UncaughtExceptionReporter.js:
3868 * UserInterface/Models/AuditTestCase.js:
3869 * UserInterface/Models/Canvas.js:
3870 * UserInterface/Models/RecordingAction.js:
3871 * UserInterface/Models/ScriptTimelineRecord.js:
3872 * UserInterface/Views/AuditTestCaseContentView.js:
3873 * UserInterface/Views/AuditTestContentView.js:
3874 * UserInterface/Views/AuditTestGroupContentView.js:
3875 * UserInterface/Views/CallFrameView.js:
3876 * UserInterface/Views/CanvasContentView.js:
3877 * UserInterface/Views/CanvasOverviewContentView.css:
3878 * UserInterface/Views/ConsoleMessageView.css:
3879 * UserInterface/Views/ContextMenuUtilities.js:
3880 * UserInterface/Views/DOMEventsBreakdownView.js:
3881 * UserInterface/Views/DataGrid.css:
3882 * UserInterface/Views/DataGrid.js:
3883 * UserInterface/Views/DatabaseTableContentView.js:
3884 * UserInterface/Views/DebuggerDashboardView.css:
3885 * UserInterface/Views/DebuggerSidebarPanel.js:
3886 * UserInterface/Views/ErrorObjectView.js:
3887 * UserInterface/Views/EventBreakpointPopover.js:
3888 * UserInterface/Views/InlineSwatch.js:
3889 * UserInterface/Views/LayerTreeDataGridNode.js:
3890 * UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
3891 * UserInterface/Views/Layers3DContentView.js:
3892 * UserInterface/Views/LayoutTimelineDataGridNode.js:
3893 * UserInterface/Views/NetworkTableContentView.css:
3894 * UserInterface/Views/NetworkTableContentView.js:
3895 * UserInterface/Views/ObjectPreviewView.js:
3896 * UserInterface/Views/ProfileDataGridNode.js:
3897 * UserInterface/Views/ResourceTimelineDataGridNode.js:
3898 * UserInterface/Views/ScriptDetailsTimelineView.css:
3899 * UserInterface/Views/TextEditor.css:
3900 * UserInterface/Views/TreeOutline.css:
3902 2018-11-29 Matt Baker <mattbaker@apple.com>
3904 Web Inspector: RTL: disclosure triangles should be flipped and aligned right
3905 https://bugs.webkit.org/show_bug.cgi?id=192089
3906 <rdar://problem/46316753>
3908 Reviewed by Devin Rousso.
3910 * UserInterface/Views/ComputedStyleSection.css:
3911 (.computed-style-section .computed-property-item .disclosure-button):
3912 (body[dir=rtl] .computed-style-section .computed-property-item .disclosure-button):
3914 * UserInterface/Views/ConsoleMessageView.css:
3915 (.console-message.expandable .console-top-level-message::before):
3916 (body[dir=rtl] .console-message.expandable .console-top-level-message::before):
3918 * UserInterface/Views/ErrorObjectView.css:
3919 (.error-object > .formatted-error::before):
3920 (body[dir=rtl] .error-object > .formatted-error::before):
3921 (.error-object .content):
3923 * UserInterface/Views/LogContentView.css:
3924 (.console-group-title::before):
3925 (body[dir=ltr] .console-group-title::before):
3926 (body[dir=rtl] .console-group-title::before):
3928 * UserInterface/Views/ObjectTreeView.css:
3929 (body[dir=rtl] .object-tree > :matches(.title, .object-preview)::before):
3931 * UserInterface/Views/TypeTreeElement.css:
3932 (body[dir=rtl] .item.type-tree-element.parent > .disclosure-button):
3934 2018-11-28 Dean Jackson <dino@apple.com>
3936 [ES Modules] Allow .mjs content when loaded from file://
3937 https://bugs.webkit.org/show_bug.cgi?id=192100
3938 <rdar://problem/46320065>
3940 Reviewed by Sam Weinig.
3942 Add a mapping from .mjs to application/javascript.
3944 * UserInterface/Base/MIMETypeUtilities.js:
3945 (WI.mimeTypeForFileExtension):
3947 2018-11-29 Matt Baker <mattbaker@apple.com>
3949 Web Inspector: Elements: selecting more than one DOM node causes the scope highlight to contrast
3950 https://bugs.webkit.org/show_bug.cgi?id=192118
3951 <rdar://problem/46325664>
3953 Reviewed by Devin Rousso.
3955 Use an alpha blended border for the "selected" DOM scope highlight,
3956 matching the "hovered" scope highlight.