Web Inspector: Dark Mode: Media query names are unreadable
[WebKit-https.git] / Source / WebInspectorUI / ChangeLog
1 2018-06-25  Nikita Vasilyev  <nvasilyev@apple.com>
2
3         Web Inspector: Dark Mode: Media query names are unreadable
4         https://bugs.webkit.org/show_bug.cgi?id=186974
5
6         Reviewed by Brian Burg.
7
8         Change media query names from dark blue to light blue.
9
10         * UserInterface/Views/DarkMode.css:
11         (@media (prefers-dark-interface)):
12         (.CodeMirror .CodeMirror-lines .CodeMirror-matchingbracket):
13         (.cm-s-default .cm-attribute):
14
15 2018-06-25  Nikita Vasilyev  <nvasilyev@apple.com>
16
17         Web Inspector: Dark Mode: Network headers colors are too dim
18         https://bugs.webkit.org/show_bug.cgi?id=186985
19
20         Reviewed by Brian Burg.
21
22         Increasing the luminance of network header colors by increasing lightness and brightness.
23
24         * UserInterface/Views/DarkMode.css:
25         (@media (prefers-dark-interface)):
26         (:root):
27
28 2018-06-25  Nikita Vasilyev  <nvasilyev@apple.com>
29
30         Web Inspector: Dark Mode: Font guideline colors are too bright
31         https://bugs.webkit.org/show_bug.cgi?id=186986
32
33         Reviewed by Brian Burg.
34
35         Make the guidelines less distractive from the font glyphs.
36
37         * UserInterface/Views/DarkMode.css:
38         (@media (prefers-dark-interface)):
39         (.content-view.resource.font .preview > .line):
40         (.content-view.resource.font .metric.top):
41         (.content-view.resource.font .metric.baseline):
42         (.content-view.resource.font .metric.middle):
43         (.content-view.resource.font .metric.xheight):
44         (.content-view.resource.font .metric.bottom):
45
46 2018-06-20  Daniel Bates  <dabates@apple.com>
47
48         Web Inspector: All non-Same-Site cookies are marked as Same-Site Strict in Storage tab
49         https://bugs.webkit.org/show_bug.cgi?id=186867
50         <rdar://problem/41175424>
51
52         Reviewed by Matt Baker.
53
54         Fixes an issue where cookies that do not have a Same-Site policy would be marked up as Same-
55         Site Strict in Web Inspector's cookie storage content view (under the storage tab).
56
57         * UserInterface/Views/CookieStorageContentView.js:
58         (WI.CookieStorageContentView.prototype._rebuildTable): Only compute the display name if
59         we cookie.sameSite is non-null and is not WI.Cookie.SameSiteType.None. Moreover, remove
60         an extraneous call to WI.Cookie.parseSameSiteAttributeValue() as cookie.SameSite represents
61         the already parsed value (one of the WI.Cookie.SameSiteType-scoped values).
62
63 2018-06-18  Brian Burg  <bburg@apple.com>
64
65         Web Inspector: TypeError: Array.prototype.sort passed bad value in NetworkTableContentView _updateSortAndFilteredEntries
66         https://bugs.webkit.org/show_bug.cgi?id=186787
67         <rdar://problem/41175680>
68
69         Reviewed by Timothy Hatcher.
70
71         * UserInterface/Views/NetworkTableContentView.js:
72         (WI.NetworkTableContentView.prototype._updateSortAndFilteredEntries):
73
74 2018-06-13  Nikita Vasilyev  <nvasilyev@apple.com>
75
76         Web Inspector: open source Dark Mode
77         https://bugs.webkit.org/show_bug.cgi?id=186606
78
79         Reviewed by Timothy Hatcher.
80
81         The dark mode is currently only available on macOS Mojave via prefers-dark-interface CSS media query.
82
83         * UserInterface/Main.html:
84         * UserInterface/Views/DarkMode.css: Added.
85         (@media (prefers-dark-interface)):
86         (:root):
87         (body.window-inactive):
88         (body.window-inactive *):
89         (#main):
90         (.tree-outline.dom li.selected .selection-area):
91         (.tab-bar > .item > .icon):
92         (.go-to-arrow):
93         (.resource-link,):
94         (.expand-list-button):
95         (:matches(img, canvas).show-grid):
96         (.formatted-object,):
97         (.formatted-null,):
98         (.editing):
99         (.editing, .editing *):
100         (.text-editor > .CodeMirror .execution-line):
101         (.text-editor > .CodeMirror .execution-range-highlight:not(.CodeMirror-selectedtext),):
102         (.details-section > .header):
103         (.details-section > .header > label):
104         (.details-section .details-section,):
105         (.details-section .details-section:not(.collapsed) > .header):
106         (.details-section > .content > .group > .row.simple > .label):
107         (.details-section > .content > .group:nth-child(even)):
108         (.details-section > .content > .group > .row:matches(.empty, .text)):
109         (.data-grid th):
110         (.data-grid td .subtitle):
111         (.data-grid:matches(:focus, .force-focus) tr.selected td .subtitle):
112         (body:not(.window-inactive, .window-docked-inactive) .data-grid:matches(:focus, .force-focus) tr.editable.selected .cell-content > input):
113         (.data-grid tr.editable .cell-content > input):
114         (.data-grid td.spanning):
115         (.object-tree,):
116         (.object-preview .name):
117         (.object-preview > .size):
118         (.tab-bar):
119         (.tab-bar > .item):
120         (.tab-bar > .item > .title):
121         (.tab-bar > .item:not(.disabled).selected):
122         (.tab-bar:not(.animating) > .item:not(.selected):hover):
123         (.tab-bar > .item > .close):
124         (body.window-inactive .tab-bar):
125         (body.window-inactive .tab-bar > .item):
126         (body.window-inactive .tab-bar > .item.selected):
127         (body.window-inactive .tab-bar > .item > .title):
128         (body .toolbar):
129         (body.window-inactive .toolbar):
130         (body.latest-mac .toolbar .item.button,):
131         (body.latest-mac .toolbar .search-bar > input[type="search"]):
132         (body.latest-mac .toolbar .search-bar > input[type="search"]:focus):
133         (body.latest-mac .toolbar .search-bar > input[type="search"]::placeholder):
134         (body.latest-mac.window-inactive .toolbar .search-bar > input[type="search"]::placeholder):
135         (body.latest-mac.window-inactive .toolbar .search-bar > input[type="search"]::-webkit-search-results-button):
136         (body.latest-mac .toolbar .dashboard-container):
137         (body.latest-mac .toolbar .item.button:active):
138         (body.latest-mac.window-inactive .toolbar .item.button,):
139         (.navigation-bar .item.divider):
140         (.toolbar .item.button):
141         (.toolbar .item.button:not(.disabled):active):
142         (.toolbar .item.button:not(.disabled):matches(:focus, .activate.activated)):
143         (.toolbar .item.button:not(.disabled):active:matches(:focus, .activate.activated)):
144         (.toolbar .dashboard.default > .item > div):
145         (.toolbar .dashboard.default > .item.enabled > div):
146         (.toolbar .dashboard.default > .item.enabled:hover):
147         (.toolbar .dashboard.default > .item.enabled:hover > div):
148         (.toolbar .dashboard.default > .resourcesCount > img,):
149         (body.latest-mac .toolbar .dashboard .item.button):
150         (.dashboard-container .advance-arrow):
151         (.toolbar .dashboard.debugger):
152         (.dashboard.debugger .navigation-bar .item.button > .glyph):
153         (.dashboard.debugger > .location .function-name):
154         (.dashboard.debugger > .location .go-to-link):
155         (.dashboard.debugger > .divider):
156         (.popover .edit-breakpoint-popover-content > label.toggle):
157         (.popover .edit-breakpoint-popover-content > table > tr > th):
158         (.breakpoint-action-block-body):
159         (.breakpoint-action-block-body > .description):
160         (.breakpoint-action-append-button,):
161         (.popover .xhr-breakpoint-content > .editor-wrapper > .editor):
162         (.navigation-bar .item.button):
163         (.spreadsheet-style-declaration-editor .property:not(.disabled) .value):
164         (.spreadsheet-css-declaration):
165         (.spreadsheet-css-declaration .selector:focus,):
166         (.spreadsheet-css-declaration.locked .origin::after):
167         (.spreadsheet-css-declaration .origin .go-to-link,):
168         (.spreadsheet-style-declaration-editor :matches(.name, .value).editing):
169         (.spreadsheet-style-declaration-editor .property.has-warning):
170         (.spreadsheet-style-declaration-editor .property.has-warning .warning):
171         (.spreadsheet-css-declaration .media-label):
172         (.quick-console):
173         (.syntax-highlighted,):
174         (.cm-s-default,):
175         (.CodeMirror .jump-to-symbol-highlight,):
176         (.console-prompt):
177         (.completion-suggestions):
178         (.completion-suggestions-container > .item):
179         (.CodeMirror-cursor):
180         (.CodeMirror .CodeMirror-gutters):
181         (.cm-s-default .cm-link):
182         (.cm-s-default .cm-m-xml.cm-attribute,):
183         (.cm-s-default .cm-meta):
184         (.cm-s-default .cm-variable-3):
185         (.cm-s-default .cm-builtin):
186         (.tree-outline .item .subtitle):
187         (.object-tree-property .getter,):
188         (.item.object-tree-property.prototype-property):
189         (.object-tree-property.prototype-property:hover,):
190         (.object-tree-property .value.error):
191         (.tree-outline.dom):
192         (.tree-outline.dom li.selected + ol.children.expanded):
193         (.tree-outline.dom .shadow):
194         (.tree-outline.dom li.parent.shadow + ol.children.expanded,):
195         (.showing-find-banner .tree-outline.dom .search-highlight):
196         (.sidebar > .panel.dom-node-details .details-section.dom-node-event-listeners > .header > .filter:hover):
197         (.sidebar > .panel.details.css-style > .content > .pseudo-classes > .group > label):
198         (.spreadsheet-css-declaration.locked):
199         (.spreadsheet-css-declaration .selector.style-attribute):
200         (.spreadsheet-style-declaration-editor .property:matches(.invalid-name, .other-vendor, .overridden):not(.disabled) .content > *):
201         (.inline-swatch):
202         (.spreadsheet-style-panel .section-header):
203         (.spreadsheet-style-panel .section-header .node-link:hover):
204         (.computed-style-properties.details-section):
205         (.details-section.style-box-model:not(.collapsed) > :matches(.header, .content)):
206         (.table,):
207         (.table > .header > .sortable:active):
208         (.table > .header > :matches(.sort-ascending, .sort-descending)):
209         (.table > .header > :matches(.sort-ascending, .sort-descending)::after):
210         (.scope-bar > li):
211         (.timeline-overview > .navigation-bar.timelines):
212         (.timeline-overview:not(.frames) > .graphs-container > .timeline-overview-graph:nth-child(even)):
213         (.timeline-overview.edit-instruments > .tree-outline.timelines .item:not(:first-child),):
214         (.time-icon .icon):
215         (.data-grid th:matches(.sort-ascending, .sort-descending)):
216         (.content-view.timeline-recording > .content-browser > .navigation-bar > .item.scope-bar.default-item-selected > .multiple):
217         (.content-view.timeline-recording > .content-browser > .navigation-bar > .item.scope-bar.default-item-selected > .multiple .arrows):
218         (.content-view.settings .navigation-bar):
219         (.content-view.settings .navigation-bar .item.radio.button.text-only.selected):
220         (.new-tab.tab.content-view):
221         (.filter-bar > input[type="search"]):
222         (.filter-bar > input[type="search"]::placeholder):
223         (.filter-bar > input[type="search"]:focus):
224         (.content-view.resource.image):
225         (.console-messages):
226         (.console-item):
227         (.console-messages:focus .console-item.selected):
228         (.console-messages:focus .console-item.selected + .console-item):
229         (.console-session:first-of-type .console-session-header):
230         (.console-session:not(:first-of-type) .console-session-header):
231         (.console-messages a):
232         (.console-messages a:hover):
233         (.console-messages:focus .console-item.selected::after):
234         (.console-error-level):
235         (.console-error-level:not(.filtered-out, .filtered-out-by-search), .console-error-level:not(.filtered-out, .filtered-out-by-search) + .console-item):
236         (.console-warning-level):
237         (.console-warning-level:not(.filtered-out, .filtered-out-by-search), .console-warning-level:not(.filtered-out, .filtered-out-by-search) + .console-item):
238         (.search-in-progress .console-item:not(.filtered-out-by-search) .highlighted):
239         (.search-in-progress .console-item:not(.filtered-out-by-search) .highlighted.selected):
240         (.source-code.text-editor > .CodeMirror .error):
241         (.source-code.text-editor > .CodeMirror .warning):
242         (.source-code.text-editor > .CodeMirror .issue-widget):
243         (.source-code.text-editor > .CodeMirror .issue-widget.inline.warning):
244         (.source-code.text-editor > .CodeMirror .issue-widget.inline.warning > .arrow):
245         (.source-code.text-editor > .CodeMirror .issue-widget.inline.error):
246         (.source-code.text-editor > .CodeMirror .issue-widget.inline.error > .arrow):
247         (.console-message .syntax-highlighted):
248         (.console-warning-level .console-message-text):
249         (.console-error-level .console-message-text):
250         (.console-user-command > .console-message-text):
251         (.console-message .repeat-count):
252         (.call-frame .subtitle,):
253         (.call-frame:hover .subtitle .source-link,):
254         (.call-frame .separator):
255         (.quick-console.showing-log):
256         (.find-banner.console-find-banner > input[type=search]:not(:placeholder-shown)):
257         (.network-resource-detail):
258         (.network-resource-detail .item.close > .glyph):
259         (.network .network-resource-detail .navigation-bar .item.radio.button.text-only.selected):
260         (.resource-headers .value):
261         (.network-table .cell.domain > .lock):
262         (.resource-sizes > .content .label):
263         (.popover.waterfall-popover):
264         (.resource-timing-breakdown > table > tr.header:not(.total-row) > td):
265         (.resource-timing-breakdown > table > tr > td.label,):
266         (.resource-timing-breakdown > table hr):
267         (.sidebar > .panel.details.css-style > .content ~ .options-container > .new-rule):
268         (.content-view.tab.canvas .navigation-bar > .item .canvas-overview .icon):
269         (.web-socket.content-view .data-grid table.data tr.revealed):
270         (.web-socket.content-view .data-grid.variable-height-rows table.data tr.outgoing):
271         (.web-socket.content-view .data-grid.variable-height-rows table.data tr.non-text-frame):
272         (.item.action:not(.initial-state)::before):
273         (.tree-outline .item.action.visual:not(.selected, .invalid)):
274         (.item.action:not(.initial-state) > .icon):
275         (.tree-outline:not(.hide-disclosure-buttons) .item.action:not(.initial-state, .parent) > .icon):
276         (.content-view.tab.canvas .navigation-bar > .item .canvas-overview .icon,):
277         (.content-view.canvas > .preview > img,):
278         (.content-view.canvas-overview):
279         (.content-view.canvas-overview .content-view.canvas):
280         (.content-view.canvas-overview .content-view.canvas.is-recording):
281         (.content-view.canvas-overview .content-view.canvas.is-recording > header):
282         (.content-view.canvas-overview .content-view.canvas > header > .titles > .title):
283         (.content-view.canvas-overview .content-view.canvas > header > .titles > .subtitle,):
284         (.content-view.canvas-overview .content-view.canvas > footer > .recordings::before):
285         (.content-view.canvas-overview .content-view.canvas.is-recording > header > .titles > .subtitle):
286         (.content-view.canvas:not(.tab)):
287         (.content-view:not(.tab).recording):
288         (.content-view:not(.tab).recording > header > .slider-container):
289         (.content-view:not(.tab).recording > header > .slider-container > input[type=range]):
290         (.sidebar > .panel.details.recording-state > .content > .data-grid tr.modified):
291         (.progress-view > .titles > .title):
292         (.progress-view > .titles > .subtitle):
293         (.indeterminate-progress-spinner):
294         (.content-view.shader-program > .text-editor.shader):
295         (.content-view.shader-program > .text-editor.shader > .type-title):
296         (.item.shader-program .status > img):
297         (.open-resource-dialog):
298         (.open-resource-dialog > .field > input):
299         (.open-resource-dialog > .field > input::placeholder):
300         (.open-resource-dialog > .tree-outline .item.selected):
301         (.open-resource-dialog > .field::before):
302
303 2018-06-09  Dan Bernstein  <mitz@apple.com>
304
305         [Xcode] Clean up and modernize some build setting definitions
306         https://bugs.webkit.org/show_bug.cgi?id=186463
307
308         Reviewed by Sam Weinig.
309
310         * Configurations/Base.xcconfig: Removed definition for macOS 10.11.
311         * Configurations/DebugRelease.xcconfig: Ditto.
312         * Configurations/Version.xcconfig: Ditto.
313
314 2018-06-05  Matt Baker  <mattbaker@apple.com>
315
316         Web Inspector: Tab picker is briefly visible when TabBar initially shown
317         https://bugs.webkit.org/show_bug.cgi?id=186317
318
319         Reviewed by Joseph Pecoraro.
320
321         * UserInterface/Views/TabBar.js:
322         (WI.TabBar): Picker should be initially hidden.
323
324 2018-06-05  Nikita Vasilyev  <nvasilyev@apple.com>
325
326         Web Inspector: Text in "Add New Class" in auto-capitalizes
327         https://bugs.webkit.org/show_bug.cgi?id=186311
328
329         Reviewed by Matt Baker.
330
331         Disable spellcheck to prevent auto-capitalization.
332
333         * UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
334         (WI.GeneralStyleDetailsSidebarPanel.prototype.initialLayout):
335
336 2018-06-04  Matt Baker  <mattbaker@apple.com>
337
338         Web Inspector: Cannot copy a link address in Elements tab
339         https://bugs.webkit.org/show_bug.cgi?id=186281
340         <rdar://problem/39193355>
341
342         Reviewed by Brian Burg.
343
344         * UserInterface/Views/ContextMenuUtilities.js:
345         (WI.appendContextMenuItemsForURL):
346
347 2018-05-30  Daniel Bates  <dabates@apple.com>
348
349         Web Inspector: Annotate Same-Site cookies
350         https://bugs.webkit.org/show_bug.cgi?id=184897
351         <rdar://problem/35178209>
352
353         Reviewed by Brian Burg.
354
355         Add a new column for the value of the Same-Site cookie attribute to the resource cookie content
356         view (shown for a resource under the Network tab) and cookie storage content view (shown under
357         the Storage tab).
358
359         The SameSite column in the resource cookie content view reflects the parsing of the Same-Site
360         attribute from the HTTP response by Web Inspector. This parsing is materially consistent with
361         the parsing of the SameSite atttribute in CFNetwork. The Same-Site column in the cookie storage
362         content view reflects the Same-Site cookie policy associated with the cookies provided by the
363         network stack, if supported. This column will be blank on systems whose network stack does not
364         support Same-Site cookies (e.g libsoup).
365
366         * Localizations/en.lproj/localizedStrings.js:
367         * UserInterface/Controllers/HARBuilder.js:
368         (WI.HARBuilder.cookies):
369         * UserInterface/Models/Cookie.js:
370         (WI.Cookie):
371         (WI.Cookie.displayNameForSameSiteType):
372         (WI.Cookie.parseSameSiteAttributeValue):
373         (WI.Cookie.parseSetCookieResponseHeader):
374         * UserInterface/Views/CookieStorageContentView.js:
375         (WI.CookieStorageContentView.prototype._rebuildTable):
376         (WI.CookieStorageContentView.prototype._sortDataGrid):
377         * UserInterface/Views/ResourceCookiesContentView.js:
378         (WI.ResourceCookiesContentView.prototype.tablePopulateCell):
379         (WI.ResourceCookiesContentView.prototype._generateSortComparator):
380         (WI.ResourceCookiesContentView.prototype._refreshResponseCookiesSection):
381
382 2018-05-25  Matt Baker  <mattbaker@apple.com>
383
384         Web Inspector: Popover dismissed while attempting to move cursor inside
385         https://bugs.webkit.org/show_bug.cgi?id=185741
386         <rdar://problem/40340938>
387
388         Reviewed by Joseph Pecoraro.
389
390         Hovering a token within the bounds of the current popover should not
391         show a new popover. This prevents the popover from being dismissed when
392         the cursor passes over a token under the transparent portion of the
393         popover frame.
394
395         * UserInterface/Views/SourceCodeTextEditor.js:
396         (WI.SourceCodeTextEditor.prototype._showPopover):
397
398 2018-05-22  Ryan Haddad  <ryanhaddad@apple.com>
399
400         Unreviewed, rolling out r232052.
401
402         Breaks internal builds.
403
404         Reverted changeset:
405
406         "Use more C++17"
407         https://bugs.webkit.org/show_bug.cgi?id=185176
408         https://trac.webkit.org/changeset/232052
409
410 2018-05-21  Yusuke Suzuki  <utatane.tea@gmail.com>
411
412         Use more C++17
413         https://bugs.webkit.org/show_bug.cgi?id=185176
414
415         Reviewed by JF Bastien.
416
417         * Configurations/Base.xcconfig:
418
419 2018-05-18  Devin Rousso  <webkit@devinrousso.com>
420
421         Web Inspector: Canvas: put `hasVisualEffect` behind an experimental setting
422         https://bugs.webkit.org/show_bug.cgi?id=185758
423
424         Reviewed by Matt Baker.
425
426         * Localizations/en.lproj/localizedStrings.js:
427
428         * UserInterface/Base/Setting.js:
429
430         * UserInterface/Models/RecordingAction.js:
431         (WI.RecordingAction.prototype.process):
432
433         * UserInterface/Views/RecordingActionTreeElement.js:
434         (WI.RecordingActionTreeElement.prototype.onattach):
435
436         * UserInterface/Views/SettingsTabContentView.js:
437         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
438
439 2018-05-16  Devin Rousso  <webkit@devinrousso.com>
440
441         Web Inspector: create a navigation item for toggling the overlay rulers/guides
442         https://bugs.webkit.org/show_bug.cgi?id=185644
443
444         Reviewed by Matt Baker.
445
446         * Localizations/en.lproj/localizedStrings.js:
447         * UserInterface/Base/Setting.js:
448         * UserInterface/Views/DOMTreeContentView.js:
449         (WI.DOMTreeContentView):
450         (WI.DOMTreeContentView.prototype.get navigationItems):
451         (WI.DOMTreeContentView.prototype.closed):
452         (WI.DOMTreeContentView.prototype._showRulersChanged): Added.
453         (WI.DOMTreeContentView.prototype._toggleShowRulers): Added.
454
455 2018-05-14  Nikita Vasilyev  <nvasilyev@apple.com>
456
457         Web Inspector: Canvas: Remove unused --value-visual-highlight CSS variable
458         https://bugs.webkit.org/show_bug.cgi?id=185636
459
460         Reviewed by Matt Baker.
461
462         * UserInterface/Views/Variables.css:
463         (:root):
464
465 2018-05-14  Devin Rousso  <webkit@devinrousso.com>
466
467         Web Inspector: Canvas tab: don't automatically select a recording when viewing a canvas
468         https://bugs.webkit.org/show_bug.cgi?id=182950
469
470         Reviewed by Matt Baker.
471
472         * UserInterface/Views/CanvasSidebarPanel.js:
473         (WI.CanvasSidebarPanel):
474         (WI.CanvasSidebarPanel.prototype._currentRepresentedObjectsDidChange):
475         (WI.CanvasSidebarPanel.prototype._treeOutlineSelectionDidChange):
476         (WI.CanvasSidebarPanel.prototype._canvasChanged):
477         (WI.CanvasSidebarPanel.prototype._recordingChanged):
478         (WI.CanvasSidebarPanel.prototype._updateRecordingScopeBar):
479         Add a "dummy" ScopeBarItem to the recording ScopeBar that is selected whenever a TreeElement
480         that doesn't correspond to a Recording is selected. This way, the Recording ScopeBar will
481         become deselected, and the list of actions will disappear. Clicking on the Recording ScopeBar
482         will show the previously selected Recording.
483
484 2018-05-08  Matt Baker  <mattbaker@apple.com>
485
486         Web Inspector: Console drawer resizing is broken when console prompt has >1 line of code
487         https://bugs.webkit.org/show_bug.cgi?id=185369
488         <rdar://problem/40013202>
489
490         Reviewed by Devin Rousso.
491
492         Mouse offset calculation should account for the height of the quick console.
493         The only reason resizing worked with the single-line quick console is that
494         the offset calculation included the resizer height, which is very close
495         to that of the single-line quick console (27px and 30px respectively).
496
497         * UserInterface/Views/ConsoleDrawer.js:
498
499 2018-05-04  Devin Rousso  <webkit@devinrousso.com>
500
501         Web Inspector: simplify the WI.Collection interface
502         https://bugs.webkit.org/show_bug.cgi?id=185187
503
504         Reviewed by Brian Burg.
505
506         * UserInterface/Models/Collection.js:
507         (WI.Collection.prototype.get size): Added.
508         (WI.Collection.prototype.has): Added.
509         (WI.Collection.prototype.toJSON):
510         (WI.Collection.prototype.[Symbol.iterator]): Added.
511         (WI.Collection.prototype.get items): Deleted.
512         (WI.Collection.prototype.toArray): Deleted.
513
514         * UserInterface/Controllers/CanvasManager.js:
515         (WI.CanvasManager.prototype._removeCanvas):
516         * UserInterface/Controllers/DOMDebuggerManager.js:
517         (WebInspector.DOMDebuggerManager.prototype.get domBreakpoints):
518         * UserInterface/Models/Frame.js:
519         (WI.Frame.prototype.removeAllChildFrames):
520         (WI.Frame.prototype.resourceForURL):
521         (WI.Frame.prototype.removeAllResources):
522         * UserInterface/Models/Script.js:
523         (WI.Script):
524         * UserInterface/Views/CanvasContentView.js:
525         (WI.CanvasContentView.prototype.initialLayout):
526         * UserInterface/Views/CanvasOverviewContentView.js:
527         (WI.CanvasOverviewContentView.prototype._updateNavigationItems):
528         * UserInterface/Views/CanvasSidebarPanel.js:
529         (WI.CanvasSidebarPanel.prototype._recordingRemoved):
530         (WI.CanvasSidebarPanel.prototype._canvasChanged):
531         (WI.CanvasSidebarPanel.prototype._updateRecordingScopeBar):
532         * UserInterface/Views/CanvasTabContentView.js:
533         (WI.CanvasTabContentView.prototype.attached):
534         (WI.CanvasTabContentView.prototype._addCanvas):
535         (WI.CanvasTabContentView.prototype._removeCanvas):
536         * UserInterface/Views/CanvasTreeElement.js:
537         (WI.CanvasTreeElement.prototype.onpopulate):
538         * UserInterface/Views/CollectionContentView.js:
539         (WI.CollectionContentView.prototype.initialLayout):
540         (WI.CollectionContentView.prototype.attached):
541         * UserInterface/Views/CookieStorageContentView.js:
542         (WI.CookieStorageContentView.prototype._filterCookies):
543         * UserInterface/Views/DebuggerSidebarPanel.js:
544         (WI.DebuggerSidebarPanel.prototype._addResourcesRecursivelyForFrame):
545         * UserInterface/Views/FolderizedTreeElement.js:
546         (WI.FolderizedTreeElement.prototype.updateParentStatus):
547         (WI.FolderizedTreeElement.prototype._shouldGroupIntoFolders):
548         * UserInterface/Views/FrameTreeElement.js:
549         (WI.FrameTreeElement.prototype.onpopulate):
550         * UserInterface/Views/NavigationSidebarPanel.js:
551         (WI.NavigationSidebarPanel.prototype.get contentTreeOutlines):
552         * UserInterface/Views/NetworkTableContentView.js:
553         (WI.NetworkTableContentView.prototype._populateWithInitialResourcesIfNeeded):
554         * UserInterface/Views/OpenResourceDialog.js:
555         (WI.OpenResourceDialog.prototype._addResourcesForFrame):
556         (WI.OpenResourceDialog.prototype._addResourcesForTarget):
557         * UserInterface/Views/TreeOutlineGroup.js:
558         (WI.TreeOutlineGroup.prototype.get selectedTreeElement):
559         (WI.TreeOutlineGroup.prototype._removeConflictingTreeSelections):
560         * UserInterface/Views/WorkerTreeElement.js:
561         (WI.WorkerTreeElement.prototype.onpopulate):
562
563 2018-05-04  Nikita Vasilyev  <nvasilyev@apple.com>
564
565         Web Inspector: Styles: Newly added unsupported properties sometimes don't have warnings
566         https://bugs.webkit.org/show_bug.cgi?id=183097
567         <rdar://problem/37843816>
568
569         Reviewed by Matt Baker.
570
571         Update status of properties warnings every time focus moves.
572
573         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
574         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
575         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyFocusMoved):
576         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._propertiesChanged):
577         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._updatePropertiesStatus):
578         * UserInterface/Views/SpreadsheetStyleProperty.js:
579         (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidBlur):
580
581 2018-05-04  Devin Rousso  <webkit@devinrousso.com>
582
583         Web Inspector: Styles Redesign: ensure that tabbing through the last section wraps back to the first
584         https://bugs.webkit.org/show_bug.cgi?id=181973
585
586         Reviewed by Matt Baker.
587
588         Unified delegate functions to start editing previous/next rules into a single function for
589         simplicity.
590
591         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
592         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetCSSStyleDeclarationEditorFocusMoved):
593
594         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
595         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.startEditingRuleSelector):
596         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.spreadsheetSelectorFieldDidChange):
597         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.spreadsheetCSSStyleDeclarationEditorStartEditingAdjacentRule):
598         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.cssStyleDeclarationEditorStartEditingAdjacentRule): Deleted.
599
600         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
601         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.focusFirstSection):
602         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.focusLastSection):
603         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.spreadsheetCSSStyleDeclarationSectionStartEditingAdjacentRule):
604         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionStartEditingNextRule): Deleted.
605         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionStartEditingPreviousRule): Deleted.
606
607         * UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
608         (WI.GeneralStyleDetailsSidebarPanel.prototype.styleDetailsPanelFocusLastPseudoClassCheckbox):
609         (WI.GeneralStyleDetailsSidebarPanel.prototype.styleDetailsPanelFocusFilterBar):
610         (WI.GeneralStyleDetailsSidebarPanel.prototype.initialLayout):
611         (WI.GeneralStyleDetailsSidebarPanel.prototype._handleForcedPseudoClassCheckboxKeydown):
612         (WI.GeneralStyleDetailsSidebarPanel.prototype._forcedPseudoClassCheckboxChanged):
613         (WI.GeneralStyleDetailsSidebarPanel.prototype._handleFilterBarInputFieldKeyDown):
614
615         Drive-by fix: provide tabbing support for the Computed styles panel.
616
617         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
618         (WI.CSSStyleDeclarationTextEditor.prototype._handleShiftTabKey.switchRule):
619         (WI.CSSStyleDeclarationTextEditor.prototype._handleTabKey.switchRule):
620
621         * UserInterface/Views/ComputedStyleDetailsPanel.js:
622         (WI.ComputedStyleDetailsPanel.prototype.focusFirstSection):
623         (WI.ComputedStyleDetailsPanel.prototype.focusLastSection):
624         (WI.ComputedStyleDetailsPanel.prototype.cssStyleDeclarationTextEditorStartEditingAdjacentRule):
625
626 2018-05-04  Devin Rousso  <webkit@devinrousso.com>
627
628         Web Inspector: Canvas tab: Determine isFunction by looking at the prototype
629         https://bugs.webkit.org/show_bug.cgi?id=184990
630
631         Reviewed by Brian Burg.
632
633         * UserInterface/Models/RecordingAction.js:
634         (WI.RecordingAction.isFunctionForType):
635         (WI.RecordingAction._prototypeForType):
636         (WI.RecordingAction.prototype.async.swizzle):
637
638 2018-05-01  Devin Rousso  <webkit@devinrousso.com>
639
640         Web Inspector: Canvas tab: determine hasVisibleEffect for all actions immediately after recording is added
641         https://bugs.webkit.org/show_bug.cgi?id=182995
642
643         Reviewed by Matt Baker.
644
645         Previously, we'd swizzle the entirety of the `WI.Recording` in one, which would usually
646         freeze the UI, especially for larger recordings. This patch uses `WI.YieldableTask` to split
647         the work and allow the rest of the UI to still be usable while `WI.Recording` are processing.
648         Additionally, since we no longer have to worry about hangs, we can do more work upfront,
649         such as calculating `hasVisibleEffect` and the current state of 2D canvases.
650
651         These changes require that all uses of `WI.Recording` call `process()` before attempting to
652         use any `frames`/`actions`/`initialState`, as they will have their original payload values
653         and will have not been swizzled or applied.
654
655         * Localizations/en.lproj/localizedStrings.js:
656
657         * UserInterface/Models/Recording.js:
658         (WI.Recording):
659         (WI.Recording.prototype.process):
660         (WI.Recording.prototype.createContext): Added.
661         (WI.Recording.prototype.async yieldableTaskWillProcessItem): Added.
662         (WI.Recording.prototype.async yieldableTaskDidFinish): Added.
663
664         * UserInterface/Models/RecordingAction.js:
665         (WI.RecordingAction):
666         (WI.RecordingAction.prototype.process): Added.
667         (WI.RecordingAction.prototype.async swizzle): Added.
668         (WI.RecordingAction.prototype.apply):
669         (WI.RecordingAction.prototype.toJSON):
670         (WI.RecordingAction.prototype.set state): Deleted.
671         (WI.RecordingAction.prototype.swizzle): Deleted.
672         (WI.RecordingAction.prototype.apply.getContent): Deleted.
673         (WI.RecordingAction.prototype.async _swizzle): Deleted.
674         * UserInterface/Models/RecordingInitialStateAction.js:
675         (WI.RecordingInitialStateAction):
676
677         * UserInterface/Views/CanvasSidebarPanel.js:
678         (WI.CanvasSidebarPanel):
679         (WI.CanvasSidebarPanel.prototype.set action):
680         (WI.CanvasSidebarPanel.prototype._treeOutlineSelectionDidChange):
681         (WI.CanvasSidebarPanel.prototype._recordingChanged):
682
683         * UserInterface/Views/CanvasSidebarPanel.css:
684         (.sidebar > .panel.navigation.canvas > .content > .recording-content > .indeterminate-progress-spinner):
685
686         * UserInterface/Views/RecordingActionTreeElement.js:
687         (WI.RecordingActionTreeElement):
688         (WI.RecordingActionTreeElement.prototype.onattach):
689         (WI.RecordingActionTreeElement.prototype._handleHasVisibleEffectChanged): Deleted.
690
691         * UserInterface/Views/RecordingContentView.js:
692         (WI.RecordingContentView):
693         (WI.RecordingContentView.prototype.get navigationItems):
694         (WI.RecordingContentView.prototype.updateActionIndex):
695         (WI.RecordingContentView.prototype.initialLayout):
696         (WI.RecordingContentView.prototype._generateContentCanvas2D): Added.
697         (WI.RecordingContentView.prototype._generateContentCanvasWebGL): Added.
698         (WI.RecordingContentView.prototype._updateCanvasPath):
699         (WI.RecordingContentView.prototype._updateProcessProgress): Added.
700         (WI.RecordingContentView.prototype._handleRecordingProcessedActionSwizzle): Added.
701         (WI.RecordingContentView.prototype._handleRecordingProcessedActionApply): Added.
702         (WI.RecordingContentView.supportsCanvasPathDebugging): Deleted.
703         (WI.RecordingContentView.prototype.async _generateContentCanvas2D): Deleted.
704         (WI.RecordingContentView.prototype.async _generateContentCanvasWebGL): Deleted.
705
706         * UserInterface/Views/RecordingContentView.css:
707         (.content-view:not(.tab).recording > .preview-container):
708
709         * UserInterface/Base/ImageUtilities.js:
710         (WI.ImageUtilities.supportsCanvasPathDebugging):
711
712 2018-04-26  Jer Noble  <jer.noble@apple.com>
713
714         Unreviewed build fix; fix WebInspectorUI copy resources step after r231063.
715
716         * Configurations/Base.xcconfig:
717
718 2018-04-26  Jer Noble  <jer.noble@apple.com>
719
720         WK_COCOA_TOUCH all the things.
721         https://bugs.webkit.org/show_bug.cgi?id=185006
722
723         Reviewed by Tim Horton.
724
725         * Configurations/WebInspectorUIFramework.xcconfig:
726
727 2018-04-21  Nikita Vasilyev  <nvasilyev@apple.com>
728
729         REGRESSION(r214076): Web Inspector: Timelines load and DOMContentLoaded markers aren't visible
730         https://bugs.webkit.org/show_bug.cgi?id=184858
731
732         Reviewed by Brian Burg.
733
734         r214076 changed the color of all markers to light gray.
735
736         * UserInterface/Views/TimelineRuler.css:
737         (.timeline-ruler > .markers > .marker):
738         (body[dir=ltr] .timeline-ruler > .markers > .marker):
739         (body[dir=rtl] .timeline-ruler > .markers > .marker):
740         (.timeline-ruler > .markers > .marker.current-time):
741         (.timeline-ruler > .markers > .marker.load-event):
742         (.timeline-ruler > .markers > .marker.dom-content-event):
743         (.timeline-ruler > .markers > .marker.timestamp):
744         (body[dir=ltr] .timeline-ruler > .markers > .marker.current-time): Deleted.
745         (body[dir=rtl] .timeline-ruler > .markers > .marker.current-time): Deleted.
746
747 2018-04-19  Chris Dumez  <cdumez@apple.com>
748
749         Rename JSDOMWindowProxy to JSWindowProxy
750         https://bugs.webkit.org/show_bug.cgi?id=184797
751
752         Reviewed by Sam Weinig.
753
754         Rename JSDOMWindowProxy to JSWindowProxy for consistency with WindowProxy.
755
756         * UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
757         (HeapSnapshot.prototype._isNodeGlobalObject):
758
759 2018-04-19  David Kilzer  <ddkilzer@apple.com>
760
761         Enable Objective-C weak references
762         <https://webkit.org/b/184789>
763         <rdar://problem/39571716>
764
765         Reviewed by Dan Bernstein.
766
767         * Configurations/Base.xcconfig:
768         (CLANG_ENABLE_OBJC_WEAK): Enable.
769
770 2018-04-16  Nikita Vasilyev  <nvasilyev@apple.com>
771
772         Web Inspector: Can't select and copy text from Network tab popover
773         https://bugs.webkit.org/show_bug.cgi?id=184606
774
775         Reviewed by Matt Baker.
776
777         * UserInterface/Views/ResourceTimingBreakdownView.css:
778         (.waterfall-popover .resource-timing-breakdown):
779
780 2018-04-12  Nikita Vasilyev  <nvasilyev@apple.com>
781
782         Web Inspector: Refactoring: move popover styles from JS to CSS
783         https://bugs.webkit.org/show_bug.cgi?id=184558
784
785         Reviewed by Brian Burg.
786
787         Introduce several CSS variables to customize popover appearance in CSS
788         and not JavaScript.
789
790         * UserInterface/Views/NetworkTableContentView.js:
791         (WI.NetworkTableContentView.prototype._waterfallPopoverContentForResource):
792         (WI.NetworkTableContentView.prototype._handleMousedownWaterfall):
793         * UserInterface/Views/Popover.css:
794         (.popover):
795         * UserInterface/Views/Popover.js:
796         (WI.Popover):
797         (WI.Popover.prototype._drawBackground):
798         Replace `var` with `let`.
799
800         (WI.Popover.prototype.get backgroundStyle): Deleted.
801         (WI.Popover.prototype.set backgroundStyle): Deleted.
802         * UserInterface/Views/ResourceTimingBreakdownView.css:
803         (.popover.waterfall-popover):
804         (.waterfall-popover-content .resource-timing-breakdown):
805         (.waterfall-popover .resource-timing-breakdown): Deleted.
806
807         * UserInterface/Views/NetworkTableContentView.js:
808         (WI.NetworkTableContentView.prototype._waterfallPopoverContentForResource):
809         (WI.NetworkTableContentView.prototype._handleMousedownWaterfall):
810         * UserInterface/Views/Popover.css:
811         (.popover):
812         * UserInterface/Views/Popover.js:
813         (WI.Popover):
814         (WI.Popover.prototype._drawBackground):
815         * UserInterface/Views/ResourceTimingBreakdownView.css:
816         (.popover.waterfall-popover):
817         (.waterfall-popover-content .resource-timing-breakdown):
818
819 2018-04-07  Nikita Vasilyev  <nvasilyev@apple.com>
820
821         Web Inspector: Errors glyph doesn't fully change to blue when active
822         https://bugs.webkit.org/show_bug.cgi?id=184389
823
824         Reviewed by Joseph Pecoraro.
825
826         The dot of the exclamation mark was always black.
827
828         * UserInterface/Images/Errors.svg:
829
830 2018-04-03  Aaron Chu  <aaron_chu@apple.com>
831
832         AX: Add Experimental setting for Accessibility Audit
833         https://bugs.webkit.org/show_bug.cgi?id=183646
834         <rdar://problem/38478583>
835
836         Reviewed by Brian Burg.
837
838         Added experimental feature flag for Accessibility Audit work.
839
840         * Localizations/en.lproj/localizedStrings.js:
841         * UserInterface/Base/Setting.js:
842         * UserInterface/Views/SettingsTabContentView.js:
843         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
844
845 2018-04-01  Matt Baker  <mattbaker@apple.com>
846
847         Web Inspector: Remove dead TabBrowser/TabContentView code
848         https://bugs.webkit.org/show_bug.cgi?id=184104
849
850         Reviewed by Devin Rousso.
851
852         * UserInterface/Base/Main.js:
853         (WI._tryToRestorePendingTabs):
854         * UserInterface/Views/NewTabContentView.js:
855         (WI.NewTabContentView.prototype.shown):
856         (WI.NewTabContentView.prototype.hidden):
857         * UserInterface/Views/TabBrowser.js:
858         (WI.TabBrowser.prototype.addTabForContentView):
859         (WI.TabBrowser.prototype.showTabForContentView):
860         (WI.TabBrowser._tabBarItemRemoved):
861         * UserInterface/Views/TabContentView.js:
862         (WI.TabContentView.prototype.get parentTabBrowser): Deleted.
863         (WI.TabContentView.prototype.set parentTabBrowser): Deleted.
864
865 2018-03-30  Devin Rousso  <webkit@devinrousso.com>
866
867         Web Inspector: tint all pixels drawn by shader program when hovering ShaderProgramTreeElement
868         https://bugs.webkit.org/show_bug.cgi?id=175223
869
870         Reviewed by Matt Baker.
871
872         * UserInterface/Models/ShaderProgram.js:
873         (WI.ShaderProgram):
874         (WI.ShaderProgram.prototype.showHighlight):
875         (WI.ShaderProgram.prototype.hideHighlight):
876
877         * UserInterface/Views/ShaderProgramTreeElement.js:
878         (WI.ShaderProgramTreeElement.prototype.onattach):
879         (WI.ShaderProgramTreeElement.prototype._handleMouseOver):
880         (WI.ShaderProgramTreeElement.prototype._handleMouseOut):
881         Whenever a ShaderProgramTreeElement is hovered, highlight the corresponding shader program
882         by tinting the pixels it draws via a blend.
883
884 2018-03-27  Timothy Hatcher  <timothy@apple.com>
885
886         Web Inspector: Modernize some utility functions
887         https://bugs.webkit.org/show_bug.cgi?id=184047
888
889         Reviewed by Matt Baker.
890
891         * UserInterface/Base/Utilities.js:
892         (Node.prototype.enclosingNodeOrSelfWithClass): Use parentElement instead of parentNode, so we don't need to check for document.
893         (Node.prototype.enclosingNodeOrSelfWithNodeNameInArray): Ditto. Also just toUpperCase input, since nodeName is already upper case.
894         (String.prototype.escapeCharacters): Use Set and string iteration instead of indexOf and charAt.
895
896 2018-03-27  Nikita Vasilyev  <nvasilyev@apple.com>
897
898         Web Inspector: Command-Shift-left/right arrow keys should not switch tabs when focused on color picker text fields
899         https://bugs.webkit.org/show_bug.cgi?id=184028
900
901         Reviewed by Timothy Hatcher.
902
903         * UserInterface/Views/EditingSupport.js:
904         (WI.isEventTargetAnEditableField):
905         Detect <input type="number"> as an editable text field.
906
907 2018-03-23  Nikita Vasilyev  <nvasilyev@apple.com>
908
909         Web Inspector: Styles: don't show checkboxes for invalid properties
910         https://bugs.webkit.org/show_bug.cgi?id=183951
911         <rdar://problem/38807602>
912
913         Reviewed by Matt Baker.
914
915         Since toggling of invalid properties isn't supported by the backend, don't show checkboxes for invalid properties.
916
917         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
918         (.spreadsheet-css-declaration:matches(:hover, :focus) .property:not(:matches(.invalid-name, .invalid-value)) .property-toggle,):
919         (.spreadsheet-css-declaration:matches(:hover, :focus) .property-toggle,): Deleted.
920         Don't show checkboxes for invalid properties but still show them for duplicate properties.
921
922 2018-03-23  Brian Burg  <bburg@apple.com>
923
924         Web Inspector: add WebKitAdditions hooks for WebInspectorUI
925         https://bugs.webkit.org/show_bug.cgi?id=183940
926         <rdar://problem/38796310>
927
928         Reviewed by Timothy Hatcher.
929
930         * Scripts/combine-resources.pl:
931         (debugLog): Added. Leave in the logging I used to debug this.
932
933         (concatenateIncludedFilesMatchingPattern):
934         (stripIncludedFilesMatchingPattern):
935         (concatenateFiles): Deleted.
936         This function tried to do too many things. Split it into
937         two functions, one for stripping includes and one for concatenating
938         files referenced by includes.
939
940         Lastly, add a negative lookahead clause for 'WebKitAdditions' so includes
941         containing that string are not combined when no input directory is passed
942         to the script.
943
944         * Scripts/copy-user-interface-resources.pl:
945         WebKitAdditions is computed either from BUILT_PRODUCTS_DIR or SDKROOT,
946         depending on the build style. Just try them in order and use the first
947         one that exists. WebInspectorUI files are in their own directory, so
948         we can assume there are files to process if that directory exists.
949
950         Copy Main.html to derived sources before doing any processing on it.
951         This makes all combining phases have the same --input-html argument.
952
953         (debugLog): Added. Leave in the logging I used to debug this.
954
955         (combineOrStripResourcesForWebKitAdditions):
956         (stripResourcesForWebKitAdditions):
957         (combineResourcesForWebKitAdditions):
958         Determine if WebKitAdditions exists and whether there are any
959         resources for WebInspectorUI present that need to be processed.
960
961         * UserInterface/Main.html:
962         Add stub .js and .css WebKitAdditions files. We can add more later
963         if it makes sense but this is good enough to validate the build machinery.
964
965 2018-03-23  Nikita Vasilyev  <nvasilyev@apple.com>
966
967         Web Inspector: Styles Redesign: flashing when switching between nodes
968         https://bugs.webkit.org/show_bug.cgi?id=179291
969         <rdar://problem/35352660>
970
971         Reviewed by Matt Baker.
972
973         Flashing was happening because the layout was a two-step process:
974         1. Append empty sections.
975         2. Layout everything inside of the section on requestAnimationFrame.
976
977         SpreadsheetRulesStyleDetailsPanel was converted to use layout method,
978         so both steps happen on requestAnimationFrame.
979
980         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
981         (WI.SpreadsheetRulesStyleDetailsPanel):
982         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.refresh):
983         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.layout):
984         The removed lines from the refresh method moved to the layout method without any changes.
985
986 2018-03-22  Nikita Vasilyev  <nvasilyev@apple.com>
987
988         Uncaught Exception: TypeError: this._textEditor.toggleUnexecutedCodeHighlights().then is not a function
989         https://bugs.webkit.org/show_bug.cgi?id=181912
990         <rdar://problem/36700022>
991
992         Reviewed by Matt Baker.
993
994         The uncaught exception was caused by returning `false` instead of a promise object.
995         This patch only fixes the exception. Further enhancements should be done in <https://webkit.org/b/183887>.
996
997         * UserInterface/Views/SourceCodeTextEditor.js:
998         (WI.SourceCodeTextEditor.prototype.toggleTypeAnnotations):
999         (WI.SourceCodeTextEditor.prototype.toggleUnexecutedCodeHighlights):
1000
1001 2018-03-20  Nikita Vasilyev  <nvasilyev@apple.com>
1002
1003         Web Inspector: Styles: Loses focus when editing a property while page is being loaded
1004         https://bugs.webkit.org/show_bug.cgi?id=182619
1005         <rdar://problem/37363185>
1006
1007         Reviewed by Matt Baker.
1008
1009         Adding or removing a stylesheet causes SpreadsheetRulesStyleDetailsPanel to refresh, triggering a layout
1010         of all SpreadsheetCSSStyleDeclarationSection child views. This resets the focus, selection, and
1011         auto-completion state.
1012
1013         This patch prevents SpreadsheetCSSStyleDeclarationSection from performing a layout when a property is being edited.
1014
1015         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
1016         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
1017         Allow re-layout after creating a blank CSS property and pasting CSS code.
1018         - _pendingAddBlankPropertyIndexOffset is a number after pasting CSS rules.
1019         - _propertyPendingStartEditing is a property model after creating a new property.
1020
1021 2018-03-20  Devin Rousso  <webkit@devinrousso.com>
1022
1023         Web Inspector: Session dividers are not added when Console tab is not visible
1024         https://bugs.webkit.org/show_bug.cgi?id=168622
1025
1026         Reviewed by Matt Baker.
1027
1028         Restructure `_pendingMessages` to be a `Map [ConsoleSession, ConsoleMessageView]`. Instead
1029         of rendering to the `_currentConsoleGroup`, we now render to the saved `ConsoleSession`.
1030         Also ensure that `_pendingMessages` is cleared when navigating and "Preserve Log" is off.
1031
1032         * UserInterface/Controllers/JavaScriptLogViewController.js:
1033         (WI.JavaScriptLogViewController):
1034         (WI.JavaScriptLogViewController.prototype.startNewSession):
1035         (WI.JavaScriptLogViewController.prototype.consolePromptHistoryDidChange):
1036         (WI.JavaScriptLogViewController.prototype._appendConsoleMessageView):
1037         (WI.JavaScriptLogViewController.prototype.renderPendingMessages):
1038         (WI.JavaScriptLogViewController.prototype.get prompt): Deleted.
1039         (WI.JavaScriptLogViewController.prototype.get currentConsoleGroup): Deleted.
1040
1041 2018-03-20  Nikita Vasilyev  <nvasilyev@apple.com>
1042
1043         Web Inspector: Can't add a new class by editing class attribute in DOM outline
1044         https://bugs.webkit.org/show_bug.cgi?id=180890
1045
1046         Reviewed by Ryosuke Niwa.
1047
1048         Typing "my-foo my-bar" creates a single "my-foo\xA0my-bar" class name because
1049         contentEditable-based attribute editor sometimes inserts non-breaking space characters (\xA0).
1050
1051         Replace all non-breaking space characters with the regular space characters when
1052         commiting attribute change.
1053
1054         * UserInterface/Views/DOMTreeElement.js:
1055
1056 2018-03-16  Nikita Vasilyev  <nvasilyev@apple.com>
1057
1058         Web Inspector: Elements: "Force Print Media Styles" should not persist across Web Inspector sessions
1059         https://bugs.webkit.org/show_bug.cgi?id=183708
1060         <rdar://problem/36452183>
1061
1062         Reviewed by Matt Baker.
1063
1064         * UserInterface/Base/Main.js:
1065         (WI.loaded):
1066         * UserInterface/Views/DOMTreeContentView.js:
1067         (WI.DOMTreeContentView):
1068         (WI.DOMTreeContentView.prototype._showPrintStylesChanged):
1069         (WI.DOMTreeContentView.prototype._togglePrintStyles):
1070         (WI.DOMTreeContentView.prototype._showPrintStylesSettingChanged): Deleted.
1071         (WI.DOMTreeContentView.prototype._togglePrintStylesSetting): Deleted.
1072
1073 2018-03-14  Devin Rousso  <webkit@devinrousso.com>
1074
1075         Web Inspector: Canvas: a recording initiated by the user should be shown immediately on completion
1076         https://bugs.webkit.org/show_bug.cgi?id=183647
1077         <rdar://problem/38479187>
1078
1079         Reviewed by Matt Baker.
1080
1081         When recordings are initiated via `console.record`, we don't want to automatically show the
1082         recording after it's payload is sent to the frontend. We determine whether a recording came
1083         from the console by comparing the recording's associated canvas with the current value of
1084         `_recordingCanvas`. Previously, when stopping a recording, we would always null the value,
1085         which meant that all non-single-frame recordings (single-frame recordings are stopped by
1086         the agent after the first paint or tick after an action is performed) would be categorized
1087         as coming from the console, since `_recordingCanvas` would be null by the time the frontend
1088         recieved the payload.
1089
1090         This patch changes it so that the nulling of `_recordingCanvas` in `stopRecording` is only
1091         done if the agent command errors. It was already the case that `_recordingCanvas` was nulled
1092         in `stopRecording`, so this patch just prevents it from being nulled too early.
1093
1094         * UserInterface/Controllers/CanvasManager.js:
1095         (WI.CanvasManager.prototype.stopRecording):
1096
1097 2018-03-12  Jon Davis  <jond@apple.com>
1098
1099         Web Inspector: Remove redundant tooltips
1100         https://bugs.webkit.org/show_bug.cgi?id=183099
1101
1102         Reviewed by Matt Baker.
1103
1104         * Localizations/en.lproj/localizedStrings.js:
1105         * UserInterface/Base/Main.js:
1106         (WI.contentLoaded):
1107         Instantiate ConsoleDrawer so the keyboard shortcuts for FindBanner are available.
1108
1109         * UserInterface/Views/BreakpointTreeElement.js:
1110         (WI.BreakpointTreeElement):
1111         Suppress tooltips by setting the tooltipHandledSeprately flag with no custom handler.
1112
1113         * UserInterface/Views/ButtonNavigationItem.js:
1114         (WI.ButtonNavigationItem):
1115         Only show tooltips when the button style is an image.
1116
1117         * UserInterface/Views/ConsoleDrawer.js:
1118         (WI.ConsoleDrawer):
1119         (WI.ConsoleDrawer.prototype.toggleButtonShortcutTooltip):
1120         Added helper to set the toggle button keyboard shortcut tooltip.
1121
1122         * UserInterface/Views/DOMBreakpointTreeElement.js:
1123         (WI.DOMBreakpointTreeElement):
1124         Suppress tooltips by setting the tooltipHandledSeprately flag with no custom handler.
1125
1126         * UserInterface/Views/DOMNodeTreeElement.js:
1127         (WI.DOMNodeTreeElement):
1128         Suppress tooltips by setting the tooltipHandledSeprately flag with no custom handler.
1129
1130         * UserInterface/Views/FindBanner.js:
1131         (WI.FindBanner):
1132         * UserInterface/Views/HierarchicalPathComponent.js:
1133         (WI.HierarchicalPathComponent):
1134         (WI.HierarchicalPathComponent.prototype.get tooltip):
1135         (WI.HierarchicalPathComponent.prototype.set tooltip):
1136         (WI.HierarchicalPathComponent.prototype.get hideTooltip):
1137         (WI.HierarchicalPathComponent.prototype.set hideTooltip):
1138         (WI.HierarchicalPathComponent.prototype._updateElementTitleAndText):
1139         Add tooltip management features to manage tooltips separately of the displayName,
1140         and provide a behavior to hide tooltips while retaining the tooltip data.
1141
1142         * UserInterface/Views/HierarchicalPathNavigationItem.js:
1143         (WI.HierarchicalPathNavigationItem.prototype.updateLayout):
1144         Hide tooltips when fully visible, show tooltips for collapsed items.
1145
1146         * UserInterface/Views/PinnedTabBarItem.js:
1147         (WI.PinnedTabBarItem.prototype.titleDidChange):
1148         Set tooltips for pinned tab bar items.
1149
1150         * UserInterface/Views/QuickConsole.js:
1151         (WI.QuickConsole):
1152         Set the ConsoleDrawer toggle button tooltip after the keyboard shortcut is registered.
1153
1154         * UserInterface/Views/StorageTreeElement.js:
1155         (WI.StorageTreeElement):
1156         Suppress tooltips by setting the tooltipHandledSeprately flag with no custom handler.
1157
1158         * UserInterface/Views/TabBarItem.js:
1159         (WI.TabBarItem.prototype.get title):
1160         (WI.TabBarItem.prototype.set title):
1161         (WI.TabBarItem.prototype.titleDidChange):
1162         (WI.TabBarItem):
1163         Add title property management with an overridable titleDidChange handler for
1164         setting tooltips when needed.
1165
1166         * UserInterface/Views/TimelineTreeElement.js:
1167         (WI.TimelineTreeElement):
1168         Suppress tooltips by setting the tooltipHandledSeprately flag with no custom handler.
1169
1170         * UserInterface/Views/ToggleButtonNavigationItem.js:
1171         (WI.ToggleButtonNavigationItem.prototype.set defaultToolTip):
1172         Added a setter for manging the default tooltip of a toggle button.
1173
1174         * UserInterface/Views/XHRBreakpointTreeElement.js:
1175         (WI.XHRBreakpointTreeElement):
1176         Suppress tooltips by setting the tooltipHandledSeprately flag with no custom handler.
1177
1178 2018-03-09  Nikita Vasilyev  <nvasilyev@apple.com>
1179
1180         Web Inspector: Sources: Open all resources in Sources tab instead of Resources/Debugger
1181         https://bugs.webkit.org/show_bug.cgi?id=183317
1182         <rdar://problem/38108455>
1183
1184         Reviewed by Matt Baker.
1185
1186         * Localizations/en.lproj/localizedStrings.js:
1187         * UserInterface/Base/Main.js:
1188         * UserInterface/Views/ContextMenuUtilities.js:
1189         (WI.appendContextMenuItemsForURL):
1190         Introduce preferredTabType option instead of listing ignoreResourcesTab, ignoreDebuggerTab, ignoreSearchTab, and ignoreNetworkTab.
1191         The only correct outcome of selecting "Reveal in Sources Tab" context menu is to open Sources tab, not any other tab.
1192
1193         * UserInterface/Views/SourceCodeTextEditor.js:
1194         (WI.SourceCodeTextEditor.prototype.textEditorGutterContextMenu):
1195         * UserInterface/Views/TabBrowser.js:
1196         (WI.TabBrowser.prototype.bestTabContentViewForRepresentedObject):
1197
1198 2018-03-08  Nikita Vasilyev  <nvasilyev@apple.com>
1199
1200         Web Inspector: Sources: add SourcesTabContentView and SourceSidebarPanel classes
1201         https://bugs.webkit.org/show_bug.cgi?id=183316
1202         <rdar://problem/38107639>
1203
1204         Reviewed by Matt Baker.
1205
1206         Add Sources tab and sidebar panel, which are copies of the corresponding Resources classes.
1207         The Sources tab is shown when it's enabled in the experimental settings. This patch doesn't
1208         remove existing Resources and Debugger tabs.
1209
1210         * UserInterface/Base/Main.js:
1211         (WI.contentLoaded):
1212         * UserInterface/Main.html:
1213         * UserInterface/Views/SourcesSidebarPanel.css: Added.
1214         (.sidebar > .panel.navigation.sources > .content):
1215         (.sidebar > .panel.navigation.sources > .navigation-bar):
1216         * UserInterface/Views/SourcesSidebarPanel.js: Added.
1217         (WI.SourcesSidebarPanel):
1218         (WI.SourcesSidebarPanel.shouldPlaceResourcesAtTopLevel):
1219         (WI.SourcesSidebarPanel.prototype.get minimumWidth):
1220         (WI.SourcesSidebarPanel.prototype.closed):
1221         (WI.SourcesSidebarPanel.prototype.showDefaultContentView):
1222         (WI.SourcesSidebarPanel.prototype.treeElementForRepresentedObject.isAncestor):
1223         (WI.SourcesSidebarPanel.prototype.treeElementForRepresentedObject.getParent):
1224         (WI.SourcesSidebarPanel.prototype.treeElementForRepresentedObject):
1225         (WI.SourcesSidebarPanel.prototype.initialLayout):
1226         (WI.SourcesSidebarPanel.prototype.hasCustomFilters):
1227         (WI.SourcesSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match):
1228         (WI.SourcesSidebarPanel.prototype.matchTreeElementAgainstCustomFilters):
1229         (WI.SourcesSidebarPanel.prototype._mainResourceDidChange):
1230         (WI.SourcesSidebarPanel.prototype._mainFrameDidChange):
1231         (WI.SourcesSidebarPanel.prototype._mainFrameMainResourceDidChange.delayedWork):
1232         (WI.SourcesSidebarPanel.prototype._mainFrameMainResourceDidChange):
1233         (WI.SourcesSidebarPanel.prototype._scriptWasAdded):
1234         (WI.SourcesSidebarPanel.prototype._addScript):
1235         (WI.SourcesSidebarPanel.prototype._scriptWasRemoved):
1236         (WI.SourcesSidebarPanel.prototype._scriptsCleared):
1237         (WI.SourcesSidebarPanel.prototype._styleSheetAdded):
1238         (WI.SourcesSidebarPanel.prototype._addTargetWithMainResource):
1239         (WI.SourcesSidebarPanel.prototype._targetRemoved):
1240         (WI.SourcesSidebarPanel.prototype._treeSelectionDidChange):
1241         (WI.SourcesSidebarPanel.prototype._compareTreeElements):
1242         (WI.SourcesSidebarPanel.prototype._extraDomainsActivated):
1243         (WI.SourcesSidebarPanel.prototype._scopeBarSelectionDidChange):
1244         * UserInterface/Views/SourcesTabContentView.js: Added.
1245         (WI.SourcesTabContentView):
1246         (WI.SourcesTabContentView.tabInfo):
1247         (WI.SourcesTabContentView.isTabAllowed):
1248         (WI.SourcesTabContentView.prototype.get type):
1249         (WI.SourcesTabContentView.prototype.get supportsSplitContentBrowser):
1250         (WI.SourcesTabContentView.prototype.canShowRepresentedObject):
1251
1252 2018-03-07  Devin Rousso  <webkit@devinrousso.com>
1253
1254         Web Inspector: Canvas tab: ensure that the Recording TreeOutline has a specified height for virtualization
1255         https://bugs.webkit.org/show_bug.cgi?id=183015
1256
1257         Reviewed by Matt Baker.
1258
1259         * UserInterface/Views/CanvasSidebarPanel.js:
1260         (WI.CanvasSidebarPanel):
1261
1262         * UserInterface/Views/CanvasSidebarPanel.css:
1263         (.sidebar > .panel.navigation.canvas > .content):
1264         (.sidebar > .panel.navigation.canvas > .content > .navigation-bar):
1265         (.sidebar > .panel.navigation.canvas.has-recordings > .content > .recording-content):
1266         (.sidebar > .panel.navigation.canvas:not(.has-recordings) > .filter-bar,):
1267         (.sidebar > .panel.navigation.canvas > .content > .recording-content > .navigation-bar): Deleted.
1268         (.sidebar > .panel.navigation.canvas.has-recordings > .content > .tree-outline.canvas): Deleted.
1269
1270         * UserInterface/Views/TreeElement.js:
1271         (WI.TreeElement.prototype._detach):
1272
1273 2018-02-26  Devin Rousso  <webkit@devinrousso.com>
1274
1275         Web Inspector: Canvas Tab: Scroll into view / Inspect element if Canvas has DOM node
1276         https://bugs.webkit.org/show_bug.cgi?id=181769
1277
1278         Reviewed by Matt Baker.
1279
1280         * Localizations/en.lproj/localizedStrings.js:
1281
1282         * UserInterface/Images/Markup.svg: Added.
1283
1284         * UserInterface/Views/CanvasContentView.js:
1285         (WI.CanvasContentView):
1286         (WI.CanvasContentView.prototype.initialLayout):
1287         (WI.CanvasContentView.prototype._canvasElementButtonClicked):
1288
1289 2018-02-19  Matt Baker  <mattbaker@apple.com>
1290
1291         Web Inspector: Canvas tab: hide navigation sidebar when viewing the overview
1292         https://bugs.webkit.org/show_bug.cgi?id=182597
1293         <rdar://problem/37341564>
1294
1295         Reviewed by Devin Rousso.
1296
1297         Support showing/hiding the navigation sidebar panel based on the current
1298         represented object. Individual TabContentViews can opt-in to this behavior,
1299         by overriding TabContentView.prototype.managesNavigationSidebarPanel.
1300
1301         * UserInterface/Views/CanvasSidebarPanel.js:
1302         (WI.CanvasSidebarPanel.prototype.canShowRepresentedObject):
1303         * UserInterface/Views/CanvasTabContentView.js:
1304         (WI.CanvasTabContentView.prototype.get managesNavigationSidebarPanel):
1305         Hide the Canvas navigation sidebar when viewing the overview.
1306
1307         * UserInterface/Views/ContentBrowserTabContentView.js:
1308         (WI.ContentBrowserTabContentView):
1309         (WI.ContentBrowserTabContentView.prototype.showNavigationSidebarPanel):
1310         (WI.ContentBrowserTabContentView.prototype._navigationSidebarCollapsedStateDidChange):
1311         (WI.ContentBrowserTabContentView.prototype._contentBrowserCurrentRepresentedObjectsDidChange):
1312
1313         * UserInterface/Views/NavigationSidebarPanel.js:
1314         (WI.NavigationSidebarPanel.prototype.canShowRepresentedObject):
1315         Provide default implementation that just defers to the TabContentView.
1316         This exists so that a NavigationSidebarPanel that implements canShowRepresentedObject
1317         will have a meaningful default to fall back on.
1318
1319         * UserInterface/Views/TabBrowser.js:
1320         (WI.TabBrowser.prototype._sidebarCollapsedStateDidChange):
1321         (WI.TabBrowser.prototype._showNavigationSidebarPanelForTabContentView):
1322
1323         * UserInterface/Views/TabContentView.js:
1324         (WI.TabContentView.prototype.get managesNavigationSidebarPanel):
1325
1326 2018-02-16  Matt Baker  <mattbaker@apple.com>
1327
1328         Web Inspector: TabBar redesign: remove top-level search field and pin the Search tab
1329         https://bugs.webkit.org/show_bug.cgi?id=182353
1330         <rdar://problem/37088644>
1331
1332         Reviewed by Devin Rousso.
1333
1334         * Localizations/en.lproj/localizedStrings.js:
1335
1336         * UserInterface/Base/Main.js:
1337         (WI.contentLoaded):
1338         Create Search UI based on experimental setting. When the new TabBar is
1339         enabled, the Search tab is a pinned tab. Since it is also saveable, it
1340         needs to be added to the TabBrowser (the browser adds the item to the bar).
1341
1342         When restoring saved tabs, make an additional check to prevent a tab
1343         from being added twice. This can occur now that the Search tab is pinned.
1344
1345         * UserInterface/Images/Search.svg:
1346         Update art to better match Safari/macOS. Slightly increase the radius of
1347         the lens, and shorten the length of the handle.
1348
1349         * UserInterface/Views/GoToLineDialog.css:
1350         (.go-to-line-dialog > div::before):
1351         Update styles for new Search icon.
1352
1353         * UserInterface/Views/LegacyTabBar.js:
1354         (WI.LegacyTabBar.prototype.get saveableTabCount):
1355         Backported new TabBar method which is called by TabBrowser.
1356
1357         * UserInterface/Views/OpenResourceDialog.css:
1358         (.open-resource-dialog > .field::before):
1359         Update styles for new Search icon.
1360
1361         * UserInterface/Views/PinnedTabBarItem.js:
1362         (WI.PinnedTabBarItem.prototype.fromTabInfo):
1363         Match GeneralTabBarItem.fromTabInfo.
1364
1365         * UserInterface/Views/SearchTabContentView.js:
1366         (WI.SearchTabContentView):
1367         (WI.SearchTabContentView.tabInfo):
1368         New image (magnifying glass without border) when new TabBar is enabled.
1369
1370         * UserInterface/Views/SettingsTabContentView.js:
1371         (WI.SettingsTabContentView):
1372
1373         * UserInterface/Views/TabBar.js:
1374         (WI.TabBar):
1375         Move creation of the Settings item out of TabBar. The TabBar should
1376         only be concerned with managing tabs.
1377
1378         (WI.TabBar.prototype.get saveableTabCount):
1379         (WI.TabBar.prototype._handleContextMenu):
1380         (WI.TabBar.prototype.get normalNonEphemeralTabCount): Deleted.
1381         Now that the Search tab is pinned, there aren't any normal tabs that
1382         are also ephemeral. For the LegacyTabBar, both the Search and New Tab
1383         tabs are still in this category.
1384
1385         * UserInterface/Views/TabBrowser.js:
1386         (WI.TabBrowser.prototype.addTabForContentView):
1387         (WI.TabBrowser.prototype.closeTabForContentView):
1388         (WI.TabBrowser.prototype._tabBarItemSelected):
1389         (WI.TabBrowser._tabBarItemRemoved):
1390         Recent tab list should be validated against the list of saveable tabs,
1391         since the Search tab is no longer a normal tab (a GeneralTabBarItem),
1392         but is still persisted across Inspector sessions.
1393
1394 2018-02-16  Matt Baker  <mattbaker@apple.com>
1395
1396         Web Inspector: TabBar redesign: TabBarItem close button is incorrectly positioned
1397         https://bugs.webkit.org/show_bug.cgi?id=182844
1398         <rdar://problem/37586749>
1399
1400         Reviewed by Timothy Hatcher.
1401
1402         * UserInterface/Views/GeneralTabBarItem.js:
1403         (WI.GeneralTabBarItem.prototype.set title):
1404         Insert the title before the last flexible space item.
1405
1406         * UserInterface/Views/TabBar.css:
1407         (.tab-bar > .item):
1408         (.tab-bar > .item > .close):
1409         (.tab-bar > .item > .flex-space):
1410         (.tab-bar > .item.ephemeral > .flex-space:last-child):
1411         (.tab-bar.collapsed > .item):
1412         (.tab-bar.collapsed > .item > .flex-space):
1413         (.tab-bar.collapsed > .item > .close):
1414         (.tab-bar.collapsed > .item:hover > .close):
1415         (.tab-bar.collapsed > .item.ephemeral:hover > .icon):
1416         (.tab-bar > .item:hover > .close): Deleted.
1417         (.tab-bar:not(.collapsed) > .item.ephemeral:hover > .icon): Deleted.
1418
1419         * UserInterface/Views/TabBarItem.js:
1420         (WI.TabBarItem):
1421         Restore flexible space items before and after the icon.
1422
1423 2018-02-14  Nikita Vasilyev  <nvasilyev@apple.com>
1424
1425         Web Inspector: Styles: completion popover doesn't hide when switching panels
1426         https://bugs.webkit.org/show_bug.cgi?id=182464
1427         <rdar://problem/37202763>
1428
1429         Reviewed by Timothy Hatcher.
1430
1431         Save the position of the anchor, an element the popover is shown for, and hide the completion popover
1432         when the position changes.
1433
1434         * UserInterface/Views/CompletionSuggestionsView.js:
1435         (WI.CompletionSuggestionsView.prototype.showUntilAnchorMoves):
1436         When the popover is visible, check every 200ms if the anchor moved.
1437
1438         (WI.CompletionSuggestionsView.prototype.hide):
1439         * UserInterface/Views/SpreadsheetTextField.js:
1440         (WI.SpreadsheetTextField.prototype._updateCompletions):
1441         (WI.SpreadsheetTextField.prototype._getCaretRect):
1442         getBoundingClientRect returns {x: 0, y: 0} when it can't determine node's position.
1443         This happens when a node isn't attached to DOM, attached to DOM but not visible, and
1444         a number of odd cases.
1445
1446 2018-02-14  Matt Baker  <mattbaker@apple.com>
1447
1448         Web Inspector: TabBar redesign: only show allowed tabs in the available tabs context menu
1449         https://bugs.webkit.org/show_bug.cgi?id=182721
1450         <rdar://problem/37479019>
1451
1452         Reviewed by Timothy Hatcher.
1453
1454         In addition to only including allowed tabs in the TabBar context menu,
1455         perform a sanity check when setting the selected tab item, since the
1456         serialized selection index could refer to a tab that is no longer allowed.
1457
1458         * UserInterface/Views/LegacyTabBar.js:
1459         (WI.LegacyTabBar.prototype.set selectedTabBarItem):
1460         (WI.LegacyTabBar.prototype._handleContextMenu):
1461
1462         * UserInterface/Views/TabBar.js:
1463         (WI.TabBar.prototype.set selectedTabBarItem):
1464         (WI.TabBar.prototype._handleContextMenu):
1465
1466 2018-02-09  Matt Baker  <mattbaker@apple.com>
1467
1468         Web Inspector: Canvas tab: tree selection abruptly changes when selecting a recording frame
1469         https://bugs.webkit.org/show_bug.cgi?id=182667
1470         <rdar://problem/37412639>
1471
1472         Reviewed by Devin Rousso.
1473
1474         * UserInterface/Views/CanvasSidebarPanel.css:
1475         (.sidebar > .panel.navigation.canvas > .content > .recording-content > .navigation-bar):
1476         (.sidebar > .panel.navigation.canvas:not(.has-recordings) > .filter-bar,):
1477         (.sidebar > .panel.navigation.canvas > .content > .recording-content > .tree-outline .item.recording > .icon):
1478         (.sidebar > .panel.navigation.canvas > .content > .recording-content > .tree-outline .item.folder-icon > .icon):
1479         (.sidebar > .panel.navigation.canvas > .content > .recording-content > .tree-outline .item.folder-icon > .status):
1480         (.sidebar > .panel.navigation.canvas > .content > .navigation-bar): Deleted.
1481         (.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.recording > .icon): Deleted.
1482         (.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.folder-icon > .icon): Deleted.
1483         (.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.folder-icon > .status): Deleted.
1484         Style changes for the additional DOM element required to virtualize the recording tree outline.
1485
1486         * UserInterface/Views/CanvasSidebarPanel.js:
1487         (WI.CanvasSidebarPanel):
1488         In order to be virtualized, the tree must be the only child of its parent.
1489
1490         (WI.CanvasSidebarPanel.prototype.set action):
1491         Ensure that a frame tree element isn't deselected when the last action
1492         in the frame becomes selected in the RecordingContentView.
1493
1494         (WI.CanvasSidebarPanel.prototype.shown):
1495         Refresh the sidebar, as represented objects may have changed while hidden.
1496
1497         (WI.CanvasSidebarPanel.prototype._currentRepresentedObjectsDidChange):
1498         Unset the recording when no valid represented objects are found, to
1499         prevent a stale recording tree from being shown when viewing the overview.
1500
1501         (WI.CanvasSidebarPanel.prototype._canvasChanged):
1502         (WI.CanvasSidebarPanel.prototype._recordingChanged):
1503         (WI.CanvasSidebarPanel.prototype._updateRecordingScopeBar):
1504         Moved toggling of the "has-recordings" style to _canvasChanged, since
1505         the navigation bar should be hidden when no canvas exists.
1506
1507         * UserInterface/Views/CollectionContentView.js:
1508         (WI.CollectionContentView.prototype.addContentViewForItem):
1509         (WI.CollectionContentView.prototype.removeContentViewForItem):
1510         Drive by fixes for child view visible state.
1511
1512         * UserInterface/Views/TreeOutline.css:
1513         (.tree-outline:not(.large):matches(:focus, .force-focus) .item.selected .status .indeterminate-progress-spinner):
1514         Make spinner easier to see against the selection background color.
1515
1516 2018-02-09  Matt Baker  <mattbaker@apple.com>
1517
1518         Web Inspector: Object.shallowEqual always fails when comparing array property values
1519         https://bugs.webkit.org/show_bug.cgi?id=182634
1520         <rdar://problem/37374639>
1521
1522         Reviewed by Devin Rousso.
1523
1524         Object.shallowEqual should use Array.shallowEqual when comparing property
1525         values, since strictly comparing objects/arrays is only true if both
1526         operands reference the same Object.
1527
1528         * UserInterface/Base/Utilities.js:
1529         (value):
1530
1531 2018-02-08  Matt Baker  <mattbaker@apple.com>
1532
1533         Web Inspector: add listing of Canvases/Programs/Recordings to the NavigationSidebar
1534         https://bugs.webkit.org/show_bug.cgi?id=178744
1535         <rdar://problem/35374379>
1536
1537         Reviewed by Devin Rousso.
1538
1539         * Localizations/en.lproj/localizedStrings.js:
1540
1541         * UserInterface/Images/Canvas2D.svg:
1542         * UserInterface/Images/Canvas3D.svg:
1543         * UserInterface/Images/Recording.svg:
1544         Update canvas icons to be monochrome. Simplified the recording icon.
1545
1546         * UserInterface/Main.html:
1547
1548         * UserInterface/Models/RecordingAction.js:
1549         (WI.RecordingAction.prototype.get state):
1550         (WI.RecordingAction.prototype.set state):
1551         Allow (2D) snapshot state to be associated with the action. Used by
1552         RecordingActionDetailsSidebarPanel to retrieve the snapshot state.
1553
1554         * UserInterface/Views/CanvasContentView.css:
1555         (.content-view.canvas:not(.tab)):
1556         (.content-view.canvas:not(.tab) > .progress): Deleted.
1557         (.content-view.canvas:not(.tab) > .progress > .frame-count): Deleted.
1558
1559         * UserInterface/Views/CanvasContentView.js:
1560         (WI.CanvasContentView):
1561         (WI.CanvasContentView.prototype.get navigationItems):
1562         (WI.CanvasContentView.prototype.layout):
1563         (WI.CanvasContentView.prototype.shown):
1564         (WI.CanvasContentView.prototype._recordingStarted):
1565         (WI.CanvasContentView.prototype._recordingProgress):
1566         (WI.CanvasContentView.prototype._recordingStopped):
1567         (WI.CanvasContentView.prototype._updateRecordNavigationItem):
1568         (WI.CanvasContentView.prototype._updateProgressView):
1569         Replace progress UI with a reusable ProgressView class.
1570         When in the overview, clicking the CanvasContentView shows a dedicated
1571         CanvasContentView for inspecting shaders and recordings. This behavior
1572         is controlled by CollectionContentView, so we need to prevent it when
1573         clicking inside the header and footer elements, which contain clickable UI.
1574
1575         * UserInterface/Views/CanvasDetailsSidebarPanel.js:
1576         (WI.CanvasDetailsSidebarPanel.prototype.inspect):
1577
1578         * UserInterface/Views/CanvasOverviewContentView.css:
1579         (.content-view.canvas-overview .content-view.canvas):
1580         (.content-view.canvas-overview .content-view.canvas.is-recording):
1581         (.content-view.canvas-overview .content-view.canvas > :matches(header, footer)):
1582         (.content-view.canvas-overview .content-view.canvas > header):
1583         (.content-view.canvas-overview .content-view.canvas.is-recording > header):
1584         (.content-view.canvas-overview .content-view.canvas > header > .navigation-bar):
1585         (.content-view.canvas-overview .content-view.canvas:matches(:hover, .is-recording) > header > .navigation-bar):
1586         (.content-view.canvas-overview .content-view.canvas.is-recording > .progress-view,):
1587         (.content-view.canvas-overview .content-view.canvas.is-recording > .preview):
1588         (.content-view.canvas-overview .content-view.canvas > :matches(header, .progress, .preview, footer)): Deleted.
1589         (.content-view.canvas-overview .content-view.canvas.selected > :matches(.progress, .preview, footer),): Deleted.
1590         (.content-view.canvas-overview .content-view.canvas:not(:hover, .is-recording, .selected) > header > .navigation-bar): Deleted.
1591         (.content-view.canvas-overview .content-view.canvas > :matches(.progress, .preview)): Deleted.
1592         (.content-view.canvas-overview .content-view.canvas > .preview): Deleted.
1593         (.content-view.canvas-overview .content-view.canvas > .progress ~ .preview): Deleted.
1594         Clean up styles, and remove selection styles as canvases are no longer selectable in the overview.
1595
1596         * UserInterface/Views/CanvasOverviewContentView.js:
1597         (WI.CanvasOverviewContentView):
1598         (WI.CanvasOverviewContentView.prototype.get navigationItems):
1599         (WI.CanvasOverviewContentView.prototype.attached):
1600         (WI.CanvasOverviewContentView.prototype.detached):
1601         (WI.CanvasOverviewContentView.prototype.get selectionPathComponents): Deleted.
1602         (WI.CanvasOverviewContentView.prototype._changeSelectedItemVertically): Deleted.
1603         (WI.CanvasOverviewContentView.prototype._changeSelectedItemHorizontally): Deleted.
1604         (WI.CanvasOverviewContentView.prototype._selectionPathComponentsChanged): Deleted.
1605         (WI.CanvasOverviewContentView.prototype._handleUp): Deleted.
1606         (WI.CanvasOverviewContentView.prototype._handleRight): Deleted.
1607         (WI.CanvasOverviewContentView.prototype._handleDown): Deleted.
1608         (WI.CanvasOverviewContentView.prototype._handleLeft): Deleted.
1609         (WI.CanvasOverviewContentView.prototype._handleSpace): Deleted.
1610         (WI.CanvasOverviewContentView.prototype._supplementalRepresentedObjectsDidChange): Deleted.
1611         Disable canvas selection. Remove logic for supplemental represented objects,
1612         path components, and selection keyboard shortcuts.
1613
1614         * UserInterface/Views/CanvasSidebarPanel.css: Added.
1615         (.sidebar > .panel.navigation.canvas > .content):
1616         (.sidebar > .panel.navigation.canvas > .navigation-bar > .item.record-start-stop.disabled):
1617         (.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.canvas.canvas-2d .icon):
1618         (.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.canvas.webgl .icon):
1619         (.sidebar > .panel.navigation.canvas > .content > .navigation-bar):
1620         (.sidebar > .panel.navigation.canvas.has-recordings > .content > .tree-outline.canvas):
1621         (.sidebar > .panel.navigation.canvas:not(.has-recordings) > .filter-bar,):
1622         (.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.recording > .icon):
1623         (.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.shader-program > .icon):
1624         (.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.folder-icon > .icon):
1625         (.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.folder-icon > .status):
1626
1627         * UserInterface/Views/CanvasSidebarPanel.js: Added.
1628         (WI.CanvasSidebarPanel):
1629         (WI.CanvasSidebarPanel.prototype.get canvas):
1630         (WI.CanvasSidebarPanel.prototype.set canvas):
1631         (WI.CanvasSidebarPanel.prototype.set recording):
1632         (WI.CanvasSidebarPanel.prototype.set action):
1633         (WI.CanvasSidebarPanel.prototype.shown):
1634         (WI.CanvasSidebarPanel.prototype.hidden):
1635         (WI.CanvasSidebarPanel.prototype.hasCustomFilters):
1636         (WI.CanvasSidebarPanel.prototype.matchTreeElementAgainstCustomFilters):
1637         (WI.CanvasSidebarPanel.prototype.initialLayout):
1638         (WI.CanvasSidebarPanel.prototype._recordingAdded):
1639         (WI.CanvasSidebarPanel.prototype._recordingRemoved):
1640         (WI.CanvasSidebarPanel.prototype._scopeBarSelectionChanged):
1641         (WI.CanvasSidebarPanel.prototype._toggleRecording):
1642         (WI.CanvasSidebarPanel.prototype._currentRepresentedObjectsDidChange):
1643         (WI.CanvasSidebarPanel.prototype._treeOutlineSelectionDidChange):
1644         (WI.CanvasSidebarPanel.prototype._canvasChanged):
1645         (WI.CanvasSidebarPanel.prototype._recordingChanged):
1646         (WI.CanvasSidebarPanel.prototype._updateRecordNavigationItem):
1647         (WI.CanvasSidebarPanel.prototype._updateRecordingScopeBar):
1648         Add new navigation sidebar, split into two sections. The upper section
1649         contains a tree with a single element for the current canvas, and child
1650         elements for any shader programs. The maximum height of this section is 50%
1651         of the sidebar's height. The lower section contains a tree for the selected
1652         recording, and a scope bar for choosing between recordings.
1653
1654         * UserInterface/Views/CanvasTabContentView.css:
1655         (.content-view.tab.canvas .navigation-bar > .item .canvas-overview .icon):
1656         (.content-view.tab.canvas .navigation-bar > .item .canvas.canvas-2d .icon):
1657         (.content-view.tab.canvas .navigation-bar > .item .canvas.webgl .icon):
1658         (.content-view.tab.canvas .navigation-bar > .item .shader-program > .icon):
1659         (.content-view.tab.canvas .navigation-bar > .item > .hierarchical-path-component > .icon): Deleted.
1660         (.content-view.tab.canvas .navigation-bar > .item .canvas .icon): Deleted.
1661
1662         * UserInterface/Views/CanvasTabContentView.js:
1663         (WI.CanvasTabContentView):
1664         (WI.CanvasTabContentView.prototype.canShowRepresentedObject):
1665         (WI.CanvasTabContentView.prototype.attached):
1666         (WI.CanvasTabContentView.prototype._addCanvas):
1667         (WI.CanvasTabContentView.prototype._removeCanvas):
1668         (WI.CanvasTabContentView.prototype._canvasTreeOutlineSelectionDidChange):
1669         (WI.CanvasTabContentView.prototype._recordingAdded):
1670         (WI.CanvasTabContentView.prototype._handleSpace):
1671         (WI.CanvasTabContentView.prototype.showRepresentedObject): Deleted.
1672         (WI.CanvasTabContentView.prototype._navigationSidebarTreeOutlineSelectionChanged): Deleted.
1673         (WI.CanvasTabContentView.prototype._recordingActionIndexChanged): Deleted.
1674         (WI.CanvasTabContentView.prototype._updateActionIndex): Deleted.
1675         The canvas tab now maintains a tree outline of all canvases, with an
1676         "Overview" element as the root. The Overview element is always the first
1677         item of content browser's hierarchical path.
1678
1679         * UserInterface/Views/CanvasTreeElement.js:
1680         (WI.CanvasTreeElement.createRecordingTreeElement):
1681         (WI.CanvasTreeElement):
1682         (WI.CanvasTreeElement.prototype.onattach):
1683         (WI.CanvasTreeElement.prototype.onpopulate):
1684         (WI.CanvasTreeElement.prototype._updateStatus):
1685         (WI.CanvasTreeElement.prototype.ondetach): Deleted.
1686         Make it possible to not show recordings under the Canvas element.
1687         Create `isRecording` status element (spinner).
1688
1689         * UserInterface/Views/CollectionContentView.js:
1690         (WI.CollectionContentView.prototype.shown):
1691         (WI.CollectionContentView.prototype.hidden):
1692         Child ContentViews need to be updated when the collection's visibility changes.
1693
1694         * UserInterface/Views/ContentView.js:
1695         (WI.ContentView.isViewable):
1696
1697         * UserInterface/Views/ProgressView.css: Added.
1698         (.progress-view):
1699         (.progress-view > .titles):
1700         (.progress-view > .titles > .title):
1701         (.progress-view > .titles > .subtitle):
1702         (.progress-view > .titles > .subtitle::before):
1703         (.progress-view > .indeterminate-progress-spinner):
1704
1705         * UserInterface/Views/ProgressView.js: Added.
1706         (WI.ProgressView):
1707         (WI.ProgressView.prototype.get title):
1708         (WI.ProgressView.prototype.set title):
1709         (WI.ProgressView.prototype.get subtitle):
1710         (WI.ProgressView.prototype.set subtitle):
1711         (WI.ProgressView.prototype.get visible):
1712         (WI.ProgressView.prototype.set visible):
1713         (WI.ProgressView.prototype.initialLayout):
1714         (WI.ProgressView.prototype._updateTitles):
1715         New view class (not a ContentView) for showing a generic progress message,
1716         with a title, subtitle, and progress spinner.
1717
1718         * UserInterface/Views/RecordingContentView.css:
1719         (.content-view:not(.tab).recording > .preview-container):
1720         Remove unnecessary styles.
1721
1722         * UserInterface/Views/RecordingContentView.js:
1723         (WI.RecordingContentView):
1724         (WI.RecordingContentView.prototype.get navigationItems):
1725         (WI.RecordingContentView.prototype.get supplementalRepresentedObjects):
1726         (WI.RecordingContentView.prototype.updateActionIndex):
1727         (WI.RecordingContentView.prototype.get saveData):
1728         (WI.RecordingContentView.prototype._exportRecording):
1729         Relocate the recording export logic and UI.
1730         (WI.RecordingContentView.prototype.async._generateContentCanvas2D):
1731         (WI.RecordingContentView.prototype.async._generateContentCanvasWebGL):
1732         (WI.RecordingContentView.prototype._sliderChanged):
1733         Refactor logic for notifying the rest of the UI of changes to the action slider.
1734         The selected action is now exposed as a supplemental represented object, and a
1735         corresponding SupplementalRepresentedObjectsDidChange event.
1736
1737         * UserInterface/Views/RecordingStateDetailsSidebarPanel.js:
1738         (WI.RecordingStateDetailsSidebarPanel.prototype.inspect):
1739         (WI.RecordingStateDetailsSidebarPanel.prototype.set action):
1740         (WI.RecordingStateDetailsSidebarPanel.prototype._generateDetailsCanvas2D):
1741         (WI.RecordingStateDetailsSidebarPanel):
1742         (WI.RecordingStateDetailsSidebarPanel.prototype.updateAction): Deleted.
1743
1744         * UserInterface/Views/RecordingTraceDetailsSidebarPanel.js:
1745         (WI.RecordingTraceDetailsSidebarPanel.prototype.inspect):
1746         (WI.RecordingTraceDetailsSidebarPanel.prototype.set action):
1747         (WI.RecordingTraceDetailsSidebarPanel):
1748         (WI.RecordingTraceDetailsSidebarPanel.prototype.updateAction): Deleted.
1749         Now that the selected action is exposed to the UI as a supplemental
1750         represented object, details sidebars can be more decoupled from the
1751         canvas tab, and be notified of changes to the selection via `inspect()`.
1752
1753         * UserInterface/Views/ResourceIcons.css:
1754         (.canvas > .icon): Deleted.
1755         (.shader-program .icon): Deleted.
1756
1757 2018-02-08  Nikita Vasilyev  <nvasilyev@apple.com>
1758
1759         Web Inspector: Styles: Typing value and quickly moving focus away may display outdated value in UI
1760         https://bugs.webkit.org/show_bug.cgi?id=182588
1761         <rdar://problem/37332161>
1762
1763         Reviewed by Matt Baker.
1764
1765         CSSProperty models were updated with a 250ms delay. Quickly adding a blank property after modifying
1766         an existing property could result in outdated values being shown.
1767
1768         This patch removes the 250ms delay.
1769
1770         * UserInterface/Views/SpreadsheetStyleProperty.js:
1771         (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidChange):
1772
1773 2018-02-07  Matt Baker  <mattbaker@apple.com>
1774
1775         Web Inspector: replace isAncestor with Node.contains() in LegacyTabBar
1776         https://bugs.webkit.org/show_bug.cgi?id=182586
1777
1778         Reviewed by Timothy Hatcher.
1779
1780         * UserInterface/Views/LegacyTabBar.js:
1781
1782 2018-02-07  Nikita Vasilyev  <nvasilyev@apple.com>
1783
1784         Web Inspector: Styles: completion popover doesn't hide when switching panels
1785         https://bugs.webkit.org/show_bug.cgi?id=182464
1786         <rdar://problem/37202763>
1787
1788         Reviewed by Timothy Hatcher.
1789
1790         Hide completion popover by triggering blur event on the focused text field.
1791         Removing text fields from the DOM tree would hide the completion popovers as well,
1792         but switching sidebar panels doesn't remove them from the DOM.
1793
1794         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
1795         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.hidden):
1796         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
1797         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.hidden):
1798         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
1799         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.hidden):
1800         * UserInterface/Views/SpreadsheetStyleProperty.js:
1801         (WI.SpreadsheetStyleProperty.prototype.hidden):
1802
1803 2018-02-06  Devin Rousso  <webkit@devinrousso.com>
1804
1805         Web Inspector: Replace isAncestor and isDescendant with native DOM contains method
1806         https://bugs.webkit.org/show_bug.cgi?id=182069
1807
1808         Reviewed by Brian Burg.
1809
1810         * UserInterface/Base/Main.js:
1811         (WI.restoreFocusFromElement):
1812         (WI._mouseDown):
1813         (WI._focusedContentBrowser):
1814         (WI._focusedContentView):
1815         * UserInterface/Base/Utilities.js:
1816         (Node.prototype.traverseNextNode):
1817         (Node.prototype.isAncestor): Deleted.
1818         (Node.prototype.isDescendant): Deleted.
1819         (Node.prototype.isSelfOrAncestor): Deleted.
1820         (Node.prototype.isSelfOrDescendant): Deleted.
1821         * UserInterface/Views/BoxModelDetailsSectionRow.js:
1822         (WI.BoxModelDetailsSectionRow.prototype._handleKeyDown):
1823         * UserInterface/Views/CSSStyleDeclarationSection.js:
1824         (WI.CSSStyleDeclarationSection.prototype._handleSelectorPaste):
1825         * UserInterface/Views/DOMTreeOutline.js:
1826         (WI.DOMTreeOutline.prototype._onmouseout):
1827         * UserInterface/Views/DetailsSection.js:
1828         (WI.DetailsSection.prototype._headerElementClicked):
1829         * UserInterface/Views/EditingSupport.js:
1830         (WI.incrementElementValue):
1831         * UserInterface/Views/LogContentView.js:
1832         (WI.LogContentView.prototype._handleContextMenuEvent):
1833         * UserInterface/Views/ShaderProgramTreeElement.js:
1834         (WI.ShaderProgramTreeElement.prototype.selectOnMouseDown):
1835         * UserInterface/Views/SoftContextMenu.js:
1836         (WI.SoftContextMenu.prototype._menuItemMouseOut):
1837         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
1838         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.initialLayout):
1839         * UserInterface/Views/TabBar.js:
1840         (WI.TabBar.prototype.insertTabBarItem):
1841
1842 2018-02-06  Devin Rousso  <webkit@devinrousso.com>
1843
1844         Web Inspector: Elements tab should have "Jump to Layer" functionality
1845         https://bugs.webkit.org/show_bug.cgi?id=181800
1846
1847         Reviewed by Joseph Pecoraro.
1848
1849         * Localizations/en.lproj/localizedStrings.js:
1850
1851         * UserInterface/Base/Main.js:
1852         (WI.isShowingElementsTab):
1853         (WI.showLayersTab):
1854         (WI.isShowingLayersTab):
1855
1856         * UserInterface/Views/ContextMenuUtilities.js:
1857         (WI.appendContextMenuItemsForDOMNode):
1858
1859         * UserInterface/Views/LayersTabContentView.js:
1860         (WI.LayersTabContentView.prototype.selectLayerForNode):
1861
1862         * UserInterface/Views/Layers3DContentView.js:
1863         (WI.Layers3DContentView):
1864         (WI.Layers3DContentView.prototype.selectLayerForNode):
1865         (WI.Layers3DContentView.prototype.layout):
1866
1867         * UserInterface/Views/LayerDetailsSidebarPanel.js:
1868         (WI.LayerDetailsSidebarPanel):
1869         (WI.LayerDetailsSidebarPanel.prototype.selectNodeByLayerId):
1870         (WI.LayerDetailsSidebarPanel.prototype._updateDataGrid):
1871
1872 2018-02-06  Nikita Vasilyev  <nvasilyev@apple.com>
1873
1874         Web Inspector: Rename String.prototype.trimEnd to avoid conflicts with native trimEnd
1875         https://bugs.webkit.org/show_bug.cgi?id=182545
1876
1877         Reviewed by Brian Burg.
1878
1879         Rename:
1880         - trimEnd to truncateEnd
1881         - trimMiddle to truncateMiddle
1882
1883         * UserInterface/Base/Utilities.js:
1884         (String.prototype.trimMiddle): Deleted.
1885         (String.prototype.trimEnd): Deleted.
1886         (String.prototype.truncateMiddle): Added.
1887         (String.prototype.truncateEnd): Added.
1888         Use strict mode. Scrict mode allows `this` to be a primitive (a string, in our case).
1889         In non-strict mode, `this` is always an object. Without the strict mode,
1890         "a".truncateEnd(42) !== "a", because truncateEnd returns a string object.
1891
1892         * UserInterface/Views/DOMTreeElement.js:
1893         (WI.DOMTreeElement.prototype._buildAttributeDOM):
1894         * UserInterface/Views/DOMTreeElementPathComponent.js:
1895         (WI.DOMTreeElementPathComponent):
1896         * UserInterface/Views/SearchResultTreeElement.js:
1897         Remove an obvious comment.
1898
1899         (WI.SearchResultTreeElement.truncateAndHighlightTitle):
1900         * UserInterface/Views/SpreadsheetStyleProperty.js:
1901         (WI.SpreadsheetStyleProperty.prototype._renderValue):
1902
1903 2018-02-05  Nikita Vasilyev  <nvasilyev@apple.com>
1904
1905         Web Inspector: Add an experimental setting to enable Sources tab
1906         https://bugs.webkit.org/show_bug.cgi?id=182461
1907
1908         Reviewed by Brian Burg.
1909
1910         This patch only adds a setting. It doesn't add the Sources tab.
1911
1912         * Localizations/en.lproj/localizedStrings.js:
1913         * UserInterface/Base/Setting.js:
1914         * UserInterface/Views/SettingsTabContentView.js:
1915
1916 2018-02-02  Devin Rousso  <webkit@devinrousso.com>
1917
1918         Web Inspector: Styles Redesign: Pasting multiple properties should create properties instead of a bad property
1919         https://bugs.webkit.org/show_bug.cgi?id=179622
1920         <rdar://problem/35511170>
1921
1922         Reviewed by Matt Baker.
1923
1924         * UserInterface/Views/SpreadsheetStyleProperty.js:
1925         (WI.SpreadsheetStyleProperty.prototype._remove):
1926         (WI.SpreadsheetStyleProperty.prototype._update):
1927         (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidCommit):
1928         (WI.SpreadsheetStyleProperty.prototype._handleNamePaste):
1929         When the user pastes into the name field, parse the text for a list of name-value pairs and
1930         replace the property being edited with the text of those pairs.
1931
1932         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
1933         (WI.SpreadsheetCSSStyleDeclarationEditor):
1934         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
1935         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.addBlankProperty):
1936         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyFocusMoved):
1937         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyAddBlankPropertySoon):
1938         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyRemoved):
1939         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._propertiesChanged):
1940         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetCSSStyleDeclarationEditorFocusMoved): Deleted.
1941         Calling `addBlankProperty` will trigger a layout on the next frame, but that might be before
1942         the CSSAgent has had a chance to finish refreshing, so we need a way to defer the creation
1943         of a new property until after we have finished the next layout (which is after the refresh).
1944         Drive-by: fix naming of some delegate functions.
1945
1946         * UserInterface/Models/CSSProperty.js:
1947         (WI.CSSProperty.prototype.replaceWithText):
1948         Provide a way for replacing the property with new text.
1949
1950 2018-02-02  Matt Baker  <mattbaker@apple.com>
1951
1952         Web Inspector: TabBar redesign: remove New Tab button and add experimental feature flag
1953         https://bugs.webkit.org/show_bug.cgi?id=182342
1954         <rdar://problem/37078662>
1955
1956         Reviewed by Devin Rousso.
1957
1958         This patch adds a new experimental setting group, "User Interface", with
1959         a single setting, "Enable New TabBar". When enabled, the New Tab button is
1960         no longer available in the top-level TabBar. The 'open tabs' context menu
1961         no longer allows the last non-ephemeral open tab to be closed (unchecked).
1962
1963         * Localizations/en.lproj/localizedStrings.js:
1964
1965         * UserInterface/Base/Main.js:
1966         (WI.contentLoaded):
1967         (WI._tryToRestorePendingTabs):
1968         Retain legacy behavior behind experimental feature setting.
1969         (WI.isNewTabWithTypeAllowed):
1970
1971         * UserInterface/Base/Setting.js:
1972         * UserInterface/Main.html:
1973
1974         * UserInterface/Views/CanvasTabContentView.js:
1975         (WI.CanvasTabContentView):
1976         * UserInterface/Views/ConsoleTabContentView.js:
1977         (WI.ConsoleTabContentView):
1978         * UserInterface/Views/DebuggerTabContentView.js:
1979         (WI.DebuggerTabContentView):
1980         * UserInterface/Views/ElementsTabContentView.js:
1981         (WI.ElementsTabContentView):
1982
1983         * UserInterface/Views/GeneralTabBarItem.js:
1984         (WI.GeneralTabBarItem):
1985         (WI.GeneralTabBarItem.prototype.fromTabInfo):
1986         (WI.GeneralTabBarItem.prototype.get isEphemeral):
1987         (WI.GeneralTabBarItem.fromTabContentViewConstructor): Deleted.
1988
1989         * UserInterface/Views/LayersTabContentView.js:
1990         (WI.LayersTabContentView):
1991
1992         * UserInterface/Views/LegacyTabBar.js: Copied from Source/WebInspectorUI/UserInterface/Views/TabBar.js.
1993         (WI.LegacyTabBar):
1994         (WI.LegacyTabBar.prototype.get newTabTabBarItem):
1995         (WI.LegacyTabBar.prototype.updateNewTabTabBarItemState):
1996         (WI.LegacyTabBar.prototype.addTabBarItem):
1997         (WI.LegacyTabBar.prototype.insertTabBarItem.animateTabs):
1998         (WI.LegacyTabBar.prototype.insertTabBarItem.removeStyles):
1999         (WI.LegacyTabBar.prototype.insertTabBarItem):
2000         (WI.LegacyTabBar.prototype.removeTabBarItem.animateTabs):
2001         (WI.LegacyTabBar.prototype.removeTabBarItem.removeStyles):
2002         (WI.LegacyTabBar.prototype.removeTabBarItem):
2003         (WI.LegacyTabBar.prototype.selectPreviousTab):
2004         (WI.LegacyTabBar.prototype.selectNextTab):
2005         (WI.LegacyTabBar.prototype.get selectedTabBarItem):
2006         (WI.LegacyTabBar.prototype.set selectedTabBarItem):
2007         (WI.LegacyTabBar.prototype.get tabBarItems):
2008         (WI.LegacyTabBar.prototype.get normalTabCount):
2009         (WI.LegacyTabBar.prototype.layout.forceItemHidden):
2010         (WI.LegacyTabBar.prototype.layout):
2011         (WI.LegacyTabBar.prototype._tabBarItemsFromLeftToRight):
2012         (WI.LegacyTabBar.prototype._findTabBarItem):
2013         (WI.LegacyTabBar.prototype._hasMoreThanOneNormalTab):
2014         (WI.LegacyTabBar.prototype._openDefaultTab):
2015         (WI.LegacyTabBar.prototype._recordTabBarItemSizesAndPositions):
2016         (WI.LegacyTabBar.prototype._applyTabBarItemSizesAndPositions):
2017         (WI.LegacyTabBar.prototype._clearTabBarItemSizesAndPositions):
2018         (WI.LegacyTabBar.prototype._finishExpandingTabsAfterClose.):
2019         (WI.LegacyTabBar.prototype._finishExpandingTabsAfterClose):
2020         (WI.LegacyTabBar.prototype._handleMouseDown):
2021         (WI.LegacyTabBar.prototype._handleClick):
2022         (WI.LegacyTabBar.prototype._handleMouseMoved):
2023         (WI.LegacyTabBar.prototype._handleMouseUp):
2024         (WI.LegacyTabBar.prototype._handleMouseLeave):
2025         (WI.LegacyTabBar.prototype._handleContextMenu):
2026         (WI.LegacyTabBar.prototype._handleNewTabClick):
2027         (WI.LegacyTabBar.prototype._handleTabPickerTabContextMenu):
2028         (WI.LegacyTabBar.prototype._handleNewTabMouseEnter):
2029
2030         * UserInterface/Views/NetworkTabContentView.js:
2031         (WI.NetworkTabContentView):
2032         * UserInterface/Views/NewTabContentView.js:
2033         (WI.NewTabContentView):
2034         (WI.NewTabContentView.tabInfo):
2035         (WI.NewTabContentView.isEphemeral): Deleted.
2036         * UserInterface/Views/ResourcesTabContentView.js:
2037         (WI.ResourcesTabContentView):
2038         * UserInterface/Views/SearchTabContentView.js:
2039         (WI.SearchTabContentView):
2040         (WI.SearchTabContentView.tabInfo):
2041         (WI.SearchTabContentView.isEphemeral): Deleted.
2042
2043         * UserInterface/Views/SettingsTabContentView.js:
2044         (WI.SettingsTabContentView.tabInfo):
2045         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
2046         (WI.SettingsTabContentView.isEphemeral): Deleted.
2047
2048         * UserInterface/Views/StorageTabContentView.js:
2049         (WI.StorageTabContentView):
2050
2051         * UserInterface/Views/TabBar.css:
2052         * UserInterface/Views/TabBar.js:
2053         (WI.TabBar):
2054         (WI.TabBar.prototype.insertTabBarItem):
2055         (WI.TabBar.prototype.removeTabBarItem):
2056         (WI.TabBar.prototype.set selectedTabBarItem):
2057         (WI.TabBar.prototype.get normalNonEphemeralTabCount):
2058         (WI.TabBar.prototype._handleMouseDown):
2059         (WI.TabBar.prototype._handleClick):
2060         (WI.TabBar.prototype._handleMouseMoved):
2061         (WI.TabBar.prototype._handleMouseLeave):
2062         (WI.TabBar.prototype._handleContextMenu):
2063         (WI.TabBar.prototype._handleTabPickerTabContextMenu):
2064         (WI.TabBar.prototype.get newTabTabBarItem): Deleted.
2065         (WI.TabBar.prototype.updateNewTabTabBarItemState): Deleted.
2066         (WI.TabBar.prototype._openDefaultTab): Deleted.
2067         (WI.TabBar.prototype._handleNewTabClick): Deleted.
2068         (WI.TabBar.prototype._handleNewTabMouseEnter): Deleted.
2069         Remove support for the New Tab button and default tab. Without a default
2070         tab, there is nothing to display when no tabs are open, so prevent the
2071         last non-pinned tab from being removed.
2072
2073         * UserInterface/Views/TabBrowser.js:
2074         (WI.TabBrowser._tabBarItemRemoved):
2075         * UserInterface/Views/TabContentView.js:
2076         (WI.TabContentView.isEphemeral): Deleted.
2077         * UserInterface/Views/TimelineTabContentView.js:
2078         (WI.TimelineTabContentView):
2079
2080 2018-01-30  Devin Rousso  <webkit@devinrousso.com>
2081
2082         Web Inspector: Replace Object.shallowMerge with ES2018 spread operator
2083         https://bugs.webkit.org/show_bug.cgi?id=182219
2084
2085         Reviewed by Brian Burg.
2086
2087         * UserInterface/Base/Utilities.js:
2088         (Object.shallowMerge): Deleted.
2089         * UserInterface/Base/DOMUtilities.js:
2090         (WI.linkifyNodeReference):
2091         * UserInterface/Base/Main.js:
2092         (WI.handlePossibleLinkClick):
2093         (WI.openURL):
2094         (WI.showSourceCodeLocation):
2095         (WI.showOriginalUnformattedSourceCodeLocation):
2096         (WI.showOriginalOrFormattedSourceCodeLocation):
2097         (WI.showOriginalOrFormattedSourceCodeTextRange):
2098         (WI.linkifyLocation):
2099         * UserInterface/Views/DOMTreeElement.js:
2100         (WI.DOMTreeElement.prototype._insertAdjacentHTML):
2101         * UserInterface/Views/WebSocketContentView.js:
2102         (WI.WebSocketContentView.prototype._addRow):
2103
2104 2018-01-26  Matt Baker  <mattbaker@apple.com>
2105
2106         Web Inspector: Timelines content browser NavigationBar is squashed at narrow heights
2107         https://bugs.webkit.org/show_bug.cgi?id=182196
2108         <rdar://problem/36929899>
2109
2110         Reviewed by Joseph Pecoraro.
2111
2112         * UserInterface/Views/NavigationBar.css:
2113         (.navigation-bar):
2114
2115 2018-01-26  Matt Baker  <mattbaker@apple.com>
2116
2117         Web Inspector: TabBar redesign: improvements to tab layout and resize behavior
2118         https://bugs.webkit.org/show_bug.cgi?id=181468
2119         <rdar://problem/36395439>
2120
2121         Reviewed by Devin Rousso.
2122
2123         * Localizations/en.lproj/localizedStrings.js:
2124
2125         * UserInterface/Images/TabPicker.svg: Added.
2126         New ">>" icon for the tab picker button.
2127
2128         * UserInterface/Views/CanvasTabContentView.js:
2129         (WI.CanvasTabContentView):
2130         * UserInterface/Views/ConsoleTabContentView.js:
2131         (WI.ConsoleTabContentView):
2132         * UserInterface/Views/DebuggerTabContentView.js:
2133         (WI.DebuggerTabContentView):
2134         * UserInterface/Views/ElementsTabContentView.js:
2135         (WI.ElementsTabContentView):
2136
2137         * UserInterface/Views/GeneralTabBarItem.js:
2138         (WI.GeneralTabBarItem):
2139         (WI.GeneralTabBarItem.fromTabContentViewConstructor):
2140         (WI.GeneralTabBarItem.prototype.get title):
2141         Add missing override for getter/setter pair.
2142         (WI.GeneralTabBarItem.prototype.set title):
2143         (WI.GeneralTabBarItem.prototype._handleContextMenuEvent):
2144         Show the close button on ephemeral tabs only (Search, New Tab).
2145         Replace unused `representedObject` parameter with `isEphemeral`, which
2146         determines whether to show a close button for the tab.
2147
2148         * UserInterface/Views/LayersTabContentView.js:
2149         (WI.LayersTabContentView):
2150
2151         * UserInterface/Views/NavigationBar.js:
2152         Remove unused symbol.
2153
2154         * UserInterface/Views/NetworkTabContentView.js:
2155         (WI.NetworkTabContentView):
2156         * UserInterface/Views/NewTabContentView.js:
2157         (WI.NewTabContentView):
2158
2159         * UserInterface/Views/PinnedTabBarItem.js:
2160         (WI.PinnedTabBarItem):
2161         Remove unused parameter.
2162
2163         * UserInterface/Views/ResourcesTabContentView.js:
2164         (WI.ResourcesTabContentView):
2165         * UserInterface/Views/SearchTabContentView.js:
2166         (WI.SearchTabContentView):
2167         * UserInterface/Views/StorageTabContentView.js:
2168         (WI.StorageTabContentView):
2169
2170         * UserInterface/Views/TabBar.css:
2171         (.tab-bar > .item):
2172         (.tab-bar.calculate-width > .item):
2173         (.tab-bar > .item.pinned.tab-picker):
2174         (.tab-bar > .item > .close):
2175         (.tab-bar > .item > .title):
2176         (.tab-bar:not(.collapsed) > .item > .title):
2177         (.tab-bar.collapsed > .item:not(.pinned) > .icon):
2178         (.tab-bar > .item:hover > .close):
2179         (.tab-bar.collapsed > .item:hover > .close):
2180         (.tab-bar:not(.collapsed) > .item.ephemeral:hover > .icon):
2181         (.tab-bar.collapsed > .item.ephemeral:hover > .title):
2182         (body[dir=ltr] .tab-bar > .item > .close): Deleted.
2183         (body[dir=rtl] .tab-bar > .item > .close): Deleted.
2184         (.tab-bar > .item > .flex-space): Deleted.
2185         (.tab-bar > .item:not(.pinned) > .flex-space:last-child): Deleted.
2186         (body[dir=ltr] .tab-bar > .item:not(.pinned) > .flex-space:last-child): Deleted.
2187         (body[dir=rtl] .tab-bar > .item:not(.pinned) > .flex-space:last-child): Deleted.
2188         (body[dir=ltr] .tab-bar > .item > .title): Deleted.
2189         (body[dir=rtl] .tab-bar > .item > .title): Deleted.
2190         (.tab-bar.collapsed > .item): Deleted.
2191         (.tab-bar.collapsed > .item > .flex-space): Deleted.
2192         (.tab-bar.collapsed > .item > .close): Deleted.
2193         (body[dir=ltr] .tab-bar.collapsed > .item > .close): Deleted.
2194         (body[dir=rtl] .tab-bar.collapsed > .item > .close): Deleted.
2195         (.tab-bar.hide-titles > .item > .title): Deleted.
2196         (.tab-bar.collapsed:not(.hide-titles) > .item:not(.pinned):hover > .icon,): Deleted.
2197         (.tab-bar.collapsed:not(.hide-titles) > .item:hover > .close,): Deleted.
2198         Clean up tab styles and prevent tabs from shrinking during flex layout.
2199         Added new `calculate-width` class, to disable flex layout when measuring
2200         the minimum width of the TabBar required to fit all tab items.
2201
2202         * UserInterface/Views/TabBar.js:
2203         (WI.TabBar):
2204         (WI.TabBar.prototype.set selectedTabBarItem):
2205         (WI.TabBar.prototype.layout.forceItemHidden):
2206         (WI.TabBar.prototype.layout):
2207         Perform two layout passes, similar to NavigationBar. The first pass disables
2208         flex layout and measures tab items at full size. If the bar isn't wide enough
2209         to show all the tabs, hide their icons and measure again. If there still isn't
2210         room, hide tabs starting from the end of the bar and display the tab picker.
2211
2212         (WI.TabBar.prototype._handleMouseDown):
2213         (WI.TabBar.prototype._handleTabPickerTabContextMenu):
2214
2215         * UserInterface/Views/TabBarItem.js:
2216         (WI.TabBarItem):
2217
2218         * UserInterface/Views/TimelineTabContentView.js:
2219         (WI.TimelineTabContentView):
2220
2221 2018-01-25  Joseph Pecoraro  <pecoraro@apple.com>
2222
2223         Web Inspector: Network Table: Sort indicator is not displayed when sorted column is hidden and re-shown
2224         https://bugs.webkit.org/show_bug.cgi?id=182164
2225         <rdar://problem/36892619>
2226
2227         Reviewed by Brian Burg.
2228
2229         * UserInterface/Views/Table.js:
2230         (WI.Table.prototype.showColumn):
2231         Re-add the sort classes if the column being shown is the active sort column.
2232
2233 2018-01-25  Joseph Pecoraro  <pecoraro@apple.com>
2234
2235         Web Inspector: Network - Cookies view should behave better at narrow widths, all data is hidden
2236         https://bugs.webkit.org/show_bug.cgi?id=182163
2237         <rdar://problem/36893241>
2238
2239         Reviewed by Brian Burg.
2240
2241         * UserInterface/Views/ResourceCookiesContentView.css:
2242         (.resource-cookies .table):
2243         Give these tables a reasonable minimum size so that if the inspector
2244         is narrow, the content view can still be scrolled to see all of
2245         the table data.
2246
2247         * UserInterface/Views/Table.css:
2248         (.table > .header):
2249         Match the data-container and mark overflow as hidden, otherwise
2250         super narrow widths show header content beyond the edge.
2251
2252 2018-01-25  Joseph Pecoraro  <pecoraro@apple.com>
2253
2254         Web Inspector: "Displayed Columns" should not be displayed in context menu if all columns are required columns
2255         https://bugs.webkit.org/show_bug.cgi?id=182162
2256         <rdar://problem/36893758>
2257
2258         Reviewed by Matt Baker.
2259
2260         * UserInterface/Views/Table.js:
2261         (WI.Table.prototype._handleHeaderContextMenu):
2262         Only add the header column when we know there are hideable columns.
2263
2264 2018-01-24  Joseph Pecoraro  <pecoraro@apple.com>
2265
2266         Web Inspector: Simplify update-LegacyInspectorBackendCommands.rb
2267         https://bugs.webkit.org/show_bug.cgi?id=182067
2268
2269         Reviewed by Brian Burg.
2270
2271         * Scripts/update-LegacyInspectorBackendCommands.rb:
2272         Remove stale dependency_json, it has always been empty for a while now.
2273         Switch to framework WebInspectorUI to generate only the backend commands
2274         and not spend time generating a bunch of cpp files.
2275
2276 2018-01-24  Nikita Vasilyev  <nvasilyev@apple.com>
2277
2278         REGRESSION (r226994): Web Inspector: Styles: Suggestions popover floats in top-left corner of Web Inspector after tabbing
2279         https://bugs.webkit.org/show_bug.cgi?id=182027
2280
2281         Reviewed by Matt Baker.
2282
2283         r226994 added a layout of all properties on property removal. Layout caused
2284         a property element to be removed from DOM right before dislaying the suggestion
2285         popover, resulting in the popover being displayed at the top left corner.
2286
2287         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
2288         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
2289         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyRemoved):
2290         Only update property view indices when a property is removed.
2291
2292         * UserInterface/Views/SpreadsheetStyleProperty.js:
2293         (WI.SpreadsheetStyleProperty):
2294         (WI.SpreadsheetStyleProperty.prototype.set index):
2295
2296         * UserInterface/Views/SpreadsheetTextField.js:
2297         (WI.SpreadsheetTextField.prototype._updateCompletions):
2298         Checking this._element.parentNode to see if the element is attached to the DOM tree is unreliable,
2299         since the element may have a non-null parent node that is detached from the DOM tree. To fix that,
2300         we could traverse element's ancestors, but I used a concise isConnected property instead.
2301
2302 2018-01-24  Joseph Pecoraro  <pecoraro@apple.com>
2303
2304         ReferenceError:​ Can't find variable:​ DOMAgent (at ScriptSyntaxTree.js:​178:​22)​
2305         https://bugs.webkit.org/show_bug.cgi?id=182059
2306
2307         Reviewed by Matt Baker.
2308
2309         * UserInterface/Models/ScriptSyntaxTree.js:
2310         (WI.ScriptSyntaxTree.functionReturnDivot):
2311         DOMAgent won't be available in a ServiceWorker or JSContext inspector. So add
2312         a check for DOMAgent, and assume if DOMAgent doesn't exist that we should fall
2313         back to the latest path (non-iOS 9) target.
2314
2315 2018-01-23  Joseph Pecoraro  <pecoraro@apple.com>
2316
2317         Web Inspector: Network's columns shake when scrolling at non-default zoom level
2318         https://bugs.webkit.org/show_bug.cgi?id=181998
2319         <rdar://problem/36449808>
2320
2321         Reviewed by Matt Baker.
2322
2323         * UserInterface/Views/Table.js:
2324         When zoomed the bounding client rect values were fractional, which was
2325         unexpected by this area of code. Floor the values to get a value we expect
2326         to be able to evenly distribute.
2327
2328 2018-01-22  Nikita Vasilyev  <nvasilyev@apple.com>
2329
2330         Web Inspector: Styles Redesign: data corruption when updating values quickly
2331         https://bugs.webkit.org/show_bug.cgi?id=179461
2332         <rdar://problem/35431882>
2333
2334         Reviewed by Joseph Pecoraro.
2335
2336         Data corruption used to happen because CSSStyleDeclaration.prototype.text didn't
2337         update synchronously. Making two or more quick changes resulted in corrupted data.
2338
2339         Imagine we modify a CSS value 3 times:
2340
2341         Front-end:  (1)-(2)---(3)
2342         Back-end:          (1)-----(2)-(3)
2343
2344         The first response from the backend could happen after the 2nd edit. In this patch,
2345         CSSStyleDeclaration is locked when its view is being edited.
2346
2347         To correctly display invalid and overridden properties, the backend is allowed to update
2348         CSSStyleDeclaration and CSSProperty when they're locked if the text from the backend
2349         matches the model's text. This should happen when the backend is caught up with the
2350         front-end changes.
2351
2352         * UserInterface/Models/CSSProperty.js:
2353         (WI.CSSProperty.prototype.update):
2354         * UserInterface/Models/CSSStyleDeclaration.js:
2355         (WI.CSSStyleDeclaration):
2356         (WI.CSSStyleDeclaration.prototype.get locked):
2357         (WI.CSSStyleDeclaration.prototype.set locked):
2358         (WI.CSSStyleDeclaration.prototype.set text):
2359
2360         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
2361         (WI.SpreadsheetCSSStyleDeclarationEditor):
2362         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.initialLayout):
2363         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.detached):
2364         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.get editing):
2365         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.set focused):
2366         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.set inlineSwatchActive):
2367         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.stylePropertyInlineSwatchActivated):
2368         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.stylePropertyInlineSwatchDeactivated):
2369         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._propertiesChanged):
2370         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._updateStyleLock):
2371         Lock CSSStyleDeclaration when a CSS property name or value is focused or
2372         an inline widget is active.
2373
2374         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
2375         (WI.SpreadsheetCSSStyleDeclarationSection):
2376         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleMouseDown):
2377         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleClick):
2378         * UserInterface/Views/SpreadsheetStyleProperty.js:
2379         (WI.SpreadsheetStyleProperty):
2380         (WI.SpreadsheetStyleProperty.prototype._createInlineSwatch):
2381         When selector is focused, clicking on the white-space should not add a new blank property.
2382
2383 2018-01-19  Ross Kirsling  <ross.kirsling@sony.com>
2384
2385         Web Inspector: Layers tab should do away with popovers (if possible)
2386         https://bugs.webkit.org/show_bug.cgi?id=181805
2387
2388         Reviewed by Matt Baker.
2389
2390         * Localizations/en.lproj/localizedStrings.js:
2391         Remove superfluous colon from a string.
2392
2393         * UserInterface/Main.html:
2394         * UserInterface/Views/LayerDetailsSidebarPanel.css:
2395         * UserInterface/Views/Layers3DContentView.css: Added.
2396         Remove popover styling from sidebar, add new file with similar styling for canvas overlay.
2397
2398         * UserInterface/Views/LayerDetailsSidebarPanel.js:
2399         (WI.LayerDetailsSidebarPanel):
2400         (WI.LayerDetailsSidebarPanel.prototype.selectNodeByLayerId):
2401         (WI.LayerDetailsSidebarPanel.prototype._dataGridSelectedNodeChanged):
2402         (WI.LayerDetailsSidebarPanel.prototype._updateLayers):
2403         (WI.LayerDetailsSidebarPanel.prototype._updateBottomBar):
2404         (WI.LayerDetailsSidebarPanel.prototype.willDismissPopover): Deleted.
2405         (WI.LayerDetailsSidebarPanel.prototype._showPopoverForSelectedNode): Deleted.
2406         (WI.LayerDetailsSidebarPanel.prototype._presentPopover): Deleted.
2407         (WI.LayerDetailsSidebarPanel.prototype._contentForPopover): Deleted.
2408         (WI.LayerDetailsSidebarPanel.prototype._populateListOfCompositingReasons.addReason): Deleted.
2409         (WI.LayerDetailsSidebarPanel.prototype._populateListOfCompositingReasons): Deleted.
2410         * UserInterface/Views/Layers3DContentView.js:
2411         (WI.Layers3DContentView):
2412         (WI.Layers3DContentView.prototype.shown):
2413         (WI.Layers3DContentView.prototype.selectLayerById):
2414         (WI.Layers3DContentView.prototype._canvasMouseDown):
2415         (WI.Layers3DContentView.prototype._buildLayerInfoElement):
2416         (WI.Layers3DContentView.prototype._updateLayerInfoElement):
2417         (WI.Layers3DContentView.prototype._updateReasonsList):
2418         Remove popover from sidebar table, overlay div with same data arrangement on top of the canvas.
2419         Also reverse the fix from r226671 since the visualization is no longer unusable without the sidebar!
2420
2421 2018-01-19  Matt Baker  <mattbaker@apple.com>
2422
2423         Web Inspector: Canvas Tab: Multiple "waiting for frames" messages displayed
2424         https://bugs.webkit.org/show_bug.cgi?id=181865
2425         <rdar://problem/36664737>
2426
2427         Reviewed by Devin Rousso.
2428
2429         * UserInterface/Views/CanvasContentView.js:
2430         (WI.CanvasContentView.prototype._recordingStarted):
2431         (WI.CanvasContentView.prototype._recordingStopped):
2432
2433 2018-01-19  Nikita Vasilyev  <nvasilyev@apple.com>
2434
2435         Web Inspector: Styles Redesign: tabbing on commented out property throws exception
2436         https://bugs.webkit.org/show_bug.cgi?id=180676
2437         <rdar://problem/35981058>
2438
2439         Reviewed by Joseph Pecoraro.
2440
2441         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
2442         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.startEditingFirstProperty):
2443         Tabbing from the selector field should focus on the first editable property.
2444         When no editable properties are present, a new blank property should be added after the commented out ones.
2445
2446         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.startEditingLastProperty):
2447         Shift-tabbing from the selector field should focus on the last editable property of the previous CSS rule.
2448         When no editable properties are present, a new blank property should be added after the commented out ones.
2449
2450         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetCSSStyleDeclarationEditorFocusMoved):
2451         When navigating between properties skip the commented out ones.
2452
2453         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._editablePropertyAfter):
2454         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._editablePropertyBefore):
2455         * UserInterface/Views/SpreadsheetStyleProperty.js:
2456         (WI.SpreadsheetStyleProperty.prototype.get enabled):
2457         (WI.SpreadsheetStyleProperty.prototype._update):
2458
2459 2018-01-19  Nikita Vasilyev  <nvasilyev@apple.com>
2460
2461         Web Inspector: Make styles sidebar always LTR
2462         https://bugs.webkit.org/show_bug.cgi?id=175357
2463         <rdar://problem/33787988>
2464
2465         Reviewed by Joseph Pecoraro.
2466
2467         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
2468         (WI.SpreadsheetRulesStyleDetailsPanel):
2469
2470 2018-01-19  Keith Miller  <keith_miller@apple.com>
2471
2472         HaveInternalSDK includes should be "#include?"
2473         https://bugs.webkit.org/show_bug.cgi?id=179670
2474
2475         Reviewed by Dan Bernstein.
2476
2477         * Configurations/Base.xcconfig:
2478
2479 2018-01-18  Dan Bernstein  <mitz@apple.com>
2480
2481         [Xcode] Streamline and future-proof target-macOS-version-dependent build setting definitions
2482         https://bugs.webkit.org/show_bug.cgi?id=181803
2483
2484         Reviewed by Tim Horton.
2485
2486         * Configurations/Base.xcconfig: Updated.
2487         * Configurations/DebugRelease.xcconfig: Ditto.
2488         * Configurations/Version.xcconfig: Ditto.
2489
2490 2018-01-18  Devin Rousso  <webkit@devinrousso.com>
2491
2492         Web Inspector: Canvas Tab: record button on canvas card doesn't always show on hover, or is misplaced
2493         https://bugs.webkit.org/show_bug.cgi?id=179183
2494
2495         Reviewed by Joseph Pecoraro.
2496
2497         * UserInterface/Views/CanvasOverviewContentView.css:
2498         (.content-view.canvas-overview .content-view.canvas:not(.is-recording) > header > .navigation-bar > .item.record-start-stop): Deleted.
2499
2500 2018-01-17  Devin Rousso  <webkit@devinrousso.com>
2501
2502         Web Inspector: clicking on a path component that has no siblings should select it
2503         https://bugs.webkit.org/show_bug.cgi?id=181772
2504
2505         Reviewed by Joseph Pecoraro.
2506
2507         * UserInterface/Views/HierarchicalPathComponent.js:
2508         (WI.HierarchicalPathComponent.prototype._updateSelectElement):
2509         (WI.HierarchicalPathComponent.prototype._selectElementMouseDown):
2510
2511 2018-01-17  Joseph Pecoraro  <pecoraro@apple.com>
2512
2513         Web Inspector: Add back localized strings for Styles sidebar panels
2514         https://bugs.webkit.org/show_bug.cgi?id=181748
2515         <rdar://problem/36583184>
2516
2517         Reviewed by Brian Burg.
2518
2519         * Localizations/en.lproj/localizedStrings.js:
2520         * UserInterface/Views/ComputedStyleDetailsSidebarPanel.js:
2521         (WI.ComputedStyleDetailsSidebarPanel):
2522         * UserInterface/Views/RulesStyleDetailsSidebarPanel.js:
2523         (WI.RulesStyleDetailsSidebarPanel):
2524         * UserInterface/Views/VisualStyleDetailsSidebarPanel.js:
2525         (WI.VisualStyleDetailsSidebarPanel):
2526         Add back localized strings for panel titles lost in r225547.
2527
2528 2018-01-17  Joseph Pecoraro  <pecoraro@apple.com>
2529
2530         Web Inspector: Super long URL string causes bad wrapping in Resources detail sidebar
2531         https://bugs.webkit.org/show_bug.cgi?id=181617
2532
2533         Reviewed by Brian Burg.
2534
2535         * UserInterface/Views/DetailsSection.css:
2536         (.details-section > .content > .group > .row.simple > .value):
2537         Set the break to all characters.
2538
2539 2018-01-16  Matt Baker  <mattbaker@apple.com>
2540
2541         Web Inspector: Canvas tab: typing a "space" in the QuickConsole shouldn't trigger a recording
2542         https://bugs.webkit.org/show_bug.cgi?id=181706
2543         <rdar://problem/36558221>
2544
2545         Reviewed by Joseph Pecoraro.
2546
2547         * UserInterface/Views/CanvasOverviewContentView.js:
2548         (WI.CanvasOverviewContentView):
2549         (WI.CanvasOverviewContentView.prototype._handleSpace):
2550
2551 2018-01-16  Joseph Pecoraro  <pecoraro@apple.com>
2552
2553         Web Inspector: Make Console's Execution Context picker stand out when it is non-default
2554         https://bugs.webkit.org/show_bug.cgi?id=181628
2555         <rdar://problem/36492044>
2556
2557         Reviewed by Matt Baker.
2558
2559         * UserInterface/Views/HierarchicalPathComponent.css:
2560         (.hierarchical-path-component > .selector-arrows):
2561         * UserInterface/Views/HierarchicalPathComponent.js:
2562         (WI.HierarchicalPathComponent.prototype.set selectorArrows):
2563         Switch to SVG element so we can style the arrows.
2564
2565         * UserInterface/Views/QuickConsole.css:
2566         (.quick-console > .navigation-bar > .hierarchical-path .execution-context):
2567         (.quick-console > .navigation-bar > .hierarchical-path .execution-context .separator):
2568         (.quick-console > .navigation-bar > .hierarchical-path.non-default-execution-context .execution-context):
2569         (.quick-console > .navigation-bar > .hierarchical-path.non-default-execution-context .execution-context .selector-arrows):
2570         Styles for the execution context picker. We hide the unused separator
2571         and instead use margin so that the selected background and border don't
2572         have an extra 7px on the right/end side.
2573
2574         * UserInterface/Views/QuickConsole.js:
2575         (WI.QuickConsole.prototype._activeExecutionContextChanged):
2576         Toggle the non-default class name on the path.
2577
2578 2018-01-16  Nikita Vasilyev  <nvasilyev@apple.com>
2579
2580         Web Inspector: Styles: pressing down key should select first item from completion list when focusing on empty value
2581         https://bugs.webkit.org/show_bug.cgi?id=181633
2582         <rdar://problem/36501797>
2583
2584         Reviewed by Joseph Pecoraro.
2585
2586         * UserInterface/Views/SpreadsheetTextField.js:
2587         (WI.SpreadsheetTextField.prototype._updateCompletions):
2588
2589 2018-01-16  Nikita Vasilyev  <nvasilyev@apple.com>
2590
2591         Web Inspector: Styles Redesign: Long value causes bad wrapping
2592         https://bugs.webkit.org/show_bug.cgi?id=181618
2593         <rdar://problem/36485175>
2594
2595         Reviewed by Joseph Pecoraro.
2596
2597         Wrap long values only when editing.
2598
2599         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
2600         (.spreadsheet-style-declaration-editor .value.editing):
2601
2602 2018-01-16  Nikita Vasilyev  <nvasilyev@apple.com>
2603
2604         Web Inspector: Styles Redesign: clicking on the white space after the property sometimes places a blank property at the wrong index
2605         https://bugs.webkit.org/show_bug.cgi?id=179585
2606         <rdar://problem/35490780>
2607
2608         Reviewed by Joseph Pecoraro.
2609
2610         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
2611         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyRemoved):
2612         Layout call is needed to update data-property-index attributes on the property views.
2613
2614 2018-01-16  Joseph Pecoraro  <pecoraro@apple.com>
2615
2616         Web Inspector: Network Tab - Export HAR Context Menu not working
2617         https://bugs.webkit.org/show_bug.cgi?id=181694
2618         <rdar://problem/36479197>
2619
2620         Reviewed by Brian Burg.
2621
2622         * UserInterface/Views/NetworkTableContentView.js:
2623         (WI.NetworkTableContentView.prototype.tableCellContextMenuClicked):
2624         Ensure `this` works in the handler.
2625
2626 2018-01-15  Matt Baker  <mattbaker@apple.com>
2627
2628         Web Inspector: TabBar redesign: add context menu to TabBar for toggling available tabs
2629         https://bugs.webkit.org/show_bug.cgi?id=181448
2630         <rdar://problem/36383298>
2631
2632         Reviewed by Devin Rousso.
2633
2634         * UserInterface/Base/Main.js:
2635         (WI.loaded):
2636         (WI.contentLoaded):
2637         Reorder production tab classes and default (open) tabs.
2638         (WI.registerTabClass): Removed.
2639         Not used.
2640
2641         * UserInterface/Base/Object.js:
2642         Remove notification that is no longer used.
2643
2644         * UserInterface/Views/GeneralTabBarItem.js:
2645         (WI.GeneralTabBarItem):
2646         (WI.GeneralTabBarItem.prototype.set title):
2647         (WI.GeneralTabBarItem.prototype._handleContextMenuEvent): Deleted.
2648         Remove per-tab context menu (provided Close Tab and Close Other Tabs).
2649
2650         * UserInterface/Views/NewTabContentView.js:
2651         (WI.NewTabContentView):
2652
2653         * UserInterface/Views/TabBar.js:
2654         (WI.TabBar):
2655         (WI.TabBar.prototype._handleContextMenu):
2656
2657         * UserInterface/Views/TabBrowser.js:
2658         (WI.TabBrowser):
2659         (WI.TabBrowser._handleNewTabContextMenu): Deleted.
2660         No longer needed.
2661
2662 2018-01-13  Nikita Vasilyev  <nvasilyev@apple.com>
2663
2664         Web Inspector: Styles Redesign: properties should never be semitransparent or crossed out while editing
2665         https://bugs.webkit.org/show_bug.cgi?id=180793
2666         <rdar://problem/36038813>
2667
2668         Reviewed by Devin Rousso.
2669
2670         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
2671         (.spreadsheet-style-declaration-editor .value.editing):
2672         (.spreadsheet-style-declaration-editor .property:matches(.invalid-name, .other-vendor, .overridden):not(.disabled) .content > *):
2673         (.spreadsheet-style-declaration-editor .property.invalid-name:not(.disabled) .content > *):
2674         (.spreadsheet-style-declaration-editor .property.invalid-value:not(.disabled) .content .value):
2675         (.spreadsheet-style-declaration-editor .property.not-inherited .content > *):
2676         * UserInterface/Views/SpreadsheetStyleProperty.js:
2677         (WI.SpreadsheetStyleProperty.prototype._update):
2678
2679 2018-01-12  Joseph Pecoraro  <pecoraro@apple.com>
2680
2681         Web Inspector: Drop support for iOS 7 targets
2682         https://bugs.webkit.org/show_bug.cgi?id=181549
2683         <rdar://problem/36444813>
2684
2685         Reviewed by Brian Burg.
2686
2687         * Versions/Inspector-iOS-7.0.json: Removed.
2688         * UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js: Removed.
2689         Remove protocol snapshot and generated commands for iOS 7.
2690
2691         * UserInterface/Base/Main.js:
2692         * UserInterface/Controllers/BreakpointPopoverController.js:
2693         (WI.BreakpointPopoverController.prototype._createPopoverContent):
2694         * UserInterface/Controllers/DebuggerManager.js:
2695         (WI.DebuggerManager.prototype._setBreakpoint):
2696         * UserInterface/Controllers/SourceMapManager.js:
2697         (WI.SourceMapManager.prototype._loadAndParseSourceMap):
2698         * UserInterface/Models/Instrument.js:
2699         (WI.Instrument.startLegacyTimelineAgent):
2700         * UserInterface/Models/ResourceTimingData.js:
2701         * UserInterface/Models/ScriptTimelineRecord.js:
2702         (WI.ScriptTimelineRecord.EventType.displayName):
2703         * UserInterface/Models/SourceMapResource.js:
2704         (WI.SourceMapResource.prototype.requestContentFromBackend):
2705         * UserInterface/Protocol/CSSObserver.js:
2706         (WI.CSSObserver.prototype.regionLayoutUpdated): Deleted.
2707         * UserInterface/Protocol/RemoteObject.js:
2708         (WI.RemoteObject.fromPayload):
2709         Remove code that was only necessary to support iOS 7.
2710
2711 2018-01-12  Joseph Pecoraro  <pecoraro@apple.com>
2712
2713         Web Inspector: Support JSX (React) syntax highlighting
2714         https://bugs.webkit.org/show_bug.cgi?id=181607
2715         <rdar://problem/36442564>
2716
2717         Reviewed by Brian Burg.
2718
2719         * UserInterface/Base/MIMETypeUtilities.js:
2720         (WI.mimeTypeForFileExtension):
2721         (WI.fileExtensionForMIMEType):
2722         * UserInterface/Models/Resource.js:
2723         Support the jsx extension and mime types.
2724
2725         * UserInterface/Main.html:
2726         * Scripts/update-codemirror-resources.rb:
2727         * UserInterface/External/CodeMirror/jsx.js: Added.
2728         Include new mode from CodeMirror@d8926768.
2729
2730 2018-01-11  Joseph Pecoraro  <pecoraro@apple.com>
2731
2732         Web Inspector: Rename "Query String" section as "Query String Parameters" for clarity
2733         https://bugs.webkit.org/show_bug.cgi?id=181464
2734
2735         Reviewed by Darin Adler.
2736
2737         * Localizations/en.lproj/localizedStrings.js:
2738         * UserInterface/Views/ResourceHeadersContentView.js:
2739         (WI.ResourceHeadersContentView.prototype.initialLayout):
2740
2741 2018-01-11  Joseph Pecoraro  <pecoraro@apple.com>
2742
2743         Web Inspector: Remove unused variable in WI.DebuggerSidebarPanel
2744         https://bugs.webkit.org/show_bug.cgi?id=181517
2745
2746         Reviewed by Matt Baker.
2747
2748         * UserInterface/Views/DebuggerSidebarPanel.js:
2749
2750 2018-01-10  Joseph Pecoraro  <pecoraro@apple.com>
2751
2752         REGRESSION(r218975): Web Inspector: Add back NavigationSidebarPanel initialization parameter used by SearchSidebarPanel (top overflow shadow)
2753         https://bugs.webkit.org/show_bug.cgi?id=181518
2754         <rdar://problem/36427197>
2755
2756         Reviewed by Matt Baker.
2757
2758         * UserInterface/Views/NavigationSidebarPanel.css:
2759         (.sidebar > .panel.navigation > .overflow-shadow.top):
2760         * UserInterface/Views/NavigationSidebarPanel.js:
2761         (WI.NavigationSidebarPanel):
2762         Add back the initialization parameter still used by SearchSidebarPanel
2763         and add back its implementation. There were still references to
2764         dynamically update _topOverflowShadowElement in NavigationSidebarPanel.
2765
2766 2018-01-10  Joseph Pecoraro  <pecoraro@apple.com>
2767
2768         Web Inspector: Incorrect check with WI.debuggableType
2769         https://bugs.webkit.org/show_bug.cgi?id=181515
2770         <rdar://problem/36425509>
2771
2772         Reviewed by Brian Burg.
2773
2774         * UserInterface/Base/Main.js:
2775         (WI.contentLoaded):
2776         This moved to WI.sharedApp a while ago.
2777
2778 2018-01-10  Matt Baker  <mattbaker@apple.com>
2779
2780         Web Inspector: Canvas tab: throttle recording slider updates
2781         https://bugs.webkit.org/show_bug.cgi?id=180839
2782         <rdar://problem/36057849>
2783
2784         Reviewed by Joseph Pecoraro
2785
2786         * UserInterface/Base/Utilities.js:
2787         Add Object.throttle and Function.cancelThrottle. Repeated calls to a
2788         function on a throttled object are delayed, so that the function isn't
2789         invoked more frequently than the specified delay value.
2790
2791         For a description of throttling behavior see:
2792           - http://www.chrislondon.co/throttling-vs-debouncing
2793           - http://benalman.com/projects/jquery-throttle-debounce-plugin
2794
2795         * UserInterface/Views/RecordingContentView.js:
2796         (WI.RecordingContentView.prototype.updateActionIndex):
2797         Throttle frequency of canvas snapshot creation to 200ms.
2798         (WI.RecordingContentView.prototype.hidden):
2799         Prevent trailing edge call after hiding the view.
2800
2801 2018-01-10  Joseph Pecoraro  <pecoraro@apple.com>
2802
2803         Web Inspector: Should not try to autocomplete subsections of a string
2804         https://bugs.webkit.org/show_bug.cgi?id=181461
2805         <rdar://problem/36369421>
2806
2807         Reviewed by Brian Burg.
2808
2809         * UserInterface/Controllers/CodeMirrorCompletionController.js:
2810         (WI.CodeMirrorCompletionController.prototype._completeAtCurrentPosition):
2811         Disable autocompletion within strings.
2812
2813 2018-01-09  Joseph Pecoraro  <pecoraro@apple.com>
2814
2815         REGRESSION(r201855): Web Inspector: Should see "length" autocompletion suggestion on a string literal
2816         https://bugs.webkit.org/show_bug.cgi?id=181462
2817         <rdar://problem/36390699>
2818
2819         Reviewed by Matt Baker.
2820
2821         * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
2822         (WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.inspectedPage_evalResult_getCompletions):
2823         This is code that runs on the inspected target, which may have an old version of
2824         WebKit/JavaScriptCore, so don't use new syntax like this.
2825
2826         (WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded):
2827         We intended to return the result by as a JSON value instead of a RemoteObject.
2828
2829 2018-01-09  Ross Kirsling  <ross.kirsling@sony.com>
2830
2831         Web Inspector: Layers sidebar shows popover on selection even when collapsed
2832         https://bugs.webkit.org/show_bug.cgi?id=181465
2833
2834         Reviewed by Matt Baker.
2835
2836         * UserInterface/Views/LayerDetailsSidebarPanel.js:
2837         (WI.LayerDetailsSidebarPanel.prototype.selectNodeByLayerId):
2838         Have sidebar show itself if necessary before displaying popover.
2839
2840 2018-01-08  Joseph Pecoraro  <pecoraro@apple.com>
2841
2842         Web Inspector: Find next / previous within a resource content view does not have bouncy highlight when editor scrolls
2843         https://bugs.webkit.org/show_bug.cgi?id=181279
2844         <rdar://problem/36291097>
2845
2846         Reviewed by Brian Burg.
2847
2848         * UserInterface/Views/TextEditor.js:
2849         (WI.TextEditor.prototype._revealSearchResult):
2850         Reposition the bouncy highlight on scroll based on the CodeMirror
2851         line/ch position of the search result.
2852
2853         (WI.TextEditor.prototype._removeBouncyHighlightElementIfNeeded):
2854         Track the bouncy highlight scroll handler in a member variable so that
2855         we always remember to remove it and don't leak scroll handlers.
2856
2857 2018-01-07  David Kilzer  <ddkilzer@apple.com>
2858
2859         Enable -Wcast-qual for WebInspectorUI, WebKitLegacy, WebKit projects
2860         <https://webkit.org/b/181256>
2861         <rdar://problem/36281730>
2862
2863         Reviewed by Darin Adler.
2864
2865         * Configurations/Base.xcconfig:
2866         (WARNING_CFLAGS): Add -Wcast-qual.
2867
2868 2018-01-05  Joseph Pecoraro  <pecoraro@apple.com>
2869
2870         Web Inspector: Add another Protocol Version
2871         https://bugs.webkit.org/show_bug.cgi?id=181354
2872         <rdar://problem/35432817>
2873
2874         Reviewed by Matt Baker.
2875
2876         * UserInterface/Protocol/Legacy/11.3/InspectorBackendCommands.js: Added.
2877         * Versions/Inspector-iOS-11.3.json: Added.
2878
2879 2018-01-04  Devin Rousso  <webkit@devinrousso.com>
2880
2881         Web Inspector: replace HTMLCanvasElement with CanvasRenderingContext for instrumentation logic
2882         https://bugs.webkit.org/show_bug.cgi?id=180770
2883
2884         Reviewed by Joseph Pecoraro.
2885
2886         * UserInterface/Models/Canvas.js:
2887         (WI.Canvas.fromPayload):
2888         (WI.Canvas.prototype.get contextType):
2889         (WI.Canvas.prototype.saveIdentityToCookie):
2890         (WI.Canvas.prototype.get frame): Deleted.
2891
2892 2018-01-04  Joseph Pecoraro  <pecoraro@apple.com>
2893
2894         REGRESSION (r225709): Web Inspector: CSS Source maps not loading
2895         https://bugs.webkit.org/show_bug.cgi?id=181314
2896         <rdar://problem/36177620>
2897
2898         Reviewed by Brian Burg.
2899
2900         * UserInterface/Controllers/SourceMapManager.js:
2901         (WI.SourceMapManager.prototype._loadAndParseSourceMap):
2902         * UserInterface/Models/SourceMapResource.js:
2903         (WI.SourceMapResource.prototype.requestContentFromBackend):
2904         Correct this so that we only fall back to a reasonable frame id
2905         if we couldn't determine a frame id from earlier. Previously this
2906         was incorrectly clearing the frame id if we had gotten it earlier.
2907
2908         * UserInterface/Test.html:
2909         * UserInterface/Test/Test.js:
2910         (WI.loaded):
2911         Add SourceMap related files for tests.
2912
2913 2018-01-04  Brian Burg  <bburg@apple.com>
2914
2915         Web Inspector: Capture Element Screenshot looks fuzzy
2916         https://bugs.webkit.org/show_bug.cgi?id=175734
2917         <rdar://problem/33803377>
2918
2919         Reviewed by Joseph Pecoraro and Simon Fraser.
2920
2921         Spruce up these functions a bit. They now optionally return a promise
2922         if no callback is supplied. They now can take either a WI.DOMNode or a node id.
2923
2924         * UserInterface/Controllers/DOMTreeManager.js:
2925         (WI.DOMTreeManager.prototype.querySelector):
2926         (WI.DOMTreeManager.prototype.querySelectorAll):
2927
2928 2018-01-04  Brian Burg  <bburg@apple.com>
2929
2930         Web Inspector: add RemoteObject.fetchProperties and some basic tests for RemoteObject API
2931         https://bugs.webkit.org/show_bug.cgi?id=180945
2932
2933         Reviewed by Joseph Pecoraro.
2934
2935         Add a new method, fetchProperties, which async fetches an arbitrary list of properties
2936         from a RemoteObject. This is intended for writing tests and other quick evaluations,
2937         so it has some behaviors that are suitable in these situations:
2938         - If the evaluation throws an exception, the result will reject with that exception.
2939         - If there is a protocol error for some reason, the result will reject with an exception.
2940         - Non-string and non-number keys cause an exception, as this is probably not intended.
2941         - Does not accept a callback, returns a promise only. New code should use async.
2942
2943         For full fidelity introspection of property descriptors, clients should use the existing
2944         getOwnPropertyDescriptor[s] class of methods.
2945
2946         * UserInterface/Protocol/RemoteObject.js:
2947         (WI.RemoteObject.prototype.async.fetchProperties): Added.
2948         - Validate specified keys and remove duplicates.
2949         - Request properties one-by-one to avoid fetching all descriptors and dealing with previews.
2950         - Unwrap returned primitive values to avoid unnecessary munging in tests.
2951
2952         (WI.RemoteObject.prototype.getProperty):
2953         - Rework this to return a promise if no callback was supplied.
2954         - Introduce stricter property type checking to avoid unintended mistakes.
2955
2956         (WI.RemoteObject.prototype.callFunction):
2957         - Rework this to return a promise if no callback was supplied.
2958         - Turn thrown exceptions and protocol errors into rejected promises.
2959
2960 2018-01-04  Joseph Pecoraro  <pecoraro@apple.com>
2961
2962         Web Inspector: ⌘G / ⇧⌘G text search does not working after closing find banner
2963         https://bugs.webkit.org/show_bug.cgi?id=181280
2964         <rdar://problem/36291175>
2965
2966         Reviewed by Matt Baker.
2967
2968         * UserInterface/Views/ContentBrowser.js:
2969         (WI.ContentBrowser.prototype._findBannerDidHide):
2970         When the find banner is hidden trigger a new ContentView method,
2971         searchHidden instead of the destructive searchCleared. This allows
2972         most content views (text editors, DOM tree, Network Headers view)
2973         to keep their populated search results.
2974
2975         * UserInterface/Views/ContentView.js:
2976         (WI.ContentView.prototype.searchHidden):
2977         * UserInterface/Views/LogContentView.js:
2978         (WI.LogContentView.prototype.searchHidden):
2979         By default searchHidden does nothing. The Console's LogContentView
2980         treats the find banner differently and clears its search results.
2981
2982         * UserInterface/Views/TextEditor.js:
2983         (WI.TextEditor.prototype.searchCleared):
2984         Modernize some code while working in this area.
2985
2986         * UserInterface/Views/Main.css:
2987         (.bouncy-highlight):
2988         Ensure black text on yellow background in the bouncy highlight. In the
2989         DOM Tree it could have been white if the find banner was closed.
2990
2991 2018-01-03  Ting-Wei Lan  <lantw44@gmail.com>
2992
2993         Replace hard-coded paths in shebangs with #!/usr/bin/env
2994         https://bugs.webkit.org/show_bug.cgi?id=181040
2995
2996         Reviewed by Alex Christensen.
2997
2998         * Scripts/combine-resources.pl:
2999         * Scripts/copy-user-interface-resources-dryrun.rb:
3000         * Scripts/copy-user-interface-resources.pl:
3001         * Scripts/fix-worker-imports-for-optimized-builds.pl:
3002         * Scripts/remove-console-asserts-dryrun.rb:
3003         * Scripts/remove-console-asserts.pl:
3004         * Scripts/update-LegacyInspectorBackendCommands.rb:
3005         * Scripts/update-codemirror-resources.rb:
3006         * WebInspectorUI.vcxproj/build-webinspectorui.pl:
3007
3008 2018-01-03  Joseph Pecoraro  <pecoraro@apple.com>
3009
3010         Web Inspector: "Log Value" context menu is sometimes unavailable
3011         https://bugs.webkit.org/show_bug.cgi?id=181278
3012         <rdar://problem/36281649>
3013
3014         Reviewed by Devin Rousso.
3015
3016         * UserInterface/Views/ObjectPreviewView.css:
3017         (.object-preview > .title):
3018         * UserInterface/Views/ObjectTreeView.css:
3019         (.object-tree.expanded > .title):
3020         Make the expanded object title information 16px tall to match ObjectTree
3021         tree element row heights. This eliminates the floating console message
3022         location from overlapping the first ObjectTree's TreeElement and causing
3023         truncation and other behavior issues (like Context Menu identification).
3024
3025 2018-01-03  Joseph Pecoraro  <pecoraro@apple.com>
3026
3027         Web Inspector: RTL - DOM Tree Element selection doesn't work
3028         https://bugs.webkit.org/show_bug.cgi?id=181275
3029         <rdar://problem/36290450>
3030
3031         Reviewed by Devin Rousso.
3032
3033         * UserInterface/Views/TreeOutline.js:
3034         (WI.TreeOutline.prototype.treeElementFromEvent):
3035         Provide a better explanation for why we are making the `x` adjustment here,
3036         to detect the inner most tree element along the horizontal. Fix the algorithm
3037         for RTL, since the intent is to adjust to the trailing edge of the container
3038         which is on the opposite side in RTL.
3039
3040 2018-01-03  Joseph Pecoraro  <pecoraro@apple.com>
3041
3042         Web Inspector: Find banner sometimes does not work (when already populated and shown for first time on resource)
3043         https://bugs.webkit.org/show_bug.cgi?id=181255
3044         <rdar://problem/36248855>
3045
3046         Reviewed by Matt Baker.
3047
3048         * UserInterface/Views/TextEditor.js:
3049         (WI.TextEditor.prototype.set string):
3050         Defer any early searches until the initial content of a TextEditor has been set.
3051         Such searches can happen when the FindBanner already has content when a
3052         ContentView is first opened and needs to load its content from the backend.
3053         Further, even though the content may be loaded from the backend before the
3054         search results, microtask hops might cause the content to get to the TextEditor
3055         after the search results.
3056
3057 2018-01-03  Joseph Pecoraro  <pecoraro@apple.com>
3058
3059         REGRESSION: Web Inspector: Debugger tab doesn't restore selected resource on reload
3060         https://bugs.webkit.org/show_bug.cgi?id=181253
3061         <rdar://problem/36280564>
3062
3063         Reviewed by Matt Baker.
3064
3065         * UserInterface/Views/DebuggerSidebarPanel.js:
3066         (WI.DebuggerSidebarPanel.prototype.restoreStateFromCookie):
3067         Add braces to ensure the trailing else is actually trailing the outer
3068         chain as it was intended to be.
3069
3070 2018-01-02  Joseph Pecoraro  <pecoraro@apple.com>
3071
3072         Web Inspector: Clicking source location link in Console unexpectedly jumps to Network tab
3073         https://bugs.webkit.org/show_bug.cgi?id=181229
3074         <rdar://problem/36075219>
3075
3076         Reviewed by Matt Baker.
3077
3078         * UserInterface/Base/Main.js:
3079         Cleanup linkifyURLAsNode. Ignore Search tab in generic handlePossibleLinkClick
3080         when not already in the Search tab.
3081
3082         * UserInterface/Views/CallFrameView.js:
3083         (WI.CallFrameView):
3084         Ignore Search and Network tab in CallFrame links.
3085
3086         * UserInterface/Views/TabBrowser.js:
3087         (WI.TabBrowser.prototype.bestTabContentViewForRepresentedObject):
3088         Improve style.
3089
3090 == Rolled over to ChangeLog-2018-01-01 ==