[WHLSL] Make generated Metal code should be indented properly to ease reading while...
[WebKit-https.git] / Source / WebInspectorUI / ChangeLog-2018-01-01
1 2017-12-19  Brian Burg  <bburg@apple.com>
2
3         Web Inspector: InspectorTest.evaluateInPage should return a rejection if an error was thrown
4         https://bugs.webkit.org/show_bug.cgi?id=180956
5
6         Reviewed by Joseph Pecoraro.
7
8         * UserInterface/Test/FrontendTestHarness.js:
9         (FrontendTestHarness.prototype.evaluateInPage.translateResult):┬áRenamed.
10         (FrontendTestHarness.prototype.evaluateInPage):
11         If the result was thrown, then reject with the error.
12         Rename the helper method to match the same one in RemoteObject.prototype.fetchProperties.
13
14 2017-12-19  Joseph Pecoraro  <pecoraro@apple.com>
15
16         Web Inspector: Network Table - Redesign the waterfall popover showing timing data
17         https://bugs.webkit.org/show_bug.cgi?id=180996
18         <rdar://problem/34072542>
19
20         Reviewed by Matt Baker.
21
22         * Localizations/en.lproj/localizedStrings.js:
23         * UserInterface/Main.html:
24         New strings and files.
25
26         * UserInterface/Views/NetworkTableContentView.js:
27         (WI.NetworkTableContentView.prototype._waterfallPopoverContentForResource):
28         (WI.NetworkTableContentView.prototype._handleMousedownWaterfall):
29         Use the ResourceTimingBreakdownView with a fixed width size.
30
31         * UserInterface/Views/ResourceTimingContentView.css: Removed.
32         * UserInterface/Views/ResourceTimingContentView.js:
33         (WI.ResourceTimingContentView.prototype.initialLayout):
34         (WI.ResourceTimingContentView.prototype._refreshTimingSection):
35         (WI.ResourceTimingContentView.prototype._refreshTimingSection.createBlock): Deleted.
36         (WI.ResourceTimingContentView.prototype._refreshTimingSection.createTimeLabel): Deleted.
37         (WI.ResourceTimingContentView.prototype._refreshTimingSection.createRow): Deleted.
38         Use the ResourceTimingBreakdownView with a flexible size.
39         Also changed the loading indicator and empty message to match
40         normal ContentView loading indicator and message only UI.
41
42         * UserInterface/Views/ResourceTimingBreakdownView.css:
43         (.waterfall-popover .resource-timing-breakdown):
44         (.resource-timing-breakdown > table > tr > td.label):
45         (.resource-timing-breakdown > table > tr > td.graph):
46         (.resource-timing-breakdown > table > tr > td.time):
47         (.resource-timing-breakdown > table > tr.empty):
48         (.resource-timing-breakdown > table > tr.header:not(.total-row) > td):
49         (.resource-timing-breakdown > table hr):
50         (.resource-timing-breakdown .waterfall .block):
51         (.resource-timing-breakdown): Deleted.
52         (.resource-timing-breakdown > .waterfall): Deleted.
53         (.resource-timing-breakdown > .waterfall .block): Deleted.
54         (.resource-timing-breakdown ul): Deleted.
55         (.resource-timing-breakdown ul > li): Deleted.
56         (.resource-timing-breakdown ul > li > .row-label): Deleted.
57         (body[dir=ltr] .resource-timing-breakdown ul > li > .row-label): Deleted.
58         (body[dir=rtl] .resource-timing-breakdown ul > li > .row-label): Deleted.
59         (.resource-timing-breakdown ul > li > .section-label): Deleted.
60         (.resource-timing-breakdown ul > li > .time-label): Deleted.
61         (.resource-timing-breakdown .time-section): Deleted.
62         (.resource-timing-breakdown ul > li > .time-section > .label): Deleted.
63         (.resource-timing-breakdown ul > li.total .block): Deleted.
64         (.resource-timing-breakdown ul > li.total .time-label): Deleted.
65         * UserInterface/Views/ResourceTimingBreakdownView.js:
66         (WI.ResourceTimingBreakdownView):
67         (WI.ResourceTimingBreakdownView.prototype._appendEmptyRow):
68         (WI.ResourceTimingBreakdownView.prototype._appendHeaderRow):
69         (WI.ResourceTimingBreakdownView.prototype._appendRow):
70         (WI.ResourceTimingBreakdownView.prototype.initialLayout):
71         (WI.ResourceTimingBreakdownView.prototype.initialLayout.createBlock): Deleted.
72         (WI.ResourceTimingBreakdownView.prototype.initialLayout.createSectionLabel): Deleted.
73         (WI.ResourceTimingBreakdownView.prototype.initialLayout.createTimeLabel): Deleted.
74         (WI.ResourceTimingBreakdownView.prototype.initialLayout.createTimeSection): Deleted.
75         (WI.ResourceTimingBreakdownView.prototype.initialLayout.createRow): Deleted.
76         (WI.ResourceTimingBreakdownView.prototype.initialLayout.emptyRow): Deleted.
77         (WI.ResourceTimingBreakdownView.prototype.initialLayout.appendGraphRow): Deleted.
78         (WI.ResourceTimingBreakdownView.prototype.initialLayout.appendEmptyRow): Deleted.
79         (WI.ResourceTimingBreakdownView.prototype.initialLayout.getCurrentSectionMetrics): Deleted.
80         Redesign the breakdown view.
81
82 2017-12-19  Brian Burg  <bburg@apple.com>
83
84         Web Inspector: InspectorTest.expectException does not handle implicitly resolved async functions correctly
85         https://bugs.webkit.org/show_bug.cgi?id=180944
86
87         Reviewed by Joseph Pecoraro.
88
89         * UserInterface/Test/TestHarness.js:
90         (TestHarness.prototype.expectException):
91         Don't chain .catch after we might have just returned a rejected promise.
92
93 2017-12-19  Joseph Pecoraro  <pecoraro@apple.com>
94
95         Web Inspector: Network Table - Update the Time column to include the total duration not just the download duration
96         https://bugs.webkit.org/show_bug.cgi?id=180998
97         <rdar://problem/36140424>
98
99         Reviewed by Matt Baker.
100
101         * UserInterface/Models/Resource.js:
102         (WI.Resource.prototype.get totalDuration):
103         (WI.Resource.prototype.get duration): Deleted.
104         Rename and group getters to be clearer.
105
106         * UserInterface/Views/NetworkTableContentView.js:
107         (WI.NetworkTableContentView.prototype._entryForResource):
108         Use the totalDuration for the network table time column.
109
110         * UserInterface/Views/ResourceTimelineDataGridNode.js:
111         (WI.ResourceTimelineDataGridNode.prototype._mouseoverRecordBar graphDataSource.get secondsPerPixel):
112         Using the download duration was incorrect here.
113
114 2017-12-19  Devin Rousso  <webkit@devinrousso.com>
115
116         Web Inspector: Styles Redesign: Typing semicolon at the end of value should move to the next property
117         https://bugs.webkit.org/show_bug.cgi?id=178498
118         <rdar://problem/35065995>
119
120         Reviewed by Joseph Pecoraro.
121
122         * UserInterface/Views/SpreadsheetStypeProperty.js:
123         (WI.SpreadsheetStypeProperty.prototype._update):
124         (WI.SpreadsheetStypeProperty.prototype._handleValueBeforeInput):
125         Only move to the next property if there are no unbalanced quotes. For example, adding a
126         semicolon after `url("foo` or `url('bar` would not move to the next property.
127
128         * UserInterface/Views/SpreadsheetTextField.js:
129         (WI.SpreadsheetTextField.prototype.valueWithoutSuggestion):
130         (WI.SpreadsheetTextField.prototype.completionSuggestionsSelectedCompletion):
131         (WI.SpreadsheetTextField.prototype.completionSuggestionsClickedCompletion):
132         (WI.SpreadsheetTextField.prototype._handleKeyDownForSuggestionView):
133         (WI.SpreadsheetTextField.prototype._updateCompletions):
134         (WI.SpreadsheetTextField.prototype._getPrefix): Deleted.
135
136 2017-12-18  Nikita Vasilyev  <nvasilyev@apple.com>
137
138         Web Inspector: Styles Redesign: Command-S should save changes in matching CSS resource
139         https://bugs.webkit.org/show_bug.cgi?id=180900
140
141         Reviewed by Timothy Hatcher.
142
143         When focused on a CSS selector, property name or value, pressing Command-S should save
144         the CSS resource to the file system.
145
146         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
147         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
148         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._save):
149
150 2017-12-18  Devin Rousso  <webkit@devinrousso.com>
151
152         Web Inspector: Styles Redesign: add inline swatch for CSS variables
153         https://bugs.webkit.org/show_bug.cgi?id=180798
154
155         Reviewed by Timothy Hatcher.
156
157         * UserInterface/Views/SpreadsheetStyleProperty.js:
158         (WI.SpreadsheetStyleProperty):
159         (WI.SpreadsheetStyleProperty.prototype.updateStatus):
160         (WI.SpreadsheetStyleProperty.prototype._renderValue):
161         (WI.SpreadsheetStyleProperty.prototype._addVariableTokens):
162
163 2017-12-18  Devin Rousso  <webkit@devinrousso.com>
164
165         Web Inspector: recording view and slider have jumbled layout at narrow widths
166         https://bugs.webkit.org/show_bug.cgi?id=180597
167         <rdar://problem/35939904>
168
169         Reviewed by Timothy Hatcher.
170
171         * UserInterface/Views/RecordingContentView.css:
172         (.content-view:not(.tab).recording > header > .slider-container):
173         (.content-view:not(.tab).recording > header > .slider-container > *):
174         (.content-view:not(.tab).recording > header > .slider-container > input[type=range]):
175
176 2017-12-18  Matt Baker  <mattbaker@apple.com>
177
178         Web Inspector: Canvas tab: placeholder/help text wrapping looks poor at narrow widths
179         https://bugs.webkit.org/show_bug.cgi?id=180943
180         <rdar://problem/36114431>
181
182         Reviewed by Timothy Hatcher.
183
184         * UserInterface/Views/ContentView.css:
185         (.content-view > .message-text-view > .description):
186         * UserInterface/Views/Main.css:
187         (.message-text-view .navigation-item-help):
188         (.message-text-view .navigation-item-help .navigation-bar):
189         (.message-text-view .navigation-item-help .navigation-bar > .item):
190
191 2017-12-18  Devin Rousso  <webkit@devinrousso.com>
192
193         REGRESSION (r225569): Web Inspector: Commented out properties aren't properly highlighted
194         https://bugs.webkit.org/show_bug.cgi?id=180687
195
196         Reviewed by Timothy Hatcher.
197
198         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
199         (.spreadsheet-style-declaration-editor .property:not(.disabled) .name):
200         (.spreadsheet-style-declaration-editor .property:not(.disabled) .value):
201         (.spreadsheet-style-declaration-editor .property.disabled):
202         (.spreadsheet-style-declaration-editor .name): Deleted.
203         (.spreadsheet-style-declaration-editor .value): Deleted.
204         (.spreadsheet-style-declaration-editor .property.disabled, .spreadsheet-style-declaration-editor .property.disabled > *): Deleted.
205
206 2017-12-18  Joseph Pecoraro  <pecoraro@apple.com>
207
208         Web Inspector: Network Tab - waterfall graph can be mis-sized after closing detail view
209         https://bugs.webkit.org/show_bug.cgi?id=180903
210         <rdar://problem/36087903>
211
212         Reviewed by Matt Baker.
213
214         * UserInterface/Views/NetworkTableContentView.js:
215         (WI.NetworkTableContentView.prototype._hideResourceDetailView):
216         Redraw waterfall column after hiding the detail view.
217
218 2017-12-15  Ryan Haddad  <ryanhaddad@apple.com>
219
220         Unreviewed, rolling out r225941.
221
222         This change introduced LayoutTest crashes and assertion
223         failures.
224
225         Reverted changeset:
226
227         "Web Inspector: replace HTMLCanvasElement with
228         CanvasRenderingContext for instrumentation logic"
229         https://bugs.webkit.org/show_bug.cgi?id=180770
230         https://trac.webkit.org/changeset/225941
231
232 2017-12-15  Devin Rousso  <webkit@devinrousso.com>
233
234         Web Inspector: Canvas Tab should be turned on by default
235         https://bugs.webkit.org/show_bug.cgi?id=180594
236         <rdar://problem/35938917>
237
238         Reviewed by Brian Burg.
239
240         * UserInterface/Base/Main.js:
241         (WI.loaded):
242
243 2017-12-15  Nikita Vasilyev  <nvasilyev@apple.com>
244
245         Web Inspector: Styles Redesign: clicking above selector should prepend new property
246         https://bugs.webkit.org/show_bug.cgi?id=180628
247         <rdar://problem/35954570>
248
249         Reviewed by Devin Rousso.
250
251         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
252         (.spreadsheet-style-declaration-editor .property):
253         (.spreadsheet-style-declaration-editor .property-toggle):
254         (.spreadsheet-style-declaration-editor .property.has-warning .warning):
255         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:
256         (.spreadsheet-css-declaration):
257         (.spreadsheet-css-declaration :matches(.header, .header-media)):
258         (.spreadsheet-css-declaration :matches(.header, .header-media):first-child):
259         When header-media element is present, header element should have padding-top set to 0.
260
261         (.spreadsheet-css-declaration .header.editing-selector .origin):
262         (.spreadsheet-css-declaration .close-brace):
263
264 2017-12-14  David Kilzer  <ddkilzer@apple.com>
265
266         Enable -Wstrict-prototypes for WebKit
267         <https://webkit.org/b/180757>
268         <rdar://problem/36024132>
269
270         Rubber-stamped by Joseph Pecoraro.
271
272         * Configurations/Base.xcconfig:
273         (CLANG_WARN_STRICT_PROTOTYPES): Add. Set to YES.
274
275 2017-12-14  Brian Burg  <bburg@apple.com>
276
277         Web Inspector: InspectorTest.evaluateInPage should unwrap primitive values by default
278         https://bugs.webkit.org/show_bug.cgi?id=180831
279
280         Reviewed by Joseph Pecoraro.
281
282         * UserInterface/Test/FrontendTestHarness.js:
283         (FrontendTestHarness.prototype.evaluateInPage.resultObjectToReturn):
284         (FrontendTestHarness.prototype.evaluateInPage):
285         Unwrap the resulting RemoteObject's value if it is a primitive.
286         Add an `options` dictionary so this behavior can be opted out.
287
288         * UserInterface/Test/TestHarness.js:
289         Add documentation of how evaluateInPage works.
290
291 2017-12-14  Nikita Vasilyev  <nvasilyev@apple.com>
292
293         Web Inspector: Styles Redesign: selecting text should not add new properties
294         https://bugs.webkit.org/show_bug.cgi?id=180797
295         <rdar://problem/36039751>
296
297         Reviewed by Devin Rousso.
298
299         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
300         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleClick):
301
302 2017-12-14  Devin Rousso  <webkit@devinrousso.com>
303
304         Web Inspector: replace HTMLCanvasElement with CanvasRenderingContext for instrumentation logic
305         https://bugs.webkit.org/show_bug.cgi?id=180770
306
307         Reviewed by Joseph Pecoraro.
308
309         * UserInterface/Models/Canvas.js:
310         (WI.Canvas.fromPayload):
311         (WI.Canvas.prototype.get contextType):
312         (WI.Canvas.prototype.saveIdentityToCookie):
313         (WI.Canvas.prototype.get frame): Deleted.
314
315 2017-12-14  Joseph Pecoraro  <pecoraro@apple.com>
316
317         Web Inspector: Network Tab - URL filter should be case-insensitive like filter bars in other tabs
318         https://bugs.webkit.org/show_bug.cgi?id=180824
319         <rdar://problem/35910750>
320
321         Reviewed by Brian Burg.
322
323         * UserInterface/Views/NetworkTableContentView.js:
324         (WI.NetworkTableContentView):
325         (WI.NetworkTableContentView.prototype._resetFilters):
326         (WI.NetworkTableContentView.prototype._urlFilterDidChange):
327         Use a case-insensitive regex created from the search query
328         and use that when filtering resources.
329
330         (WI.NetworkTableContentView.prototype._checkURLFilterAgainstFinishedResource): Deleted.
331         (WI.NetworkTableContentView.prototype._checkURLFilterAgainstResource):
332         (WI.NetworkTableContentView.prototype._resourceLoadingDidFinish):
333         (WI.NetworkTableContentView.prototype._resourceLoadingDidFail):
334         Rename the helper for checking the URL filter.
335
336 2017-12-14  Joseph Pecoraro  <pecoraro@apple.com>
337
338         Web Inspector: UncaughtExceptionReporter fails on early errors
339         https://bugs.webkit.org/show_bug.cgi?id=180776
340
341         Reviewed by Brian Burg.
342
343         * UserInterface/Debug/UncaughtExceptionReporter.js:
344         (urlLastPathComponent):
345         (handleError):
346         (handleUncaughtException):
347         URLUtilities parseURL might not be available, so have a small
348         helper for getting a good name from a URL / filename.
349
350         (handleUncaughtExceptionRecord):
351         (dismissErrorSheet):
352         Wrap `WI` namespace accesses in a try/catch since `WI` might not be available.
353         Safely check global variables there were `Foo` as `window.Foo` to avoid errors
354         if they are not actually available.
355
356 2017-12-13  Joseph Pecoraro  <pecoraro@apple.com>
357
358         Web Inspector: Network Tab - Make text filter just a URL filter and update incrementally
359         https://bugs.webkit.org/show_bug.cgi?id=180796
360
361         Reviewed by Brian Burg.
362
363         Revert the Network Tab's text filter back to being just a URL filter with the
364         normal behaviors of our other text filters that update as you type (incremental).
365         This also renames the "text filter" to "url filter" everywhere in the ContentView
366         for clarity. A follow-up change will make the url filter be case-insensitive
367         to fully match the filter bars in other tabs.
368
369         * Localizations/en.lproj/localizedStrings.js:
370         * UserInterface/Views/NetworkTableContentView.js:
371         (WI.NetworkTableContentView):
372         (WI.NetworkTableContentView.prototype.get filterNavigationItems):
373         (WI.NetworkTableContentView.prototype._checkURLFilterAgainstFinishedResource):
374         (WI.NetworkTableContentView.prototype._updateURLFilterActiveIndicator):
375         (WI.NetworkTableContentView.prototype._resourceLoadingDidFinish):
376         (WI.NetworkTableContentView.prototype._resourceLoadingDidFail):
377         (WI.NetworkTableContentView.prototype._hasURLFilter):
378         (WI.NetworkTableContentView.prototype._hasActiveFilter):
379         (WI.NetworkTableContentView.prototype._passURLFilter):
380         (WI.NetworkTableContentView.prototype._passFilter):
381         (WI.NetworkTableContentView.prototype._updateFilteredEntries):
382         (WI.NetworkTableContentView.prototype._resetFilters):
383         (WI.NetworkTableContentView.prototype._urlFilterDidChange):
384         (WI.NetworkTableContentView.prototype._checkTextFilterAgainstFinishedResource): Deleted.
385         (WI.NetworkTableContentView.prototype._checkTextFilterAgainstFailedResource): Deleted.
386         (WI.NetworkTableContentView.prototype._updateTextFilterActiveIndicator): Deleted.
387         (WI.NetworkTableContentView.prototype._hasTextFilter): Deleted.
388         (WI.NetworkTableContentView.prototype._passTextFilter): Deleted.
389         (WI.NetworkTableContentView.prototype._textFilterDidChange): Deleted.
390
391 2017-12-13  Joseph Pecoraro  <pecoraro@apple.com>
392
393         REGRESSION: Web Inspector: Opening inspector crashes page if there are empty resources
394         https://bugs.webkit.org/show_bug.cgi?id=180787
395         <rdar://problem/35934838>
396
397         Reviewed by Brian Burg.
398
399         * UserInterface/Test/TestUtilities.js:
400         Add a generic sanitizeURL used by many tests.
401
402         * UserInterface/TestStub.html:
403         Include TestUtilities.
404
405 2017-12-13  Devin Rousso  <webkit@devinrousso.com>
406
407         Web Inspector: add instrumentation for ImageBitmapRenderingContext
408         https://bugs.webkit.org/show_bug.cgi?id=180736
409
410         Reviewed by Joseph Pecoraro.
411
412         * UserInterface/Base/ImageUtilities.js:
413         (WI.ImageUtilities.promisifyLoad):
414         (WI.ImageUtilities.imageFromImageBitmap):
415
416         * UserInterface/Models/Canvas.js:
417         (WI.Canvas.fromPayload):
418         (WI.Canvas.displayNameForContextType):
419
420         * UserInterface/Models/NativeFunctionParameters.js:
421
422         * UserInterface/Models/Recording.js:
423         (WI.Recording.displayNameForSwizzleType):
424         (WI.Recording.prototype.async swizzle):
425
426         * UserInterface/Views/RecordingActionTreeElement.js:
427         (WI.RecordingActionTreeElement._generateDOM):
428         (WI.RecordingActionTreeElement._generateDOM.createParameterElement):
429
430 2017-12-12  Nikita Vasilyev  <nvasilyev@apple.com>
431
432         Web Inspector: Styles Redesign: navigating away from empty value should remove CSS property
433         https://bugs.webkit.org/show_bug.cgi?id=180508
434
435         Reviewed by Devin Rousso.
436
437         Remove a property when navigating away from it (e.g. to the next/previous property,
438         or outside of the styles panel entirely) and either its name or value is empty:
439
440             color: [ ]->
441             <-[ ]: red
442             <-[color]:
443
444         Don't remove a property when navigating from an empty value to a non-empty name:
445
446             color: <-[ ]
447
448         Always remove a property when both name and value are empty.
449
450         * UserInterface/Views/SpreadsheetStyleProperty.js:
451         (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidCommit):
452         (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidBlur):
453         * UserInterface/Views/SpreadsheetTextField.js:
454         (WI.SpreadsheetTextField.prototype._handleBlur):
455         (WI.SpreadsheetTextField.prototype.get valueBeforeEditing): Deleted.
456
457 2017-12-12  Brian Burg  <bburg@apple.com>
458
459         Web Inspector: support async setup() and async teardown() in AsyncTestSuite
460         https://bugs.webkit.org/show_bug.cgi?id=180626
461
462         Reviewed by Timothy Hatcher.
463
464         This can make some code simpler by removing Promise-related boilerplate. I'm splitting
465         this patch from the new use-site in the interest of making it easier to review.
466
467         * UserInterface/Test/TestSuite.js:
468         (AsyncTestSuite.prototype.runTestCases):
469         (AsyncTestSuite):
470
471 2017-12-12  Brian Burg  <bburg@apple.com>
472
473         Web Inspector: SyncTestSuite should complain if passed an async setup/test/teardown function
474         https://bugs.webkit.org/show_bug.cgi?id=180717
475
476         Reviewed by Devin Rousso.
477
478         * UserInterface/Test/TestSuite.js:
479         (SyncTestSuite.prototype.addTestCase):
480         Raise an exception if test/setup/teardown is an async function. It won't work.
481
482 2017-12-12  Brian Burg  <bburg@apple.com>
483
484         Web Inspector: add InspectorTest.expectException() and use it
485         https://bugs.webkit.org/show_bug.cgi?id=180719
486
487         Reviewed by Matt Baker.
488
489         This helps straighten out async test() functions that need
490         to test exceptional cases. Without this, every such method
491         needs try/catch boilerplate to leak the error outside the
492         scope of the catch-block and then assert that it exists.
493
494         * UserInterface/Test/TestHarness.js:
495         (TestHarness.prototype.expectException):
496         Added. This method takes a callback which is expected to raise
497         an exception either by throwing an Error instance or returning
498         a Promise that rejects with an Error instance. The method returns
499         a Promise that is either resolved with the expected exception
500         from one of the above sources, or is rejected with the non-exception
501         result that was returned or resolved by the callback.
502
503 2017-12-12  Michael Catanzaro  <mcatanzaro@igalia.com>
504
505         Don't require perl(File::Copy::Recursive)
506         https://bugs.webkit.org/show_bug.cgi?id=180479
507         <rdar://problem/35944218>
508
509         Reviewed by Daniel Bates.
510
511         Fix the error handling. I added this at the last moment and failed to test. The logic is
512         inverted, causing an error to always be reported on success.
513
514         Add a missing 'mkdir -p' using File::Path::make_path. This has its own built-in error
515         reporting, so no need to add our own.
516
517         * Scripts/copy-user-interface-resources.pl:
518         (ditto):
519
520 2017-12-12  Michael Catanzaro  <mcatanzaro@igalia.com>
521
522         Unreviewed, don't print empty error message when copying resource fails
523
524         Unsurprisingly, when system() fails, there is not any useful error to be printed, so don't.
525
526         * Scripts/copy-user-interface-resources.pl:
527         (ditto):
528
529 2017-12-08  Joseph Pecoraro  <pecoraro@apple.com>
530
531         ServiceWorker Inspector: Various issues inspecting service worker on mobile.twitter.com
532         https://bugs.webkit.org/show_bug.cgi?id=180520
533         <rdar://problem/35900764>
534
535         Reviewed by Brian Burg.
536
537         * UserInterface/Main.html:
538         * UserInterface/Test.html:
539         New files.
540
541         * UserInterface/Controllers/SourceMapManager.js:
542         (WI.SourceMapManager.prototype._loadAndParseSourceMap):
543         * UserInterface/Models/SourceMapResource.js:
544         (WI.SourceMapResource.prototype.requestContentFromBackend):
545         A ServiceWorker inspector doesn't have a main frame, fall back to an
546         empty frameIdentifier, it is ignored by the Service Worker network agent.
547
548         * UserInterface/Base/Main.js:
549         Handle a Service Worker inspector where there is no frame. This can
550         search the main resource's resource collection.
551
552         * UserInterface/Controllers/DebuggerManager.js:
553         (WI.DebuggerManager.prototype.scriptDidParse):
554
555         * UserInterface/Controllers/FrameResourceManager.js:
556         (WI.FrameResourceManager.prototype.resourceRequestDidFailLoading):
557         In Service Workers the resources won't have a parent frame.
558
559         (WI.FrameResourceManager.prototype._addNewResourceToFrameOrTarget):
560         (WI.FrameResourceManager.prototype._processServiceWorkerInitializationInfo):
561         In service worker initialization fallback to using the script content
562         as the main resource if we didn't get a Script that actually includes it.
563
564         * UserInterface/Models/LocalScript.js:
565         (WI.LocalScript):
566         (WI.LocalScript.prototype.requestContentFromBackend):
567         A way to create a local Script with content.
568
569         * UserInterface/Views/SourceCodeTextEditor.js:
570         (WI.SourceCodeTextEditor.prototype.get _supportsDebugging):
571         Disallow breakpoints in a LocalScript since we have no way to tell the
572         backend where to set breakpoints.
573
574         * UserInterface/Models/TextRange.js:
575         (WI.TextRange.fromText):
576         Add a way to get a TextRange from static text.
577
578 2017-12-08  Michael Catanzaro  <mcatanzaro@igalia.com>
579
580         Don't require perl(File::Copy::Recursive)
581         https://bugs.webkit.org/show_bug.cgi?id=180479
582
583         Reviewed by Konstantin Tokarev.
584
585         If File::Copy::Recursive is not installed, there is currently a Darwin
586         fallback to the ditto command. That doesn't exist on Linux, but we can
587         emulate it by running 'cp -R' on everything in the source directory.
588         This should probably work everywhere except Windows.
589
590         * Scripts/copy-user-interface-resources.pl:
591         (ditto):
592
593 2017-12-07  Eric Carlson  <eric.carlson@apple.com>
594
595         Simplify log channel configuration UI
596         https://bugs.webkit.org/show_bug.cgi?id=180527
597         <rdar://problem/35908382>
598
599         Reviewed by Joseph Pecoraro.
600
601         * Localizations/en.lproj/localizedStrings.js:
602         * UserInterface/Models/LoggingChannel.js:
603         * UserInterface/Views/SettingsTabContentView.js:
604         (WI.SettingsTabContentView.prototype._createGeneralSettingsView):
605
606 2017-12-07  Matt Lewis  <jlewis3@apple.com>
607
608         Unreviewed, rolling out r225634.
609
610         This caused layout tests to time out.
611
612         Reverted changeset:
613
614         "Simplify log channel configuration UI"
615         https://bugs.webkit.org/show_bug.cgi?id=180527
616         https://trac.webkit.org/changeset/225634
617
618 2017-12-07  Eric Carlson  <eric.carlson@apple.com>
619
620         Simplify log channel configuration UI
621         https://bugs.webkit.org/show_bug.cgi?id=180527
622         <rdar://problem/35908382>
623
624         Reviewed by Joseph Pecoraro.
625
626         * Localizations/en.lproj/localizedStrings.js:
627         * UserInterface/Models/LoggingChannel.js:
628         * UserInterface/Views/SettingsTabContentView.js:
629         (WI.SettingsTabContentView.prototype._createGeneralSettingsView):
630
631 2017-12-06  Devin Rousso  <webkit@devinrousso.com>
632
633         Web Inspector: Canvas: spurious warnings shown for commands that changed pixel contents
634         https://bugs.webkit.org/show_bug.cgi?id=180505
635         <rdar://problem/35891651>
636
637         Reviewed by Brian Burg.
638
639         * UserInterface/Models/RecordingAction.js:
640         (WI.RecordingAction.prototype.apply.getContent):
641         (WI.RecordingAction.prototype.apply):
642
643 2017-12-06  Devin Rousso  <webkit@devinrousso.com>
644
645         Web Inspector: Style Redesign: filtering removes header if one rule has no match even if others do
646         https://bugs.webkit.org/show_bug.cgi?id=180467
647
648         Reviewed by Timothy Hatcher.
649
650         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
651         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.applyFilter):
652         (WI.SpreadsheetRulesStyleDetailsPanel.prototype._handleSectionFilterApplied):
653
654 2017-12-06  Matt Baker  <mattbaker@apple.com>
655
656         Web Inspector: Details section headers overlap Classes container in the Computed Styles panel
657         https://bugs.webkit.org/show_bug.cgi?id=180380
658
659         Reviewed by Timothy Hatcher.
660
661         * UserInterface/Views/CSSStyleDetailsSidebarPanel.css:
662         (.sidebar > .panel.details.css-style > .content ~ :matches(.options-container, .class-list-container)):
663
664 2017-12-06  Matt Baker  <mattbaker@apple.com>
665
666         Web Inspector: Canvas Tab initial user experience is poor when no canvases exist
667         https://bugs.webkit.org/show_bug.cgi?id=179329
668         <rdar://problem/35842036>
669
670         Reviewed by Timothy Hatcher.
671
672         This patch adds a new method, WI.createNavigationItemHelp, for creating command
673         help to display in a message text view. The method accepts a format string and
674         NavigationItem, and returns a DOM element. For example,
675
676             WI.createNavigationItemHelp("Press %s to do X.", navigationItem)
677
678         returns:
679
680             <div class="navigation-item-help">
681                 Press <div class="navigation-bar"><div class="item">...</div></div> to do X.
682             </div>
683
684         * Localizations/en.lproj/localizedStrings.js:
685         * UserInterface/Base/Main.js:
686
687         * UserInterface/Controllers/CanvasManager.js:
688         (WI.CanvasManager.prototype.importRecording):
689         Importing a recording should be a manager command with a corresponding
690         event, so that it's decoupled from any specific location in the UI.
691
692         * UserInterface/Views/CanvasOverviewContentView.js:
693         (WI.CanvasOverviewContentView):
694
695         * UserInterface/Views/CanvasTabContentView.js:
696         (WI.CanvasTabContentView):
697         (WI.CanvasTabContentView.prototype.attached):
698         (WI.CanvasTabContentView.prototype._recordingImportedOrStopped):
699         (WI.CanvasTabContentView.prototype._recordingStopped): Deleted.
700         (WI.CanvasTabContentView.prototype._navigationSidebarImport): Deleted.
701
702         * UserInterface/Views/Main.css:
703         (.message-text-view .navigation-item-help):
704         (.message-text-view .navigation-item-help .navigation-bar):
705         (.message-text-view .navigation-item-help .navigation-bar > .item):
706         New styles for a NavigationItem appearing inline as part of descriptive
707         text. Wrapped in a fake navigation bar so navigation item styles are picked up.
708
709         * UserInterface/Views/RecordingNavigationSidebarPanel.js:
710         (WI.RecordingNavigationSidebarPanel.prototype.initialLayout):
711         (WI.RecordingNavigationSidebarPanel.prototype._importNavigationItemClicked): Deleted.
712         Moved import code to CanvasManager.
713
714 2017-12-06  Devin Rousso  <webkit@devinrousso.com>
715
716         Web Inspector: REGRESSION(r225569): CSSStyleDetailsSidebarPanel no longer exists
717         https://bugs.webkit.org/show_bug.cgi?id=180466
718
719         Reviewed by Joseph Pecoraro.
720
721         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
722         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.applyFilter):
723         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleEditorFilterApplied):
724
725         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
726         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.applyFilter):
727         (WI.SpreadsheetRulesStyleDetailsPanel.prototype._handleSectionFilterApplied):
728
729         * UserInterface/Views/SpreadsheetStyleProperty.js:
730         (WI.SpreadsheetStyleProperty.prototype.applyFilter):
731
732 2017-12-06  Devin Rousso  <webkit@devinrousso.com>
733
734         Web Inspector: Styles Redesign: display related pseudo-elements
735         https://bugs.webkit.org/show_bug.cgi?id=176187
736         <rdar://problem/34194917>
737
738         Reviewed by Timothy Hatcher.
739
740         * Localizations/en.lproj/localizedStrings.js:
741
742         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
743         (WI.SpreadsheetRulesStyleDetailsPanel):
744         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.refresh):
745         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.applyFilter):
746         (WI.SpreadsheetRulesStyleDetailsPanel.prototype._handleSectionFilterApplied):
747         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.css:
748         (.spreadsheet-style-panel .section-header):
749         (.spreadsheet-style-panel .section-header .node-link):
750         (.spreadsheet-style-panel .section-header .node-link:hover):
751         (.spreadsheet-style-panel .section-inherited): Deleted.
752         (.spreadsheet-style-panel .section-inherited .node-link): Deleted.
753         (.spreadsheet-style-panel .section-inherited .node-link:hover): Deleted.
754         After all of the matched and inherited styles are added, loop over each pseudo-element, get
755         the DOMNodeStyles for each, refresh them if needed, and then add the header and sections.
756
757         * UserInterface/Models/DOMNodeStyles.js:
758         (WI.DOMNodeStyles.prototype.refreshIfNeeded):
759         (WI.DOMNodeStyles.prototype.refresh):
760         Return a reference to the DOMNodeStyles object once the refresh promise is resolved.
761
762         * UserInterface/Models/DOMNode.js:
763         (WI.DOMNode.prototype.get displayName):
764         If the node is a pseudo-element, display the pseudo-type instead of the node name.
765
766 2017-12-06  Devin Rousso  <webkit@devinrousso.com>
767
768         Web Inspector: [PARITY] Styles Redesign: Ability to add new style rules
769         https://bugs.webkit.org/show_bug.cgi?id=178329
770         <rdar://problem/35001005>
771
772         Reviewed by Timothy Hatcher.
773
774         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
775         (WI.SpreadsheetRulesStyleDetailsPanel):
776         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.refresh):
777         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.newRuleButtonClicked):
778         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.newRuleButtonContextMenu):
779         (WI.SpreadsheetRulesStyleDetailsPanel.prototype._addNewRule):
780         Implement the two functions that CSSStyleDetailsSidebarPanel expects to exist in order for
781         the selected panel to support adding a new rule.
782
783         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
784         (WI.SpreadsheetCSSStyleDeclarationSection):
785         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.layout):
786         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.startEditingRuleSelector):
787         If the _selectorElement has not been created yet, set a flag and focus it once layout() has
788         been called (thereby ensuring that initialLayout() has been called).
789
790 2017-12-05  Devin Rousso  <webkit@devinrousso.com>
791
792         Web Inspector: Styles Redesign: for newly added properties, pressing delete in empty value field should focus on name field
793         https://bugs.webkit.org/show_bug.cgi?id=179831
794         <rdar://problem/35626976>
795
796         Reviewed by Timothy Hatcher.
797
798         * UserInterface/Views/SpreadsheetTextField.js:
799         (WI.SpreadsheetTextField.prototype._handleKeyDown):
800
801         * UserInterface/Views/SpreadsheetStyleProperty.js:
802         (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidBackspace):
803
804 2017-12-05  Devin Rousso  <webkit@devinrousso.com>
805
806         Web Inspector: [PARITY] Styles Redesign: Make filtering work
807         https://bugs.webkit.org/show_bug.cgi?id=178331
808         <rdar://problem/35001015>
809
810         Reviewed by Timothy Hatcher.
811
812         Since both the sections and editors (per-section) use View semantics, we cannot simply
813         search for instances of the filtered text since not all of the subviews may have called
814         layout() yet. Instead, we have to rely on event listeners to relay information as to whether
815         the filtered text was matched up the chain, applying the correct style classes along the way.
816
817         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
818         (WI.SpreadsheetRulesStyleDetailsPanel):
819         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.refresh):
820         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.applyFilter):
821         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.filterDidChange):
822         (WI.SpreadsheetRulesStyleDetailsPanel.prototype._handleSectionFilterApplied):
823         Save the "Inherited From" elements so that they can be hidden if no styles inherited from
824         that node match the filter.
825
826         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
827         (WI.SpreadsheetCSSStyleDeclarationSection):
828         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
829         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.layout):
830         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.applyFilter):
831         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._renderSelector):
832         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._createMediaHeader):
833         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleEditorFilterApplied):
834         Save the media header elements so that they can also be filtered.
835
836         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
837         (WI.SpreadsheetCSSStyleDeclarationEditor):
838         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
839         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.applyFilter):
840
841         * UserInterface/Views/SpreadsheetStyleProperty.js:
842         (WI.SpreadsheetStyleProperty):
843         (WI.SpreadsheetStyleProperty.prototype.applyFilter):
844         (WI.SpreadsheetStyleProperty.prototype._update):
845         Move the name and value elements to a new container so that filter highlight won't also
846         apply to the checkbox or warning element.
847
848 2017-12-05  Nikita Vasilyev  <nvasilyev@apple.com>
849
850         Web Inspector: Styles Redesign: adding a property before or after the first one appends it to the end
851         https://bugs.webkit.org/show_bug.cgi?id=180321
852         <rdar://problem/35816402>
853
854         Reviewed by Timothy Hatcher.
855
856         * UserInterface/Models/CSSStyleDeclaration.js:
857         (WI.CSSStyleDeclaration.prototype._rangeAfterPropertyAtIndex):
858         * UserInterface/Models/TextRange.js:
859         (WI.TextRange.prototype.collapseToStart):
860
861 2017-12-05  Joseph Pecoraro  <pecoraro@apple.com>
862
863         Web Inspector: Empty Message View in Network Tab has padding at top
864         https://bugs.webkit.org/show_bug.cgi?id=180453
865
866         Reviewed by Matt Baker.
867
868         * UserInterface/Views/NetworkTableContentView.css:
869         (.content-view.network .message-text-view): Deleted.
870
871 2017-12-05  Nikita Vasilyev  <nvasilyev@apple.com>
872
873         Web Inspector: Styles: make Computed a top-level sidebar tab
874         https://bugs.webkit.org/show_bug.cgi?id=174229
875         <rdar://problem/33170193>
876
877         Reviewed by Matt Baker.
878
879         Styles dropdown tab selector was removed. Styles and Computed are now top-level sidebar tabs.
880
881         Visual styles is no longer visible in the Styles sidebar tabs by default but can be enabled in the settings.
882
883         * Localizations/en.lproj/localizedStrings.js:
884         * UserInterface/Base/Setting.js:
885         * UserInterface/Main.html:
886         * UserInterface/Views/CSSStyleDeclarationSection.js:
887         (WI.CSSStyleDeclarationSection.prototype.findMatchingPropertiesAndSelectors):
888         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
889         (WI.CSSStyleDeclarationTextEditor.prototype.findMatchingProperties):
890         (WI.CSSStyleDeclarationTextEditor.prototype.removeNonMatchingProperties):
891         * UserInterface/Views/ComputedStyleDetailsSidebarPanel.js: Added.
892         (WI.ComputedStyleDetailsSidebarPanel):
893         * UserInterface/Views/DOMTreeOutline.js:
894         (WI.DOMTreeOutline.prototype._ondragover):
895         (WI.DOMTreeOutline.prototype._ondrop):
896         * UserInterface/Views/ElementsTabContentView.js:
897         (WI.ElementsTabContentView):
898         * UserInterface/Views/GeneralStyleDetailsSidebarPanel.css: Renamed from Source/WebInspectorUI/UserInterface/Views/CSSStyleDetailsSidebarPanel.css.
899         * UserInterface/Views/GeneralStyleDetailsSidebarPanel.js: Renamed from Source/WebInspectorUI/UserInterface/Views/CSSStyleDetailsSidebarPanel.js.
900         (WI.GeneralStyleDetailsSidebarPanel):
901         (WI.GeneralStyleDetailsSidebarPanel.prototype.get panel):
902         (WI.GeneralStyleDetailsSidebarPanel.prototype.visibilityDidChange):
903         (WI.GeneralStyleDetailsSidebarPanel.prototype.computedStyleDetailsPanelShowProperty):
904         (WI.GeneralStyleDetailsSidebarPanel.prototype.layout):
905         (WI.GeneralStyleDetailsSidebarPanel.prototype.initialLayout):
906         (WI.GeneralStyleDetailsSidebarPanel.prototype.sizeDidChange):
907         (WI.GeneralStyleDetailsSidebarPanel.prototype.get _initialScrollOffset):
908         (WI.GeneralStyleDetailsSidebarPanel.prototype._updateNoForcedPseudoClassesScrollOffset):
909         (WI.GeneralStyleDetailsSidebarPanel.prototype._showPanel):
910         (WI.GeneralStyleDetailsSidebarPanel.prototype._newRuleButtonClicked):
911         (WI.GeneralStyleDetailsSidebarPanel.prototype._newRuleButtonContextMenu):
912         (WI.GeneralStyleDetailsSidebarPanel.prototype._populateClassToggles):
913         (WI.GeneralStyleDetailsSidebarPanel.prototype._createToggleForClassName):
914         (WI.GeneralStyleDetailsSidebarPanel.prototype._filterDidChange):
915         Styles and Computed tabs share a few UI components, such as force state (:hover, :focus, etc.),
916         filter field, and CSS class toggle components. To implement this, CSSStyleDetailsSidebarPanel was renamed
917         to GeneralStyleDetailsSidebarPanel.
918
919         CSSStyleDetailsSidebarPanel used to support several panels. This is no longer the case with GeneralStyleDetailsSidebarPanel:
920         - _initiallySelectedPanel was removed.
921         - _selectedPanel was replaced by _panel.
922
923         * UserInterface/Views/GroupNavigationItem.js:
924         (WI.GroupNavigationItem.prototype.get minimumWidth):
925         * UserInterface/Views/NavigationBar.css:
926         (.navigation-bar .item,):
927         (.sidebar-navigation-bar):
928         (.sidebar-navigation-bar .holder):
929         * UserInterface/Views/NavigationBar.js:
930         (WI.NavigationBar.prototype._calculateMinimumWidth):
931         Minor optimization: don't toggle class names when there are no visible navigation items.
932
933         * UserInterface/Views/RulesStyleDetailsPanel.js:
934         (WI.RulesStyleDetailsPanel.prototype.filterDidChange):
935         * UserInterface/Views/RulesStyleDetailsSidebarPanel.js: Copied from Source/WebInspectorUI/UserInterface/Views/NavigationBar.css.
936         (WI.RulesStyleDetailsSidebarPanel):
937         * UserInterface/Views/SearchTabContentView.js:
938         (WI.SearchTabContentView):
939         * UserInterface/Views/SettingsTabContentView.js:
940         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
941         * UserInterface/Views/Sidebar.js:
942         (WI.Sidebar):
943         * UserInterface/Views/SidebarNavigationBar.js: Copied from Source/WebInspectorUI/UserInterface/Views/NavigationBar.css.
944         (WI.SidebarNavigationBar):
945         (WI.SidebarNavigationBar.prototype.insertNavigationItem):
946         (WI.SidebarNavigationBar.prototype._calculateMinimumWidth):
947         SidebarNavigationBar wraps navigation items in an element so it can correctly calculate the width of all items with spacing between them.
948
949         * UserInterface/Views/StyleDetailsPanel.js:
950         (WI.StyleDetailsPanel.prototype.get _initialScrollOffset):
951         * UserInterface/Views/VisualStyleDetailsSidebarPanel.js: Copied from Source/WebInspectorUI/UserInterface/Views/NavigationBar.css.
952         (WI.VisualStyleDetailsSidebarPanel):
953
954 2017-12-05  Joseph Pecoraro  <pecoraro@apple.com>
955
956         Web Inspector: content views for resources loaded through XHR do not reflect declared mime-type
957         https://bugs.webkit.org/show_bug.cgi?id=141389
958         <rdar://problem/19767070>
959
960         Reviewed by Brian Burg.
961
962         * UserInterface/Base/Utilities.js:
963         Blob <-> Text conversion helpers.
964
965         * UserInterface/Models/Resource.js:
966         (WI.Resource.prototype.createObjectURL):
967         Previously all Image resources were assumed to have base64Encoded data
968         which we automatically convert to a Blob. Now that some image data
969         can be transfered as text, convert that to a Blob here since the output
970         is expected to be a Blob.
971
972         * UserInterface/Views/ResourceContentView.js:
973         (WI.ResourceContentView.prototype.showGenericNoContentMessage):
974         * UserInterface/Views/TextResourceContentView.js:
975         (WI.TextResourceContentView.prototype.contentAvailable):
976         (WI.TextResourceContentView.prototype._contentDidPopulate):
977         * UserInterface/Views/ImageResourceContentView.js:
978         (WI.ImageResourceContentView.prototype.contentAvailable):
979         Better handle no content cases.
980
981         * UserInterface/Views/ResourceClusterContentView.js:
982         (WI.ResourceClusterContentView.prototype.get responseContentView):
983         (WI.ResourceClusterContentView.prototype._contentViewForResourceType):
984         Make a best effort to find a good ContentView to show the resource data.
985         This is done by looking at the ResourceType and MIME Type.
986
987         * UserInterface/Views/SVGImageResourceClusterContentView.js:
988         (WI.SVGImageResourceClusterContentView.prototype._showContentViewForIdentifier):
989         Handle if image data is now text (the image/svg+xml case).
990
991 2017-12-05  Simon Fraser  <simon.fraser@apple.com>
992
993         Remove webkitGetImageDataHD and webkitPutImageDataHD from canvas API
994         https://bugs.webkit.org/show_bug.cgi?id=180387
995
996         Reviewed by Dean Jackson.
997
998         CanvasRenderingContext2D.webkitGetImageDataHD and webkitPutImageDataHD were never standardized,
999         and Blink removed support in 2014 (https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/FOPH5dloGG8).
1000
1001         Since our canvas backing store is always 1x, they have no use anyway, so remove them.
1002
1003         * UserInterface/Models/NativeFunctionParameters.js:
1004         * UserInterface/Models/RecordingAction.js:
1005         (WI.RecordingAction.prototype.getImageParameters):
1006         (WI.RecordingAction):
1007         * UserInterface/Views/RecordingActionTreeElement.js:
1008         (WI.RecordingActionTreeElement._classNameForAction.classNameForActionName):
1009         (WI.RecordingActionTreeElement._classNameForAction):
1010
1011 2017-12-04  Devin Rousso  <webkit@devinrousso.com>
1012
1013         Web Inspector: provide method for recording CanvasRenderingContext2D from JavaScript
1014         https://bugs.webkit.org/show_bug.cgi?id=175166
1015         <rdar://problem/34040740>
1016
1017         Reviewed by Joseph Pecoraro.
1018
1019         * UserInterface/Controllers/CanvasManager.js:
1020         (WI.CanvasManager.prototype.recordingFinished):
1021         If a `name` is sent with the payload, use it as the suggested name.
1022
1023         * UserInterface/Models/NativeFunctionParameters.js:
1024         Add `console.record` and `console.recordEnd`.
1025
1026         * UserInterface/Views/CanvasTabContentView.js:
1027         (WI.CanvasTabContentView.prototype.showRepresentedObject):
1028         Drive-by: remove logic that toggled the collapsed state of the navigation sidebar, as this
1029         was not very controllable by the user and often was aggravating.
1030
1031         (WI.CanvasTabContentView.prototype._recordingStopped):
1032         Only show the recording if it was not started from the console. This can determined by
1033         CanvasManager when it recieves a recording if the recording's source is not the same as the
1034         current canvas being recorded.
1035
1036 2017-12-04  Matt Baker  <mattbaker@apple.com>
1037
1038         Web Inspector: Canvas Tab initial user interface needs some polish
1039         https://bugs.webkit.org/show_bug.cgi?id=179330
1040         <rdar://problem/35367581>
1041
1042         Reviewed by Joseph Pecoraro.
1043
1044         Update the Canvas overview placeholder text and prevent appearance of
1045         the vertical scrollbar when no canvases exist. This patch also includes
1046         a bunch of cleanup of code that creates content placeholder text throughout
1047         the UI, and makes sure all text is styled consistently.
1048
1049         * Localizations/en.lproj/localizedStrings.js:
1050         Updated Canvas overview message text.
1051
1052         * UserInterface/Base/Main.js:
1053         Make the "message text view" a container with child message element, instead
1054         of a simple element with text content. This makes it simpler to customize
1055         the message (by adding buttons, more text, etc).
1056
1057         * UserInterface/Views/CanvasDetailsSidebarPanel.css:
1058         (.sidebar > .panel.details.canvas .details-section.canvas-extensions .content > ul):
1059         (.sidebar > .panel.details.canvas > .content > .empty-content-placeholder): Deleted.
1060         (.sidebar > .panel.details.canvas > .content > .empty-content-placeholder > .message): Deleted.
1061         * UserInterface/Views/CanvasDetailsSidebarPanel.js:
1062         (WI.CanvasDetailsSidebarPanel.prototype.initialLayout):
1063
1064         * UserInterface/Views/CanvasOverviewContentView.js:
1065         (WI.CanvasOverviewContentView):
1066         Customize the content placeholder to include a description beneath
1067         the "No Canvas Contexts" message.
1068
1069         * UserInterface/Views/CollectionContentView.css:
1070         (.content-view.collection):
1071         Change overflow-y to auto, to prevent scrollbar from appearing when
1072         "Show scroll bars" system preference is enabled on macOS.
1073
1074         * UserInterface/Views/CollectionContentView.js:
1075         Add support for custom content placeholders.
1076         (WI.CollectionContentView):
1077         (WI.CollectionContentView.prototype._showContentPlaceholder):
1078         (WI.CollectionContentView.prototype._hideContentPlaceholder):
1079
1080         * UserInterface/Views/ContentView.css:
1081         (.content-view > .message-text-view):
1082         (.content-view > .message-text-view > .message):
1083
1084         * UserInterface/Views/DebuggerSidebarPanel.css:
1085         (.sidebar > .panel.navigation.debugger > .content):
1086         (.sidebar > .panel.navigation.debugger > :matches(.content, .empty-content-placeholder)): Deleted.
1087
1088         * UserInterface/Views/DetailsSection.css:
1089         (.details-section > .content > .group > .row > .message-text-view):
1090
1091         * UserInterface/Views/Main.css:
1092         (.message-text-view):
1093         (.message-text-view > .message):
1094         (.message-text-view.error):
1095
1096         * UserInterface/Views/NavigationSidebarPanel.css:
1097         (.sidebar > .panel.navigation > .overflow-shadow):
1098         (.sidebar > .panel.navigation > .content .empty-content-placeholder): Deleted.
1099         (.sidebar > .panel.navigation > .content > .empty-content-placeholder): Deleted.
1100         (.sidebar > .panel.navigation > .content .empty-content-placeholder > .message): Deleted.
1101
1102         * UserInterface/Views/NavigationSidebarPanel.js:
1103         (WI.NavigationSidebarPanel.prototype.showEmptyContentPlaceholder):
1104         (WI.NavigationSidebarPanel.prototype._createEmptyContentPlaceholderIfNeeded):
1105
1106         * UserInterface/Views/NetworkTableContentView.css:
1107         (.content-view.network .message-text-view):
1108         (.content-view.network .message-text-view > .message):
1109         Workaround to prevent "No Filter Results" message from being styled like
1110         "full width" messages displayed in ContentViews (large, bold font).
1111         This is needed because the placeholder message element is a immediate child
1112         of the network content view, rather than the network table.
1113
1114         (.content-view.network .empty-content-placeholder): Deleted.
1115         (body[dir=ltr] .content-view.network .empty-content-placeholder): Deleted.
1116         (body[dir=rtl] .content-view.network .empty-content-placeholder): Deleted.
1117         (.content-view.network .empty-content-placeholder > .message): Deleted.
1118
1119         * UserInterface/Views/NetworkTableContentView.js:
1120         (WI.NetworkTableContentView.prototype._showEmptyFilterResultsMessage):
1121
1122         * UserInterface/Views/RecordingNavigationSidebarPanel.css:
1123         (.sidebar > .panel.navigation.recording > .content):
1124         (.sidebar > .panel.navigation.recording > :matches(.content, .empty-content-placeholder)): Deleted.
1125
1126         * UserInterface/Views/ResourceSidebarPanel.css:
1127         (.sidebar > .panel.navigation.resource > .content):
1128         (.sidebar > .panel.navigation.resource > :matches(.content, .empty-content-placeholder)): Deleted.
1129
1130         * UserInterface/Views/RulesStyleDetailsPanel.css:
1131         (.sidebar > .panel.details.css-style > .content > .rules > .message-text-view):
1132         (.sidebar > .panel.details.css-style > .content > .rules:not(.filter-non-matching) > .message-text-view):
1133         (.sidebar > .panel.details.css-style > .content > .rules:not(.filter-non-matching) > .no-filter-results): Deleted.
1134         (.sidebar > .panel.details.css-style > .content.filter-in-progress > .rules.filter-non-matching > .no-filter-results): Deleted.
1135         (.sidebar > .panel.details.css-style > .content.filter-in-progress > .rules.filter-non-matching > .no-filter-results > .no-filter-results-message): Deleted.
1136
1137         * UserInterface/Views/RulesStyleDetailsPanel.js:
1138         (WI.RulesStyleDetailsPanel):
1139
1140         * UserInterface/Views/SearchSidebarPanel.css:
1141         (.sidebar > .panel.navigation.search > :matches(.content, .message-text-view)):
1142         (.sidebar > .panel.navigation.search.changed > :matches(.content, .message-text-view)):
1143         (.sidebar > .panel.navigation.search > :matches(.content, .empty-content-placeholder)): Deleted.
1144         (.sidebar > .panel.navigation.search.changed > :matches(.content, .empty-content-placeholder)): Deleted.
1145
1146         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
1147         (WI.SpreadsheetRulesStyleDetailsPanel):
1148
1149         * UserInterface/Views/StorageSidebarPanel.css:
1150         (.sidebar > .panel.navigation.storage > .content):
1151         (.sidebar > .panel.navigation.storage > :matches(.content, .empty-content-placeholder)): Deleted.
1152
1153         * UserInterface/Views/Variables.css:
1154         (:root):
1155
1156 2017-11-29  Nikita Vasilyev  <nvasilyev@apple.com>
1157
1158         Web Inspector: Styles Redesign: can't add new property after property without trailing semicolon
1159         https://bugs.webkit.org/show_bug.cgi?id=179587
1160         <rdar://problem/35490858>
1161
1162         Reviewed by Timothy Hatcher.
1163
1164         * UserInterface/Models/CSSProperty.js:
1165         (WI.CSSProperty.prototype._updateOwnerStyleText):
1166         (WI.CSSProperty.prototype._appendSemicolonIfNeeded):
1167         Add a semicolon before the new property if the last property doesn't have it already.
1168
1169 2017-11-29  Joseph Pecoraro  <pecoraro@apple.com>
1170
1171         Web Inspector: Console Tab navigation bar sometimes does not include filter bar, clear console sometimes does not work
1172         https://bugs.webkit.org/show_bug.cgi?id=180124
1173         <rdar://problem/35740353>
1174
1175         Reviewed by Brian Burg.
1176
1177         * UserInterface/Views/LogContentView.js:
1178         (WI.LogContentView.prototype.closed):
1179         Avoid removing event listeners if this LogContentView singleton is ever closed.
1180         The singleton will always be alive so we don't want to remove the event listeners
1181         without a way to add them back.
1182
1183         * UserInterface/Base/Main.js:
1184         (WI.showSplitConsole):
1185         * UserInterface/Views/ConsoleTabContentView.js:
1186         (WI.ConsoleTabContentView.prototype.shown):
1187         When showing the ConsoleTab immediately collapse the split console so that any
1188         following code that checks WI.isShowingSplitConsole will get the expected value.
1189         It is also now possible to share a ContentView across ContentBrowsers via
1190         tombstones, so remove the old code that would frequently close the LogContentView.
1191
1192 2017-11-28  Devin Rousso  <webkit@devinrousso.com>
1193
1194         Web Inspector: remove extra space before call frames in Canvas backtraces
1195         https://bugs.webkit.org/show_bug.cgi?id=180129
1196
1197         Reviewed by Matt Baker.
1198
1199         * UserInterface/Views/CanvasDetailsSidebarPanel.js:
1200         (WI.CanvasDetailsSidebarPanel.prototype.initialLayout):
1201         * UserInterface/Views/RecordingTraceDetailsSidebarPanel.js:
1202         (WI.RecordingTraceDetailsSidebarPanel):
1203         Hide the disclosure buttons of these TreeOutlines as they don't have children.
1204
1205 2017-11-28  Matt Baker  <mattbaker@apple.com>
1206
1207         Web Inspector: Clean up backtrace in Canvas details sidebar
1208         https://bugs.webkit.org/show_bug.cgi?id=179807
1209         <rdar://problem/35604378>
1210
1211         Reviewed by Devin Rousso.
1212
1213         * UserInterface/Controllers/CallFrameTreeController.js: Added.
1214         Display a list of call frames in a tree outline. Browse to the represented
1215         call frame's source code location when a tree element is clicked or selected.
1216
1217         (WI.CallFrameTreeController):
1218         (WI.CallFrameTreeController.prototype.get treeOutline):
1219         (WI.CallFrameTreeController.prototype.get callFrames):
1220         (WI.CallFrameTreeController.prototype.set callFrames):
1221         (WI.CallFrameTreeController.prototype.disconnect):
1222         (WI.CallFrameTreeController.prototype._treeElementClicked):
1223         (WI.CallFrameTreeController.prototype._treeSelectionDidChange):
1224         (WI.CallFrameTreeController.prototype._showSourceCodeLocation):
1225
1226         * UserInterface/Main.html:
1227
1228         * UserInterface/Views/CanvasDetailsSidebarPanel.css:
1229         (.sidebar > .panel.details.canvas .details-section.canvas-backtrace .call-frame): Deleted.
1230         * UserInterface/Views/CanvasDetailsSidebarPanel.js:
1231         (WI.CanvasDetailsSidebarPanel.prototype.initialLayout):
1232         (WI.CanvasDetailsSidebarPanel.prototype._refreshBacktraceSection):
1233
1234         * UserInterface/Views/RecordingTraceDetailsSidebarPanel.css:
1235         (.sidebar > .panel.details.recording-trace > .content > .call-frame): Deleted.
1236         * UserInterface/Views/RecordingTraceDetailsSidebarPanel.js:
1237         (WI.RecordingTraceDetailsSidebarPanel):
1238         (WI.RecordingTraceDetailsSidebarPanel.prototype.updateAction):
1239
1240         * UserInterface/Views/TreeElement.js:
1241         (WI.TreeElement.treeElementToggled):
1242         (WI.TreeElement.prototype.selectOnMouseDown):
1243         Prevent selection if parent tree outline is not selectable.
1244
1245         * UserInterface/Views/TreeOutline.css:
1246         (.tree-outline.non-selectable .item:hover):
1247
1248         * UserInterface/Views/TreeOutline.js:
1249         Add `selectable` behavior, set at construction time. When false,
1250         clicking a tree element dispatches an event instead of selecting
1251         the tree element. Default true.
1252
1253         (WI.TreeOutline):
1254         (WI.TreeOutline.prototype.get selectable):
1255         Dispatch click event when not selectable, and some drive-by cleanup.
1256
1257 2017-11-28  Joseph Pecoraro  <pecoraro@apple.com>
1258
1259         Web Inspector: Move console Preserve Log setting from Setting tab to Console navigation bar
1260         https://bugs.webkit.org/show_bug.cgi?id=180125
1261
1262         Reviewed by Matt Baker.
1263
1264         * Localizations/en.lproj/localizedStrings.js:
1265         * UserInterface/Views/LogContentView.js:
1266         (WI.LogContentView):
1267         (WI.LogContentView.prototype.get navigationItems):
1268         (WI.LogContentView.prototype._clearLogOnNavigateSettingChanged):
1269         * UserInterface/Views/SettingsTabContentView.js:
1270         (WI.SettingsTabContentView.prototype._createGeneralSettingsView):
1271
1272 2017-11-28  Joseph Pecoraro  <pecoraro@apple.com>
1273
1274         Web Inspector: Remove Network "Clear on load" from Settings tab now that Network tab has a toggle for it
1275         https://bugs.webkit.org/show_bug.cgi?id=180123
1276
1277         Reviewed by Matt Baker.
1278
1279         * Localizations/en.lproj/localizedStrings.js:
1280         * UserInterface/Views/SettingsTabContentView.js:
1281         (WI.SettingsTabContentView.prototype._createGeneralSettingsView):
1282
1283 2017-11-28  Joseph Pecoraro  <pecoraro@apple.com>
1284
1285         Web Inspector: Network Tab - Add a toggle in the network tab to control automatically clearing or preserving log across loads
1286         https://bugs.webkit.org/show_bug.cgi?id=180110
1287         <rdar://problem/34071789>
1288
1289         Reviewed by Timothy Hatcher.
1290
1291         * Localizations/en.lproj/localizedStrings.js:
1292         New strings.
1293
1294         * UserInterface/Views/CheckboxNavigationItem.css:
1295         (.navigation-bar .item.checkbox input[type=checkbox]):
1296         Tweak style to more center the checkbox vertically.
1297
1298         * UserInterface/Views/CheckboxNavigationItem.js:
1299         (WI.CheckboxNavigationItem):
1300         Fix setting the initial value of a checkbox navigation item.
1301
1302         * UserInterface/Views/NetworkTableContentView.js:
1303         (WI.NetworkTableContentView):
1304         (WI.NetworkTableContentView.prototype.get navigationItems):
1305         (WI.NetworkTableContentView.prototype.closed):
1306         (WI.NetworkTableContentView.prototype._clearNetworkOnNavigateSettingChanged):
1307         Add a new checkbox for the clear on navigation setting.
1308
1309         * UserInterface/Views/SettingEditor.js:
1310         (WI.SettingEditor.createForSetting):
1311         Update the editor checkbox if the setting changes outside of the setting editor.
1312
1313         * UserInterface/Views/NavigationItem.js:
1314         (WI.NavigationItem.prototype.get tooltip):
1315         (WI.NavigationItem.prototype.set tooltip):
1316         * UserInterface/Views/ActivateButtonNavigationItem.js:
1317         (WI.ActivateButtonNavigationItem.prototype.set activated):
1318         * UserInterface/Views/ButtonNavigationItem.js:
1319         (WI.ButtonNavigationItem):
1320         (WI.ButtonNavigationItem.prototype.get toolTip): Deleted.
1321         (WI.ButtonNavigationItem.prototype.set toolTip): Deleted.
1322         * UserInterface/Views/ToggleButtonNavigationItem.js:
1323         (WI.ToggleButtonNavigationItem.prototype.set alternateToolTip):
1324         (WI.ToggleButtonNavigationItem.prototype.set toggled):
1325         Move tooltip to the base class and rename it from `toolTip` to `tooltip` to
1326         match existing generic places like TreeElement.
1327
1328 2017-11-28  Joseph Pecoraro  <pecoraro@apple.com>
1329
1330         Web Inspector: Include Beacon loads in the Network Table's "Other" filter
1331         https://bugs.webkit.org/show_bug.cgi?id=180113
1332
1333         Reviewed by Matt Baker.
1334
1335         * UserInterface/Views/NetworkTableContentView.js:
1336         (WI.NetworkTableContentView):
1337         Ensure the Other filter will handle any type that hasn't already been handled.
1338
1339 2017-11-28  Joseph Pecoraro  <pecoraro@apple.com>
1340
1341         ServiceWorker Inspector: Frontend changes to support Network tab and sub resources
1342         https://bugs.webkit.org/show_bug.cgi?id=179642
1343         <rdar://problem/35517704>
1344
1345         Reviewed by Brian Burg.
1346
1347         This patch makes use of the NetworkAgent and ServiceWorker agents in the frontend
1348         for a ServiceWorker inspection target. It also makes changes to ensure that the
1349         subresources requested by a ServiceWorker appear as expected in both the Resources
1350         and Network Tabs.
1351
1352         The backends of ServiceWorkers and DedicatedWorkers for network requests are
1353         different, but we want the presentation to be very similiar. Ultimately we'd like
1354         to move to more similiar backends if possible.
1355
1356         The first (after Inspector.enable) message a ServiceWorker inspector sends to the
1357         backend is ServiceWorker.getInitializationInfo. This parallels a Page inspector
1358         sending Page.getResourceTree. From the response we get enough information to
1359         setup the MainTarget with enough information (targetId, URL) to know what its main
1360         resource URL will be. Like DedicatedWorkers, the target's main resource will be
1361         filled in with the first WI.Script matching the URL. With this initialization
1362         message alone the ServiceWorker Target behaves almost identically to a Worker
1363         target and Network loads associated with the target (by targetId) are added as
1364         sub-resources as expected.
1365
1366         The biggest tension in this patch is within FrameResourceManager. The class, as
1367         its name indicates, assumes page resources with Frames, navigation, and loader
1368         semantics. It takes a few modifications to make it better handle resources not
1369         associated with a Page. A follow-up will rename this to just ResourceManager as
1370         the class' main task is now to associate Resources with Targets.
1371
1372         * UserInterface/Base/Main.js:
1373         (WI.loaded):
1374         There are assumptions in a few places that the main target is a Page. Those
1375         places can now be reached when the main target is a ServiceWorker. Add a
1376         convenience WI.pageTarget that can be used in these places.
1377
1378         * UserInterface/Test/Test.js:
1379         (WI.loaded):
1380         Add pageTarget.
1381
1382         * UserInterface/Controllers/DebuggerManager.js:
1383         (WI.DebuggerManager.prototype.scriptDidParse):
1384         Generalize the condition so the main target can have its main resource populated.
1385         This will be the case when a ServiceWorker is the main target and its main resource
1386         needs to be populated from a Script.
1387
1388         * UserInterface/Controllers/FrameResourceManager.js:
1389         (WI.FrameResourceManager):
1390         (WI.FrameResourceManager.prototype._processServiceWorkerInitializationInfo):
1391         Handle ServiceWorker Resource initialization which is different from Page initialization.
1392
1393         (WI.FrameResourceManager.prototype._addNewResourceToFrameOrTarget):
1394         (WI.FrameResourceManager.prototype._addResourceToTarget):
1395         (WI.FrameResourceManager.prototype._addFrameTreeFromFrameResourceTreePayload):
1396         Eliminate PageAgent, which might not be available in some targets.
1397         Use pageTarget instead of mainTarget where appropriate.
1398
1399         * UserInterface/Controllers/TargetManager.js:
1400         (WI.TargetManager.prototype.targetForIdentifier):
1401         A ServiceWorker is the first time that the main target has an identifier,
1402         so let TargetManager find it by target id.
1403
1404         * UserInterface/Models/Resource.js:
1405         (WI.Resource):
1406         (WI.Resource.resolvedType):
1407         (WI.Resource.prototype.updateForResponse):
1408         For Resource.Type.Other resources include a better type inferred from the MIME type.
1409         ServiceWorker loads currently don't have type information and this provides a great
1410         type for such loads. This should also provide nice types for CacheStorage.add*
1411         populated resources which are otherwise type-less fetches.
1412
1413         * UserInterface/Protocol/Connection.js:
1414         Rename the class since this may no longer be a "Page".
1415
1416         * UserInterface/Protocol/MainTarget.js:
1417         (WI.MainTarget):
1418         (WI.MainTarget.mainConnectionInfo):
1419         (WI.MainTarget.prototype.get mainResource):
1420         (WI.MainTarget.prototype.set mainResource):
1421         (WI.MainTarget.prototype.get displayName): Deleted.
1422         * UserInterface/Protocol/Target.js:
1423         (WI.Target.prototype.set identifier):
1424         (WI.Target.prototype.set name):
1425         (WI.Target.prototype.get mainResource):
1426         (WI.Target.prototype.set mainResource):
1427         (WI.Target.prototype.get displayName):
1428         Give richer types for the main target. And allow a few things to be initialized
1429         lazily, which will be necessary from an initialization message.
1430
1431         * UserInterface/Views/NetworkTabContentView.js:
1432         (WI.NetworkTabContentView.isTabAllowed):
1433         Remove a PageAgent requirement for the Network tab. A ServiceWorker will not
1434         have a PageAgent, but it will have a NetworkAgent, which should be good enough.
1435
1436         * UserInterface/Views/NetworkTableContentView.js:
1437         (WI.NetworkTableContentView.prototype._populateWithInitialResourcesIfNeeded):
1438         Initial populate should populate all subresources of all targets.
1439
1440         * UserInterface/Views/ResourceContentView.js:
1441         (WI.ResourceContentView.prototype.contentAvailable):
1442         This was getting used by ResourceType.Other without warning. Make it warn.
1443
1444         * UserInterface/Views/ResourceSidebarPanel.js:
1445         (WI.ResourceSidebarPanel.prototype._addScript):
1446         (WI.ResourceSidebarPanel.prototype._addTargetWithMainResource):
1447         * UserInterface/Views/ScriptTreeElement.js:
1448         (WI.ScriptTreeElement):
1449         Allow WorkerTreeElements for ServiceWorker targets which may also be the main target.
1450         Also when adding such a tree element, promote the resource sidebar to a full tree
1451         outline, and stop hiding disclosure buttons.
1452
1453 2017-11-27  Nikita Vasilyev  <nvasilyev@apple.com>
1454
1455         Web Inspector: Styles Redesign: selector's field shadow is clipped at the bottom
1456         https://bugs.webkit.org/show_bug.cgi?id=179961
1457
1458         Reviewed by Matt Baker.
1459
1460         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:
1461         (.spreadsheet-css-declaration .selector):
1462
1463 2017-11-21  Tomas Popela  <tpopela@redhat.com>
1464
1465         Unreviewed compile warning fix
1466
1467         WARNING: console.assert inside control flow statement without braces on line: 130487:
1468         console.assert(this._loggingChannelSources.includes(channel.source));
1469
1470         * UserInterface/Controllers/LogManager.js:
1471         (WI.LogManager):
1472
1473 2017-11-18  Joseph Pecoraro  <pecoraro@apple.com>
1474
1475         Web Inspector: Update the Trash / Clear icon
1476         https://bugs.webkit.org/show_bug.cgi?id=179850
1477
1478         Reviewed by Matt Baker.
1479
1480         * UserInterface/Images/NavigationItemTrash.svg:
1481         Update the icon.
1482
1483         * UserInterface/Views/ProbeDetailsSidebarPanel.css:
1484         (.sidebar > .panel.probes > .navigation-bar .item.clear-samples):
1485         * UserInterface/Views/ProbeSetDetailsSection.js:
1486         (WI.ProbeSetDetailsSection):
1487         * UserInterface/Views/ScopeChainDetailsSidebarPanel.css:
1488         (.scope-chain .navigation-bar .item.clear-watch-expressions):
1489         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
1490         (WI.ScopeChainDetailsSidebarPanel):
1491         Resize to 15x15 and move it down a pixel.
1492
1493 2017-11-17  Joseph Pecoraro  <pecoraro@apple.com>
1494
1495         Web Inspector: Network Tab - Add HAR Export button
1496         https://bugs.webkit.org/show_bug.cgi?id=179570
1497         <rdar://problem/35484918>
1498
1499         Reviewed by Matt Baker.
1500
1501         * Localizations/en.lproj/localizedStrings.js:
1502         New strings.
1503
1504         * UserInterface/Images/Export.svg: Added.
1505         * UserInterface/Images/Import.svg: Added.
1506         Add symmetric import/export buttons.
1507
1508         * UserInterface/Base/Main.js:
1509         (WI.contentLoaded):
1510         Expose the save keyboard shortcut so we can show its display name in a tooltip.
1511
1512         * UserInterface/Views/NetworkTableContentView.js:
1513         (WI.NetworkTableContentView):
1514         (WI.NetworkTableContentView.prototype.get navigationItems):
1515         (WI.NetworkTableContentView.prototype.reset):
1516         (WI.NetworkTableContentView.prototype.layout):
1517         (WI.NetworkTableContentView.prototype._updateExportButton):
1518         Include the export button and enable/disable it when appropriate.
1519
1520         (WI.NetworkTableContentView.prototype.closed):
1521         Add a missing event listener removal.
1522
1523 2017-11-17  Matt Baker  <mattbaker@apple.com>
1524
1525         Web Inspector: Disabled ImageAndText-style buttons should have gray text
1526         https://bugs.webkit.org/show_bug.cgi?id=179843
1527         <rdar://problem/35624337>
1528
1529         Reviewed by Joseph Pecoraro.
1530
1531         * UserInterface/Views/ButtonNavigationItem.css:
1532         (.navigation-bar .item.button.disabled.image-and-text,):
1533         (.navigation-bar .item.button.disabled > .glyph): Deleted.
1534
1535 2017-11-17  Joseph Pecoraro  <pecoraro@apple.com>
1536
1537         Web Inspector: Network Tab - Update Ignore Caches button
1538         https://bugs.webkit.org/show_bug.cgi?id=179841
1539
1540         Reviewed by Matt Baker.
1541
1542         * UserInterface/Images/IgnoreCaches.svg:
1543         This changes from an arrow over a cache to a slash through a cache.
1544
1545 2017-11-17  Matt Baker  <mattbaker@apple.com>
1546
1547         Web Inspector: Remove WI.instanceForClass
1548         https://bugs.webkit.org/show_bug.cgi?id=179746
1549
1550         Reviewed by Timothy Hatcher.
1551
1552         The implementations of DetailsSidebarPanel subclasses assume that panels
1553         are closed and released when no longer needed. Keeping them alive with
1554         instanceForClass isn't the right choice, since sidebar panels remove their
1555         event listeners when closed.
1556
1557         * UserInterface/Base/Main.js:
1558         (WI.instanceForClass): Deleted.
1559         * UserInterface/Views/DebuggerTabContentView.js:
1560         (WI.DebuggerTabContentView.prototype.showDetailsSidebarPanels):
1561         * UserInterface/Views/TabContentView.js:
1562         (WI.TabContentView.prototype.get detailsSidebarPanels):
1563
1564 2017-11-17  Matt Baker  <mattbaker@apple.com>
1565
1566         Web Inspector: ButtonNavigationItem should support image and text button style
1567         https://bugs.webkit.org/show_bug.cgi?id=179625
1568         <rdar://problem/35512238>
1569
1570         Reviewed by Joseph Pecoraro.
1571
1572         * UserInterface/Main.html:
1573
1574         * UserInterface/Views/ButtonNavigationItem.css:
1575         (.navigation-bar .item.button):
1576         (.navigation-bar .item.button.image-only):
1577         (.navigation-bar .item.button.image-and-text):
1578         (.navigation-bar .item.button.image-and-text > span):
1579         (.navigation-bar .item.button.text-only):
1580         (.navigation-bar .item.button.text-only.checkbox): Deleted.
1581         (.navigation-bar .item.button.text-only.checkbox label): Deleted.
1582         Checkbox styles have been moved to a separate CSS file.
1583
1584         * UserInterface/Views/ButtonNavigationItem.js:
1585         Add backing data members for the image and label, allowing the DOM
1586         representation of the button to change as needed.
1587
1588         (WI.ButtonNavigationItem):
1589         Remove duplicate role logic. The base class sets the role.
1590
1591         (WI.ButtonNavigationItem.prototype.set label):
1592         (WI.ButtonNavigationItem.prototype.set image):
1593         (WI.ButtonNavigationItem.prototype.get buttonStyle):
1594         (WI.ButtonNavigationItem.prototype.set buttonStyle):
1595         (WI.ButtonNavigationItem.prototype.get additionalClassNames):
1596         (WI.ButtonNavigationItem.prototype._mouseClicked):
1597         (WI.ButtonNavigationItem.prototype._update):
1598         (WI.ButtonNavigationItem.prototype.updateButtonText): Deleted.
1599
1600         * UserInterface/Views/CheckboxNavigationItem.css: Added.
1601         (.navigation-bar .item.checkbox):
1602         (.navigation-bar .item.checkbox label):
1603
1604         * UserInterface/Views/CheckboxNavigationItem.js:
1605         Change base class to NavigationItem, since this item lacks an image
1606         and makes use of an actual label element instead of a span for its text.
1607
1608         (WI.CheckboxNavigationItem):
1609         (WI.CheckboxNavigationItem.prototype._checkboxChanged):
1610         (WI.CheckboxNavigationItem.prototype.updateButtonText): Deleted.
1611
1612 2017-11-17  Joseph Pecoraro  <pecoraro@apple.com>
1613
1614         Web Inspector: Remove FIXMEs for GTK+ missing icons
1615         https://bugs.webkit.org/show_bug.cgi?id=155282
1616         <rdar://problem/25076615>
1617
1618         Reviewed by Michael Catanzaro.
1619
1620         * UserInterface/Views/PathComponentIcons.css:
1621         (.source-icon .icon):
1622         (body:not(.mac-platform, .windows-platform) .heap-snapshot-record .icon,): Deleted.
1623         * UserInterface/Views/ResourceIcons.css:
1624         (.large .resource-icon.resource-type-websocket .icon):
1625         (body:not(.mac-platform, .windows-platform) .resource-icon.resource-type-ping .icon,): Deleted.
1626         (body:not(.mac-platform, .windows-platform) .large .resource-icon.resource-type-ping .icon,): Deleted.
1627         All ports now share the same images.
1628
1629 2017-11-15  Nikita Vasilyev  <nvasilyev@apple.com>
1630
1631         Web Inspector: Styles Redesign: typing colon in property name should advance to value field
1632         https://bugs.webkit.org/show_bug.cgi?id=178795
1633         <rdar://problem/35174674>
1634
1635         Reviewed by Devin Rousso.
1636
1637         * UserInterface/Views/SpreadsheetStyleProperty.js:
1638         (WI.SpreadsheetStyleProperty.prototype._update):
1639         (WI.SpreadsheetStyleProperty.prototype._handleNameBeforeInput):
1640         Unlike pressing Tab or Enter, typing ":" in the property name should discard suggestion hint.
1641
1642         (WI.SpreadsheetStyleProperty.prototype._valueCompletionDataProvider):
1643         We use 250ms debounce before updating this._property.name.
1644         When typing "font-f:", we want to discard suggestion hint (i.e. "font-family"),
1645         and immediately show autocomplete for "font-f" (in this case, invalid property).
1646
1647         * UserInterface/Views/SpreadsheetTextField.js:
1648         (WI.SpreadsheetTextField):
1649         (WI.SpreadsheetTextField.prototype.stopEditing):
1650         (WI.SpreadsheetTextField.prototype.discardCompletion):
1651         Call spreadsheetTextFieldDidChange when discarding non-empty suggestion hint.
1652
1653         (WI.SpreadsheetTextField.prototype.detached):
1654         (WI.SpreadsheetTextField.prototype.completionSuggestionsClickedCompletion):
1655         (WI.SpreadsheetTextField.prototype._handleBlur):
1656         (WI.SpreadsheetTextField.prototype._handleKeyDownForSuggestionView):
1657         (WI.SpreadsheetTextField.prototype._updateCompletions):
1658         (WI.SpreadsheetTextField.prototype._applyCompletionHint):
1659         (WI.SpreadsheetTextField.prototype._hideCompletions): Deleted.
1660
1661 2017-11-15  Matt Baker  <mattbaker@apple.com>
1662
1663         Web Inspector: REGRESSION (r217750): Navigation sidebar broken after closing and re-opening tab
1664         https://bugs.webkit.org/show_bug.cgi?id=179717
1665         <rdar://problem/35551541>
1666
1667         Reviewed by Devin Rousso.
1668
1669         NavigationSidebarPanels should not be created with WI.instanceForClass.
1670
1671         * UserInterface/Views/DebuggerSidebarPanel.js:
1672         * UserInterface/Views/ResourceSidebarPanel.js:
1673         (WI.ResourceSidebarPanel):
1674         * UserInterface/Views/SearchSidebarPanel.js:
1675         (WI.SearchSidebarPanel):
1676         * UserInterface/Views/StorageSidebarPanel.js:
1677         (WI.StorageSidebarPanel):
1678         * UserInterface/Views/TabContentView.js:
1679         (WI.TabContentView.prototype.get navigationSidebarPanel):
1680
1681 2017-11-15  Michael Catanzaro  <mcatanzaro@igalia.com>
1682
1683         Remove GTK web inspector images
1684         https://bugs.webkit.org/show_bug.cgi?id=179716
1685
1686         Reviewed by Carlos Garcia Campos.
1687
1688         * Scripts/copy-user-interface-resources.pl:
1689         * UserInterface/Images/gtk/AUTHORS: Removed.
1690         * UserInterface/Images/gtk/ActiveCallFrame.svg: Removed.
1691         * UserInterface/Images/gtk/AnimationPlayStatePaused.svg: Removed.
1692         * UserInterface/Images/gtk/AnimationPlayStateRunning.svg: Removed.
1693         * UserInterface/Images/gtk/ApplicationCache.png: Removed.
1694         * UserInterface/Images/gtk/ApplicationCache@2x.png: Removed.
1695         * UserInterface/Images/gtk/ApplicationCacheManifest.png: Removed.
1696         * UserInterface/Images/gtk/ApplicationCacheManifest@2x.png: Removed.
1697         * UserInterface/Images/gtk/ArrowUp.svg: Removed.
1698         * UserInterface/Images/gtk/Assertion.svg: Removed.
1699         * UserInterface/Images/gtk/BackForwardArrows.svg: Removed.
1700         * UserInterface/Images/gtk/Breakpoint.png: Removed.
1701         * UserInterface/Images/gtk/Breakpoint@2x.png: Removed.
1702         * UserInterface/Images/gtk/BreakpointButton.svg: Removed.
1703         * UserInterface/Images/gtk/BreakpointInactive.png: Removed.
1704         * UserInterface/Images/gtk/BreakpointInactive@2x.png: Removed.
1705         * UserInterface/Images/gtk/BreakpointInactiveButton.svg: Removed.
1706         * UserInterface/Images/gtk/Breakpoints.svg: Removed.
1707         * UserInterface/Images/gtk/COPYING: Removed.
1708         * UserInterface/Images/gtk/COPYING_CCBYSA3: Removed.
1709         * UserInterface/Images/gtk/COPYING_LGPL2: Removed.
1710         * UserInterface/Images/gtk/CSSVariable.svg: Removed.
1711         * UserInterface/Images/gtk/CallTrees.svg: Removed.
1712         * UserInterface/Images/gtk/Canvas.svg: Removed.
1713         * UserInterface/Images/gtk/Canvas2D.svg: Removed.
1714         * UserInterface/Images/gtk/Canvas3D.svg: Removed.
1715         * UserInterface/Images/gtk/CanvasOverview.svg: Removed.
1716         * UserInterface/Images/gtk/Checkers.svg: Removed.
1717         * UserInterface/Images/gtk/Circle.svg: Removed.
1718         * UserInterface/Images/gtk/ClearBoth.svg: Removed.
1719         * UserInterface/Images/gtk/ClearLeft.svg: Removed.
1720         * UserInterface/Images/gtk/ClearRight.svg: Removed.
1721         * UserInterface/Images/gtk/ClippingCSS.png: Removed.
1722         * UserInterface/Images/gtk/ClippingCSS@2x.png: Removed.
1723         * UserInterface/Images/gtk/ClippingCSSLarge.png: Removed.
1724         * UserInterface/Images/gtk/ClippingCSSLarge@2x.png: Removed.
1725         * UserInterface/Images/gtk/ClippingGeneric.png: Removed.
1726         * UserInterface/Images/gtk/ClippingGeneric@2x.png: Removed.
1727         * UserInterface/Images/gtk/ClippingGenericLarge.png: Removed.
1728         * UserInterface/Images/gtk/ClippingGenericLarge@2x.png: Removed.
1729         * UserInterface/Images/gtk/ClippingJS.png: Removed.
1730         * UserInterface/Images/gtk/ClippingJS@2x.png: Removed.
1731         * UserInterface/Images/gtk/ClippingJSLarge.png: Removed.
1732         * UserInterface/Images/gtk/ClippingJSLarge@2x.png: Removed.
1733         * UserInterface/Images/gtk/Close.svg: Removed.
1734         * UserInterface/Images/gtk/CloseLarge.svg: Removed.
1735         * UserInterface/Images/gtk/CloseWhite.svg: Removed.
1736         * UserInterface/Images/gtk/ColorIcon.png: Removed.
1737         * UserInterface/Images/gtk/ColorIcon@2x.png: Removed.
1738         * UserInterface/Images/gtk/Console.svg: Removed.
1739         * UserInterface/Images/gtk/Cookie.png: Removed.
1740         * UserInterface/Images/gtk/Cookie@2x.png: Removed.
1741         * UserInterface/Images/gtk/Crosshair.svg: Removed.
1742         * UserInterface/Images/gtk/CubicBezier.svg: Removed.
1743         * UserInterface/Images/gtk/DOMBreakpoint.svg: Removed.
1744         * UserInterface/Images/gtk/DOMCharacterData.svg: Removed.
1745         * UserInterface/Images/gtk/DOMComment.svg: Removed.
1746         * UserInterface/Images/gtk/DOMDocument.svg: Removed.
1747         * UserInterface/Images/gtk/DOMDocumentType.svg: Removed.
1748         * UserInterface/Images/gtk/DOMElement.svg: Removed.
1749         * UserInterface/Images/gtk/DOMNode.svg: Removed.
1750         * UserInterface/Images/gtk/DOMTextNode.svg: Removed.
1751         * UserInterface/Images/gtk/Database.png: Removed.
1752         * UserInterface/Images/gtk/Database@2x.png: Removed.
1753         * UserInterface/Images/gtk/DatabaseTable.png: Removed.
1754         * UserInterface/Images/gtk/DatabaseTable@2x.png: Removed.
1755         * UserInterface/Images/gtk/Debug.svg: Removed.
1756         * UserInterface/Images/gtk/Debugger.svg: Removed.
1757         * UserInterface/Images/gtk/DisclosureTriangles.svg: Removed.
1758         * UserInterface/Images/gtk/DockBottom.svg: Removed.
1759         * UserInterface/Images/gtk/DockLeft.svg: Removed.
1760         * UserInterface/Images/gtk/DockRight.svg: Removed.
1761         * UserInterface/Images/gtk/DocumentCSS.png: Removed.
1762         * UserInterface/Images/gtk/DocumentCSS@2x.png: Removed.
1763         * UserInterface/Images/gtk/DocumentCSSLarge.png: Removed.
1764         * UserInterface/Images/gtk/DocumentCSSLarge@2x.png: Removed.
1765         * UserInterface/Images/gtk/DocumentFont.png: Removed.
1766         * UserInterface/Images/gtk/DocumentFont@2x.png: Removed.
1767         * UserInterface/Images/gtk/DocumentFontLarge.png: Removed.
1768         * UserInterface/Images/gtk/DocumentFontLarge@2x.png: Removed.
1769         * UserInterface/Images/gtk/DocumentGeneric.png: Removed.
1770         * UserInterface/Images/gtk/DocumentGeneric@2x.png: Removed.
1771         * UserInterface/Images/gtk/DocumentGenericLarge.png: Removed.
1772         * UserInterface/Images/gtk/DocumentGenericLarge@2x.png: Removed.
1773         * UserInterface/Images/gtk/DocumentImage.png: Removed.
1774         * UserInterface/Images/gtk/DocumentImage@2x.png: Removed.
1775         * UserInterface/Images/gtk/DocumentImageLarge.png: Removed.
1776         * UserInterface/Images/gtk/DocumentImageLarge@2x.png: Removed.
1777         * UserInterface/Images/gtk/DocumentJS.png: Removed.
1778         * UserInterface/Images/gtk/DocumentJS@2x.png: Removed.
1779         * UserInterface/Images/gtk/DocumentJSLarge.png: Removed.
1780         * UserInterface/Images/gtk/DocumentJSLarge@2x.png: Removed.
1781         * UserInterface/Images/gtk/DocumentMarkup.png: Removed.
1782         * UserInterface/Images/gtk/DocumentMarkup@2x.png: Removed.
1783         * UserInterface/Images/gtk/DocumentMarkupLarge.png: Removed.
1784         * UserInterface/Images/gtk/DocumentMarkupLarge@2x.png: Removed.
1785         * UserInterface/Images/gtk/DownloadArrow.svg: Removed.
1786         * UserInterface/Images/gtk/Elements.svg: Removed.
1787         * UserInterface/Images/gtk/Error.svg: Removed.
1788         * UserInterface/Images/gtk/Errors.svg: Removed.
1789         * UserInterface/Images/gtk/ErrorsEnabled.svg: Removed.
1790         * UserInterface/Images/gtk/EventListener.svg: Removed.
1791         * UserInterface/Images/gtk/Events.svg: Removed.
1792         * UserInterface/Images/gtk/Exception.svg: Removed.
1793         * UserInterface/Images/gtk/Eye.svg: Removed.
1794         * UserInterface/Images/gtk/FilterFieldActiveGlyph.svg: Removed.
1795         * UserInterface/Images/gtk/FilterFieldGlyph.svg: Removed.
1796         * UserInterface/Images/gtk/FloatLeft.svg: Removed.
1797         * UserInterface/Images/gtk/FloatRight.svg: Removed.
1798         * UserInterface/Images/gtk/FolderGeneric.png: Removed.
1799         * UserInterface/Images/gtk/FolderGeneric@2x.png: Removed.
1800         * UserInterface/Images/gtk/FontStyleItalic.svg: Removed.
1801         * UserInterface/Images/gtk/FontStyleNormal.svg: Removed.
1802         * UserInterface/Images/gtk/Function.svg: Removed.
1803         * UserInterface/Images/gtk/Gear.svg: Removed.
1804         * UserInterface/Images/gtk/GoToArrow.svg: Removed.
1805         * UserInterface/Images/gtk/GradientStop.png: Removed.
1806         * UserInterface/Images/gtk/GradientStop@2x.png: Removed.
1807         * UserInterface/Images/gtk/GradientStopSelected.png: Removed.
1808         * UserInterface/Images/gtk/GradientStopSelected@2x.png: Removed.
1809         * UserInterface/Images/gtk/HeapAllocationsInstrument.svg: Removed.
1810         * UserInterface/Images/gtk/HeapSnapshotObjectGraph.svg: Removed.
1811         * UserInterface/Images/gtk/HierarchicalNavigationItemChevron.svg: Removed.
1812         * UserInterface/Images/gtk/HoverMenuButton.png: Removed.
1813         * UserInterface/Images/gtk/HoverMenuButton@2x.png: Removed.
1814         * UserInterface/Images/gtk/IgnoreCaches.svg: Removed.
1815         * UserInterface/Images/gtk/Image.svg: Removed.
1816         * UserInterface/Images/gtk/IndeterminateProgressSpinner1.svg: Removed.
1817         * UserInterface/Images/gtk/IndeterminateProgressSpinner10.svg: Removed.
1818         * UserInterface/Images/gtk/IndeterminateProgressSpinner11.svg: Removed.
1819         * UserInterface/Images/gtk/IndeterminateProgressSpinner12.svg: Removed.
1820         * UserInterface/Images/gtk/IndeterminateProgressSpinner2.svg: Removed.
1821         * UserInterface/Images/gtk/IndeterminateProgressSpinner3.svg: Removed.
1822         * UserInterface/Images/gtk/IndeterminateProgressSpinner4.svg: Removed.
1823         * UserInterface/Images/gtk/IndeterminateProgressSpinner5.svg: Removed.
1824         * UserInterface/Images/gtk/IndeterminateProgressSpinner6.svg: Removed.
1825         * UserInterface/Images/gtk/IndeterminateProgressSpinner7.svg: Removed.
1826         * UserInterface/Images/gtk/IndeterminateProgressSpinner8.svg: Removed.
1827         * UserInterface/Images/gtk/IndeterminateProgressSpinner9.svg: Removed.
1828         * UserInterface/Images/gtk/Info.svg: Removed.
1829         * UserInterface/Images/gtk/InstructionPointer.png: Removed.
1830         * UserInterface/Images/gtk/InstructionPointer@2x.png: Removed.
1831         * UserInterface/Images/gtk/Issues.svg: Removed.
1832         * UserInterface/Images/gtk/IssuesEnabled.svg: Removed.
1833         * UserInterface/Images/gtk/LayerBorders.svg: Removed.
1834         * UserInterface/Images/gtk/Layers.svg: Removed.
1835         * UserInterface/Images/gtk/LayoutInstrument.svg: Removed.
1836         * UserInterface/Images/gtk/ListStylePositionInside.svg: Removed.
1837         * UserInterface/Images/gtk/ListStylePositionOutside.svg: Removed.
1838         * UserInterface/Images/gtk/LocalStorage.png: Removed.
1839         * UserInterface/Images/gtk/LocalStorage@2x.png: Removed.
1840         * UserInterface/Images/gtk/Locked.svg: Removed.
1841         * UserInterface/Images/gtk/Log.svg: Removed.
1842         * UserInterface/Images/gtk/Logs.svg: Removed.
1843         * UserInterface/Images/gtk/MemoryInstrument.svg: Removed.
1844         * UserInterface/Images/gtk/Minus.svg: Removed.
1845         * UserInterface/Images/gtk/Native.svg: Removed.
1846         * UserInterface/Images/gtk/NavigationItemCheckers.svg: Removed.
1847         * UserInterface/Images/gtk/NavigationItemCodeCoverage.svg: Removed.
1848         * UserInterface/Images/gtk/NavigationItemCurleyBraces.svg: Removed.
1849         * UserInterface/Images/gtk/NavigationItemGarbageCollect.svg: Removed.
1850         * UserInterface/Images/gtk/NavigationItemTrash.svg: Removed.
1851         * UserInterface/Images/gtk/NavigationItemTypes.svg: Removed.
1852         * UserInterface/Images/gtk/Network.svg: Removed.
1853         * UserInterface/Images/gtk/NetworkInstrument.svg: Removed.
1854         * UserInterface/Images/gtk/NewTab.svg: Removed.
1855         * UserInterface/Images/gtk/NewTabPlus.svg: Removed.
1856         * UserInterface/Images/gtk/Paint.svg: Removed.
1857         * UserInterface/Images/gtk/Path.svg: Removed.
1858         * UserInterface/Images/gtk/Pause.svg: Removed.
1859         * UserInterface/Images/gtk/PausedBreakpoint.svg: Removed.
1860         * UserInterface/Images/gtk/Pencil.svg: Removed.
1861         * UserInterface/Images/gtk/Plus13.svg: Removed.
1862         * UserInterface/Images/gtk/Plus15.svg: Removed.
1863         * UserInterface/Images/gtk/Printer.svg: Removed.
1864         * UserInterface/Images/gtk/Program.svg: Removed.
1865         * UserInterface/Images/gtk/PseudoElement.svg: Removed.
1866         * UserInterface/Images/gtk/Receiving.svg: Removed.
1867         * UserInterface/Images/gtk/Record.svg: Removed.
1868         * UserInterface/Images/gtk/Recording.svg: Removed.
1869         * UserInterface/Images/gtk/Reflection.svg: Removed.
1870         * UserInterface/Images/gtk/ReloadFull.svg: Removed.
1871         * UserInterface/Images/gtk/ReloadToolbar.svg: Removed.
1872         * UserInterface/Images/gtk/RenderingFrame.svg: Removed.
1873         * UserInterface/Images/gtk/RenderingFramesInstrument.svg: Removed.
1874         * UserInterface/Images/gtk/Request.svg: Removed.
1875         * UserInterface/Images/gtk/Resources.svg: Removed.
1876         * UserInterface/Images/gtk/Response.svg: Removed.
1877         * UserInterface/Images/gtk/ResultLine.svg: Removed.
1878         * UserInterface/Images/gtk/Resume.svg: Removed.
1879         * UserInterface/Images/gtk/ScriptsInstrument.svg: Removed.
1880         * UserInterface/Images/gtk/Search.svg: Removed.
1881         * UserInterface/Images/gtk/SearchResults.svg: Removed.
1882         * UserInterface/Images/gtk/Sending.svg: Removed.
1883         * UserInterface/Images/gtk/SessionStorage.png: Removed.
1884         * UserInterface/Images/gtk/SessionStorage@2x.png: Removed.
1885         * UserInterface/Images/gtk/ShadowDOM.svg: Removed.
1886         * UserInterface/Images/gtk/SliderThumb.png: Removed.
1887         * UserInterface/Images/gtk/SliderThumb@2x.png: Removed.
1888         * UserInterface/Images/gtk/SliderThumbPressed.png: Removed.
1889         * UserInterface/Images/gtk/SliderThumbPressed@2x.png: Removed.
1890         * UserInterface/Images/gtk/SortIndicatorArrows.svg: Removed.
1891         * UserInterface/Images/gtk/Source.svg: Removed.
1892         * UserInterface/Images/gtk/SplitToggleUp.svg: Removed.
1893         * UserInterface/Images/gtk/StepInto.svg: Removed.
1894         * UserInterface/Images/gtk/StepOut.svg: Removed.
1895         * UserInterface/Images/gtk/StepOver.svg: Removed.
1896         * UserInterface/Images/gtk/Stop.svg: Removed.
1897         * UserInterface/Images/gtk/Stopwatch.svg: Removed.
1898         * UserInterface/Images/gtk/Storage.svg: Removed.
1899         * UserInterface/Images/gtk/StyleRule.svg: Removed.
1900         * UserInterface/Images/gtk/StyleRuleInheritedElement.svg: Removed.
1901         * UserInterface/Images/gtk/StyleRulePseudoElement.svg: Removed.
1902         * UserInterface/Images/gtk/TailDeletedFunction.svg: Removed.
1903         * UserInterface/Images/gtk/TextAlignCenter.svg: Removed.
1904         * UserInterface/Images/gtk/TextAlignJustify.svg: Removed.
1905         * UserInterface/Images/gtk/TextAlignLeft.svg: Removed.
1906         * UserInterface/Images/gtk/TextAlignRight.svg: Removed.
1907         * UserInterface/Images/gtk/TextDecorationLineThrough.svg: Removed.
1908         * UserInterface/Images/gtk/TextDecorationOverline.svg: Removed.
1909         * UserInterface/Images/gtk/TextDecorationUnderline.svg: Removed.
1910         * UserInterface/Images/gtk/TextTransformCapitalize.svg: Removed.
1911         * UserInterface/Images/gtk/TextTransformLowercase.svg: Removed.
1912         * UserInterface/Images/gtk/TextTransformUppercase.svg: Removed.
1913         * UserInterface/Images/gtk/Thread.svg: Removed.
1914         * UserInterface/Images/gtk/Time.svg: Removed.
1915         * UserInterface/Images/gtk/Timeline.svg: Removed.
1916         * UserInterface/Images/gtk/TimelineRecordAPI.svg: Removed.
1917         * UserInterface/Images/gtk/TimelineRecordAnimation.svg: Removed.
1918         * UserInterface/Images/gtk/TimelineRecordComposite.svg: Removed.
1919         * UserInterface/Images/gtk/TimelineRecordConsoleProfile.svg: Removed.
1920         * UserInterface/Images/gtk/TimelineRecordEvent.svg: Removed.
1921         * UserInterface/Images/gtk/TimelineRecordLayout.svg: Removed.
1922         * UserInterface/Images/gtk/TimelineRecordPaint.svg: Removed.
1923         * UserInterface/Images/gtk/TimelineRecordProbeSampled.svg: Removed.
1924         * UserInterface/Images/gtk/TimelineRecordScriptEvaluated.svg: Removed.
1925         * UserInterface/Images/gtk/TimelineRecordStyle.svg: Removed.
1926         * UserInterface/Images/gtk/TimelineRecordTimer.svg: Removed.
1927         * UserInterface/Images/gtk/ToggleLeftSidebar.svg: Removed.
1928         * UserInterface/Images/gtk/ToggleRightSidebar.svg: Removed.
1929         * UserInterface/Images/gtk/TypeBoolean.svg: Removed.
1930         * UserInterface/Images/gtk/TypeNull.svg: Removed.
1931         * UserInterface/Images/gtk/TypeNumber.svg: Removed.
1932         * UserInterface/Images/gtk/TypeObject.svg: Removed.
1933         * UserInterface/Images/gtk/TypeRegex.svg: Removed.
1934         * UserInterface/Images/gtk/TypeString.svg: Removed.
1935         * UserInterface/Images/gtk/TypeSymbol.svg: Removed.
1936         * UserInterface/Images/gtk/TypeUndefined.svg: Removed.
1937         * UserInterface/Images/gtk/Undock.svg: Removed.
1938         * UserInterface/Images/gtk/UpDownArrows.svg: Removed.
1939         * UserInterface/Images/gtk/UserInputPrompt.svg: Removed.
1940         * UserInterface/Images/gtk/UserInputPromptPrevious.svg: Removed.
1941         * UserInterface/Images/gtk/UserInputResult.svg: Removed.
1942         * UserInterface/Images/gtk/VisualStyleNone.svg: Removed.
1943         * UserInterface/Images/gtk/VisualStylePropertyLinked.svg: Removed.
1944         * UserInterface/Images/gtk/VisualStylePropertyUnlinked.svg: Removed.
1945         * UserInterface/Images/gtk/Warning.svg: Removed.
1946         * UserInterface/Images/gtk/WebSocket.png: Removed.
1947         * UserInterface/Images/gtk/WebSocket@2x.png: Removed.
1948         * UserInterface/Images/gtk/WebSocketLarge.png: Removed.
1949         * UserInterface/Images/gtk/WebSocketLarge@2x.png: Removed.
1950         * UserInterface/Images/gtk/Weight.svg: Removed.
1951         * UserInterface/Images/gtk/WorkerScript.png: Removed.
1952         * UserInterface/Images/gtk/WorkerScript@2x.png: Removed.
1953         * UserInterface/Images/gtk/WorkerScriptLarge.png: Removed.
1954         * UserInterface/Images/gtk/WorkerScriptLarge@2x.png: Removed.
1955
1956 2017-11-14  Joseph Pecoraro  <pecoraro@apple.com>
1957
1958         Relicense non-distributable web inspector images
1959         https://bugs.webkit.org/show_bug.cgi?id=166460
1960         <rdar://problem/29800966>
1961
1962         Reviewed by Brian Burg.
1963
1964         * APPLE_IMAGES_LICENSE.rtf: Removed.
1965         Remove the restrictive Web Inspector images license and default to the
1966         same license as the rest of WebKit.
1967
1968         The Apple Images license was never intended to restrict distribution of
1969         Web Inspector images when used as part of WebKit. Now, all contributions
1970         to Web Inspector, images and source, have the same licensing as all other
1971         WebKit contributions.
1972
1973 2017-11-14  Joseph Pecoraro  <pecoraro@apple.com>
1974
1975         Web Inspector: Network Detail Views - Split Metrics into Sizes and Timing
1976         https://bugs.webkit.org/show_bug.cgi?id=179569
1977         <rdar://problem/35484914>
1978
1979         Reviewed by Brian Burg.
1980
1981         * Localizations/en.lproj/localizedStrings.js:
1982         * UserInterface/Main.html:
1983         New resources and strings.
1984
1985         * UserInterface/Views/NetworkResourceDetailView.js:
1986         (WI.NetworkResourceDetailView):
1987         (WI.NetworkResourceDetailView.prototype.initialLayout):
1988         (WI.NetworkResourceDetailView.prototype._showPreferredContentView):
1989         (WI.NetworkResourceDetailView.prototype._showContentViewForNavigationItem):
1990         (WI.NetworkResourceDetailView.prototype.sizesContentViewGoToHeaders): Renamed.
1991         (WI.NetworkResourceDetailView.prototype.sizesContentViewGoToRequestBody): Renamed.
1992         (WI.NetworkResourceDetailView.prototype.sizesContentViewGoToResponseBody): Renamed.
1993         Split into two navigation items and views.
1994
1995         * UserInterface/Views/ResourceMetricsContentView.css: Removed.
1996         * UserInterface/Views/ResourceMetricsContentView.js: Removed.
1997         * UserInterface/Views/ResourceSizesContentView.css: Added.
1998         * UserInterface/Views/ResourceSizesContentView.js: Added.
1999         * UserInterface/Views/ResourceTimingContentView.css: Added.
2000         * UserInterface/Views/ResourceTimingContentView.js: Added.
2001         Split Metrics into two views.
2002
2003 2017-11-14  Matt Baker  <mattbaker@apple.com>
2004
2005         Web Inspector: Cleanup navigation bar dividers and separators
2006         https://bugs.webkit.org/show_bug.cgi?id=179654
2007         <rdar://problem/35523734>
2008
2009         Reviewed by Devin Rousso.
2010
2011         Update path separator icon, and reduce number of dividers used in the
2012         content browser's navigation bar, to more closely match modern Xcode.
2013
2014         * UserInterface/Images/HierarchicalNavigationItemChevron.svg:
2015         Update icon, remove tapered arrow head.
2016
2017         * UserInterface/Views/ContentBrowser.js:
2018         (WI.ContentBrowser):
2019         Remove divider between back/forward buttons and item name.
2020         (WI.ContentBrowser.prototype._updateContentViewNavigationItems):
2021
2022         * UserInterface/Views/HierarchicalPathComponent.css:
2023         (.hierarchical-path-component > .separator):
2024
2025         * UserInterface/Views/LogContentView.js:
2026         (WI.LogContentView.prototype.get navigationItems):
2027         Remove dividers between buttons provided by the current content view.
2028
2029 2017-11-13  Joseph Pecoraro  <pecoraro@apple.com>
2030
2031         Web Inspector: Network Details Views - make section headers more prominent
2032         https://bugs.webkit.org/show_bug.cgi?id=179565
2033         <rdar://problem/35510531>
2034
2035         Reviewed by Devin Rousso.
2036
2037         * UserInterface/Views/ResourceDetailsSection.css:
2038         (.resource-details > section > .title):
2039
2040 2017-11-13  Nikita Vasilyev  <nvasilyev@apple.com>
2041
2042         Web Inspector: Styles Redesign: make selector field inline-block when editing
2043         https://bugs.webkit.org/show_bug.cgi?id=179588
2044         <rdar://problem/35490915>
2045
2046         Reviewed by Brian Burg.
2047
2048         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:
2049         (.spreadsheet-css-declaration .header.editing-selector .origin):
2050         When the selector field is multiline, it covers the source link entirely.
2051         When the selector field takes only one line, the source link remains where it was before editing.
2052
2053         (.spreadsheet-css-declaration .selector):
2054         Make it `position: relative` to cover the source link.
2055
2056         (.spreadsheet-css-declaration .selector.spreadsheet-selector-field.editing):
2057         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
2058         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
2059
2060 2017-11-13  Joseph Pecoraro  <pecoraro@apple.com>
2061
2062         REGRESSION(r223856): Web Inspector: Cannot view Request Data
2063         https://bugs.webkit.org/show_bug.cgi?id=179567
2064
2065         Reviewed by Brian Burg.
2066
2067         * UserInterface/Views/ResourceClusterContentView.js:
2068         (WI.ResourceClusterContentView.prototype._canShowRequestContentView):
2069         This condition unintentionally got flipped in r223856.
2070
2071 2017-11-13  Matt Baker  <mattbaker@apple.com>
2072
2073         Web Inspector: Add CheckboxNavigationItem
2074         https://bugs.webkit.org/show_bug.cgi?id=179584
2075         <rdar://problem/35490085>
2076
2077         Reviewed by Brian Burg.
2078
2079         * UserInterface/Main.html:
2080         * UserInterface/Views/ButtonNavigationItem.css:
2081         (.navigation-bar .item.button.text-only.checkbox):
2082         (.navigation-bar .item.button.text-only.checkbox label):
2083
2084         * UserInterface/Views/ButtonNavigationItem.js:
2085         Cleanup and some tweaks to the label to make it work with subclasses
2086         regardless of how label is represented in the DOM.
2087
2088         (WI.ButtonNavigationItem):
2089         (WI.ButtonNavigationItem.prototype.get toolTip):
2090         (WI.ButtonNavigationItem.prototype.set toolTip):
2091         (WI.ButtonNavigationItem.prototype.get label):
2092         (WI.ButtonNavigationItem.prototype.set label):
2093         (WI.ButtonNavigationItem.prototype.set image):
2094         (WI.ButtonNavigationItem.prototype.get enabled):
2095         (WI.ButtonNavigationItem.prototype.set enabled):
2096         (WI.ButtonNavigationItem.prototype.updateButtonText):
2097
2098         * UserInterface/Views/CheckboxNavigationItem.js: Added.
2099         New button item with a checkbox and label. Dispatches a Clicked evennt
2100         whenever the checked state changes.
2101
2102         (WI.CheckboxNavigationItem):
2103         (WI.CheckboxNavigationItem.prototype.get checked):
2104         (WI.CheckboxNavigationItem.prototype.set checked):
2105         (WI.CheckboxNavigationItem.prototype.get additionalClassNames):
2106         (WI.CheckboxNavigationItem.prototype.updateButtonText):
2107         (WI.CheckboxNavigationItem.prototype._checkboxChanged):
2108
2109 2017-11-13  Joseph Pecoraro  <pecoraro@apple.com>
2110
2111         Web Inspector: Give DataGrid/Table Header ContextMenu a section header to better describe its functions
2112         https://bugs.webkit.org/show_bug.cgi?id=179560
2113
2114         Reviewed by Matt Baker.
2115
2116         * Localizations/en.lproj/localizedStrings.js:
2117         New string.
2118
2119         * UserInterface/Views/DataGrid.js:
2120         (WI.DataGrid.prototype._contextMenuInHeader):
2121         * UserInterface/Views/Table.js:
2122         (WI.Table.prototype._handleHeaderContextMenu):
2123         Include a disabled context menu item as a section header.
2124
2125 2017-11-12  Carlos Garcia Campos  <cgarcia@igalia.com>
2126
2127         REGRESSION(r224566): [GTK] 26 new timeouts on inspector related tests.
2128         https://bugs.webkit.org/show_bug.cgi?id=179471
2129
2130         Reviewed by Darin Adler.
2131
2132         TestStub.html and TestStub.js was missing in resources bundle.
2133
2134         * Scripts/copy-user-interface-resources.pl: Also combine resources for TestStub.
2135
2136 2017-11-11  Joseph Pecoraro  <pecoraro@apple.com>
2137
2138         Web Inspector: Network detail views - Include a newline between sections when copying
2139         https://bugs.webkit.org/show_bug.cgi?id=179577
2140
2141         Reviewed by Matt Baker.
2142
2143         * UserInterface/Views/NetworkResourceDetailView.css:
2144         (.content-view.resource-details):
2145         * UserInterface/Views/ResourceDetailsSection.css:
2146         (.resource-details > section):
2147         (.resource-details > section > .title):
2148         Adjust styles now that there is a <br> taking up space between sections.
2149         After all the changes, the top section moved up 1px from where it was originally.
2150
2151         * UserInterface/Views/ResourceDetailsSection.js:
2152         (WI.ResourceDetailsSection):
2153         Include a <br> to get newlines when copying.
2154
2155 2017-11-11  Joseph Pecoraro  <pecoraro@apple.com>
2156
2157         Web Inspector: Network waterfall graph - make connection part thinner
2158         https://bugs.webkit.org/show_bug.cgi?id=179561
2159
2160         Reviewed by Devin Rousso.
2161
2162         * UserInterface/Views/NetworkTableContentView.css:
2163         (.waterfall .block):
2164
2165 2017-11-11  Devin Rousso  <webkit@devinrousso.com>
2166
2167         Web Inspector: Canvas tab: show detailed status during canvas recording
2168         https://bugs.webkit.org/show_bug.cgi?id=178185
2169         <rdar://problem/34939862>
2170
2171         Reviewed by Brian Burg.
2172
2173         * Localizations/en.lproj/localizedStrings.js:
2174
2175         * UserInterface/Protocol/CanvasObserver.js:
2176         (WI.CanvasObserver.prototype.recordingProgress):
2177         * UserInterface/Controllers/CanvasManager.js:
2178         (WI.CanvasManager):
2179         (WI.CanvasManager.prototype.recordingProgress):
2180         (WI.CanvasManager.prototype.recordingFinished):
2181         Maintain arrays of recorded frames for each canvas and add new frames each time a progress
2182         event is fired. When the recording is finished, use the array as part of the payload for
2183         creating a WI.Recording object.
2184
2185         * UserInterface/Models/Recording.js:
2186         (WI.Recording.fromPayload):
2187
2188         * UserInterface/Models/RecordingAction.js:
2189         (WI.RecordingAction.prototype.apply.getContent):
2190         (WI.RecordingAction.prototype.apply):
2191         Drive-by fix: toDataURL is very slow, so add alternative ways of getting and comparing the
2192         content of the canvas to determine if the action has a visible effect.
2193
2194         * UserInterface/Views/CanvasContentView.css:
2195         (.content-view.canvas:not(.tab)):
2196         (.content-view.canvas:not(.tab) > .progress):
2197         (.content-view.canvas:not(.tab) > .progress > .frame-count):
2198         * UserInterface/Views/CanvasContentView.js:
2199         (WI.CanvasContentView):
2200         (WI.CanvasContentView.prototype.attached):
2201         (WI.CanvasContentView.prototype._recordingStarted):
2202         (WI.CanvasContentView.prototype._recordingProgress):
2203         (WI.CanvasContentView.prototype._recordingStopped):
2204         Steal some space from the preview area to display a count of the number of recorded frames
2205         and the current buffer usage.
2206
2207         * UserInterface/Views/CanvasOverviewContentView.css:
2208         (.content-view.canvas-overview .content-view.canvas > :matches(header, .progress, .preview, footer)):
2209         (.content-view.canvas-overview .content-view.canvas.selected > :matches(.progress, .preview, footer),):
2210         (.content-view.canvas-overview .content-view.canvas > :matches(.progress, .preview)):
2211         (.content-view.canvas-overview .content-view.canvas > .preview):
2212         (.content-view.canvas-overview .content-view.canvas > .progress ~ .preview):
2213         (.content-view.canvas-overview .content-view.canvas > :matches(header, .preview, footer)): Deleted.
2214         (.content-view.canvas-overview .content-view.canvas.selected > :matches(.preview, footer),): Deleted.
2215
2216 2017-11-09  Nikita Vasilyev  <nvasilyev@apple.com>
2217
2218         Web Inspector: Styles Redesign: clicking on inline swatches and property checkboxes should not add a new property
2219         https://bugs.webkit.org/show_bug.cgi?id=179507
2220         <rdar://problem/35452204>
2221
2222         Reviewed by Brian Burg.
2223
2224         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
2225         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
2226         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleClick):
2227         Don't add new properties when clicking on selector fields, source links, and property checkboxes.
2228
2229         * UserInterface/Views/SpreadsheetStyleProperty.js:
2230         (WI.SpreadsheetStyleProperty.prototype._update):
2231         It is safe to replace "change" event with "click" since it fires even when pressing Space key when the checkbox is focused.
2232
2233 2017-11-09  Devin Rousso  <webkit@devinrousso.com>
2234
2235         Web Inspector: support undo/redo of insertAdjacentHTML
2236         https://bugs.webkit.org/show_bug.cgi?id=179283
2237
2238         Reviewed by Joseph Pecoraro.
2239
2240         * UserInterface/Models/DOMNode.js:
2241         (WI.DOMNode.prototype.insertAdjacentHTML):
2242
2243         * UserInterface/Views/DOMTreeElement.js:
2244         (WI.DOMTreeElement.prototype._startEditingAsHTML):
2245         Drive-by: only attempt to update the cursor if an initialValue is supplied.
2246
2247 2017-11-09  Joseph Pecoraro  <pecoraro@apple.com>
2248
2249         Web Inspector: Make domain availability a list of types instead of a single type
2250         https://bugs.webkit.org/show_bug.cgi?id=179457
2251
2252         Reviewed by Brian Burg.
2253
2254         * UserInterface/Protocol/InspectorBackend.js:
2255         (InspectorBackendClass.prototype.activateDomain):
2256         The second value changed to be an optional list. Check if the active
2257         debuggable type is in the list or not.
2258
2259         * UserInterface/Protocol/Legacy/10.0/InspectorBackendCommands.js:
2260         * UserInterface/Protocol/Legacy/10.3/InspectorBackendCommands.js:
2261         * UserInterface/Protocol/Legacy/11.0/InspectorBackendCommands.js:
2262         * UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
2263         * UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js:
2264         * UserInterface/Protocol/Legacy/9.3/InspectorBackendCommands.js:
2265         * Versions/Inspector-iOS-10.0.json:
2266         * Versions/Inspector-iOS-10.3.json:
2267         * Versions/Inspector-iOS-11.0.json:
2268         * Versions/Inspector-iOS-8.0.json:
2269         * Versions/Inspector-iOS-9.0.json:
2270         * Versions/Inspector-iOS-9.3.json:
2271         Since this is a change to how we generate the frontend resource,
2272         update the legacy versioned backends and regenerate their resource.
2273
2274 2017-11-09  Carlos Garcia Campos  <cgarcia@igalia.com>
2275
2276         REGRESSION(r224566): [GTK][WPE] Many inspector tests are failing after r224566
2277         https://bugs.webkit.org/show_bug.cgi?id=179419
2278
2279         Reviewed by Carlos Alberto Lopez Perez.
2280
2281         All of them fail with the following error:
2282
2283         Uncaught exception in Inspector page: ReferenceError: Can't find variable: CodeMirror [TestCombined.js:36658:15]
2284
2285         This is because Test.html, even when combined, is trying to load CodeMirror from External/CodeMirror, but
2286         CodeMirror was already combined for Main.html. We need to also combine CodeMirror for Test.html.
2287
2288         * Scripts/copy-user-interface-resources.pl:
2289
2290 2017-11-08  Joseph Pecoraro  <pecoraro@apple.com>
2291
2292         Web Inspector: Show Internal properties of PaymentRequest in Web Inspector Console
2293         https://bugs.webkit.org/show_bug.cgi?id=179276
2294
2295         Reviewed by Andy Estes.
2296
2297         * UserInterface/Test.html:
2298         * UserInterface/Test/FrontendTestHarness.js:
2299         (FrontendTestHarness.prototype.evaluateInPage):
2300         * UserInterface/Test/TestUtilities.js: Added.
2301         (promisify):
2302         Make async tests a little easier to work with by providing promises
2303         in some cases that would normally take a callback.
2304
2305 2017-11-08  Brian Burg  <bburg@apple.com>
2306
2307         Web Inspector: fix incorrect curly quote orientation in a UIString
2308         https://bugs.webkit.org/show_bug.cgi?id=179353
2309         <rdar://problem/35368697>
2310
2311         Reviewed by Joseph Pecoraro.
2312
2313         I didn't see any other instances of this mistake in our localized strings.
2314
2315         * Localizations/en.lproj/localizedStrings.js:
2316         * UserInterface/Views/ResourceTimelineDataGridNode.js:
2317         Fix it.
2318
2319 2017-11-08  Joseph Pecoraro  <pecoraro@apple.com>
2320
2321         Web Inspector: Remove unused Page.ScriptIdentifier protocol type
2322         https://bugs.webkit.org/show_bug.cgi?id=179407
2323
2324         Reviewed by Matt Baker.
2325
2326         * Versions/Inspector-iOS-10.0.json:
2327         * Versions/Inspector-iOS-10.3.json:
2328         * Versions/Inspector-iOS-11.0.json:
2329         * Versions/Inspector-iOS-7.0.json:
2330         * Versions/Inspector-iOS-8.0.json:
2331         * Versions/Inspector-iOS-9.0.json:
2332         * Versions/Inspector-iOS-9.3.json:
2333         Remove unused protocol type.
2334
2335 2017-11-06  Nikita Vasilyev  <nvasilyev@apple.com>
2336
2337         Web Inspector: Styles Redesign: Display warnings
2338         https://bugs.webkit.org/show_bug.cgi?id=179215
2339
2340         Reviewed by Brian Burg.
2341
2342         Display warning icons on the right of the property.
2343
2344         For now, the warning icons have only three title messages:
2345         - Invalid property name;
2346         - Invalid property value;
2347         - Duplicate property.
2348
2349         * Localizations/en.lproj/localizedStrings.js:
2350         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
2351         (.spreadsheet-style-declaration-editor .property):
2352         (.spreadsheet-style-declaration-editor .property-toggle):
2353         (.spreadsheet-style-declaration-editor .property.invalid-value:not(.disabled) .value):
2354         (.spreadsheet-style-declaration-editor .property.has-warning):
2355         (.spreadsheet-style-declaration-editor .property .warning):
2356         Draw the warning arrow and icon using only one HTML element.
2357         Don't set "top" property so the element remains vertically where it would be if it had "position: static".
2358
2359         (.spreadsheet-style-declaration-editor .property.has-warning .warning):
2360         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
2361         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._propertiesChanged):
2362         (WI.SpreadsheetCSSStyleDeclarationEditor):
2363         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:
2364         (.spreadsheet-css-declaration):
2365         (.spreadsheet-css-declaration :matches(.header, .header-media)):
2366         (.spreadsheet-css-declaration .close-brace):
2367         Make properties span the entire width of the styles sidebar. Unsupported properties have yellow
2368         background. There should be no gaps between the property element and sidebar left and right edges.
2369
2370         * UserInterface/Views/SpreadsheetStyleProperty.js:
2371         (WI.SpreadsheetStyleProperty):
2372         (WI.SpreadsheetStyleProperty.prototype.updateStatus):
2373         (WI.SpreadsheetStyleProperty.prototype._update):
2374         (WI.SpreadsheetStyleProperty.prototype.updateClassNames): Deleted.
2375         Rename updateClassNames to updateStatus since it modifies title attribute of the warning element.
2376
2377 2017-11-06  Ross Kirsling  <ross.kirsling@sony.com>
2378
2379         Web Inspector: Two little Layers tab fixes
2380         https://bugs.webkit.org/show_bug.cgi?id=179273
2381
2382         Reviewed by Devin Rousso.
2383
2384         * UserInterface/Views/LayerDetailsSidebarPanel.js:
2385         (WI.LayerDetailsSidebarPanel.prototype.selectNodeByLayerId):
2386         Even when we suppress refire of the selected event, we still want a popover.
2387
2388         * UserInterface/Views/Layers3DContentView.js:
2389         (WI.Layers3DContentView):
2390         (WI.Layers3DContentView.prototype.shown):
2391         (WI.Layers3DContentView.prototype.hidden):
2392         (WI.Layers3DContentView.prototype.closed):
2393         (WI.Layers3DContentView.prototype._layerTreeDidChange):
2394         Opening WI directly to the Layers tab wasn't fetching layers right away. Let's fetch on every shown() and
2395         prune the hacky logic we were previously using -- it's overkill anyway, now that we're tracking mutations.
2396
2397 2017-11-06  Joseph Pecoraro  <pecoraro@apple.com>
2398
2399         Web Inspector: no way to navigate from Resource tree element to its entry in Network Tab
2400         https://bugs.webkit.org/show_bug.cgi?id=179328
2401         <rdar://problem/35367294>
2402
2403         Reviewed by Brian Burg.
2404
2405         * Localizations/en.lproj/localizedStrings.js:
2406         New reveal in network tab string.
2407
2408         * UserInterface/Base/Main.js:
2409         (WI.isShowingNetworkTab):
2410         Utility to know if the network tab is showing.
2411
2412         * UserInterface/Views/ContextMenuUtilities.js:
2413         (WI.appendContextMenuItemsForSourceCode):
2414         (showResourceWithOptions):
2415         (WI.appendContextMenuItemsForURL):
2416         Generalize context menus for just a URL.
2417
2418         * UserInterface/Views/TabBrowser.js:
2419         (WI.TabBrowser.prototype.bestTabContentViewForRepresentedObject):
2420         Support more tab ignore options, this is starting to get icky. We may want to
2421         move to just a preferredTab approach, since that is what some of these want.
2422
2423         * UserInterface/Views/DOMTreeElement.js:
2424         (WI.DOMTreeElement.prototype._populateTagContextMenu):
2425         Make use of new ContextMenu utility to add menu items for a URL.
2426
2427         * UserInterface/Views/NetworkTabContentView.js:
2428         (WI.NetworkTabContentView.prototype.showRepresentedObject):
2429         * UserInterface/Views/NetworkTableContentView.js:
2430         (WI.NetworkTableContentView.prototype.showRepresentedObject):
2431         Handle showing a Resource in the NetworkTab. We immediately show
2432         the details view for it, otherwise we fallback to the list view.
2433
2434 2017-11-06  Joseph Pecoraro  <pecoraro@apple.com>
2435
2436         Uncaught Exception: TypeError: null is not an object (evaluating 'mimeType.endsWith')
2437         https://bugs.webkit.org/show_bug.cgi?id=179325
2438         <rdar://problem/35366896>
2439
2440         Reviewed by Brian Burg.
2441
2442         * UserInterface/Base/MIMETypeUtilities.js:
2443         (WI.fileExtensionForMIMEType):
2444         (WI.shouldTreatMIMETypeAsText):
2445         Handle null mime types.
2446
2447 2017-11-06  Joseph Pecoraro  <pecoraro@apple.com>
2448
2449         Web Inspector: Selecting a DOM Search Result in Search Tab unexpectedly changes Tabs
2450         https://bugs.webkit.org/show_bug.cgi?id=179223
2451         <rdar://problem/33949556>
2452
2453         Reviewed by Devin Rousso.
2454
2455         * Localizations/en.lproj/localizedStrings.js:
2456         New string.
2457
2458         * UserInterface/Views/SearchResultTreeElement.js:
2459         (WI.SearchResultTreeElement.prototype.populateContextMenu):
2460         Add a context menu for search results to jump to a different tab.
2461         These behaviors match the double click behavior for search results.
2462
2463         * UserInterface/Views/SearchTabContentView.js:
2464         (WI.SearchTabContentView.prototype.canShowRepresentedObject):
2465         Always support showing a DOM Tree. Clients should be using
2466         ignoreSearchTab if they don't want to jump here.
2467
2468         * UserInterface/Views/DOMTreeDataGridNode.js:
2469         (WI.DOMTreeDataGridNode.prototype._goToArrowWasClicked):
2470         * UserInterface/Views/LayerTreeDataGridNode.js:
2471         (WI.LayerTreeDataGridNode.prototype._goToArrowWasClicked):
2472         Use ignoreSearchTab just in case when showing a DOM Tree.
2473
2474         * UserInterface/Views/ContentBrowser.js:
2475         (WI.ContentBrowser.prototype.shown):
2476         When showing, update our UI to reflect the values of the current content view, which
2477         for a while may have been owned by another ContentBrowser.
2478
2479         (WI.ContentBrowser.prototype._contentViewSelectionPathComponentDidChange):
2480         (WI.ContentBrowser.prototype._contentViewSupplementalRepresentedObjectsDidChange):
2481         (WI.ContentBrowser.prototype._contentViewNavigationItemsDidChange):
2482         We can avoid work in a few places where we might not be the owning ContentBrowser
2483         of a ContentView that is changing.
2484
2485 2017-11-05  Nikita Vasilyev  <nvasilyev@apple.com>
2486
2487         REGRESSION (r221338): Web Inspector: NavigationBar incorrectly calculates minimumWidth
2488         https://bugs.webkit.org/show_bug.cgi?id=179292
2489
2490         Reviewed by Devin Rousso.
2491
2492         * UserInterface/Views/NavigationBar.js:
2493         (WI.NavigationBar.prototype._calculateMinimumWidth):
2494         totalItemWidth was the minimumWidth of the last item.
2495
2496 2017-11-05  Devin Rousso  <webkit@devinrousso.com>
2497
2498         Web Inspector: Canvas Tab: selecting Frame tree element should update preview/slider, does nothing
2499         https://bugs.webkit.org/show_bug.cgi?id=179072
2500         <rdar://problem/35278711>
2501
2502         Reviewed by Matt Baker.
2503
2504         * UserInterface/Views/CanvasTabContentView.js:
2505         (WI.CanvasTabContentView.prototype._navigationSidebarTreeOutlineSelectionChanged):
2506
2507         * UserInterface/Views/RecordingActionTreeElement.css:
2508         (.item.action > .titles .parameter.swizzled):
2509         (.tree-outline:not(:focus, .force-focus) .item.action:not(.initial-state, .parent, .invalid) > .icon): Deleted.
2510         (body:not(.window-inactive, .window-docked-inactive) .item.action > .titles .parameter.swizzled): Deleted.
2511         Drive-by: remove extra :focus selectors to prevent icon flashing when the window is blurred.
2512
2513 2017-11-04  Devin Rousso  <webkit@devinrousso.com>
2514
2515         Web Inspector: add contextmenu item to arbitrarily add HTML/Child to DOMTree
2516         https://bugs.webkit.org/show_bug.cgi?id=179042
2517
2518         Reviewed by Joseph Pecoraro.
2519
2520         * Localizations/en.lproj/localizedStrings.js:
2521
2522         * UserInterface/Models/DOMNode.js:
2523         (WI.DOMNode.prototype.insertAdjacentHTML.inspectedPage_node_insertAdjacentHTML):
2524         (WI.DOMNode.prototype.insertAdjacentHTML):
2525         Call-through to `insertAdjacentHTML` on the corresponding node in the inspected page.
2526
2527         * UserInterface/Views/DOMTreeElement.js:
2528         (WI.DOMTreeElement):
2529         (WI.DOMTreeElement.prototype._populateNodeContextMenu):
2530         (WI.DOMTreeElement.prototype._startEditingAsHTML.dispose):
2531         (WI.DOMTreeElement.prototype._startEditingAsHTML):
2532         (WI.DOMTreeElement.prototype._insertAdjacentHTML.commitCallback):
2533         (WI.DOMTreeElement.prototype._insertAdjacentHTML):
2534         (WI.DOMTreeElement.prototype.updateTitle):
2535         (WI.DOMTreeElement.prototype._singleTextChild):
2536         (WI.DOMTreeElement.prototype._nodeTitleInfo):
2537         (WI.DOMTreeElement.prototype._addHTML):
2538         (WI.DOMTreeElement.prototype._addPreviousSibling):
2539         (WI.DOMTreeElement.prototype._addNextSibling):
2540         (WI.DOMTreeElement.prototype._editAsHTML):
2541         Adjust where the editing element is placed depending on the options passed to `_editAsHTML`.
2542         If the placement is as a child, put it inside the child list. If the placement is as a
2543         sibling, place it before/after the selected TreeElement. Otherwise, add it as a child.
2544
2545         * UserInterface/Views/DOMTreeOutline.css:
2546         (.tree-outline.dom):
2547         (.tree-outline.dom li):
2548         (.tree-outline.dom li:not(.editing)):
2549         (.tree-outline.dom li.editing):
2550         (body[dir=ltr] .tree-outline.dom li): Deleted.
2551         (body[dir=rtl] .tree-outline.dom li): Deleted.
2552         Don't add padding when the list item is being edited.
2553
2554 2017-11-03  Nikita Vasilyev  <nvasilyev@apple.com>
2555
2556         Web Inspector: Uncaught Exception: null is not an object (evaluating 'selector.specificity.map') (at SpreadsheetCSSStyleDeclarationSection.js:199:51)
2557         https://bugs.webkit.org/show_bug.cgi?id=179225
2558         <rdar://problem/35329019>
2559
2560         Reviewed by Joseph Pecoraro.
2561
2562         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
2563         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._renderSelector):
2564         selector.specificity may not exist when the selector is dynamic and doesn't match the selected element.
2565
2566 2017-11-03  Ross Kirsling  <ross.kirsling@sony.com>
2567
2568         Web Inspector: Move Show Compositing Borders/Paint Flashing buttons from Elements tab to Layers tab
2569         https://bugs.webkit.org/show_bug.cgi?id=179211
2570
2571         Reviewed by Joseph Pecoraro.
2572
2573         * UserInterface/Views/DOMTreeContentView.js:
2574         (WI.DOMTreeContentView.prototype.get navigationItems):
2575         (WI.DOMTreeContentView.prototype._updateCompositingBordersButtonToMatchPageSettings):
2576         Guard old buttons with experimental flag.
2577
2578         * UserInterface/Views/Layers3DContentView.js:
2579         (WI.Layers3DContentView):
2580         (WI.Layers3DContentView.prototype.get navigationItems):
2581         (WI.Layers3DContentView.prototype.shown):
2582         (WI.Layers3DContentView.prototype.closed):
2583         (WI.Layers3DContentView.prototype._showPaintRectsSettingChanged):
2584         (WI.Layers3DContentView.prototype._togglePaintFlashing):
2585         (WI.Layers3DContentView.prototype._updateCompositingBordersButtonState):
2586         (WI.Layers3DContentView.prototype._toggleCompositingBorders):
2587         Add buttons to new home.
2588         No need to guard for get/setCompositingBordersVisible anymore, as these were introduced in iOS 7.
2589
2590 2017-11-03  Devin Rousso  <webkit@devinrousso.com>
2591
2592         Web Inspector: move top-level namespace functions in ImageUtilities to static class
2593         https://bugs.webkit.org/show_bug.cgi?id=179207
2594
2595         Reviewed by Brian Burg.
2596
2597         * .eslintrc:
2598         * UserInterface/Base/ImageUtilities.js:
2599         (WI.ImageUtilities.useSVGSymbol):
2600         (WI.ImageUtilities.scratchCanvasContext2D):
2601         (WI.ImageUtilities.imageFromImageData):
2602         (WI.ImageUtilities.imageFromCanvasGradient):
2603         (WI.ImageUtilities):
2604         (useSVGSymbol): Deleted.
2605         (WI.scratchCanvasContext2D): Deleted.
2606         (WI.imageFromImageData): Deleted.
2607         (WI.imageFromCanvasGradient): Deleted.
2608
2609         * UserInterface/Models/Recording.js:
2610         (WI.Recording.prototype.async swizzle):
2611         * UserInterface/Views/ButtonNavigationItem.js:
2612         (WI.ButtonNavigationItem.prototype.set image):
2613         * UserInterface/Views/CallFrameTreeElement.js:
2614         (WI.CallFrameTreeElement.prototype._updateStatus):
2615         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
2616         (WI.DOMNodeDetailsSidebarPanel.prototype.initialLayout):
2617         * UserInterface/Views/DOMTreeElement.js:
2618         (WI.DOMTreeElement.prototype._updateBreakpointStatus):
2619         * UserInterface/Views/MultipleScopeBarItem.js:
2620         (WI.MultipleScopeBarItem):
2621         * UserInterface/Views/RecordingActionTreeElement.js:
2622         (WI.RecordingActionTreeElement._generateDOM):
2623         (WI.RecordingActionTreeElement.prototype._handleHasVisibleEffectChanged):
2624         * UserInterface/Views/RecordingStateDetailsSidebarPanel.js:
2625         (WI.RecordingStateDetailsSidebarPanel.prototype._generateDetailsCanvas2D):
2626         * UserInterface/Views/ResourceMetricsContentView.js:
2627         (WI.ResourceMetricsContentView.prototype._refreshResourceSizeSection):
2628         * UserInterface/Views/ScopeRadioButtonNavigationItem.js:
2629         (WI.ScopeRadioButtonNavigationItem):
2630         * UserInterface/Views/ThreadTreeElement.js:
2631         (WI.ThreadTreeElement.prototype._updateStatus):
2632         * UserInterface/Views/TimelineTreeElement.js:
2633         (WI.TimelineTreeElement.prototype._showCloseButton):
2634         * UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js:
2635         (WI.VisualStyleCommaSeparatedKeywordEditor):
2636         * UserInterface/Views/VisualStyleKeywordIconList.js:
2637         (WI.VisualStyleKeywordIconList):
2638         * UserInterface/Views/VisualStylePropertyEditorLink.js:
2639         (WI.VisualStylePropertyEditorLink):
2640         * UserInterface/Views/VisualStyleSelectorSection.js:
2641         (WI.VisualStyleSelectorSection):
2642         * UserInterface/Views/WebSocketDataGridNode.js:
2643         (WI.WebSocketDataGridNode.prototype.createCellContent):
2644
2645 2017-11-03  Ross Kirsling  <ross.kirsling@sony.com>
2646
2647         Web Inspector: Hide legacy Layers sidebar on Search tab
2648         https://bugs.webkit.org/show_bug.cgi?id=179257
2649
2650         Reviewed by Joseph Pecoraro.
2651
2652         * UserInterface/Views/SearchTabContentView.js:
2653         (WI.SearchTabContentView):
2654
2655 2017-11-03  Joseph Pecoraro  <pecoraro@apple.com>
2656
2657         Web Inspector: Network Table - Include a secure lock indicator in the domain column
2658         https://bugs.webkit.org/show_bug.cgi?id=179233
2659         <rdar://problem/34070883>
2660
2661         Reviewed by Devin Rousso.
2662
2663         * UserInterface/Views/NetworkTableContentView.css:
2664         (.network-table .cell.domain > .lock):
2665         * UserInterface/Views/NetworkTableContentView.js:
2666         (WI.NetworkTableContentView.prototype.tablePopulateCell):
2667         (WI.NetworkTableContentView.prototype._populateDomainCell):
2668         Add a small lock icon by the domain if the request was https/wss.
2669
2670 2017-11-03  Devin Rousso  <webkit@devinrousso.com>
2671
2672         Web Inspector: Canvas2D Profiling: highlight expensive context commands in the captured command log
2673         https://bugs.webkit.org/show_bug.cgi?id=178302
2674         <rdar://problem/33158849>
2675
2676         Reviewed by Brian Burg.
2677
2678         * UserInterface/Models/RecordingFrame.js:
2679         (WI.RecordingFrame):
2680         (WI.RecordingFrame.fromPayload):
2681         (WI.RecordingFrame.prototype.get duration):
2682         (WI.RecordingFrame.prototype.toJSON):
2683
2684         * UserInterface/Views/RecordingNavigationSidebarPanel.js:
2685         (WI.RecordingNavigationSidebarPanel.prototype.set recording):
2686         * UserInterface/Views/RecordingNavigationSidebarPanel.css:
2687         (.sidebar > .panel.navigation.recording > .content > .tree-outline .item.folder-icon > .status):
2688
2689 2017-11-02  Devin Rousso  <webkit@devinrousso.com>
2690
2691         Web Inspector: Canvas Tab: show supported GL extensions for selected canvas
2692         https://bugs.webkit.org/show_bug.cgi?id=179070
2693         <rdar://problem/35278276>
2694
2695         Reviewed by Brian Burg.
2696
2697         * Localizations/en.lproj/localizedStrings.js:
2698
2699         * UserInterface/Protocol/CanvasObserver.js:
2700         (WI.CanvasObserver.prototype.extensionEnabled):
2701
2702         * UserInterface/Controllers/CanvasManager.js:
2703         (WI.CanvasManager.prototype.extensionEnabled):
2704
2705         * UserInterface/Models/Canvas.js:
2706         (WI.Canvas.prototype.get extensions):
2707         (WI.Canvas.prototype.enableExtension):
2708         Maintain a Set of enabled extensions, and dispatch an event whenever an extension is enabled.
2709
2710         * UserInterface/Views/CanvasDetailsSidebarPanel.css:
2711         (.sidebar > .panel.details.canvas .details-section.canvas-extensions .content > ul):
2712         * UserInterface/Views/CanvasDetailsSidebarPanel.js:
2713         (WI.CanvasDetailsSidebarPanel.prototype.set canvas):
2714         (WI.CanvasDetailsSidebarPanel.prototype.initialLayout):
2715         (WI.CanvasDetailsSidebarPanel.prototype.layout):
2716         (WI.CanvasDetailsSidebarPanel.prototype._refreshAttributesSection):
2717         (WI.CanvasDetailsSidebarPanel.prototype._refreshExtensionsSection):
2718         Drive-by: hide Attributes section when the canvas has no attributes.
2719
2720 2017-11-02  Joseph Pecoraro  <pecoraro@apple.com>
2721
2722         Make ServiceWorker a Remote Inspector debuggable target
2723         https://bugs.webkit.org/show_bug.cgi?id=179043
2724         <rdar://problem/34126008>
2725
2726         Reviewed by Brian Burg.
2727
2728         Customize the Web Inspector frontend for a ServiceWorker target.
2729         Currently this just behaves like a JavaScript Context target because
2730         we haven't yet added support for Networking capabilities.
2731
2732         * UserInterface/Controllers/DebuggerManager.js:
2733         (WI.DebuggerManager.prototype.get knownNonResourceScripts):
2734         Drive-by fix a bug where lazily initializing the Resources / Debugger tabs
2735         would show Console evaluation scripts. We should ignore them, like we
2736         do in other places.
2737
2738         * Localizations/en.lproj/localizedStrings.js:
2739         * UserInterface/Controllers/AppController.js:
2740         (WI.AppController):
2741         (WI.AppController.debuggableTypeFromHost):
2742         * UserInterface/Controllers/AppControllerBase.js:
2743         * UserInterface/Controllers/TimelineManager.js:
2744         (WI.TimelineManager.defaultTimelineTypes):
2745         (WI.TimelineManager.availableTimelineTypes):
2746         * UserInterface/Models/TimelineRecording.js:
2747         (WI.TimelineRecording.sourceCodeTimelinesSupported):
2748         * UserInterface/Protocol/MainTarget.js:
2749         (WI.MainTarget.prototype.get displayName):
2750         * UserInterface/Test/TestAppController.js:
2751         * UserInterface/Views/DashboardContainerView.css:
2752         (body:not(.web) .toolbar .dashboard-container):
2753         (body.javascript .toolbar .dashboard-container): Deleted.
2754         * UserInterface/Views/DefaultDashboardView.css:
2755         (body:not(.web) .toolbar .dashboard.default > :matches(.resourcesCount, .resourcesSize, .time)):
2756         (body.javascript .toolbar .dashboard.default > :matches(.resourcesCount, .resourcesSize, .time)): Deleted.
2757         * UserInterface/Views/ResourceSidebarPanel.js:
2758         (WI.ResourceSidebarPanel):
2759         (WI.ResourceSidebarPanel.shouldPlaceResourcesAtTopLevel):
2760         (WI.ResourceSidebarPanel.prototype.initialLayout):
2761         (WI.ResourceSidebarPanel.prototype._addScript):
2762         (WI.ResourceSidebarPanel.prototype._extraDomainsActivated):
2763         * UserInterface/Views/Toolbar.js:
2764
2765 2017-11-02  Devin Rousso  <webkit@devinrousso.com>
2766
2767         Web Inspector: Canvas: recording parameters that include an Image should show an InlineSwatch (2D canvas)
2768         https://bugs.webkit.org/show_bug.cgi?id=177032
2769
2770         Reviewed by Brian Burg.
2771
2772         * Localizations/en.lproj/localizedStrings.js:
2773
2774         * UserInterface/Test.html:
2775         * UserInterface/Base/ImageUtilities.js:
2776         (WI.scratchCanvasContext2D):
2777         Creates a static canvas that can be used for scratch purposes, such as converting ImageData
2778         to an Image, or rendering the result of a CanvasGradient. The canvas is reset after each
2779         call of the function so it can be reused by other callers.
2780
2781         (WI.imageFromImageData):
2782         (WI.imageFromCanvasGradient):
2783         Utility functions for getting a dataURL image of ImageData/CanvasGradient after drawing it
2784         onto WI.scratchCanvasContext2D.
2785
2786         * UserInterface/Models/Recording.js:
2787         (WI.Recording.prototype.async.swizzle):
2788         Set the Image used to create a CanvasPattern as an expando property for later use.
2789
2790         * UserInterface/Models/RecordingAction.js:
2791         (WI.RecordingAction.prototype.getImageParameters):
2792
2793         * UserInterface/Views/RecordingActionTreeElement.js:
2794         (WI.RecordingActionTreeElement._generateDOM):
2795         Add Image InlineSwatch elements for parameters that are viewable as an image. For ImageData
2796         and CanvasGradient, WI.scratchCanvasContext2D is used to draw the ImageData/CanvasGradient
2797         and get a dataURL to be used as the image.
2798
2799         (WI.RecordingActionTreeElement._createSwatchForColorParameters):
2800         Drive-by: add checks that the parameter is not a CanvasGradient or CanvasPattern.
2801
2802         * UserInterface/Views/RecordingStateDetailsSidebarPanel.js:
2803         (WI.RecordingStateDetailsSidebarPanel.prototype._generateDetailsCanvas2D):
2804         Add Image InlineSwatch elements for fillStyle/strokeStyle when the value is a CanvasGradient
2805         or a CanvasPattern.
2806
2807         * UserInterface/Views/InlineSwatch.js:
2808         (WI.InlineSwatch):
2809         (WI.InlineSwatch.prototype._updateSwatch):
2810         (WI.InlineSwatch.prototype._swatchElementClicked):
2811         * UserInterface/Views/InlineSwatch.css:
2812         (.inline-swatch):
2813         (.inline-swatch:matches(.color, .gradient)):
2814         (.inline-swatch:matches(.bezier, .spring, .variable)):
2815         (.inline-swatch:not(.read-only):matches(.bezier, .spring, .variable):hover):
2816         (.inline-swatch:not(.read-only):matches(.bezier, .spring, .variable):active):
2817         (.inline-swatch:not(.read-only):active > span):
2818         (.inline-swatch:matches(.bezier, .spring, .variable) > span):
2819         (.inline-swatch.image > span):
2820         (.inline-swatch:matches(.bezier, .spring, .variable):hover): Deleted.
2821         (.inline-swatch:matches(.bezier, .spring, .variable):active): Deleted.
2822         (.inline-swatch:active > span): Deleted.
2823         (.inline-swatch:matches(.bezier, .spring) > span): Deleted.
2824         Add Image type for showing previews of images.
2825         Drive-by: simplify some styles.
2826
2827         * UserInterface/Views/RecordingActionTreeElement.css:
2828         (.item.action > .titles .parameters > .inline-swatch):
2829         (.tree-outline:matches(:focus, .force-focus) .item.action > .titles .parameters > .inline-swatch): Deleted.
2830         Drive-by: remove the :focus requirement, as it would cause the InlineSwatch to shift when
2831         the user clicked out of the WebInspector window.
2832
2833 2017-11-02  Joseph Pecoraro  <pecoraro@apple.com>
2834
2835         Inspector should display service worker served responses properly
2836         https://bugs.webkit.org/show_bug.cgi?id=178597
2837         <rdar://problem/35186111>
2838
2839         Reviewed by Brian Burg.
2840
2841         * Localizations/en.lproj/localizedStrings.js:
2842         New Service Worker related strings.
2843
2844         * UserInterface/Controllers/HARBuilder.js:
2845         (WI.HARBuilder.entry):
2846         (WI.HARBuilder.timings):
2847         Only output timing data when we have real resource timing data.
2848
2849         (WI.HARBuilder.fetchType):
2850         Output a new string for a Service Worker load in our custom field.
2851
2852         * UserInterface/Models/ResourceTimingData.js:
2853         (WI.ResourceTimingData.prototype.get responseStart):
2854         Fallback further to the responseEnd. This can happen if the response
2855         itself is an error/failure and there was no response, so treat it as
2856         the same as response end.
2857
2858         * UserInterface/Models/Resource.js:
2859         (WI.Resource.responseSourceFromPayload):
2860         (WI.Resource.prototype.updateForRedirectResponse):
2861         (WI.Resource.prototype.updateForResponse):
2862         A fetch response won't change the URL, so if the URL is empty
2863         don't change it from what the request's URL was.
2864
2865         (WI.Resource.prototype.hasResponse):
2866         Failure is like finished. We should likely transition to an "isComplete" method.
2867
2868         * UserInterface/Views/NetworkTableContentView.js:
2869         (WI.NetworkTableContentView.prototype._populateTransferSizeCell):
2870         (WI.NetworkTableContentView.prototype._generateSortComparator):
2871         Output "(service worker)" in the transfer size field, to indicate this came
2872         from a Service worker. Sort such loads together.
2873
2874         * UserInterface/Views/ResourceHeadersContentView.js:
2875         (WI.ResourceHeadersContentView.prototype._responseSourceDisplayString):
2876         (WI.ResourceHeadersContentView.prototype._refreshSummarySection):
2877         Include the Service Worker response source in this details view. Also include
2878         a FIXME, since we would like to link directly to the service worker in the future.
2879
2880 2017-11-02  Nikita Vasilyev  <nvasilyev@apple.com>
2881
2882         Web Inspector: Styles Redesign: turn on CSS spreadsheet editor by default
2883         https://bugs.webkit.org/show_bug.cgi?id=179100
2884         <rdar://problem/35285990>
2885
2886         Reviewed by Brian Burg.
2887
2888         Add a "Legacy Style Editor" checkbox and remove the experimental "Spreadsheet Style Editor" checkbox.
2889
2890         Remove settings of the legacy styles editor:
2891         - Show inline warnings
2892         - Automatically insert newline
2893         - Select text on first click
2894
2895         These settings are not applicable for the spreadsheet styles editor and
2896         now are always enabled for the legacy styles editor.
2897
2898         * Localizations/en.lproj/localizedStrings.js:
2899         * UserInterface/Base/Setting.js:
2900         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
2901         (WI.CSSStyleDeclarationTextEditor):
2902         (WI.CSSStyleDeclarationTextEditor.prototype._handleMouseUp):
2903         (WI.CSSStyleDeclarationTextEditor.):
2904         * UserInterface/Views/CSSStyleDetailsSidebarPanel.js:
2905         (WI.CSSStyleDetailsSidebarPanel):
2906         * UserInterface/Views/SettingsTabContentView.js:
2907         (WI.SettingsTabContentView.prototype._createGeneralSettingsView):
2908         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
2909
2910 2017-11-01  Devin Rousso  <webkit@devinrousso.com>
2911
2912         Web Inspector: consolidate DOMTreeElement contextmenu items into submenus
2913         https://bugs.webkit.org/show_bug.cgi?id=178996
2914
2915         Reviewed by Joseph Pecoraro.
2916
2917         * Localizations/en.lproj/localizedStrings.js:
2918
2919         * UserInterface/Views/ContextMenu.js:
2920         (WI.ContextSubMenuItem.prototype.appendItem):
2921         (WI.ContextSubMenuItem.prototype.appendSubMenuItem):
2922         (WI.ContextSubMenuItem.prototype.appendCheckboxItem):
2923         (WI.ContextSubMenuItem.prototype.pushItem):
2924         (WI.ContextSubMenuItem.prototype._pushItem): Deleted.
2925         Made `pushItem` public so that it is possible to create a ContextMenuItem without
2926         immediately adding it to the ContextMenu.
2927
2928         (WI.ContextSubMenuItem.prototype._buildDescriptor):
2929         (WI.ContextMenu.prototype._buildDescriptor):
2930         Filter out submenus that have no items.
2931
2932         * UserInterface/Views/ContextMenuUtilities.js:
2933         (WI.appendContextMenuItemsForDOMNode):
2934         * UserInterface/Views/DOMTreeElement.js:
2935         (WI.DOMTreeElement.prototype.toggleElementVisibility):
2936         (WI.DOMTreeElement.prototype._populateTagContextMenu):
2937         (WI.DOMTreeElement.prototype._populateTextContextMenu):
2938         (WI.DOMTreeElement.prototype._populateNodeContextMenu):
2939         (WI.DOMTreeElement.prototype._populateForcedPseudoStateItems): Deleted.
2940         Add relevant items to the provided submenus and reorder the entire contextmenu for better
2941         readability and consistency.
2942
2943         * UserInterface/Views/DOMTreeOutline.js:
2944         (WI.DOMTreeOutline.prototype.populateContextMenu):
2945         Create submenus for Add, Edit, Copy, and Delete, and pass them to the DOMTreeElement
2946         "populate*ContextMenu" functions so that they can add items to each submenu.
2947
2948         (WI.DOMTreeOutline.prototype._hideElement):
2949         Move to DOMTreeElement so that it can be used by a contextmenu item.
2950
2951 2017-11-01  Ross Kirsling  <ross.kirsling@sony.com>
2952
2953         Web Inspector: Improve UX of Layers tab visualization
2954         https://bugs.webkit.org/show_bug.cgi?id=178966
2955
2956         Reviewed by Devin Rousso.
2957
2958         * UserInterface/Views/Layers3DContentView.js:
2959         (WI.Layers3DContentView):
2960         (WI.Layers3DContentView.prototype.initialLayout):
2961         (WI.Layers3DContentView.prototype._canvasMouseDown):
2962         (WI.Layers3DContentView.prototype._createLayerGroup): Renamed from _addLayerGroup.
2963         (WI.Layers3DContentView.prototype._updateLayerGroupPosition): Merged into _updateLayers.
2964         Set up zoom and pan.
2965
2966         (WI.Layers3DContentView.prototype._animate):
2967         (WI.Layers3DContentView.prototype._restrictPan):
2968         Restrict pan to bounding box on XY plane.
2969
2970         (WI.Layers3DContentView.prototype.layout):
2971         (WI.Layers3DContentView.prototype._updateDocument):
2972         (WI.Layers3DContentView.prototype._resetCamera):
2973         On new document, throw out all old layers and center the camera on the new document layer.
2974
2975         (WI.Layers3DContentView.prototype.selectLayerById):
2976         (WI.Layers3DContentView.prototype._centerOnSelection):
2977         Recenter the camera when layer group selection is updated programmatically.
2978
2979         (WI.Layers3DContentView.prototype._updateLayers):
2980         (WI.Layers3DContentView.prototype._createLayerMesh):
2981         Fix visual artifact due to "depthWrite" flag.
2982
2983         * UserInterface/Views/LayerDetailsSidebarPanel.js:
2984         (WI.LayerDetailsSidebarPanel.prototype.selectNodeByLayerId):
2985         Suppress selection update event when the data grid selection is updated programmatically.
2986
2987         * UserInterface/Views/DataGridNode.js:
2988         (WI.DataGridNode.prototype.revealAndSelect):
2989         Allow forwarding of select()'s parameter.
2990
2991 2017-11-01  Joseph Pecoraro  <pecoraro@apple.com>
2992
2993         Web Inspector: Combine all storage icon files into a single file
2994         https://bugs.webkit.org/show_bug.cgi?id=179134
2995
2996         Reviewed by Devin Rousso.
2997
2998         * UserInterface/Main.html:
2999         * UserInterface/Views/CookieIcon.css: Removed.
3000         * UserInterface/Views/DOMStorageIcons.css: Removed.
3001         * UserInterface/Views/DatabaseIcon.css: Removed.
3002         * UserInterface/Views/DatabaseTableIcon.css: Removed.
3003         * UserInterface/Views/StorageIcons.css: Added.
3004         (.application-cache-manifest .icon):
3005         (.application-cache-frame .icon):
3006         (.cookie-icon .icon):
3007         (.local-storage-icon .icon):
3008         (.session-storage-icon .icon):
3009         (.database-icon .icon):
3010         (.database-table-icon .icon):
3011
3012 2017-11-01  Nikita Vasilyev  <nvasilyev@apple.com>
3013
3014         Web Inspector: Styles Redesign: Hovering over a selector should highlight matching elements on the page
3015         https://bugs.webkit.org/show_bug.cgi?id=179040
3016
3017         Reviewed by Devin Rousso.
3018
3019         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
3020         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
3021         Use mouseenter/mouseleave events instead of mousein/mouseout (as in the old styles sidebar)
3022         to avoid unnecessary events being fired.
3023
3024         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._highlightNodesWithSelector):
3025         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._hideDOMNodeHighlight):
3026
3027 2017-10-30  Nikita Vasilyev  <nvasilyev@apple.com>
3028
3029         Web Inspector: [PARITY] Styles Redesign: Ability to modify style attributes
3030         https://bugs.webkit.org/show_bug.cgi?id=178328
3031         <rdar://problem/35000990>
3032
3033         Reviewed by Joseph Pecoraro.
3034
3035         Before this patch, modifying a property of a style attribute duplicated the old property
3036         and appended the new one. This happened because WI.TextRange.prototype.resolveOffsets
3037         didn't resolve offsets correctly when text didn't end with a trailing new line.
3038
3039         Since WI.TextRange.prototype.resolveOffsets is used elsewhere and this could be expected
3040         behavior, append a line break before resolving a range.
3041
3042         * UserInterface/Models/CSSProperty.js:
3043         (WI.CSSProperty.prototype._updateOwnerStyleText):
3044
3045 2017-10-30  Ross Kirsling  <ross.kirsling@sony.com>
3046
3047         Web Inspector: Clicking filler in data grid should clear selection
3048         https://bugs.webkit.org/show_bug.cgi?id=179027
3049
3050         Reviewed by Brian Burg.
3051
3052         * UserInterface/Views/DataGrid.js:
3053         (WI.DataGrid.prototype._mouseDownInDataTable):
3054
3055 2017-10-30  Devin Rousso  <webkit@devinrousso.com>
3056
3057         Web Inspector: Canvas Tab: no path components shown in recording content view after selecting a recording via View Recordings... dropdown
3058         https://bugs.webkit.org/show_bug.cgi?id=178807
3059         <rdar://problem/35176463>
3060
3061         Reviewed by Brian Burg.
3062
3063         When the first Recording is taken of a canvas, it is immediately added as a child. When the
3064         CanvasTreeElement is `attached`, however, it will attempt to regenerate its children if
3065         necessary. This is especially true for canvases with ShaderPrograms, as they are added with
3066         `addRepresentedObjectToNewChildQueue`, meaning that the child TreeElements aren't actually
3067         added until the next tick, preventing the ContentBrowser logic from generating path
3068         components correctly.
3069
3070         This patch switches to using `addChildForRepresentedObject` so that there is no delay when
3071         adding children, and also ensures that any existing recordings are also added on regeneration.
3072
3073         * UserInterface/Views/CanvasTabContentView.js:
3074         (WI.CanvasTabContentView.prototype._recordingAdded):
3075         Move logic for adding TreeElements for new Recordings to CanvasTreeElement.
3076
3077         * UserInterface/Views/CanvasTreeElement.js:
3078         (WI.CanvasTreeElement.createRecordingTreeElement):
3079         (WI.CanvasTreeElement):
3080         (WI.CanvasTreeElement.prototype.onattach):
3081         (WI.CanvasTreeElement.prototype.ondetach):
3082         (WI.CanvasTreeElement.prototype.onpopulate):
3083         (WI.CanvasTreeElement.prototype._handleItemAdded):
3084         (WI.CanvasTreeElement.prototype._handleItemRemoved):
3085         (WI.CanvasTreeElement.prototype._shaderProgramAdded): Deleted.
3086         (WI.CanvasTreeElement.prototype._shaderProgramRemoved): Deleted.
3087
3088 2017-10-30  Fujii Hironori  <Hironori.Fujii@sony.com>
3089
3090         [GTK] Web Inspector: Add Path.svg
3091         https://bugs.webkit.org/show_bug.cgi?id=178432
3092
3093         Reviewed by Carlos Garcia Campos.
3094
3095         * UserInterface/Images/gtk/Path.svg: Added.
3096
3097 2017-10-30  Nikita Vasilyev  <nvasilyev@apple.com>
3098
3099         Web Inspector: [PARITY] Styles Redesign: clicking on the white space after the property should create a blank property
3100         https://bugs.webkit.org/show_bug.cgi?id=178022
3101         <rdar://problem/34861687>
3102
3103         Reviewed by Matt Baker.
3104
3105         - Clicking on the whitespace on the right side of a property should insert a blank property after the clicked one.
3106         - Clicking on the whitespace at the end of a CSS rule should append a blank property.
3107         - Clicking on the whitespace before the first property should insert a blank property before the first one.
3108
3109         * UserInterface/Models/CSSProperty.js:
3110         (WI.CSSProperty.prototype.remove):
3111         (WI.CSSProperty.prototype._updateOwnerStyleText):
3112         Remove method previously didn't do anything for a newly added property.
3113
3114         * UserInterface/Models/CSSStyleDeclaration.js:
3115         (WI.CSSStyleDeclaration.prototype.newBlankProperty):
3116         Update indices of all properties after the newly added property.
3117
3118         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
3119         (WI.SpreadsheetCSSStyleDeclarationEditor):
3120         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
3121         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.startEditingFirstProperty):
3122         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.startEditingLastProperty):
3123         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.isFocused):
3124         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.addBlankProperty):
3125         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetCSSStyleDeclarationEditorFocusMoved):
3126         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._propertiesChanged):
3127         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._addBlankProperty): Deleted.
3128         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._isFocused): Deleted.
3129         Re-layout SpreadsheetCSSStyleDeclarationEditor after adding a new property. Preserve edited property
3130         so we can restore editing state after the re-layout.
3131
3132         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
3133         (WI.SpreadsheetCSSStyleDeclarationSection):
3134         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
3135         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleMouseDown):
3136         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleClick):
3137         Clicking should add a new property only when we aren't editing an existing property.
3138
3139         * UserInterface/Views/SpreadsheetStyleProperty.js:
3140         (WI.SpreadsheetStyleProperty):
3141         (WI.SpreadsheetStyleProperty.prototype.updateClassNames):
3142         (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidCommit):
3143         Remove newlyAdded property of SpreadsheetStyleProperty. During layout SpreadsheetCSSStyleDeclarationEditor
3144         recreates SpreadsheetStyleProperty views and newlyAdded property gets lost.
3145
3146         * UserInterface/Views/SpreadsheetTextField.js:
3147         (WI.SpreadsheetTextField.prototype.get valueBeforeEditing):
3148         (WI.SpreadsheetTextField.prototype.startEditing):
3149         (WI.SpreadsheetTextField.prototype.stopEditing):
3150         (WI.SpreadsheetTextField.prototype._discardChange):
3151
3152 2017-10-27  Devin Rousso  <webkit@devinrousso.com>
3153
3154         Web Inspector: Canvas Tab: no way to see backtrace of where a canvas context was created
3155         https://bugs.webkit.org/show_bug.cgi?id=178799
3156         <rdar://problem/35175805>
3157
3158         Reviewed by Brian Burg.
3159
3160         * Localizations/en.lproj/localizedStrings.js:
3161
3162         * UserInterface/Models/Canvas.js:
3163         (WI.Canvas.fromPayload):
3164         (WI.Canvas.prototype.get backtrace):
3165
3166         * UserInterface/Views/CanvasDetailsSidebarPanel.css:
3167         (.sidebar > .panel.details.canvas .details-section.canvas-backtrace .call-frame):
3168
3169         * UserInterface/Views/CanvasDetailsSidebarPanel.js:
3170         (WI.CanvasDetailsSidebarPanel.prototype.initialLayout):
3171         (WI.CanvasDetailsSidebarPanel.prototype.layout):
3172         (WI.CanvasDetailsSidebarPanel.prototype._refreshBacktraceSection):
3173
3174         * UserInterface/Views/ResourceIcons.css:
3175         (.canvas > .icon):
3176         (.canvas .icon): Deleted.
3177
3178 2017-10-26  Devin Rousso  <webkit@devinrousso.com>
3179
3180         Web Inspector: Canvas Tab: canvas path components from old page stick around when page is reloaded
3181         https://bugs.webkit.org/show_bug.cgi?id=178806
3182         <rdar://problem/35176360>
3183
3184         Reviewed by Brian Burg.
3185
3186         Before this change, the CanvasCollection was regenerated each time the Canvas tab was
3187         attached. This also caused the invisible TreeOutline, used for the path components and to
3188         manage selection, to be reset as well. Whenever the page refreshed, however, the old
3189         canvases, and associated recordings, were not removed. This patch reworks all of this logic
3190         to create the CanvasCollection on construction of the tab and add/remove canvases as needed.
3191
3192         * UserInterface/Controllers/CanvasManager.js:
3193         (WI.CanvasManager.prototype.canvasAdded):
3194         (WI.CanvasManager.prototype.canvasRemoved):
3195         (WI.CanvasManager.prototype._removeCanvas):
3196         (WI.CanvasManager.prototype._mainResourceDidChange):
3197         Replaced the "Cleared" event by instead firing "CanvasRemoved" for every tracked canvas. This
3198         massively simplifies the logic for when the page navigates, as everything goes through a
3199         single event listener.
3200         Drive-by: changed existing event names to remove unnecessary words.
3201
3202         * UserInterface/Views/CanvasTabContentView.js:
3203         (WI.CanvasTabContentView):
3204         (WI.CanvasTabContentView.prototype.attached):
3205         (WI.CanvasTabContentView.prototype.detached):
3206         (WI.CanvasTabContentView.prototype._addCanvas):
3207         (WI.CanvasTabContentView.prototype._removeCanvas):
3208         (WI.CanvasTabContentView.prototype._handleCanvasAdded):
3209         (WI.CanvasTabContentView.prototype._handleCanvasRemoved):
3210         (WI.CanvasTabContentView.prototype._canvasAdded): Deleted.
3211         (WI.CanvasTabContentView.prototype._canvasRemoved): Deleted.
3212         (WI.CanvasTabContentView.prototype._mainResourceDidChange): Deleted.
3213         Rework logic for the way that the CanvasCollection is maintained. It is no longer
3214         created/destroyed each time the view is attached/detached, and instead a diff is calculated
3215         for the added/existing/removed canvases and the content views are added/removed as such.
3216
3217         * UserInterface/Views/CanvasOverviewContentView.js:
3218         (WI.CanvasOverviewContentView.prototype._selectionPathComponentsChanged):
3219         Drive-by: if an imported recording is selected on the Canvas Overview view, we should show it.
3220
3221 2017-10-26  Devin Rousso  <webkit@devinrousso.com>
3222
3223         Web Inspector: Canvas Tab: canvases overview should support navigation via keyboard
3224         https://bugs.webkit.org/show_bug.cgi?id=178800
3225         <rdar://problem/35175856>
3226
3227         Reviewed by Brian Burg.
3228
3229         Create a KeyboardShorcut for each of the following:
3230          - Up: selects the previous canvas in the selected column
3231          - Down: selects the next canvas in the selected column
3232          - Right: selects the next canvas in the selected row
3233          - Left: selects the previous canvas in the selected row
3234          - Space: toggle recording of the selected canvas
3235          - Shift+Space: toggle single-frame recording of the selected canvas
3236
3237         The calculation for selected row/colum is based on the `offsetWidth` of the parent element
3238         and the selected item's content view element. Since this view uses a flexbox, all of the
3239         items are expected to have the same dimensions, meaning that this value is uniform. The
3240         intended functionality is that of a spreadsheet, where pressing pressing left/right will
3241         never change the selected row and up/down will never change the selected column.
3242
3243         * UserInterface/Views/CanvasOverviewContentView.css:
3244         (.content-view.canvas-overview):
3245         (.content-view.canvas-overview .content-view.canvas):
3246         Move margin value to a CSS variable so that it can be easily retrieved via JavaScript.
3247
3248         * UserInterface/Views/CanvasOverviewContentView.js:
3249         (WI.CanvasOverviewContentView):
3250         (WI.CanvasOverviewContentView.prototype.contentViewAdded):
3251         (WI.CanvasOverviewContentView.prototype.contentViewRemoved):
3252         (WI.CanvasOverviewContentView.prototype.attached):
3253         (WI.CanvasOverviewContentView.prototype.detached):
3254         (WI.CanvasOverviewContentView.prototype.get _itemMargin):
3255         (WI.CanvasOverviewContentView.prototype._changeSelectedItemVertically):
3256         (WI.CanvasOverviewContentView.prototype._changeSelectedItemHorizontally):
3257         (WI.CanvasOverviewContentView.prototype._updateNavigationItems):
3258         (WI.CanvasOverviewContentView.prototype._handleUp):
3259         (WI.CanvasOverviewContentView.prototype._handleRight):
3260         (WI.CanvasOverviewContentView.prototype._handleDown):
3261         (WI.CanvasOverviewContentView.prototype._handleLeft):
3262         (WI.CanvasOverviewContentView.prototype._handleSpace):
3263         (WI.CanvasOverviewContentView.prototype._supplementalRepresentedObjectsDidChange):
3264         Drive-by: call `_updateNavigationItems` whenever an item is added/removed so that if there
3265         are no items the navigation items cannot be clicked.
3266
3267 2017-10-26  Nikita Vasilyev  <nvasilyev@apple.com>
3268
3269         Web Inspector: Styles Redesign: Make "Style Attribute" text darker and non-focusable
3270         https://bugs.webkit.org/show_bug.cgi?id=178837
3271
3272         Reviewed by Brian Burg.
3273
3274         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:
3275         (.spreadsheet-css-declaration .selector.style-attribute):
3276         Use the same shade of gray as in the "Inherited from" sections.
3277
3278         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
3279         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
3280         Only editable selectors should be focusable.
3281
3282 2017-10-26  Fujii Hironori  <Hironori.Fujii@sony.com>
3283
3284         [GTK] Web Inspector: Add CanvasOverview.svg and Canvas.svg
3285         https://bugs.webkit.org/show_bug.cgi?id=178426
3286
3287         Reviewed by Carlos Garcia Campos.
3288
3289         * UserInterface/Images/gtk/Canvas.svg: Added.
3290         * UserInterface/Images/gtk/CanvasOverview.svg: Added.
3291
3292 2017-10-25  Devin Rousso  <webkit@devinrousso.com>
3293
3294         Web Inspector: provide a way to enable/disable event listeners
3295         https://bugs.webkit.org/show_bug.cgi?id=177451
3296         <rdar://problem/34994925>
3297
3298         Reviewed by Joseph Pecoraro.
3299
3300         * Localizations/en.lproj/localizedStrings.js:
3301
3302         * UserInterface/Controllers/DOMTreeManager.js:
3303         (WI.DOMTreeManager.prototype.setEventListenerDisabled):
3304
3305         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
3306         (WI.DOMNodeDetailsSidebarPanel.prototype.attached):
3307         (WI.DOMNodeDetailsSidebarPanel.prototype.detached):
3308         (WI.DOMNodeDetailsSidebarPanel.prototype._eventListenersChanged):
3309         (WI.DOMNodeDetailsSidebarPanel.prototype.addEventListeners): Deleted.
3310         (WI.DOMNodeDetailsSidebarPanel.prototype.removeEventListeners): Deleted.
3311         Listen for `WI.DOMNode.Event.EventListenersChanged` on all instances of WI.DOMNode, since we
3312         will still want to refresh the event listeners section in the event that an event listener
3313         is removed from a parent node.
3314
3315         * UserInterface/Views/EventListenerSectionGroup.js:
3316         (WI.EventListenerSectionGroup):
3317         (WI.EventListenerSectionGroup.prototype._eventText):
3318         (WI.EventListenerSectionGroup.prototype._nodeTextOrLink):
3319         (WI.EventListenerSectionGroup.prototype._createDisabledToggleElement):
3320         (WI.EventListenerSectionGroup.prototype._createDisabledToggleElement.updateTitle):
3321         * UserInterface/Views/EventListenerSectionGroup.css:
3322         (.event-listener-section > .content input[type="checkbox"]):
3323
3324         * UserInterface/Views/DetailsSectionSimpleRow.js:
3325         (WI.DetailsSectionSimpleRow.prototype.get label):
3326         (WI.DetailsSectionSimpleRow.prototype.set label):
3327
3328 2017-10-25  Devin Rousso  <webkit@devinrousso.com>
3329
3330         Web Inspector: replace TypeVerifier with subclasses of WI.Collection
3331         https://bugs.webkit.org/show_bug.cgi?id=178045
3332         <rdar://problem/35174307>
3333
3334         Reviewed by Brian Burg.
3335
3336         * UserInterface/Models/Collection.js:
3337         (WI.Collection):
3338         (WI.Collection.prototype.get displayName):
3339         (WI.Collection.prototype.objectIsRequiredType):
3340         (WI.Collection.prototype.add):
3341         (WI.Collection.prototype.get typeVerifier): Deleted.
3342         Instead of exposing the typeVerifier, we create a public predicate that returns whether the
3343         given object matches the expected type of the Collection. Subclasses can override it to
3344         limit the scope of the collection to a particular type.
3345
3346         * UserInterface/Models/CollectionTypes.js:
3347         (WI.FrameCollection.prototype.get displayName):
3348         (WI.FrameCollection.prototype.objectIsRequiredType):
3349         (WI.FrameCollection): Deleted.
3350         (WI.ScriptCollection.prototype.get displayName):
3351         (WI.ScriptCollection.prototype.objectIsRequiredType):
3352         (WI.ScriptCollection): Deleted.
3353         (WI.CSSStyleSheetCollection.prototype.get displayName):
3354         (WI.CSSStyleSheetCollection.prototype.objectIsRequiredType):
3355         (WI.CSSStyleSheetCollection): Deleted.
3356         (WI.CanvasCollection.prototype.get displayName):
3357         (WI.CanvasCollection.prototype.objectIsRequiredType):
3358         (WI.CanvasCollection): Deleted.
3359         (WI.ShaderProgramCollection.prototype.get displayName):
3360         (WI.ShaderProgramCollection.prototype.objectIsRequiredType):
3361         (WI.ShaderProgramCollection): Deleted.
3362         (WI.RecordingCollection.prototype.get displayName):
3363         (WI.RecordingCollection.prototype.objectIsRequiredType):
3364         (WI.RecordingCollection): Deleted.
3365         * UserInterface/Models/ResourceCollection.js:
3366         (WI.ResourceCollection):
3367         (WI.ResourceCollection.prototype.get displayName):
3368         (WI.ResourceCollection.prototype.objectIsRequiredType):
3369         (WI.ResourceCollection.verifierForType): Deleted.
3370         * UserInterface/Views/TreeOutlineGroup.js:
3371         (WI.TreeOutlineGroup.prototype.objectIsRequiredType):
3372         (WI.TreeOutlineGroup): Deleted.
3373         Introduce additional subclasses of Collection for other model types. Modify existing
3374         subclasses to remove `typeVerifier` and instead extend `objectIsRequiredType`.
3375
3376         * UserInterface/Models/Canvas.js:
3377         (WI.Canvas):
3378         * UserInterface/Models/Frame.js:
3379         (WI.Frame):
3380         * UserInterface/Protocol/Target.js:
3381         (WI.Target):
3382         * UserInterface/Views/ResourceSidebarPanel.js:
3383         (WI.ResourceSidebarPanel.prototype.treeElementForRepresentedObject):
3384         (WI.ResourceSidebarPanel.prototype._addScript):
3385
3386         * UserInterface/Views/CollectionContentView.js:
3387         (WI.CollectionContentView):
3388         (WI.CollectionContentView.titleForCollection): Delete.
3389         * UserInterface/Views/ResourceCollectionContentView.js:
3390         (WI.ResourceCollectionContentView):
3391         Require that subclasses of Collection override `get displayName` if the CollectionContentView
3392         is not provided with a `contentPlaceholderText`.
3393
3394         (WI.CollectionContentView.prototype.initialLayout):
3395         We don't need to create and add ContentView for each item of the Collection, as this is
3396         already done by attached().
3397
3398         (WI.CollectionContentView.prototype._showContentPlaceholder):
3399         Remove the 250ms delay before showing the placeholder TitleView.
3400
3401         * UserInterface/Views/FolderizedTreeElement.js:
3402         (WI.FolderizedTreeElement.prototype._settingsForRepresentedObject):
3403
3404 2017-10-25  Joseph Pecoraro  <pecoraro@apple.com>
3405
3406         Web Inspector: Display fetch() initiated loads as "fetch" instead of "xhr" in the Network Tab
3407         https://bugs.webkit.org/show_bug.cgi?id=178826
3408
3409         Reviewed by Youenn Fablet.
3410
3411         * UserInterface/Views/NetworkTableContentView.js:
3412         (WI.NetworkTableContentView.shortDisplayNameForResourceType):
3413         Fetch and XHR loads are still grouped under the succinct "XHR" filter, but
3414         at least display the better type name in the "Type" column of the table.
3415
3416 2017-10-25  Devin Rousso  <webkit@devinrousso.com>
3417
3418         Web Inspector: Canvas Tab: selected canvas card loses selection outline style while recording
3419         https://bugs.webkit.org/show_bug.cgi?id=178814
3420         <rdar://problem/35177317>
3421
3422         Reviewed by Brian Burg.
3423
3424         * UserInterface/Views/CanvasOverviewContentView.css:
3425         (.content-view.canvas-overview .content-view.canvas):
3426         (.content-view.canvas-overview .content-view.canvas > :matches(header, .preview, footer)):
3427         (.content-view.canvas-overview .content-view.canvas.selected > :matches(.preview, footer),):
3428         (.content-view.canvas-overview .content-view.canvas > header):
3429         (.content-view.canvas-overview .content-view.canvas.is-recording > header):
3430         (.content-view.canvas-overview .content-view.canvas > .preview):
3431         (.content-view.canvas-overview .content-view.canvas > footer):
3432         (.content-view.canvas-overview .content-view.canvas.selected:not(.is-recording)): Deleted.
3433         Instead of applying the border to the entire element, apply parts of the border to each of
3434         its children so that we can choose what colors to use for each part.
3435
3436 2017-10-25  Nikita Vasilyev  <nvasilyev@apple.com>
3437
3438         Web Inspector: [PARITY] Styles Redesign: Add color gradient, bezier curve, and spring inline widgets
3439         https://bugs.webkit.org/show_bug.cgi?id=178404
3440         <rdar://problem/35035992>
3441
3442         Reviewed by Devin Rousso.
3443
3444         Add inline widgets for the following CSS values:
3445         - Gradients, e.g. `background-image: linear-gradient(yellow, orange)`
3446         - Bezier curves, e.g. `transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55)`
3447         - Spring functions, e.g. `transition-timing-function: spring(1, 2, 2, 4)`
3448
3449         * UserInterface/Models/Color.js:
3450         (WI.Color.prototype.toString):
3451         Don't throw. The are never try/catch blocks on the callsites.
3452
3453         * UserInterface/Views/SpreadsheetStyleProperty.js:
3454         (WI.SpreadsheetStyleProperty.prototype._renderValue):
3455         (WI.SpreadsheetStyleProperty.prototype._createInlineSwatch):
3456         (WI.SpreadsheetStyleProperty.prototype._addGradientTokens):
3457         (WI.SpreadsheetStyleProperty.prototype._addColorTokens):
3458         (WI.SpreadsheetStyleProperty.prototype._addTimingFunctionTokens):
3459
3460 2017-10-25  Nikita Vasilyev  <nvasilyev@apple.com>
3461
3462         Web Inspector: Styles Redesign: Newly added invalid property isn't immediately shown as invalid
3463         https://bugs.webkit.org/show_bug.cgi?id=178488
3464
3465         Reviewed by Brian Burg.
3466
3467         * UserInterface/Models/CSSStyleDeclaration.js:
3468         (WI.CSSStyleDeclaration.prototype.newBlankProperty):
3469         Call this.update to update _properties, _allProperties, _visibleProperties, and _allVisibleProperties.
3470
3471         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
3472         (.spreadsheet-style-declaration-editor .property:matches(.invalid-name, .other-vendor, .overridden):not(.disabled)):
3473         (.spreadsheet-style-declaration-editor .property.invalid-name:not(.disabled)):
3474         (.spreadsheet-style-declaration-editor .property.invalid-value:not(.disabled) .value):
3475         When the property name is valid, but the value isn't, display red line-through only for the value.
3476         This is how it works in the old styles sidebar as well.
3477
3478         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
3479         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._propertiesChanged):
3480         (WI.SpreadsheetCSSStyleDeclarationEditor):
3481         * UserInterface/Views/SpreadsheetStyleProperty.js:
3482         (WI.SpreadsheetStyleProperty):
3483         (WI.SpreadsheetStyleProperty.prototype.updateClassNames):
3484         (WI.SpreadsheetStyleProperty.prototype._update):
3485         Introduce updateClassNames method. Unlike _update, it doesn't change text selection or focus and
3486         can be safely called on a property while it's being edited.
3487
3488 2017-10-25  Devin Rousso  <webkit@devinrousso.com>
3489
3490         Web Inspector: Canvas Tab: clicking on a canvas card causes details sidebar to show and mess up card arrangement
3491         https://bugs.webkit.org/show_bug.cgi?id=178803
3492         <rdar://problem/35176082>
3493
3494         Reviewed by Brian Burg.
3495
3496         * Localizations/en.lproj/localizedStrings.js:
3497         * UserInterface/Views/CanvasDetailsSidebarPanel.css:
3498         (.sidebar > .panel.details.canvas > .content > .empty-content-placeholder):
3499         (.sidebar > .panel.details.canvas > .content > .empty-content-placeholder > .message):
3500         * UserInterface/Views/CanvasDetailsSidebarPanel.js:
3501         (WI.CanvasDetailsSidebarPanel):
3502         (WI.CanvasDetailsSidebarPanel.prototype.inspect):
3503         (WI.CanvasDetailsSidebarPanel.prototype.initialLayout):
3504         (WI.CanvasDetailsSidebarPanel.prototype.layout):
3505
3506         * UserInterface/Views/RecordingNavigationSidebarPanel.js:
3507         (WI.RecordingNavigationSidebarPanel.disallowInstanceForClass): Deleted.
3508         * UserInterface/Views/RecordingStateDetailsSidebarPanel.js:
3509         (WI.RecordingStateDetailsSidebarPanel.disallowInstanceForClass): Deleted.
3510         * UserInterface/Views/RecordingTraceDetailsSidebarPanel.js:
3511         (WI.RecordingTraceDetailsSidebarPanel.disallowInstanceForClass): Deleted.
3512         Drive-by: these sidebar panels are now only used by the Canvas tab, so we no longer need to
3513         provide support for multiple instances of them.
3514
3515 2017-10-25  Devin Rousso  <webkit@devinrousso.com>
3516
3517         Web Inspector: preserve Recordings for each Canvas after closing the Canvas tab
3518         https://bugs.webkit.org/show_bug.cgi?id=178767
3519         <rdar://problem/35167239>
3520
3521         Reviewed by Brian Burg.
3522
3523         * UserInterface/Test.html:
3524         Include CollectionTypes for tests.
3525
3526         * UserInterface/Controllers/CanvasManager.js:
3527         (WI.CanvasManager.prototype.recordingFinished):
3528
3529         * UserInterface/Models/Canvas.js:
3530         (WI.Canvas):
3531         (WI.Canvas.prototype.get recordingCollection):
3532
3533         * UserInterface/Models/CollectionTypes.js:
3534         (WI.CanvasCollection):
3535         (WI.RecordingCollection):
3536
3537         * UserInterface/Views/CanvasContentView.js:
3538         (WI.CanvasContentView.prototype.initialLayout):
3539         (WI.CanvasContentView.prototype._addRecording):
3540         (WI.CanvasContentView.prototype._recordingStopped):
3541
3542         * UserInterface/Views/CanvasTabContentView.js:
3543         (WI.CanvasTabContentView.prototype.attached):
3544         (WI.CanvasTabContentView.prototype._recordingAdded):
3545
3546 2017-10-24  Joseph Pecoraro  <pecoraro@apple.com>
3547
3548         REGRESSION(r222181): Web Inspector: Augmenting Agents Domains are not getting activated
3549         https://bugs.webkit.org/show_bug.cgi?id=178768
3550         <rdar://problem/35081334>
3551
3552         Reviewed by Brian Burg.
3553
3554         * UserInterface/Base/Main.js:
3555         Simplify event dispatch.
3556
3557         * UserInterface/Controllers/AppController.js:
3558         (WI.AppController.prototype.activateExtraDomains):
3559         Pass the domains on.
3560
3561 2017-10-24  Joseph Pecoraro  <pecoraro@apple.com>
3562
3563         Web Inspector: Console Drawer resizing doesn't match cursor position
3564         https://bugs.webkit.org/show_bug.cgi?id=178753
3565         <rdar://problem/35160484>
3566
3567         Reviewed by Brian Burg.
3568
3569         * UserInterface/Views/ConsoleDrawer.js:
3570         (WI.ConsoleDrawer.prototype._updateDrawerHeight):
3571         Drive-by fix an early return that would never have worked.
3572
3573         * UserInterface/Views/Main.css:
3574         (#content):
3575         Give the #content a flex grow of 1. This causes the space to grow as it
3576         already was but now it does not affect the size of the fixed height sibling.
3577
3578 2017-10-24  Eric Carlson  <eric.carlson@apple.com>
3579
3580         Web Inspector: Enable WebKit logging configuration and display
3581         https://bugs.webkit.org/show_bug.cgi?id=177027
3582         <rdar://problem/33964767>
3583
3584         Reviewed by Joseph Pecoraro.
3585
3586         * Localizations/en.lproj/localizedStrings.js: Add new localized strings.
3587
3588         * UserInterface/Controllers/LogManager.js:
3589         (WI.LogManager): Initialize _loggingChannelSources, fetch _customLoggingChannels.
3590         (WI.LogManager.supportsLogChannels): New.
3591         (WI.LogManager.prototype.get customLoggingChannels): New.
3592         (WI.LogManager.prototype.get logChannelSources): New.
3593
3594         * UserInterface/Main.html:
3595         * UserInterface/Models/ConsoleMessage.js: Add Media and WebRTC.
3596
3597         * UserInterface/Models/IssueMessage.js:
3598         (WI.IssueMessage): Add media and webrtc.
3599
3600         * UserInterface/Models/LoggingChannel.js: Added.
3601         (WI.LoggingChannel):
3602         (WI.LoggingChannel.fromPayload):
3603         (WI.LoggingChannel.prototype.get source):
3604         (WI.LoggingChannel.prototype.get level):
3605
3606         * UserInterface/Views/LogContentView.js:
3607         (WI.LogContentView): Add new scope buttons for "Log", "Info", and "Debug". Create log channel
3608             scope buttons once logging has started.
3609         (WI.LogContentView.prototype.get navigationItems): Add the log message scope bar when necessary.
3610         (WI.LogContentView.prototype._scopeFromMessageSource): New.
3611         (WI.LogContentView.prototype._scopeFromMessageLevel): Don't group Info, Log, and Debug.
3612         (WI.LogContentView.prototype._messageAdded): Force a UI update the first time a WebKit log
3613             message is added.
3614
3615         (WI.LogContentView.prototype._messageShouldBeVisible): New, deal with message source bar buttons.
3616         (WI.LogContentView.prototype._messageSourceBarSelectionDidChange): New.
3617         (WI.LogContentView.prototype._filterMessageElements): Deal with message source bar buttons.
3618
3619         * UserInterface/Views/SettingsTabContentView.js:
3620         (WI.SettingsTabContentView.prototype._createGeneralSettingsView): Create and initialize menus
3621             for each log channel.
3622
3623 2017-10-24  Joseph Pecoraro  <pecoraro@apple.com>
3624